text: var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
      else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
      return c > 3 && r && Object.defineProperty(target, key, r), r;
  };
  var __metadata = (this && this.__metadata) || function (k, v) {
      if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
  };
  var __param = (this && this.__param) || function (paramIndex, decorator) {
      return function (target, key) { decorator(target, key, paramIndex); }
  };
  import { Injectable, Inject, Optional, NgZone, PLATFORM_ID, InjectionToken } from '@angular/core';
  import { from } from 'rxjs';
  import { map } from 'rxjs/operators';
  import { FirebaseOptionsToken, FirebaseNameOrConfigToken, _firebaseAppFactory, FirebaseZoneScheduler } from '@angular/fire';
  export var FunctionsRegionToken = new InjectionToken('angularfire2.functions.region');
  export var FUNCTIONS_ORIGIN = new InjectionToken('angularfire2.functions.origin');
  export var FUNCTIONS_REGION = FunctionsRegionToken;
  var AngularFireFunctions = (function () {
      function AngularFireFunctions(options, nameOrConfig, platformId, zone, region, origin) {
          this.scheduler = new FirebaseZoneScheduler(zone, platformId);
          this.functions = zone.runOutsideAngular(function () {
              var app = _firebaseAppFactory(options, nameOrConfig);
              return app.functions(region || undefined);
          });
          if (origin) {
              this.functions.useFunctionsEmulator(origin);
          }
      }
      AngularFireFunctions.prototype.httpsCallable = function (name) {
          var _this = this;
          var callable = this.functions.httpsCallable(name);
          return function (data) {
              var callable$ = from(callable(data));
              return _this.scheduler.runOutsideAngular(callable$.pipe(map(function (r) { return r.data; })));
          };
      };
      AngularFireFunctions = __decorate([
          Injectable(),
          __param(0, Inject(FirebaseOptionsToken)),
          __param(1, Optional()), __param(1, Inject(FirebaseNameOrConfigToken)),
          __param(2, Inject(PLATFORM_ID)),
          __param(4, Optional()), __param(4, Inject(FUNCTIONS_REGION)),
          __param(5, Optional()), __param(5, Inject(FUNCTIONS_ORIGIN)),
          __metadata("design:paramtypes", [Object, Object, Object,
              NgZone, Object, Object])
      ], AngularFireFunctions);
      return AngularFireFunctions;
  }());
  export { AngularFireFunctions };
  //# sourceMappingURL=functions.js.map