@firebase/storage 0.9.14-canary.ab3f16cba → 0.9.14-canary.c20633ed3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -81,7 +81,7 @@ var StorageError = /** @class */ (function (_super) {
81
81
  */
82
82
  function StorageError(code, message, status_) {
83
83
  if (status_ === void 0) { status_ = 0; }
84
- var _this = _super.call(this, prependCode(code), "Firebase Storage: " + message + " (" + prependCode(code) + ")") || this;
84
+ var _this = _super.call(this, prependCode(code), "Firebase Storage: ".concat(message, " (").concat(prependCode(code), ")")) || this;
85
85
  _this.status_ = status_;
86
86
  /**
87
87
  * Stores custom error data unque to StorageError.
@@ -119,7 +119,7 @@ var StorageError = /** @class */ (function (_super) {
119
119
  set: function (serverResponse) {
120
120
  this.customData.serverResponse = serverResponse;
121
121
  if (this.customData.serverResponse) {
122
- this.message = this._baseMessage + "\n" + this.customData.serverResponse;
122
+ this.message = "".concat(this._baseMessage, "\n").concat(this.customData.serverResponse);
123
123
  }
124
124
  else {
125
125
  this.message = this._baseMessage;
@@ -136,13 +136,13 @@ function prependCode(code) {
136
136
  function unknown() {
137
137
  var message = 'An unknown error occurred, please check the error payload for ' +
138
138
  'server response.';
139
- return new StorageError("unknown" /* UNKNOWN */, message);
139
+ return new StorageError("unknown" /* StorageErrorCode.UNKNOWN */, message);
140
140
  }
141
141
  function objectNotFound(path) {
142
- return new StorageError("object-not-found" /* OBJECT_NOT_FOUND */, "Object '" + path + "' does not exist.");
142
+ return new StorageError("object-not-found" /* StorageErrorCode.OBJECT_NOT_FOUND */, "Object '" + path + "' does not exist.");
143
143
  }
144
144
  function quotaExceeded(bucket) {
145
- return new StorageError("quota-exceeded" /* QUOTA_EXCEEDED */, "Quota for bucket '" +
145
+ return new StorageError("quota-exceeded" /* StorageErrorCode.QUOTA_EXCEEDED */, "Quota for bucket '" +
146
146
  bucket +
147
147
  "' exceeded, please view quota on " +
148
148
  'https://firebase.google.com/pricing/.');
@@ -150,52 +150,52 @@ function quotaExceeded(bucket) {
150
150
  function unauthenticated() {
151
151
  var message = 'User is not authenticated, please authenticate using Firebase ' +
152
152
  'Authentication and try again.';
153
- return new StorageError("unauthenticated" /* UNAUTHENTICATED */, message);
153
+ return new StorageError("unauthenticated" /* StorageErrorCode.UNAUTHENTICATED */, message);
154
154
  }
155
155
  function unauthorizedApp() {
156
- return new StorageError("unauthorized-app" /* UNAUTHORIZED_APP */, 'This app does not have permission to access Firebase Storage on this project.');
156
+ return new StorageError("unauthorized-app" /* StorageErrorCode.UNAUTHORIZED_APP */, 'This app does not have permission to access Firebase Storage on this project.');
157
157
  }
158
158
  function unauthorized(path) {
159
- return new StorageError("unauthorized" /* UNAUTHORIZED */, "User does not have permission to access '" + path + "'.");
159
+ return new StorageError("unauthorized" /* StorageErrorCode.UNAUTHORIZED */, "User does not have permission to access '" + path + "'.");
160
160
  }
161
161
  function retryLimitExceeded() {
162
- return new StorageError("retry-limit-exceeded" /* RETRY_LIMIT_EXCEEDED */, 'Max retry time for operation exceeded, please try again.');
162
+ return new StorageError("retry-limit-exceeded" /* StorageErrorCode.RETRY_LIMIT_EXCEEDED */, 'Max retry time for operation exceeded, please try again.');
163
163
  }
164
164
  function canceled() {
165
- return new StorageError("canceled" /* CANCELED */, 'User canceled the upload/download.');
165
+ return new StorageError("canceled" /* StorageErrorCode.CANCELED */, 'User canceled the upload/download.');
166
166
  }
167
167
  function invalidUrl(url) {
168
- return new StorageError("invalid-url" /* INVALID_URL */, "Invalid URL '" + url + "'.");
168
+ return new StorageError("invalid-url" /* StorageErrorCode.INVALID_URL */, "Invalid URL '" + url + "'.");
169
169
  }
170
170
  function invalidDefaultBucket(bucket) {
171
- return new StorageError("invalid-default-bucket" /* INVALID_DEFAULT_BUCKET */, "Invalid default bucket '" + bucket + "'.");
171
+ return new StorageError("invalid-default-bucket" /* StorageErrorCode.INVALID_DEFAULT_BUCKET */, "Invalid default bucket '" + bucket + "'.");
172
172
  }
173
173
  function noDefaultBucket() {
174
- return new StorageError("no-default-bucket" /* NO_DEFAULT_BUCKET */, 'No default bucket ' +
174
+ return new StorageError("no-default-bucket" /* StorageErrorCode.NO_DEFAULT_BUCKET */, 'No default bucket ' +
175
175
  "found. Did you set the '" +
176
176
  CONFIG_STORAGE_BUCKET_KEY +
177
177
  "' property when initializing the app?");
178
178
  }
179
179
  function cannotSliceBlob() {
180
- return new StorageError("cannot-slice-blob" /* CANNOT_SLICE_BLOB */, 'Cannot slice blob for upload. Please retry the upload.');
180
+ return new StorageError("cannot-slice-blob" /* StorageErrorCode.CANNOT_SLICE_BLOB */, 'Cannot slice blob for upload. Please retry the upload.');
181
181
  }
182
182
  function serverFileWrongSize() {
183
- return new StorageError("server-file-wrong-size" /* SERVER_FILE_WRONG_SIZE */, 'Server recorded incorrect upload file size, please retry the upload.');
183
+ return new StorageError("server-file-wrong-size" /* StorageErrorCode.SERVER_FILE_WRONG_SIZE */, 'Server recorded incorrect upload file size, please retry the upload.');
184
184
  }
185
185
  function noDownloadURL() {
186
- return new StorageError("no-download-url" /* NO_DOWNLOAD_URL */, 'The given file does not have any download URLs.');
186
+ return new StorageError("no-download-url" /* StorageErrorCode.NO_DOWNLOAD_URL */, 'The given file does not have any download URLs.');
187
187
  }
188
188
  function missingPolyFill(polyFill) {
189
- return new StorageError("unsupported-environment" /* UNSUPPORTED_ENVIRONMENT */, polyFill + " is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information.");
189
+ return new StorageError("unsupported-environment" /* StorageErrorCode.UNSUPPORTED_ENVIRONMENT */, "".concat(polyFill, " is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information."));
190
190
  }
191
191
  /**
192
192
  * @internal
193
193
  */
194
194
  function invalidArgument(message) {
195
- return new StorageError("invalid-argument" /* INVALID_ARGUMENT */, message);
195
+ return new StorageError("invalid-argument" /* StorageErrorCode.INVALID_ARGUMENT */, message);
196
196
  }
197
197
  function appDeleted() {
198
- return new StorageError("app-deleted" /* APP_DELETED */, 'The Firebase app was deleted.');
198
+ return new StorageError("app-deleted" /* StorageErrorCode.APP_DELETED */, 'The Firebase app was deleted.');
199
199
  }
200
200
  /**
201
201
  * @param name - The name of the operation that was invalid.
@@ -203,7 +203,7 @@ function appDeleted() {
203
203
  * @internal
204
204
  */
205
205
  function invalidRootOperation(name) {
206
- return new StorageError("invalid-root-operation" /* INVALID_ROOT_OPERATION */, "The operation '" +
206
+ return new StorageError("invalid-root-operation" /* StorageErrorCode.INVALID_ROOT_OPERATION */, "The operation '" +
207
207
  name +
208
208
  "' cannot be performed on a root reference, create a non-root " +
209
209
  "reference using child, such as .child('file.png').");
@@ -213,13 +213,13 @@ function invalidRootOperation(name) {
213
213
  * @param message - A message describing the format violation.
214
214
  */
215
215
  function invalidFormat(format, message) {
216
- return new StorageError("invalid-format" /* INVALID_FORMAT */, "String does not match format '" + format + "': " + message);
216
+ return new StorageError("invalid-format" /* StorageErrorCode.INVALID_FORMAT */, "String does not match format '" + format + "': " + message);
217
217
  }
218
218
  /**
219
219
  * @param message - A message describing the internal error.
220
220
  */
221
221
  function internalError(message) {
222
- throw new StorageError("internal-error" /* INTERNAL_ERROR */, 'Internal error: ' + message);
222
+ throw new StorageError("internal-error" /* StorageErrorCode.INTERNAL_ERROR */, 'Internal error: ' + message);
223
223
  }
224
224
 
225
225
  /**
@@ -304,13 +304,13 @@ var Location = /** @class */ (function () {
304
304
  var version = 'v[A-Za-z0-9_]+';
305
305
  var firebaseStorageHost = host.replace(/[.]/g, '\\.');
306
306
  var firebaseStoragePath = '(/([^?#]*).*)?$';
307
- var firebaseStorageRegExp = new RegExp("^https?://" + firebaseStorageHost + "/" + version + "/b/" + bucketDomain + "/o" + firebaseStoragePath, 'i');
307
+ var firebaseStorageRegExp = new RegExp("^https?://".concat(firebaseStorageHost, "/").concat(version, "/b/").concat(bucketDomain, "/o").concat(firebaseStoragePath), 'i');
308
308
  var firebaseStorageIndices = { bucket: 1, path: 3 };
309
309
  var cloudStorageHost = host === DEFAULT_HOST
310
310
  ? '(?:storage.googleapis.com|storage.cloud.google.com)'
311
311
  : host;
312
312
  var cloudStoragePath = '([^?#]*)';
313
- var cloudStorageRegExp = new RegExp("^https?://" + cloudStorageHost + "/" + bucketDomain + "/" + cloudStoragePath, 'i');
313
+ var cloudStorageRegExp = new RegExp("^https?://".concat(cloudStorageHost, "/").concat(bucketDomain, "/").concat(cloudStoragePath), 'i');
314
314
  var cloudStorageIndices = { bucket: 1, path: 2 };
315
315
  var groups = [
316
316
  { regex: gsRegex, indices: gsIndices, postModify: gsModify },
@@ -442,13 +442,13 @@ backoffCompleteCb, timeout) {
442
442
  }
443
443
  if (success) {
444
444
  clearGlobalTimeout();
445
- triggerCallback.call.apply(triggerCallback, tslib.__spreadArray([null, success], args));
445
+ triggerCallback.call.apply(triggerCallback, tslib.__spreadArray([null, success], args, false));
446
446
  return;
447
447
  }
448
448
  var mustStop = canceled() || hitTimeout;
449
449
  if (mustStop) {
450
450
  clearGlobalTimeout();
451
- triggerCallback.call.apply(triggerCallback, tslib.__spreadArray([null, success], args));
451
+ triggerCallback.call.apply(triggerCallback, tslib.__spreadArray([null, success], args, false));
452
452
  return;
453
453
  }
454
454
  if (waitSeconds < 64) {
@@ -545,10 +545,10 @@ function isNativeBlobDefined() {
545
545
  }
546
546
  function validateNumber(argument, minValue, maxValue, value) {
547
547
  if (value < minValue) {
548
- throw invalidArgument("Invalid value for '" + argument + "'. Expected " + minValue + " or greater.");
548
+ throw invalidArgument("Invalid value for '".concat(argument, "'. Expected ").concat(minValue, " or greater."));
549
549
  }
550
550
  if (value > maxValue) {
551
- throw invalidArgument("Invalid value for '" + argument + "'. Expected " + maxValue + " or less.");
551
+ throw invalidArgument("Invalid value for '".concat(argument, "'. Expected ").concat(maxValue, " or less."));
552
552
  }
553
553
  }
554
554
 
@@ -571,9 +571,9 @@ function validateNumber(argument, minValue, maxValue, value) {
571
571
  function makeUrl(urlPart, host, protocol) {
572
572
  var origin = host;
573
573
  if (protocol == null) {
574
- origin = "https://" + host;
574
+ origin = "https://".concat(host);
575
575
  }
576
- return protocol + "://" + origin + "/v0" + urlPart;
576
+ return "".concat(protocol, "://").concat(origin, "/v0").concat(urlPart);
577
577
  }
578
578
  function makeQueryString(params) {
579
579
  var encode = encodeURIComponent;
@@ -678,8 +678,8 @@ function isRetryStatusCode(status, additionalRetryCodes) {
678
678
  */
679
679
  var NetworkRequest = /** @class */ (function () {
680
680
  function NetworkRequest(url_, method_, headers_, body_, successCodes_, additionalRetryCodes_, callback_, errorCallback_, timeout_, progressCallback_, connectionFactory_, retry) {
681
- var _this = this;
682
681
  if (retry === void 0) { retry = true; }
682
+ var _this = this;
683
683
  this.url_ = url_;
684
684
  this.method_ = method_;
685
685
  this.headers_ = headers_;
@@ -909,7 +909,7 @@ function getBlob$1() {
909
909
  return new Blob(args);
910
910
  }
911
911
  else {
912
- throw new StorageError("unsupported-environment" /* UNSUPPORTED_ENVIRONMENT */, "This browser doesn't seem to support creating Blobs");
912
+ throw new StorageError("unsupported-environment" /* StorageErrorCode.UNSUPPORTED_ENVIRONMENT */, "This browser doesn't seem to support creating Blobs");
913
913
  }
914
914
  }
915
915
  }
@@ -1754,7 +1754,7 @@ function getBytes$1(service, location, maxDownloadSizeBytes) {
1754
1754
  var requestInfo = new RequestInfo(url, method, function (_, data) { return data; }, timeout);
1755
1755
  requestInfo.errorHandler = objectErrorHandler(location);
1756
1756
  if (maxDownloadSizeBytes !== undefined) {
1757
- requestInfo.headers['Range'] = "bytes=0-" + maxDownloadSizeBytes;
1757
+ requestInfo.headers['Range'] = "bytes=0-".concat(maxDownloadSizeBytes);
1758
1758
  requestInfo.successCodes = [200 /* OK */, 206 /* Partial Content */];
1759
1759
  }
1760
1760
  return requestInfo;
@@ -1889,7 +1889,7 @@ function createResumableUpload(service, location, mappings, blob, metadata) {
1889
1889
  var headers = {
1890
1890
  'X-Goog-Upload-Protocol': 'resumable',
1891
1891
  'X-Goog-Upload-Command': 'start',
1892
- 'X-Goog-Upload-Header-Content-Length': "" + blob.size(),
1892
+ 'X-Goog-Upload-Header-Content-Length': "".concat(blob.size()),
1893
1893
  'X-Goog-Upload-Header-Content-Type': metadataForUpload['contentType'],
1894
1894
  'Content-Type': 'application/json; charset=utf-8'
1895
1895
  };
@@ -1991,7 +1991,7 @@ function continueResumableUpload(location, service, url, blob, chunkSize, mappin
1991
1991
  }
1992
1992
  var headers = {
1993
1993
  'X-Goog-Upload-Command': uploadCommand,
1994
- 'X-Goog-Upload-Offset': "" + status_.current
1994
+ 'X-Goog-Upload-Offset': "".concat(status_.current)
1995
1995
  };
1996
1996
  var body = blob.slice(startByte, endByte);
1997
1997
  if (body === null) {
@@ -2078,17 +2078,17 @@ var TaskState = {
2078
2078
  };
2079
2079
  function taskStateFromInternalTaskState(state) {
2080
2080
  switch (state) {
2081
- case "running" /* RUNNING */:
2082
- case "pausing" /* PAUSING */:
2083
- case "canceling" /* CANCELING */:
2081
+ case "running" /* InternalTaskState.RUNNING */:
2082
+ case "pausing" /* InternalTaskState.PAUSING */:
2083
+ case "canceling" /* InternalTaskState.CANCELING */:
2084
2084
  return TaskState.RUNNING;
2085
- case "paused" /* PAUSED */:
2085
+ case "paused" /* InternalTaskState.PAUSED */:
2086
2086
  return TaskState.PAUSED;
2087
- case "success" /* SUCCESS */:
2087
+ case "success" /* InternalTaskState.SUCCESS */:
2088
2088
  return TaskState.SUCCESS;
2089
- case "canceled" /* CANCELED */:
2089
+ case "canceled" /* InternalTaskState.CANCELED */:
2090
2090
  return TaskState.CANCELED;
2091
- case "error" /* ERROR */:
2091
+ case "error" /* InternalTaskState.ERROR */:
2092
2092
  return TaskState.ERROR;
2093
2093
  default:
2094
2094
  // TODO(andysoto): assert(false);
@@ -2343,8 +2343,8 @@ var UploadTask = /** @class */ (function () {
2343
2343
  * @param blob - The blob to upload.
2344
2344
  */
2345
2345
  function UploadTask(ref, blob, metadata) {
2346
- var _this = this;
2347
2346
  if (metadata === void 0) { metadata = null; }
2347
+ var _this = this;
2348
2348
  /**
2349
2349
  * Number of bytes transferred so far.
2350
2350
  */
@@ -2363,11 +2363,11 @@ var UploadTask = /** @class */ (function () {
2363
2363
  this._metadata = metadata;
2364
2364
  this._mappings = getMappings();
2365
2365
  this._resumable = this._shouldDoResumable(this._blob);
2366
- this._state = "running" /* RUNNING */;
2366
+ this._state = "running" /* InternalTaskState.RUNNING */;
2367
2367
  this._errorHandler = function (error) {
2368
2368
  _this._request = undefined;
2369
2369
  _this._chunkMultiplier = 1;
2370
- if (error._codeEquals("canceled" /* CANCELED */)) {
2370
+ if (error._codeEquals("canceled" /* StorageErrorCode.CANCELED */)) {
2371
2371
  _this._needToFetchStatus = true;
2372
2372
  _this.completeTransitions_();
2373
2373
  }
@@ -2385,17 +2385,17 @@ var UploadTask = /** @class */ (function () {
2385
2385
  }
2386
2386
  }
2387
2387
  _this._error = error;
2388
- _this._transition("error" /* ERROR */);
2388
+ _this._transition("error" /* InternalTaskState.ERROR */);
2389
2389
  }
2390
2390
  };
2391
2391
  this._metadataErrorHandler = function (error) {
2392
2392
  _this._request = undefined;
2393
- if (error._codeEquals("canceled" /* CANCELED */)) {
2393
+ if (error._codeEquals("canceled" /* StorageErrorCode.CANCELED */)) {
2394
2394
  _this.completeTransitions_();
2395
2395
  }
2396
2396
  else {
2397
2397
  _this._error = error;
2398
- _this._transition("error" /* ERROR */);
2398
+ _this._transition("error" /* InternalTaskState.ERROR */);
2399
2399
  }
2400
2400
  };
2401
2401
  this.sleepTime = 0;
@@ -2422,7 +2422,7 @@ var UploadTask = /** @class */ (function () {
2422
2422
  };
2423
2423
  UploadTask.prototype._start = function () {
2424
2424
  var _this = this;
2425
- if (this._state !== "running" /* RUNNING */) {
2425
+ if (this._state !== "running" /* InternalTaskState.RUNNING */) {
2426
2426
  // This can happen if someone pauses us in a resume callback, for example.
2427
2427
  return;
2428
2428
  }
@@ -2464,14 +2464,14 @@ var UploadTask = /** @class */ (function () {
2464
2464
  ]).then(function (_a) {
2465
2465
  var authToken = _a[0], appCheckToken = _a[1];
2466
2466
  switch (_this._state) {
2467
- case "running" /* RUNNING */:
2467
+ case "running" /* InternalTaskState.RUNNING */:
2468
2468
  callback(authToken, appCheckToken);
2469
2469
  break;
2470
- case "canceling" /* CANCELING */:
2471
- _this._transition("canceled" /* CANCELED */);
2470
+ case "canceling" /* InternalTaskState.CANCELING */:
2471
+ _this._transition("canceled" /* InternalTaskState.CANCELED */);
2472
2472
  break;
2473
- case "pausing" /* PAUSING */:
2474
- _this._transition("paused" /* PAUSED */);
2473
+ case "pausing" /* InternalTaskState.PAUSING */:
2474
+ _this._transition("paused" /* InternalTaskState.PAUSED */);
2475
2475
  break;
2476
2476
  }
2477
2477
  });
@@ -2524,7 +2524,7 @@ var UploadTask = /** @class */ (function () {
2524
2524
  }
2525
2525
  catch (e) {
2526
2526
  _this._error = e;
2527
- _this._transition("error" /* ERROR */);
2527
+ _this._transition("error" /* InternalTaskState.ERROR */);
2528
2528
  return;
2529
2529
  }
2530
2530
  var uploadRequest = _this._ref.storage._makeRequest(requestInfo, newTextConnection, authToken, appCheckToken,
@@ -2537,7 +2537,7 @@ var UploadTask = /** @class */ (function () {
2537
2537
  _this._updateProgress(newStatus.current);
2538
2538
  if (newStatus.finalized) {
2539
2539
  _this._metadata = newStatus.metadata;
2540
- _this._transition("success" /* SUCCESS */);
2540
+ _this._transition("success" /* InternalTaskState.SUCCESS */);
2541
2541
  }
2542
2542
  else {
2543
2543
  _this.completeTransitions_();
@@ -2561,7 +2561,7 @@ var UploadTask = /** @class */ (function () {
2561
2561
  metadataRequest.getPromise().then(function (metadata) {
2562
2562
  _this._request = undefined;
2563
2563
  _this._metadata = metadata;
2564
- _this._transition("success" /* SUCCESS */);
2564
+ _this._transition("success" /* InternalTaskState.SUCCESS */);
2565
2565
  }, _this._metadataErrorHandler);
2566
2566
  });
2567
2567
  };
@@ -2575,7 +2575,7 @@ var UploadTask = /** @class */ (function () {
2575
2575
  _this._request = undefined;
2576
2576
  _this._metadata = metadata;
2577
2577
  _this._updateProgress(_this._blob.size());
2578
- _this._transition("success" /* SUCCESS */);
2578
+ _this._transition("success" /* InternalTaskState.SUCCESS */);
2579
2579
  }, _this._errorHandler);
2580
2580
  });
2581
2581
  };
@@ -2594,8 +2594,8 @@ var UploadTask = /** @class */ (function () {
2594
2594
  return;
2595
2595
  }
2596
2596
  switch (state) {
2597
- case "canceling" /* CANCELING */:
2598
- case "pausing" /* PAUSING */:
2597
+ case "canceling" /* InternalTaskState.CANCELING */:
2598
+ case "pausing" /* InternalTaskState.PAUSING */:
2599
2599
  // TODO(andysoto):
2600
2600
  // assert(this.state_ === InternalTaskState.RUNNING ||
2601
2601
  // this.state_ === InternalTaskState.PAUSING);
@@ -2609,24 +2609,24 @@ var UploadTask = /** @class */ (function () {
2609
2609
  this.completeTransitions_();
2610
2610
  }
2611
2611
  break;
2612
- case "running" /* RUNNING */:
2612
+ case "running" /* InternalTaskState.RUNNING */:
2613
2613
  // TODO(andysoto):
2614
2614
  // assert(this.state_ === InternalTaskState.PAUSED ||
2615
2615
  // this.state_ === InternalTaskState.PAUSING);
2616
- var wasPaused = this._state === "paused" /* PAUSED */;
2616
+ var wasPaused = this._state === "paused" /* InternalTaskState.PAUSED */;
2617
2617
  this._state = state;
2618
2618
  if (wasPaused) {
2619
2619
  this._notifyObservers();
2620
2620
  this._start();
2621
2621
  }
2622
2622
  break;
2623
- case "paused" /* PAUSED */:
2623
+ case "paused" /* InternalTaskState.PAUSED */:
2624
2624
  // TODO(andysoto):
2625
2625
  // assert(this.state_ === InternalTaskState.PAUSING);
2626
2626
  this._state = state;
2627
2627
  this._notifyObservers();
2628
2628
  break;
2629
- case "canceled" /* CANCELED */:
2629
+ case "canceled" /* InternalTaskState.CANCELED */:
2630
2630
  // TODO(andysoto):
2631
2631
  // assert(this.state_ === InternalTaskState.PAUSED ||
2632
2632
  // this.state_ === InternalTaskState.CANCELING);
@@ -2634,7 +2634,7 @@ var UploadTask = /** @class */ (function () {
2634
2634
  this._state = state;
2635
2635
  this._notifyObservers();
2636
2636
  break;
2637
- case "error" /* ERROR */:
2637
+ case "error" /* InternalTaskState.ERROR */:
2638
2638
  // TODO(andysoto):
2639
2639
  // assert(this.state_ === InternalTaskState.RUNNING ||
2640
2640
  // this.state_ === InternalTaskState.PAUSING ||
@@ -2642,7 +2642,7 @@ var UploadTask = /** @class */ (function () {
2642
2642
  this._state = state;
2643
2643
  this._notifyObservers();
2644
2644
  break;
2645
- case "success" /* SUCCESS */:
2645
+ case "success" /* InternalTaskState.SUCCESS */:
2646
2646
  // TODO(andysoto):
2647
2647
  // assert(this.state_ === InternalTaskState.RUNNING ||
2648
2648
  // this.state_ === InternalTaskState.PAUSING ||
@@ -2654,13 +2654,13 @@ var UploadTask = /** @class */ (function () {
2654
2654
  };
2655
2655
  UploadTask.prototype.completeTransitions_ = function () {
2656
2656
  switch (this._state) {
2657
- case "pausing" /* PAUSING */:
2658
- this._transition("paused" /* PAUSED */);
2657
+ case "pausing" /* InternalTaskState.PAUSING */:
2658
+ this._transition("paused" /* InternalTaskState.PAUSED */);
2659
2659
  break;
2660
- case "canceling" /* CANCELING */:
2661
- this._transition("canceled" /* CANCELED */);
2660
+ case "canceling" /* InternalTaskState.CANCELING */:
2661
+ this._transition("canceled" /* InternalTaskState.CANCELED */);
2662
2662
  break;
2663
- case "running" /* RUNNING */:
2663
+ case "running" /* InternalTaskState.RUNNING */:
2664
2664
  this._start();
2665
2665
  break;
2666
2666
  }
@@ -2804,10 +2804,10 @@ var UploadTask = /** @class */ (function () {
2804
2804
  * @returns True if the operation took effect, false if ignored.
2805
2805
  */
2806
2806
  UploadTask.prototype.resume = function () {
2807
- var valid = this._state === "paused" /* PAUSED */ ||
2808
- this._state === "pausing" /* PAUSING */;
2807
+ var valid = this._state === "paused" /* InternalTaskState.PAUSED */ ||
2808
+ this._state === "pausing" /* InternalTaskState.PAUSING */;
2809
2809
  if (valid) {
2810
- this._transition("running" /* RUNNING */);
2810
+ this._transition("running" /* InternalTaskState.RUNNING */);
2811
2811
  }
2812
2812
  return valid;
2813
2813
  };
@@ -2816,9 +2816,9 @@ var UploadTask = /** @class */ (function () {
2816
2816
  * @returns True if the operation took effect, false if ignored.
2817
2817
  */
2818
2818
  UploadTask.prototype.pause = function () {
2819
- var valid = this._state === "running" /* RUNNING */;
2819
+ var valid = this._state === "running" /* InternalTaskState.RUNNING */;
2820
2820
  if (valid) {
2821
- this._transition("pausing" /* PAUSING */);
2821
+ this._transition("pausing" /* InternalTaskState.PAUSING */);
2822
2822
  }
2823
2823
  return valid;
2824
2824
  };
@@ -2828,10 +2828,10 @@ var UploadTask = /** @class */ (function () {
2828
2828
  * @returns True if the operation took effect, false if ignored.
2829
2829
  */
2830
2830
  UploadTask.prototype.cancel = function () {
2831
- var valid = this._state === "running" /* RUNNING */ ||
2832
- this._state === "pausing" /* PAUSING */;
2831
+ var valid = this._state === "running" /* InternalTaskState.RUNNING */ ||
2832
+ this._state === "pausing" /* InternalTaskState.PAUSING */;
2833
2833
  if (valid) {
2834
- this._transition("canceling" /* CANCELING */);
2834
+ this._transition("canceling" /* InternalTaskState.CANCELING */);
2835
2835
  }
2836
2836
  return valid;
2837
2837
  };
@@ -3292,7 +3292,7 @@ function extractBucket(host, config) {
3292
3292
  }
3293
3293
  function connectStorageEmulator$1(storage, host, port, options) {
3294
3294
  if (options === void 0) { options = {}; }
3295
- storage.host = host + ":" + port;
3295
+ storage.host = "".concat(host, ":").concat(port);
3296
3296
  storage._protocol = 'http';
3297
3297
  var mockUserToken = options.mockUserToken;
3298
3298
  if (mockUserToken) {
@@ -3500,7 +3500,7 @@ var FirebaseStorageImpl = /** @class */ (function () {
3500
3500
  }());
3501
3501
 
3502
3502
  var name = "@firebase/storage";
3503
- var version = "0.9.14-canary.ab3f16cba";
3503
+ var version = "0.9.14-canary.c20633ed3";
3504
3504
 
3505
3505
  /**
3506
3506
  * @license
@@ -3702,7 +3702,7 @@ function getStorage(app$1, bucketUrl) {
3702
3702
  });
3703
3703
  var emulator = util.getDefaultEmulatorHostnameAndPort('storage');
3704
3704
  if (emulator) {
3705
- connectStorageEmulator.apply(void 0, tslib.__spreadArray([storageInstance], emulator));
3705
+ connectStorageEmulator.apply(void 0, tslib.__spreadArray([storageInstance], emulator, false));
3706
3706
  }
3707
3707
  return storageInstance;
3708
3708
  }
@@ -3786,7 +3786,7 @@ function factory(container, _a) {
3786
3786
  return new FirebaseStorageImpl(app$1, authProvider, appCheckProvider, url, app.SDK_VERSION);
3787
3787
  }
3788
3788
  function registerStorage() {
3789
- app._registerComponent(new component.Component(STORAGE_TYPE, factory, "PUBLIC" /* PUBLIC */).setMultipleInstances(true));
3789
+ app._registerComponent(new component.Component(STORAGE_TYPE, factory, "PUBLIC" /* ComponentType.PUBLIC */).setMultipleInstances(true));
3790
3790
  //RUNTIME_ENV will be replaced during the compilation to "node" for nodejs and an empty string for browser
3791
3791
  app.registerVersion(name, version, '');
3792
3792
  // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation