@elastic/ems-client 7.16.0 → 7.17.2

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.
@@ -1,565 +1,432 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
2
-
3
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
4
-
5
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6
-
7
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
8
-
9
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
10
-
11
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
12
-
13
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
14
-
15
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
16
-
17
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
18
-
19
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
20
-
21
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
22
-
23
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
24
-
25
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
26
-
27
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
28
-
29
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
30
-
31
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
32
-
33
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
34
-
35
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
36
-
37
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
38
-
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
3
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
4
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
5
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
6
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
8
+ function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
9
+ function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
10
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
11
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
12
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
14
+ function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
15
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
16
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
17
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
18
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
19
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
20
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
21
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
22
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
39
23
  /*
40
24
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
41
25
  * or more contributor license agreements. Licensed under the Elastic License
42
26
  * 2.0; you may not use this file except in compliance with the Elastic License
43
27
  * 2.0.
44
28
  */
29
+
45
30
  import _ from 'lodash';
46
31
  import { AbstractEmsService } from './ems_service';
47
32
  export var TMSService = /*#__PURE__*/function (_AbstractEmsService) {
48
- _inherits(TMSService, _AbstractEmsService);
49
-
50
- var _super = _createSuper(TMSService);
51
-
52
33
  function TMSService(config, emsClient, proxyPath) {
53
34
  var _this;
54
-
55
35
  _classCallCheck(this, TMSService);
56
-
57
- _this = _super.call(this, config, emsClient, proxyPath);
58
-
59
- _defineProperty(_assertThisInitialized(_this), "_config", void 0);
60
-
61
- _defineProperty(_assertThisInitialized(_this), "_getRasterStyleJson", _.once( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
36
+ _this = _callSuper(this, TMSService, [config, emsClient, proxyPath]);
37
+ _defineProperty(_this, "_config", void 0);
38
+ _defineProperty(_this, "_getRasterStyleJson", _.once( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
62
39
  var rasterUrl, url;
63
- return regeneratorRuntime.wrap(function _callee$(_context) {
64
- while (1) {
65
- switch (_context.prev = _context.next) {
66
- case 0:
67
- rasterUrl = _this._getStyleUrlForLocale('raster');
68
-
69
- if (!rasterUrl) {
70
- _context.next = 6;
71
- break;
72
- }
73
-
74
- url = _this._proxyPath + _this._getAbsoluteUrl(rasterUrl);
75
- return _context.abrupt("return", _this._emsClient.getManifest(_this._emsClient.extendUrlWithParams(url)));
76
-
77
- case 6:
78
- return _context.abrupt("return");
79
-
80
- case 7:
81
- case "end":
82
- return _context.stop();
83
- }
40
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
41
+ while (1) switch (_context.prev = _context.next) {
42
+ case 0:
43
+ rasterUrl = _this._getStyleUrlForLocale('raster');
44
+ if (!rasterUrl) {
45
+ _context.next = 6;
46
+ break;
47
+ }
48
+ url = _this._proxyPath + _this._getAbsoluteUrl(rasterUrl);
49
+ return _context.abrupt("return", _this._emsClient.getManifest(_this._emsClient.extendUrlWithParams(url)));
50
+ case 6:
51
+ return _context.abrupt("return");
52
+ case 7:
53
+ case "end":
54
+ return _context.stop();
84
55
  }
85
56
  }, _callee);
86
57
  }))));
87
-
88
- _defineProperty(_assertThisInitialized(_this), "_getVectorStyleJsonRaw", _.once( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
58
+ _defineProperty(_this, "_getVectorStyleJsonRaw", _.once( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
89
59
  var vectorUrl, url, vectorJson;
90
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
91
- while (1) {
92
- switch (_context2.prev = _context2.next) {
93
- case 0:
94
- vectorUrl = _this._getStyleUrlForLocale('vector');
95
-
96
- if (!vectorUrl) {
97
- _context2.next = 9;
98
- break;
99
- }
100
-
101
- url = _this._proxyPath + _this._getAbsoluteUrl(vectorUrl);
102
- _context2.next = 5;
103
- return _this._emsClient.getManifest(_this._emsClient.extendUrlWithParams(url));
104
-
105
- case 5:
106
- vectorJson = _context2.sent;
107
- return _context2.abrupt("return", _objectSpread({}, vectorJson));
108
-
109
- case 9:
110
- return _context2.abrupt("return");
111
-
112
- case 10:
113
- case "end":
114
- return _context2.stop();
115
- }
60
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
61
+ while (1) switch (_context2.prev = _context2.next) {
62
+ case 0:
63
+ vectorUrl = _this._getStyleUrlForLocale('vector');
64
+ if (!vectorUrl) {
65
+ _context2.next = 9;
66
+ break;
67
+ }
68
+ url = _this._proxyPath + _this._getAbsoluteUrl(vectorUrl);
69
+ _context2.next = 5;
70
+ return _this._emsClient.getManifest(_this._emsClient.extendUrlWithParams(url));
71
+ case 5:
72
+ vectorJson = _context2.sent;
73
+ return _context2.abrupt("return", _objectSpread({}, vectorJson));
74
+ case 9:
75
+ return _context2.abrupt("return");
76
+ case 10:
77
+ case "end":
78
+ return _context2.stop();
116
79
  }
117
80
  }, _callee2);
118
81
  }))));
119
-
120
- _defineProperty(_assertThisInitialized(_this), "_getVectorStyleJsonInlined", _.once( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
82
+ _defineProperty(_this, "_getVectorStyleJsonInlined", _.once( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
121
83
  var vectorJson, inlinedSources, sources, _iterator, _step, _sourceName, url, sourceUrl, extendedUrl, sourceJson, extendedTileUrls;
122
-
123
- return regeneratorRuntime.wrap(function _callee3$(_context3) {
124
- while (1) {
125
- switch (_context3.prev = _context3.next) {
126
- case 0:
127
- _context3.next = 2;
128
- return _this._getVectorStyleJsonRaw();
129
-
130
- case 2:
131
- vectorJson = _context3.sent;
132
-
133
- if (!vectorJson) {
134
- _context3.next = 43;
135
- break;
136
- }
137
-
138
- inlinedSources = {};
139
- sources = vectorJson.sources;
140
- _iterator = _createForOfIteratorHelper(Object.getOwnPropertyNames(sources));
141
- _context3.prev = 7;
142
-
143
- _iterator.s();
144
-
145
- case 9:
146
- if ((_step = _iterator.n()).done) {
147
- _context3.next = 21;
148
- break;
149
- }
150
-
151
- _sourceName = _step.value;
152
- url = sources[_sourceName].url;
153
- sourceUrl = _this._proxyPath + _this._getAbsoluteUrl(url);
154
- extendedUrl = _this._emsClient.extendUrlWithParams(sourceUrl);
155
- _context3.next = 16;
156
- return _this._emsClient.getManifest(extendedUrl);
157
-
158
- case 16:
159
- sourceJson = _context3.sent;
160
- extendedTileUrls = sourceJson.tiles.map(function (tileUrl) {
161
- var url = _this._proxyPath + _this._getAbsoluteUrl(tileUrl);
162
-
163
- return _this._emsClient.extendUrlWithParams(url);
164
- });
165
- inlinedSources[_sourceName] = _objectSpread(_objectSpread({}, sourceJson), {}, {
166
- type: 'vector',
167
- tiles: extendedTileUrls
168
- });
169
-
170
- case 19:
171
- _context3.next = 9;
84
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
85
+ while (1) switch (_context3.prev = _context3.next) {
86
+ case 0:
87
+ _context3.next = 2;
88
+ return _this._getVectorStyleJsonRaw();
89
+ case 2:
90
+ vectorJson = _context3.sent;
91
+ if (!vectorJson) {
92
+ _context3.next = 43;
172
93
  break;
173
-
174
- case 21:
175
- _context3.next = 26;
94
+ }
95
+ inlinedSources = {};
96
+ sources = vectorJson.sources;
97
+ _iterator = _createForOfIteratorHelper(Object.getOwnPropertyNames(sources));
98
+ _context3.prev = 7;
99
+ _iterator.s();
100
+ case 9:
101
+ if ((_step = _iterator.n()).done) {
102
+ _context3.next = 21;
176
103
  break;
177
-
178
- case 23:
179
- _context3.prev = 23;
180
- _context3.t0 = _context3["catch"](7);
181
-
182
- _iterator.e(_context3.t0);
183
-
184
- case 26:
185
- _context3.prev = 26;
186
-
187
- _iterator.f();
188
-
189
- return _context3.finish(26);
190
-
191
- case 29:
192
- _context3.t1 = _objectSpread;
193
- _context3.t2 = _objectSpread({}, vectorJson);
194
- _context3.t3 = {};
195
- _context3.t4 = inlinedSources;
196
- _context3.next = 35;
197
- return _this._getSpriteSheetRootPath();
198
-
199
- case 35:
200
- _context3.t5 = _context3.sent;
201
- _context3.next = 38;
202
- return _this._getUrlTemplateForGlyphs();
203
-
204
- case 38:
205
- _context3.t6 = _context3.sent;
206
- _context3.t7 = {
207
- sources: _context3.t4,
208
- sprite: _context3.t5,
209
- glyphs: _context3.t6
210
- };
211
- return _context3.abrupt("return", (0, _context3.t1)(_context3.t2, _context3.t3, _context3.t7));
212
-
213
- case 43:
214
- return _context3.abrupt("return");
215
-
216
- case 44:
217
- case "end":
218
- return _context3.stop();
219
- }
104
+ }
105
+ _sourceName = _step.value;
106
+ url = sources[_sourceName].url;
107
+ sourceUrl = _this._proxyPath + _this._getAbsoluteUrl(url);
108
+ extendedUrl = _this._emsClient.extendUrlWithParams(sourceUrl);
109
+ _context3.next = 16;
110
+ return _this._emsClient.getManifest(extendedUrl);
111
+ case 16:
112
+ sourceJson = _context3.sent;
113
+ extendedTileUrls = sourceJson.tiles.map(function (tileUrl) {
114
+ var url = _this._proxyPath + _this._getAbsoluteUrl(tileUrl);
115
+ return _this._emsClient.extendUrlWithParams(url);
116
+ });
117
+ inlinedSources[_sourceName] = _objectSpread(_objectSpread({}, sourceJson), {}, {
118
+ type: 'vector',
119
+ tiles: extendedTileUrls
120
+ });
121
+ case 19:
122
+ _context3.next = 9;
123
+ break;
124
+ case 21:
125
+ _context3.next = 26;
126
+ break;
127
+ case 23:
128
+ _context3.prev = 23;
129
+ _context3.t0 = _context3["catch"](7);
130
+ _iterator.e(_context3.t0);
131
+ case 26:
132
+ _context3.prev = 26;
133
+ _iterator.f();
134
+ return _context3.finish(26);
135
+ case 29:
136
+ _context3.t1 = _objectSpread;
137
+ _context3.t2 = _objectSpread({}, vectorJson);
138
+ _context3.t3 = {};
139
+ _context3.t4 = inlinedSources;
140
+ _context3.next = 35;
141
+ return _this._getSpriteSheetRootPath();
142
+ case 35:
143
+ _context3.t5 = _context3.sent;
144
+ _context3.next = 38;
145
+ return _this._getUrlTemplateForGlyphs();
146
+ case 38:
147
+ _context3.t6 = _context3.sent;
148
+ _context3.t7 = {
149
+ sources: _context3.t4,
150
+ sprite: _context3.t5,
151
+ glyphs: _context3.t6
152
+ };
153
+ return _context3.abrupt("return", (0, _context3.t1)(_context3.t2, _context3.t3, _context3.t7));
154
+ case 43:
155
+ return _context3.abrupt("return");
156
+ case 44:
157
+ case "end":
158
+ return _context3.stop();
220
159
  }
221
160
  }, _callee3, null, [[7, 23, 26, 29]]);
222
161
  }))));
223
-
224
162
  _this._config = config;
225
163
  return _this;
226
164
  }
227
-
228
- _createClass(TMSService, [{
165
+ _inherits(TMSService, _AbstractEmsService);
166
+ return _createClass(TMSService, [{
229
167
  key: "getDefaultRasterStyle",
230
168
  value: function () {
231
- var _getDefaultRasterStyle = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
169
+ var _getDefaultRasterStyle = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
232
170
  var _this2 = this;
233
-
234
171
  var tileJson, tiles;
235
- return regeneratorRuntime.wrap(function _callee4$(_context4) {
236
- while (1) {
237
- switch (_context4.prev = _context4.next) {
238
- case 0:
239
- _context4.next = 2;
240
- return this._getRasterStyleJson();
241
-
242
- case 2:
243
- tileJson = _context4.sent;
244
-
245
- if (!tileJson) {
246
- _context4.next = 8;
247
- break;
248
- }
249
-
250
- tiles = tileJson.tiles.map(function (tile) {
251
- return _this2._proxyPath + _this2._getAbsoluteUrl(tile);
252
- });
253
- return _context4.abrupt("return", _objectSpread(_objectSpread({}, tileJson), {
254
- tiles: tiles
255
- }));
256
-
257
- case 8:
258
- return _context4.abrupt("return");
259
-
260
- case 9:
261
- case "end":
262
- return _context4.stop();
263
- }
172
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
173
+ while (1) switch (_context4.prev = _context4.next) {
174
+ case 0:
175
+ _context4.next = 2;
176
+ return this._getRasterStyleJson();
177
+ case 2:
178
+ tileJson = _context4.sent;
179
+ if (!tileJson) {
180
+ _context4.next = 8;
181
+ break;
182
+ }
183
+ tiles = tileJson.tiles.map(function (tile) {
184
+ return _this2._proxyPath + _this2._getAbsoluteUrl(tile);
185
+ });
186
+ return _context4.abrupt("return", _objectSpread(_objectSpread({}, tileJson), {
187
+ tiles: tiles
188
+ }));
189
+ case 8:
190
+ return _context4.abrupt("return");
191
+ case 9:
192
+ case "end":
193
+ return _context4.stop();
264
194
  }
265
195
  }, _callee4, this);
266
196
  }));
267
-
268
197
  function getDefaultRasterStyle() {
269
198
  return _getDefaultRasterStyle.apply(this, arguments);
270
199
  }
271
-
272
200
  return getDefaultRasterStyle;
273
201
  }()
274
202
  }, {
275
203
  key: "getUrlTemplate",
276
204
  value: function () {
277
- var _getUrlTemplate = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
205
+ var _getUrlTemplate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
278
206
  var tileJson, directUrl;
279
- return regeneratorRuntime.wrap(function _callee5$(_context5) {
280
- while (1) {
281
- switch (_context5.prev = _context5.next) {
282
- case 0:
283
- _context5.next = 2;
284
- return this._getRasterStyleJson();
285
-
286
- case 2:
287
- tileJson = _context5.sent;
288
-
289
- if (!tileJson) {
290
- _context5.next = 8;
291
- break;
292
- }
293
-
294
- directUrl = this._proxyPath + this._getAbsoluteUrl(tileJson.tiles[0]);
295
- return _context5.abrupt("return", this._emsClient.extendUrlWithParams(directUrl));
296
-
297
- case 8:
298
- return _context5.abrupt("return", '');
299
-
300
- case 9:
301
- case "end":
302
- return _context5.stop();
303
- }
207
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
208
+ while (1) switch (_context5.prev = _context5.next) {
209
+ case 0:
210
+ _context5.next = 2;
211
+ return this._getRasterStyleJson();
212
+ case 2:
213
+ tileJson = _context5.sent;
214
+ if (!tileJson) {
215
+ _context5.next = 8;
216
+ break;
217
+ }
218
+ directUrl = this._proxyPath + this._getAbsoluteUrl(tileJson.tiles[0]);
219
+ return _context5.abrupt("return", this._emsClient.extendUrlWithParams(directUrl));
220
+ case 8:
221
+ return _context5.abrupt("return", '');
222
+ case 9:
223
+ case "end":
224
+ return _context5.stop();
304
225
  }
305
226
  }, _callee5, this);
306
227
  }));
307
-
308
228
  function getUrlTemplate() {
309
229
  return _getUrlTemplate.apply(this, arguments);
310
230
  }
311
-
312
231
  return getUrlTemplate;
313
232
  }()
314
233
  }, {
315
234
  key: "getUrlTemplateForVector",
316
235
  value: function () {
317
- var _getUrlTemplateForVector = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(sourceId) {
236
+ var _getUrlTemplateForVector = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(sourceId) {
318
237
  var tileJson, directUrl;
319
- return regeneratorRuntime.wrap(function _callee6$(_context6) {
320
- while (1) {
321
- switch (_context6.prev = _context6.next) {
322
- case 0:
323
- _context6.next = 2;
324
- return this._getVectorStyleJsonInlined();
325
-
326
- case 2:
327
- tileJson = _context6.sent;
328
-
329
- if (tileJson) {
330
- _context6.next = 5;
331
- break;
332
- }
333
-
334
- return _context6.abrupt("return", '');
335
-
336
- case 5:
337
- if (!(tileJson.sources[sourceId] && tileJson.sources[sourceId].tiles)) {
338
- _context6.next = 10;
339
- break;
340
- }
341
-
342
- directUrl = this._proxyPath + this._getAbsoluteUrl(tileJson.sources[sourceId].tiles[0]);
343
- return _context6.abrupt("return", this._emsClient.extendUrlWithParams(directUrl));
344
-
345
- case 10:
346
- return _context6.abrupt("return", '');
347
-
348
- case 11:
349
- case "end":
350
- return _context6.stop();
351
- }
238
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
239
+ while (1) switch (_context6.prev = _context6.next) {
240
+ case 0:
241
+ _context6.next = 2;
242
+ return this._getVectorStyleJsonInlined();
243
+ case 2:
244
+ tileJson = _context6.sent;
245
+ if (tileJson) {
246
+ _context6.next = 5;
247
+ break;
248
+ }
249
+ return _context6.abrupt("return", '');
250
+ case 5:
251
+ if (!(tileJson.sources[sourceId] && tileJson.sources[sourceId].tiles)) {
252
+ _context6.next = 10;
253
+ break;
254
+ }
255
+ directUrl = this._proxyPath + this._getAbsoluteUrl(tileJson.sources[sourceId].tiles[0]);
256
+ return _context6.abrupt("return", this._emsClient.extendUrlWithParams(directUrl));
257
+ case 10:
258
+ return _context6.abrupt("return", '');
259
+ case 11:
260
+ case "end":
261
+ return _context6.stop();
352
262
  }
353
263
  }, _callee6, this);
354
264
  }));
355
-
356
265
  function getUrlTemplateForVector(_x) {
357
266
  return _getUrlTemplateForVector.apply(this, arguments);
358
267
  }
359
-
360
268
  return getUrlTemplateForVector;
361
269
  }()
362
270
  }, {
363
271
  key: "getVectorStyleSheet",
364
272
  value: function () {
365
- var _getVectorStyleSheet = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7() {
366
- return regeneratorRuntime.wrap(function _callee7$(_context7) {
367
- while (1) {
368
- switch (_context7.prev = _context7.next) {
369
- case 0:
370
- _context7.next = 2;
371
- return this._getVectorStyleJsonInlined();
372
-
373
- case 2:
374
- return _context7.abrupt("return", _context7.sent);
375
-
376
- case 3:
377
- case "end":
378
- return _context7.stop();
379
- }
273
+ var _getVectorStyleSheet = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
274
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
275
+ while (1) switch (_context7.prev = _context7.next) {
276
+ case 0:
277
+ _context7.next = 2;
278
+ return this._getVectorStyleJsonInlined();
279
+ case 2:
280
+ return _context7.abrupt("return", _context7.sent);
281
+ case 3:
282
+ case "end":
283
+ return _context7.stop();
380
284
  }
381
285
  }, _callee7, this);
382
286
  }));
383
-
384
287
  function getVectorStyleSheet() {
385
288
  return _getVectorStyleSheet.apply(this, arguments);
386
289
  }
387
-
388
290
  return getVectorStyleSheet;
389
291
  }()
390
292
  }, {
391
293
  key: "getVectorStyleSheetRaw",
392
294
  value: function () {
393
- var _getVectorStyleSheetRaw = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
394
- return regeneratorRuntime.wrap(function _callee8$(_context8) {
395
- while (1) {
396
- switch (_context8.prev = _context8.next) {
397
- case 0:
398
- _context8.next = 2;
399
- return this._getVectorStyleJsonRaw();
400
-
401
- case 2:
402
- return _context8.abrupt("return", _context8.sent);
403
-
404
- case 3:
405
- case "end":
406
- return _context8.stop();
407
- }
295
+ var _getVectorStyleSheetRaw = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
296
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
297
+ while (1) switch (_context8.prev = _context8.next) {
298
+ case 0:
299
+ _context8.next = 2;
300
+ return this._getVectorStyleJsonRaw();
301
+ case 2:
302
+ return _context8.abrupt("return", _context8.sent);
303
+ case 3:
304
+ case "end":
305
+ return _context8.stop();
408
306
  }
409
307
  }, _callee8, this);
410
308
  }));
411
-
412
309
  function getVectorStyleSheetRaw() {
413
310
  return _getVectorStyleSheetRaw.apply(this, arguments);
414
311
  }
415
-
416
312
  return getVectorStyleSheetRaw;
417
313
  }()
418
314
  }, {
419
315
  key: "getSpriteSheetMeta",
420
316
  value: function () {
421
- var _getSpriteSheetMeta = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
317
+ var _getSpriteSheetMeta = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
422
318
  var isRetina,
423
- metaUrl,
424
- spritePngs,
425
- metaUrlExtended,
426
- jsonMeta,
427
- _args9 = arguments;
428
- return regeneratorRuntime.wrap(function _callee9$(_context9) {
429
- while (1) {
430
- switch (_context9.prev = _context9.next) {
431
- case 0:
432
- isRetina = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : false;
433
- _context9.next = 3;
434
- return this.getSpriteSheetJsonPath(isRetina);
435
-
436
- case 3:
437
- metaUrl = _context9.sent;
438
- _context9.next = 6;
439
- return this.getSpriteSheetPngPath(isRetina);
440
-
441
- case 6:
442
- spritePngs = _context9.sent;
443
-
444
- if (!(metaUrl && spritePngs)) {
445
- _context9.next = 15;
446
- break;
447
- }
448
-
449
- metaUrlExtended = this._emsClient.extendUrlWithParams(metaUrl);
450
- _context9.next = 11;
451
- return this._emsClient.getManifest(metaUrlExtended);
452
-
453
- case 11:
454
- jsonMeta = _context9.sent;
455
- return _context9.abrupt("return", {
456
- png: spritePngs,
457
- json: jsonMeta
458
- });
459
-
460
- case 15:
461
- return _context9.abrupt("return");
462
-
463
- case 16:
464
- case "end":
465
- return _context9.stop();
466
- }
319
+ metaUrl,
320
+ spritePngs,
321
+ metaUrlExtended,
322
+ jsonMeta,
323
+ _args9 = arguments;
324
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
325
+ while (1) switch (_context9.prev = _context9.next) {
326
+ case 0:
327
+ isRetina = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : false;
328
+ _context9.next = 3;
329
+ return this.getSpriteSheetJsonPath(isRetina);
330
+ case 3:
331
+ metaUrl = _context9.sent;
332
+ _context9.next = 6;
333
+ return this.getSpriteSheetPngPath(isRetina);
334
+ case 6:
335
+ spritePngs = _context9.sent;
336
+ if (!(metaUrl && spritePngs)) {
337
+ _context9.next = 15;
338
+ break;
339
+ }
340
+ metaUrlExtended = this._emsClient.extendUrlWithParams(metaUrl);
341
+ _context9.next = 11;
342
+ return this._emsClient.getManifest(metaUrlExtended);
343
+ case 11:
344
+ jsonMeta = _context9.sent;
345
+ return _context9.abrupt("return", {
346
+ png: spritePngs,
347
+ json: jsonMeta
348
+ });
349
+ case 15:
350
+ return _context9.abrupt("return");
351
+ case 16:
352
+ case "end":
353
+ return _context9.stop();
467
354
  }
468
355
  }, _callee9, this);
469
356
  }));
470
-
471
357
  function getSpriteSheetMeta() {
472
358
  return _getSpriteSheetMeta.apply(this, arguments);
473
359
  }
474
-
475
360
  return getSpriteSheetMeta;
476
361
  }()
477
362
  }, {
478
363
  key: "getSpriteSheetJsonPath",
479
364
  value: function () {
480
- var _getSpriteSheetJsonPath = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
365
+ var _getSpriteSheetJsonPath = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
481
366
  var isRetina,
482
- spriteSheetRootPath,
483
- suffix,
484
- _args10 = arguments;
485
- return regeneratorRuntime.wrap(function _callee10$(_context10) {
486
- while (1) {
487
- switch (_context10.prev = _context10.next) {
488
- case 0:
489
- isRetina = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : false;
490
- _context10.next = 3;
491
- return this._getSpriteSheetRootPath();
492
-
493
- case 3:
494
- spriteSheetRootPath = _context10.sent;
495
-
496
- if (!spriteSheetRootPath) {
497
- _context10.next = 9;
498
- break;
499
- }
500
-
501
- suffix = isRetina ? '@2x' : '';
502
- return _context10.abrupt("return", spriteSheetRootPath + suffix + '.json');
503
-
504
- case 9:
505
- return _context10.abrupt("return", '');
506
-
507
- case 10:
508
- case "end":
509
- return _context10.stop();
510
- }
367
+ spriteSheetRootPath,
368
+ suffix,
369
+ _args10 = arguments;
370
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
371
+ while (1) switch (_context10.prev = _context10.next) {
372
+ case 0:
373
+ isRetina = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : false;
374
+ _context10.next = 3;
375
+ return this._getSpriteSheetRootPath();
376
+ case 3:
377
+ spriteSheetRootPath = _context10.sent;
378
+ if (!spriteSheetRootPath) {
379
+ _context10.next = 9;
380
+ break;
381
+ }
382
+ suffix = isRetina ? '@2x' : '';
383
+ return _context10.abrupt("return", spriteSheetRootPath + suffix + '.json');
384
+ case 9:
385
+ return _context10.abrupt("return", '');
386
+ case 10:
387
+ case "end":
388
+ return _context10.stop();
511
389
  }
512
390
  }, _callee10, this);
513
391
  }));
514
-
515
392
  function getSpriteSheetJsonPath() {
516
393
  return _getSpriteSheetJsonPath.apply(this, arguments);
517
394
  }
518
-
519
395
  return getSpriteSheetJsonPath;
520
396
  }()
521
397
  }, {
522
398
  key: "getSpriteSheetPngPath",
523
399
  value: function () {
524
- var _getSpriteSheetPngPath = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
400
+ var _getSpriteSheetPngPath = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
525
401
  var isRetina,
526
- spriteSheetRootPath,
527
- suffix,
528
- _args11 = arguments;
529
- return regeneratorRuntime.wrap(function _callee11$(_context11) {
530
- while (1) {
531
- switch (_context11.prev = _context11.next) {
532
- case 0:
533
- isRetina = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : false;
534
- _context11.next = 3;
535
- return this._getSpriteSheetRootPath();
536
-
537
- case 3:
538
- spriteSheetRootPath = _context11.sent;
539
-
540
- if (!spriteSheetRootPath) {
541
- _context11.next = 9;
542
- break;
543
- }
544
-
545
- suffix = isRetina ? '@2x' : '';
546
- return _context11.abrupt("return", spriteSheetRootPath + suffix + '.png');
547
-
548
- case 9:
549
- return _context11.abrupt("return", '');
550
-
551
- case 10:
552
- case "end":
553
- return _context11.stop();
554
- }
402
+ spriteSheetRootPath,
403
+ suffix,
404
+ _args11 = arguments;
405
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
406
+ while (1) switch (_context11.prev = _context11.next) {
407
+ case 0:
408
+ isRetina = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : false;
409
+ _context11.next = 3;
410
+ return this._getSpriteSheetRootPath();
411
+ case 3:
412
+ spriteSheetRootPath = _context11.sent;
413
+ if (!spriteSheetRootPath) {
414
+ _context11.next = 9;
415
+ break;
416
+ }
417
+ suffix = isRetina ? '@2x' : '';
418
+ return _context11.abrupt("return", spriteSheetRootPath + suffix + '.png');
419
+ case 9:
420
+ return _context11.abrupt("return", '');
421
+ case 10:
422
+ case "end":
423
+ return _context11.stop();
555
424
  }
556
425
  }, _callee11, this);
557
426
  }));
558
-
559
427
  function getSpriteSheetPngPath() {
560
428
  return _getSpriteSheetPngPath.apply(this, arguments);
561
429
  }
562
-
563
430
  return getSpriteSheetPngPath;
564
431
  }()
565
432
  }, {
@@ -570,79 +437,61 @@ export var TMSService = /*#__PURE__*/function (_AbstractEmsService) {
570
437
  }, {
571
438
  key: "getMinZoom",
572
439
  value: function () {
573
- var _getMinZoom = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12() {
440
+ var _getMinZoom = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
574
441
  var tileJson;
575
- return regeneratorRuntime.wrap(function _callee12$(_context12) {
576
- while (1) {
577
- switch (_context12.prev = _context12.next) {
578
- case 0:
579
- _context12.next = 2;
580
- return this._getRasterStyleJson();
581
-
582
- case 2:
583
- tileJson = _context12.sent;
584
-
585
- if (!tileJson) {
586
- _context12.next = 7;
587
- break;
588
- }
589
-
590
- return _context12.abrupt("return", tileJson.minzoom);
591
-
592
- case 7:
593
- return _context12.abrupt("return");
594
-
595
- case 8:
596
- case "end":
597
- return _context12.stop();
598
- }
442
+ return _regeneratorRuntime().wrap(function _callee12$(_context12) {
443
+ while (1) switch (_context12.prev = _context12.next) {
444
+ case 0:
445
+ _context12.next = 2;
446
+ return this._getRasterStyleJson();
447
+ case 2:
448
+ tileJson = _context12.sent;
449
+ if (!tileJson) {
450
+ _context12.next = 7;
451
+ break;
452
+ }
453
+ return _context12.abrupt("return", tileJson.minzoom);
454
+ case 7:
455
+ return _context12.abrupt("return");
456
+ case 8:
457
+ case "end":
458
+ return _context12.stop();
599
459
  }
600
460
  }, _callee12, this);
601
461
  }));
602
-
603
462
  function getMinZoom() {
604
463
  return _getMinZoom.apply(this, arguments);
605
464
  }
606
-
607
465
  return getMinZoom;
608
466
  }()
609
467
  }, {
610
468
  key: "getMaxZoom",
611
469
  value: function () {
612
- var _getMaxZoom = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13() {
470
+ var _getMaxZoom = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
613
471
  var tileJson;
614
- return regeneratorRuntime.wrap(function _callee13$(_context13) {
615
- while (1) {
616
- switch (_context13.prev = _context13.next) {
617
- case 0:
618
- _context13.next = 2;
619
- return this._getRasterStyleJson();
620
-
621
- case 2:
622
- tileJson = _context13.sent;
623
-
624
- if (!tileJson) {
625
- _context13.next = 7;
626
- break;
627
- }
628
-
629
- return _context13.abrupt("return", tileJson.maxzoom);
630
-
631
- case 7:
632
- return _context13.abrupt("return");
633
-
634
- case 8:
635
- case "end":
636
- return _context13.stop();
637
- }
472
+ return _regeneratorRuntime().wrap(function _callee13$(_context13) {
473
+ while (1) switch (_context13.prev = _context13.next) {
474
+ case 0:
475
+ _context13.next = 2;
476
+ return this._getRasterStyleJson();
477
+ case 2:
478
+ tileJson = _context13.sent;
479
+ if (!tileJson) {
480
+ _context13.next = 7;
481
+ break;
482
+ }
483
+ return _context13.abrupt("return", tileJson.maxzoom);
484
+ case 7:
485
+ return _context13.abrupt("return");
486
+ case 8:
487
+ case "end":
488
+ return _context13.stop();
638
489
  }
639
490
  }, _callee13, this);
640
491
  }));
641
-
642
492
  function getMaxZoom() {
643
493
  return _getMaxZoom.apply(this, arguments);
644
494
  }
645
-
646
495
  return getMaxZoom;
647
496
  }()
648
497
  }, {
@@ -664,19 +513,15 @@ export var TMSService = /*#__PURE__*/function (_AbstractEmsService) {
664
513
  key: "_getStyleUrlForLocale",
665
514
  value: function _getStyleUrlForLocale(formatType) {
666
515
  var vectorFormats = this._getFormats(formatType, this._emsClient.getLocale());
667
-
668
516
  if (!vectorFormats.length) {
669
517
  //fallback to default locale
670
518
  vectorFormats = this._getFormats(formatType, this._emsClient.getDefaultLocale());
671
519
  }
672
-
673
520
  if (!vectorFormats.length) {
674
521
  // eslint-disable-next-line max-len
675
522
  throw new Error("Cannot find ".concat(formatType, " tile layer for locale ").concat(this._emsClient.getLocale(), " or ").concat(this._emsClient.getDefaultLocale()));
676
523
  }
677
-
678
524
  var defaultStyle = vectorFormats[0];
679
-
680
525
  if (defaultStyle && defaultStyle.hasOwnProperty('url')) {
681
526
  return defaultStyle.url;
682
527
  }
@@ -691,82 +536,62 @@ export var TMSService = /*#__PURE__*/function (_AbstractEmsService) {
691
536
  }, {
692
537
  key: "_getSpriteSheetRootPath",
693
538
  value: function () {
694
- var _getSpriteSheetRootPath2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14() {
539
+ var _getSpriteSheetRootPath2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
695
540
  var vectorStyleJson;
696
- return regeneratorRuntime.wrap(function _callee14$(_context14) {
697
- while (1) {
698
- switch (_context14.prev = _context14.next) {
699
- case 0:
700
- _context14.next = 2;
701
- return this._getVectorStyleJsonRaw();
702
-
703
- case 2:
704
- vectorStyleJson = _context14.sent;
705
-
706
- if (!vectorStyleJson) {
707
- _context14.next = 7;
708
- break;
709
- }
710
-
711
- return _context14.abrupt("return", this._proxyPath + this._getAbsoluteUrl(vectorStyleJson.sprite));
712
-
713
- case 7:
714
- return _context14.abrupt("return", '');
715
-
716
- case 8:
717
- case "end":
718
- return _context14.stop();
719
- }
541
+ return _regeneratorRuntime().wrap(function _callee14$(_context14) {
542
+ while (1) switch (_context14.prev = _context14.next) {
543
+ case 0:
544
+ _context14.next = 2;
545
+ return this._getVectorStyleJsonRaw();
546
+ case 2:
547
+ vectorStyleJson = _context14.sent;
548
+ if (!vectorStyleJson) {
549
+ _context14.next = 7;
550
+ break;
551
+ }
552
+ return _context14.abrupt("return", this._proxyPath + this._getAbsoluteUrl(vectorStyleJson.sprite));
553
+ case 7:
554
+ return _context14.abrupt("return", '');
555
+ case 8:
556
+ case "end":
557
+ return _context14.stop();
720
558
  }
721
559
  }, _callee14, this);
722
560
  }));
723
-
724
561
  function _getSpriteSheetRootPath() {
725
562
  return _getSpriteSheetRootPath2.apply(this, arguments);
726
563
  }
727
-
728
564
  return _getSpriteSheetRootPath;
729
565
  }()
730
566
  }, {
731
567
  key: "_getUrlTemplateForGlyphs",
732
568
  value: function () {
733
- var _getUrlTemplateForGlyphs2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15() {
569
+ var _getUrlTemplateForGlyphs2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
734
570
  var vectorStyleJson;
735
- return regeneratorRuntime.wrap(function _callee15$(_context15) {
736
- while (1) {
737
- switch (_context15.prev = _context15.next) {
738
- case 0:
739
- _context15.next = 2;
740
- return this._getVectorStyleJsonRaw();
741
-
742
- case 2:
743
- vectorStyleJson = _context15.sent;
744
-
745
- if (!vectorStyleJson) {
746
- _context15.next = 7;
747
- break;
748
- }
749
-
750
- return _context15.abrupt("return", this._proxyPath + this._getAbsoluteUrl(vectorStyleJson.glyphs));
751
-
752
- case 7:
753
- return _context15.abrupt("return", '');
754
-
755
- case 8:
756
- case "end":
757
- return _context15.stop();
758
- }
571
+ return _regeneratorRuntime().wrap(function _callee15$(_context15) {
572
+ while (1) switch (_context15.prev = _context15.next) {
573
+ case 0:
574
+ _context15.next = 2;
575
+ return this._getVectorStyleJsonRaw();
576
+ case 2:
577
+ vectorStyleJson = _context15.sent;
578
+ if (!vectorStyleJson) {
579
+ _context15.next = 7;
580
+ break;
581
+ }
582
+ return _context15.abrupt("return", this._proxyPath + this._getAbsoluteUrl(vectorStyleJson.glyphs));
583
+ case 7:
584
+ return _context15.abrupt("return", '');
585
+ case 8:
586
+ case "end":
587
+ return _context15.stop();
759
588
  }
760
589
  }, _callee15, this);
761
590
  }));
762
-
763
591
  function _getUrlTemplateForGlyphs() {
764
592
  return _getUrlTemplateForGlyphs2.apply(this, arguments);
765
593
  }
766
-
767
594
  return _getUrlTemplateForGlyphs;
768
595
  }()
769
596
  }]);
770
-
771
- return TMSService;
772
597
  }(AbstractEmsService);