1 | (function (global, factory) {
|
2 | typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('core-js/modules/es.object.entries.js'), require('core-js/modules/es.function.name.js'), require('core-js/modules/es.symbol.js'), require('core-js/modules/es.symbol.description.js'), require('core-js/modules/es.object.to-string.js'), require('core-js/modules/es.symbol.iterator.js'), require('core-js/modules/es.array.iterator.js'), require('core-js/modules/es.string.iterator.js'), require('core-js/modules/web.dom-collections.iterator.js'), require('core-js/modules/es.symbol.async-iterator.js'), require('core-js/modules/es.symbol.to-string-tag.js'), require('core-js/modules/es.json.to-string-tag.js'), require('core-js/modules/es.math.to-string-tag.js'), require('core-js/modules/es.object.get-prototype-of.js'), require('core-js/modules/es.promise.js'), require('core-js/modules/web.dom-collections.for-each.js'), require('core-js/modules/es.array.slice.js'), require('core-js/modules/esnext.global-this.js'), require('axios'), require('core-js/modules/es.regexp.to-string.js'), require('core-js/modules/es.regexp.exec.js'), require('core-js/modules/es.regexp.constructor.js'), require('core-js/modules/es.string.replace.js'), require('core-js/modules/es.array.splice.js'), require('core-js/modules/es.array.map.js'), require('core-js/modules/es.array.includes.js'), require('core-js/modules/es.array.concat.js')) :
|
3 | typeof define === 'function' && define.amd ? define(['exports', 'core-js/modules/es.object.entries.js', 'core-js/modules/es.function.name.js', 'core-js/modules/es.symbol.js', 'core-js/modules/es.symbol.description.js', 'core-js/modules/es.object.to-string.js', 'core-js/modules/es.symbol.iterator.js', 'core-js/modules/es.array.iterator.js', 'core-js/modules/es.string.iterator.js', 'core-js/modules/web.dom-collections.iterator.js', 'core-js/modules/es.symbol.async-iterator.js', 'core-js/modules/es.symbol.to-string-tag.js', 'core-js/modules/es.json.to-string-tag.js', 'core-js/modules/es.math.to-string-tag.js', 'core-js/modules/es.object.get-prototype-of.js', 'core-js/modules/es.promise.js', 'core-js/modules/web.dom-collections.for-each.js', 'core-js/modules/es.array.slice.js', 'core-js/modules/esnext.global-this.js', 'axios', 'core-js/modules/es.regexp.to-string.js', 'core-js/modules/es.regexp.exec.js', 'core-js/modules/es.regexp.constructor.js', 'core-js/modules/es.string.replace.js', 'core-js/modules/es.array.splice.js', 'core-js/modules/es.array.map.js', 'core-js/modules/es.array.includes.js', 'core-js/modules/es.array.concat.js'], factory) :
|
4 | (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.CSREST = {}, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, global.axios));
|
5 | })(this, (function (exports, es_object_entries_js, es_function_name_js, es_symbol_js, es_symbol_description_js, es_object_toString_js, es_symbol_iterator_js, es_array_iterator_js, es_string_iterator_js, web_domCollections_iterator_js, es_symbol_asyncIterator_js, es_symbol_toStringTag_js, es_json_toStringTag_js, es_math_toStringTag_js, es_object_getPrototypeOf_js, es_promise_js, web_domCollections_forEach_js, es_array_slice_js, esnext_globalThis_js, require$$0$1) { 'use strict';
|
6 |
|
7 | function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
8 |
|
9 | var require$$0__default = _interopDefaultLegacy(require$$0$1);
|
10 |
|
11 | var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
12 |
|
13 | var src = {};
|
14 |
|
15 | function ownKeys(object, enumerableOnly) {
|
16 | var keys = Object.keys(object);
|
17 |
|
18 | if (Object.getOwnPropertySymbols) {
|
19 | var symbols = Object.getOwnPropertySymbols(object);
|
20 | enumerableOnly && (symbols = symbols.filter(function (sym) {
|
21 | return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
22 | })), keys.push.apply(keys, symbols);
|
23 | }
|
24 |
|
25 | return keys;
|
26 | }
|
27 |
|
28 | function _objectSpread2(target) {
|
29 | for (var i = 1; i < arguments.length; i++) {
|
30 | var source = null != arguments[i] ? arguments[i] : {};
|
31 | i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
32 | _defineProperty(target, key, source[key]);
|
33 | }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
34 | Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
35 | });
|
36 | }
|
37 |
|
38 | return target;
|
39 | }
|
40 |
|
41 | function _typeof(obj) {
|
42 | "@babel/helpers - typeof";
|
43 |
|
44 | return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
45 | return typeof obj;
|
46 | } : function (obj) {
|
47 | return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
48 | }, _typeof(obj);
|
49 | }
|
50 |
|
51 | function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
52 | try {
|
53 | var info = gen[key](arg);
|
54 | var value = info.value;
|
55 | } catch (error) {
|
56 | reject(error);
|
57 | return;
|
58 | }
|
59 |
|
60 | if (info.done) {
|
61 | resolve(value);
|
62 | } else {
|
63 | Promise.resolve(value).then(_next, _throw);
|
64 | }
|
65 | }
|
66 |
|
67 | function _asyncToGenerator(fn) {
|
68 | return function () {
|
69 | var self = this,
|
70 | args = arguments;
|
71 | return new Promise(function (resolve, reject) {
|
72 | var gen = fn.apply(self, args);
|
73 |
|
74 | function _next(value) {
|
75 | asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
76 | }
|
77 |
|
78 | function _throw(err) {
|
79 | asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
80 | }
|
81 |
|
82 | _next(undefined);
|
83 | });
|
84 | };
|
85 | }
|
86 |
|
87 | function _classCallCheck(instance, Constructor) {
|
88 | if (!(instance instanceof Constructor)) {
|
89 | throw new TypeError("Cannot call a class as a function");
|
90 | }
|
91 | }
|
92 |
|
93 | function _defineProperties(target, props) {
|
94 | for (var i = 0; i < props.length; i++) {
|
95 | var descriptor = props[i];
|
96 | descriptor.enumerable = descriptor.enumerable || false;
|
97 | descriptor.configurable = true;
|
98 | if ("value" in descriptor) descriptor.writable = true;
|
99 | Object.defineProperty(target, descriptor.key, descriptor);
|
100 | }
|
101 | }
|
102 |
|
103 | function _createClass(Constructor, protoProps, staticProps) {
|
104 | if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
105 | if (staticProps) _defineProperties(Constructor, staticProps);
|
106 | Object.defineProperty(Constructor, "prototype", {
|
107 | writable: false
|
108 | });
|
109 | return Constructor;
|
110 | }
|
111 |
|
112 | function _defineProperty(obj, key, value) {
|
113 | if (key in obj) {
|
114 | Object.defineProperty(obj, key, {
|
115 | value: value,
|
116 | enumerable: true,
|
117 | configurable: true,
|
118 | writable: true
|
119 | });
|
120 | } else {
|
121 | obj[key] = value;
|
122 | }
|
123 |
|
124 | return obj;
|
125 | }
|
126 |
|
127 | function _inherits(subClass, superClass) {
|
128 | if (typeof superClass !== "function" && superClass !== null) {
|
129 | throw new TypeError("Super expression must either be null or a function");
|
130 | }
|
131 |
|
132 | subClass.prototype = Object.create(superClass && superClass.prototype, {
|
133 | constructor: {
|
134 | value: subClass,
|
135 | writable: true,
|
136 | configurable: true
|
137 | }
|
138 | });
|
139 | Object.defineProperty(subClass, "prototype", {
|
140 | writable: false
|
141 | });
|
142 | if (superClass) _setPrototypeOf(subClass, superClass);
|
143 | }
|
144 |
|
145 | function _getPrototypeOf(o) {
|
146 | _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
147 | return o.__proto__ || Object.getPrototypeOf(o);
|
148 | };
|
149 | return _getPrototypeOf(o);
|
150 | }
|
151 |
|
152 | function _setPrototypeOf(o, p) {
|
153 | _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
154 | o.__proto__ = p;
|
155 | return o;
|
156 | };
|
157 |
|
158 | return _setPrototypeOf(o, p);
|
159 | }
|
160 |
|
161 | function _isNativeReflectConstruct() {
|
162 | if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
163 | if (Reflect.construct.sham) return false;
|
164 | if (typeof Proxy === "function") return true;
|
165 |
|
166 | try {
|
167 | Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
168 | return true;
|
169 | } catch (e) {
|
170 | return false;
|
171 | }
|
172 | }
|
173 |
|
174 | function _construct(Parent, args, Class) {
|
175 | if (_isNativeReflectConstruct()) {
|
176 | _construct = Reflect.construct;
|
177 | } else {
|
178 | _construct = function _construct(Parent, args, Class) {
|
179 | var a = [null];
|
180 | a.push.apply(a, args);
|
181 | var Constructor = Function.bind.apply(Parent, a);
|
182 | var instance = new Constructor();
|
183 | if (Class) _setPrototypeOf(instance, Class.prototype);
|
184 | return instance;
|
185 | };
|
186 | }
|
187 |
|
188 | return _construct.apply(null, arguments);
|
189 | }
|
190 |
|
191 | function _isNativeFunction(fn) {
|
192 | return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
193 | }
|
194 |
|
195 | function _wrapNativeSuper(Class) {
|
196 | var _cache = typeof Map === "function" ? new Map() : undefined;
|
197 |
|
198 | _wrapNativeSuper = function _wrapNativeSuper(Class) {
|
199 | if (Class === null || !_isNativeFunction(Class)) return Class;
|
200 |
|
201 | if (typeof Class !== "function") {
|
202 | throw new TypeError("Super expression must either be null or a function");
|
203 | }
|
204 |
|
205 | if (typeof _cache !== "undefined") {
|
206 | if (_cache.has(Class)) return _cache.get(Class);
|
207 |
|
208 | _cache.set(Class, Wrapper);
|
209 | }
|
210 |
|
211 | function Wrapper() {
|
212 | return _construct(Class, arguments, _getPrototypeOf(this).constructor);
|
213 | }
|
214 |
|
215 | Wrapper.prototype = Object.create(Class.prototype, {
|
216 | constructor: {
|
217 | value: Wrapper,
|
218 | enumerable: false,
|
219 | writable: true,
|
220 | configurable: true
|
221 | }
|
222 | });
|
223 | return _setPrototypeOf(Wrapper, Class);
|
224 | };
|
225 |
|
226 | return _wrapNativeSuper(Class);
|
227 | }
|
228 |
|
229 | function _assertThisInitialized(self) {
|
230 | if (self === void 0) {
|
231 | throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
232 | }
|
233 |
|
234 | return self;
|
235 | }
|
236 |
|
237 | function _possibleConstructorReturn(self, call) {
|
238 | if (call && (typeof call === "object" || typeof call === "function")) {
|
239 | return call;
|
240 | } else if (call !== void 0) {
|
241 | throw new TypeError("Derived constructors may only return object or undefined");
|
242 | }
|
243 |
|
244 | return _assertThisInitialized(self);
|
245 | }
|
246 |
|
247 | function _createSuper(Derived) {
|
248 | var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
249 |
|
250 | return function _createSuperInternal() {
|
251 | var Super = _getPrototypeOf(Derived),
|
252 | result;
|
253 |
|
254 | if (hasNativeReflectConstruct) {
|
255 | var NewTarget = _getPrototypeOf(this).constructor;
|
256 |
|
257 | result = Reflect.construct(Super, arguments, NewTarget);
|
258 | } else {
|
259 | result = Super.apply(this, arguments);
|
260 | }
|
261 |
|
262 | return _possibleConstructorReturn(this, result);
|
263 | };
|
264 | }
|
265 |
|
266 | function _slicedToArray(arr, i) {
|
267 | return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
268 | }
|
269 |
|
270 | function _arrayWithHoles(arr) {
|
271 | if (Array.isArray(arr)) return arr;
|
272 | }
|
273 |
|
274 | function _iterableToArrayLimit(arr, i) {
|
275 | var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
276 |
|
277 | if (_i == null) return;
|
278 | var _arr = [];
|
279 | var _n = true;
|
280 | var _d = false;
|
281 |
|
282 | var _s, _e;
|
283 |
|
284 | try {
|
285 | for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
286 | _arr.push(_s.value);
|
287 |
|
288 | if (i && _arr.length === i) break;
|
289 | }
|
290 | } catch (err) {
|
291 | _d = true;
|
292 | _e = err;
|
293 | } finally {
|
294 | try {
|
295 | if (!_n && _i["return"] != null) _i["return"]();
|
296 | } finally {
|
297 | if (_d) throw _e;
|
298 | }
|
299 | }
|
300 |
|
301 | return _arr;
|
302 | }
|
303 |
|
304 | function _unsupportedIterableToArray(o, minLen) {
|
305 | if (!o) return;
|
306 | if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
307 | var n = Object.prototype.toString.call(o).slice(8, -1);
|
308 | if (n === "Object" && o.constructor) n = o.constructor.name;
|
309 | if (n === "Map" || n === "Set") return Array.from(o);
|
310 | if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
311 | }
|
312 |
|
313 | function _arrayLikeToArray(arr, len) {
|
314 | if (len == null || len > arr.length) len = arr.length;
|
315 |
|
316 | for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
317 |
|
318 | return arr2;
|
319 | }
|
320 |
|
321 | function _nonIterableRest() {
|
322 | throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
323 | }
|
324 |
|
325 | var runtime = {exports: {}};
|
326 |
|
327 | (function (module) {
|
328 | var runtime = function (exports) {
|
329 |
|
330 | var Op = Object.prototype;
|
331 | var hasOwn = Op.hasOwnProperty;
|
332 | var undefined$1;
|
333 |
|
334 | var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
335 | var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
336 | var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
337 | var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
338 |
|
339 | function define(obj, key, value) {
|
340 | Object.defineProperty(obj, key, {
|
341 | value: value,
|
342 | enumerable: true,
|
343 | configurable: true,
|
344 | writable: true
|
345 | });
|
346 | return obj[key];
|
347 | }
|
348 |
|
349 | try {
|
350 |
|
351 | define({}, "");
|
352 | } catch (err) {
|
353 | define = function define(obj, key, value) {
|
354 | return obj[key] = value;
|
355 | };
|
356 | }
|
357 |
|
358 | function wrap(innerFn, outerFn, self, tryLocsList) {
|
359 |
|
360 | var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
361 | var generator = Object.create(protoGenerator.prototype);
|
362 | var context = new Context(tryLocsList || []);
|
363 |
|
364 |
|
365 | generator._invoke = makeInvokeMethod(innerFn, self, context);
|
366 | return generator;
|
367 | }
|
368 |
|
369 | exports.wrap = wrap;
|
370 |
|
371 |
|
372 |
|
373 |
|
374 |
|
375 |
|
376 |
|
377 |
|
378 |
|
379 |
|
380 | function tryCatch(fn, obj, arg) {
|
381 | try {
|
382 | return {
|
383 | type: "normal",
|
384 | arg: fn.call(obj, arg)
|
385 | };
|
386 | } catch (err) {
|
387 | return {
|
388 | type: "throw",
|
389 | arg: err
|
390 | };
|
391 | }
|
392 | }
|
393 |
|
394 | var GenStateSuspendedStart = "suspendedStart";
|
395 | var GenStateSuspendedYield = "suspendedYield";
|
396 | var GenStateExecuting = "executing";
|
397 | var GenStateCompleted = "completed";
|
398 |
|
399 |
|
400 | var ContinueSentinel = {};
|
401 |
|
402 |
|
403 |
|
404 |
|
405 | function Generator() {}
|
406 |
|
407 | function GeneratorFunction() {}
|
408 |
|
409 | function GeneratorFunctionPrototype() {}
|
410 |
|
411 |
|
412 |
|
413 | var IteratorPrototype = {};
|
414 | define(IteratorPrototype, iteratorSymbol, function () {
|
415 | return this;
|
416 | });
|
417 | var getProto = Object.getPrototypeOf;
|
418 | var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
419 |
|
420 | if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
421 |
|
422 |
|
423 | IteratorPrototype = NativeIteratorPrototype;
|
424 | }
|
425 |
|
426 | var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
427 | GeneratorFunction.prototype = GeneratorFunctionPrototype;
|
428 | define(Gp, "constructor", GeneratorFunctionPrototype);
|
429 | define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
|
430 | GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction");
|
431 |
|
432 |
|
433 | function defineIteratorMethods(prototype) {
|
434 | ["next", "throw", "return"].forEach(function (method) {
|
435 | define(prototype, method, function (arg) {
|
436 | return this._invoke(method, arg);
|
437 | });
|
438 | });
|
439 | }
|
440 |
|
441 | exports.isGeneratorFunction = function (genFun) {
|
442 | var ctor = typeof genFun === "function" && genFun.constructor;
|
443 | return ctor ? ctor === GeneratorFunction ||
|
444 |
|
445 | (ctor.displayName || ctor.name) === "GeneratorFunction" : false;
|
446 | };
|
447 |
|
448 | exports.mark = function (genFun) {
|
449 | if (Object.setPrototypeOf) {
|
450 | Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
451 | } else {
|
452 | genFun.__proto__ = GeneratorFunctionPrototype;
|
453 | define(genFun, toStringTagSymbol, "GeneratorFunction");
|
454 | }
|
455 |
|
456 | genFun.prototype = Object.create(Gp);
|
457 | return genFun;
|
458 | };
|
459 |
|
460 |
|
461 |
|
462 |
|
463 |
|
464 | exports.awrap = function (arg) {
|
465 | return {
|
466 | __await: arg
|
467 | };
|
468 | };
|
469 |
|
470 | function AsyncIterator(generator, PromiseImpl) {
|
471 | function invoke(method, arg, resolve, reject) {
|
472 | var record = tryCatch(generator[method], generator, arg);
|
473 |
|
474 | if (record.type === "throw") {
|
475 | reject(record.arg);
|
476 | } else {
|
477 | var result = record.arg;
|
478 | var value = result.value;
|
479 |
|
480 | if (value && _typeof(value) === "object" && hasOwn.call(value, "__await")) {
|
481 | return PromiseImpl.resolve(value.__await).then(function (value) {
|
482 | invoke("next", value, resolve, reject);
|
483 | }, function (err) {
|
484 | invoke("throw", err, resolve, reject);
|
485 | });
|
486 | }
|
487 |
|
488 | return PromiseImpl.resolve(value).then(function (unwrapped) {
|
489 |
|
490 |
|
491 |
|
492 | result.value = unwrapped;
|
493 | resolve(result);
|
494 | }, function (error) {
|
495 |
|
496 |
|
497 | return invoke("throw", error, resolve, reject);
|
498 | });
|
499 | }
|
500 | }
|
501 |
|
502 | var previousPromise;
|
503 |
|
504 | function enqueue(method, arg) {
|
505 | function callInvokeWithMethodAndArg() {
|
506 | return new PromiseImpl(function (resolve, reject) {
|
507 | invoke(method, arg, resolve, reject);
|
508 | });
|
509 | }
|
510 |
|
511 | return previousPromise =
|
512 |
|
513 |
|
514 |
|
515 |
|
516 |
|
517 |
|
518 |
|
519 |
|
520 |
|
521 |
|
522 |
|
523 | previousPromise ? previousPromise.then(callInvokeWithMethodAndArg,
|
524 |
|
525 | callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
526 | }
|
527 |
|
528 |
|
529 |
|
530 | this._invoke = enqueue;
|
531 | }
|
532 |
|
533 | defineIteratorMethods(AsyncIterator.prototype);
|
534 | define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
535 | return this;
|
536 | });
|
537 | exports.AsyncIterator = AsyncIterator;
|
538 |
|
539 |
|
540 |
|
541 | exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
542 | if (PromiseImpl === void 0) PromiseImpl = Promise;
|
543 | var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
544 | return exports.isGeneratorFunction(outerFn) ? iter
|
545 | : iter.next().then(function (result) {
|
546 | return result.done ? result.value : iter.next();
|
547 | });
|
548 | };
|
549 |
|
550 | function makeInvokeMethod(innerFn, self, context) {
|
551 | var state = GenStateSuspendedStart;
|
552 | return function invoke(method, arg) {
|
553 | if (state === GenStateExecuting) {
|
554 | throw new Error("Generator is already running");
|
555 | }
|
556 |
|
557 | if (state === GenStateCompleted) {
|
558 | if (method === "throw") {
|
559 | throw arg;
|
560 | }
|
561 |
|
562 |
|
563 |
|
564 | return doneResult();
|
565 | }
|
566 |
|
567 | context.method = method;
|
568 | context.arg = arg;
|
569 |
|
570 | while (true) {
|
571 | var delegate = context.delegate;
|
572 |
|
573 | if (delegate) {
|
574 | var delegateResult = maybeInvokeDelegate(delegate, context);
|
575 |
|
576 | if (delegateResult) {
|
577 | if (delegateResult === ContinueSentinel) continue;
|
578 | return delegateResult;
|
579 | }
|
580 | }
|
581 |
|
582 | if (context.method === "next") {
|
583 |
|
584 |
|
585 | context.sent = context._sent = context.arg;
|
586 | } else if (context.method === "throw") {
|
587 | if (state === GenStateSuspendedStart) {
|
588 | state = GenStateCompleted;
|
589 | throw context.arg;
|
590 | }
|
591 |
|
592 | context.dispatchException(context.arg);
|
593 | } else if (context.method === "return") {
|
594 | context.abrupt("return", context.arg);
|
595 | }
|
596 |
|
597 | state = GenStateExecuting;
|
598 | var record = tryCatch(innerFn, self, context);
|
599 |
|
600 | if (record.type === "normal") {
|
601 |
|
602 |
|
603 | state = context.done ? GenStateCompleted : GenStateSuspendedYield;
|
604 |
|
605 | if (record.arg === ContinueSentinel) {
|
606 | continue;
|
607 | }
|
608 |
|
609 | return {
|
610 | value: record.arg,
|
611 | done: context.done
|
612 | };
|
613 | } else if (record.type === "throw") {
|
614 | state = GenStateCompleted;
|
615 |
|
616 |
|
617 | context.method = "throw";
|
618 | context.arg = record.arg;
|
619 | }
|
620 | }
|
621 | };
|
622 | }
|
623 |
|
624 |
|
625 |
|
626 |
|
627 |
|
628 | function maybeInvokeDelegate(delegate, context) {
|
629 | var method = delegate.iterator[context.method];
|
630 |
|
631 | if (method === undefined$1) {
|
632 |
|
633 |
|
634 | context.delegate = null;
|
635 |
|
636 | if (context.method === "throw") {
|
637 |
|
638 | if (delegate.iterator["return"]) {
|
639 |
|
640 |
|
641 | context.method = "return";
|
642 | context.arg = undefined$1;
|
643 | maybeInvokeDelegate(delegate, context);
|
644 |
|
645 | if (context.method === "throw") {
|
646 |
|
647 |
|
648 | return ContinueSentinel;
|
649 | }
|
650 | }
|
651 |
|
652 | context.method = "throw";
|
653 | context.arg = new TypeError("The iterator does not provide a 'throw' method");
|
654 | }
|
655 |
|
656 | return ContinueSentinel;
|
657 | }
|
658 |
|
659 | var record = tryCatch(method, delegate.iterator, context.arg);
|
660 |
|
661 | if (record.type === "throw") {
|
662 | context.method = "throw";
|
663 | context.arg = record.arg;
|
664 | context.delegate = null;
|
665 | return ContinueSentinel;
|
666 | }
|
667 |
|
668 | var info = record.arg;
|
669 |
|
670 | if (!info) {
|
671 | context.method = "throw";
|
672 | context.arg = new TypeError("iterator result is not an object");
|
673 | context.delegate = null;
|
674 | return ContinueSentinel;
|
675 | }
|
676 |
|
677 | if (info.done) {
|
678 |
|
679 |
|
680 | context[delegate.resultName] = info.value;
|
681 |
|
682 | context.next = delegate.nextLoc;
|
683 |
|
684 |
|
685 |
|
686 |
|
687 |
|
688 |
|
689 | if (context.method !== "return") {
|
690 | context.method = "next";
|
691 | context.arg = undefined$1;
|
692 | }
|
693 | } else {
|
694 |
|
695 | return info;
|
696 | }
|
697 |
|
698 |
|
699 |
|
700 | context.delegate = null;
|
701 | return ContinueSentinel;
|
702 | }
|
703 |
|
704 |
|
705 |
|
706 | defineIteratorMethods(Gp);
|
707 | define(Gp, toStringTagSymbol, "Generator");
|
708 |
|
709 |
|
710 |
|
711 |
|
712 |
|
713 | define(Gp, iteratorSymbol, function () {
|
714 | return this;
|
715 | });
|
716 | define(Gp, "toString", function () {
|
717 | return "[object Generator]";
|
718 | });
|
719 |
|
720 | function pushTryEntry(locs) {
|
721 | var entry = {
|
722 | tryLoc: locs[0]
|
723 | };
|
724 |
|
725 | if (1 in locs) {
|
726 | entry.catchLoc = locs[1];
|
727 | }
|
728 |
|
729 | if (2 in locs) {
|
730 | entry.finallyLoc = locs[2];
|
731 | entry.afterLoc = locs[3];
|
732 | }
|
733 |
|
734 | this.tryEntries.push(entry);
|
735 | }
|
736 |
|
737 | function resetTryEntry(entry) {
|
738 | var record = entry.completion || {};
|
739 | record.type = "normal";
|
740 | delete record.arg;
|
741 | entry.completion = record;
|
742 | }
|
743 |
|
744 | function Context(tryLocsList) {
|
745 |
|
746 |
|
747 |
|
748 | this.tryEntries = [{
|
749 | tryLoc: "root"
|
750 | }];
|
751 | tryLocsList.forEach(pushTryEntry, this);
|
752 | this.reset(true);
|
753 | }
|
754 |
|
755 | exports.keys = function (object) {
|
756 | var keys = [];
|
757 |
|
758 | for (var key in object) {
|
759 | keys.push(key);
|
760 | }
|
761 |
|
762 | keys.reverse();
|
763 |
|
764 |
|
765 | return function next() {
|
766 | while (keys.length) {
|
767 | var key = keys.pop();
|
768 |
|
769 | if (key in object) {
|
770 | next.value = key;
|
771 | next.done = false;
|
772 | return next;
|
773 | }
|
774 | }
|
775 |
|
776 |
|
777 |
|
778 |
|
779 | next.done = true;
|
780 | return next;
|
781 | };
|
782 | };
|
783 |
|
784 | function values(iterable) {
|
785 | if (iterable) {
|
786 | var iteratorMethod = iterable[iteratorSymbol];
|
787 |
|
788 | if (iteratorMethod) {
|
789 | return iteratorMethod.call(iterable);
|
790 | }
|
791 |
|
792 | if (typeof iterable.next === "function") {
|
793 | return iterable;
|
794 | }
|
795 |
|
796 | if (!isNaN(iterable.length)) {
|
797 | var i = -1,
|
798 | next = function next() {
|
799 | while (++i < iterable.length) {
|
800 | if (hasOwn.call(iterable, i)) {
|
801 | next.value = iterable[i];
|
802 | next.done = false;
|
803 | return next;
|
804 | }
|
805 | }
|
806 |
|
807 | next.value = undefined$1;
|
808 | next.done = true;
|
809 | return next;
|
810 | };
|
811 |
|
812 | return next.next = next;
|
813 | }
|
814 | }
|
815 |
|
816 |
|
817 | return {
|
818 | next: doneResult
|
819 | };
|
820 | }
|
821 |
|
822 | exports.values = values;
|
823 |
|
824 | function doneResult() {
|
825 | return {
|
826 | value: undefined$1,
|
827 | done: true
|
828 | };
|
829 | }
|
830 |
|
831 | Context.prototype = {
|
832 | constructor: Context,
|
833 | reset: function reset(skipTempReset) {
|
834 | this.prev = 0;
|
835 | this.next = 0;
|
836 |
|
837 |
|
838 | this.sent = this._sent = undefined$1;
|
839 | this.done = false;
|
840 | this.delegate = null;
|
841 | this.method = "next";
|
842 | this.arg = undefined$1;
|
843 | this.tryEntries.forEach(resetTryEntry);
|
844 |
|
845 | if (!skipTempReset) {
|
846 | for (var name in this) {
|
847 |
|
848 | if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {
|
849 | this[name] = undefined$1;
|
850 | }
|
851 | }
|
852 | }
|
853 | },
|
854 | stop: function stop() {
|
855 | this.done = true;
|
856 | var rootEntry = this.tryEntries[0];
|
857 | var rootRecord = rootEntry.completion;
|
858 |
|
859 | if (rootRecord.type === "throw") {
|
860 | throw rootRecord.arg;
|
861 | }
|
862 |
|
863 | return this.rval;
|
864 | },
|
865 | dispatchException: function dispatchException(exception) {
|
866 | if (this.done) {
|
867 | throw exception;
|
868 | }
|
869 |
|
870 | var context = this;
|
871 |
|
872 | function handle(loc, caught) {
|
873 | record.type = "throw";
|
874 | record.arg = exception;
|
875 | context.next = loc;
|
876 |
|
877 | if (caught) {
|
878 |
|
879 |
|
880 | context.method = "next";
|
881 | context.arg = undefined$1;
|
882 | }
|
883 |
|
884 | return !!caught;
|
885 | }
|
886 |
|
887 | for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
888 | var entry = this.tryEntries[i];
|
889 | var record = entry.completion;
|
890 |
|
891 | if (entry.tryLoc === "root") {
|
892 |
|
893 |
|
894 |
|
895 | return handle("end");
|
896 | }
|
897 |
|
898 | if (entry.tryLoc <= this.prev) {
|
899 | var hasCatch = hasOwn.call(entry, "catchLoc");
|
900 | var hasFinally = hasOwn.call(entry, "finallyLoc");
|
901 |
|
902 | if (hasCatch && hasFinally) {
|
903 | if (this.prev < entry.catchLoc) {
|
904 | return handle(entry.catchLoc, true);
|
905 | } else if (this.prev < entry.finallyLoc) {
|
906 | return handle(entry.finallyLoc);
|
907 | }
|
908 | } else if (hasCatch) {
|
909 | if (this.prev < entry.catchLoc) {
|
910 | return handle(entry.catchLoc, true);
|
911 | }
|
912 | } else if (hasFinally) {
|
913 | if (this.prev < entry.finallyLoc) {
|
914 | return handle(entry.finallyLoc);
|
915 | }
|
916 | } else {
|
917 | throw new Error("try statement without catch or finally");
|
918 | }
|
919 | }
|
920 | }
|
921 | },
|
922 | abrupt: function abrupt(type, arg) {
|
923 | for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
924 | var entry = this.tryEntries[i];
|
925 |
|
926 | if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
927 | var finallyEntry = entry;
|
928 | break;
|
929 | }
|
930 | }
|
931 |
|
932 | if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {
|
933 |
|
934 |
|
935 | finallyEntry = null;
|
936 | }
|
937 |
|
938 | var record = finallyEntry ? finallyEntry.completion : {};
|
939 | record.type = type;
|
940 | record.arg = arg;
|
941 |
|
942 | if (finallyEntry) {
|
943 | this.method = "next";
|
944 | this.next = finallyEntry.finallyLoc;
|
945 | return ContinueSentinel;
|
946 | }
|
947 |
|
948 | return this.complete(record);
|
949 | },
|
950 | complete: function complete(record, afterLoc) {
|
951 | if (record.type === "throw") {
|
952 | throw record.arg;
|
953 | }
|
954 |
|
955 | if (record.type === "break" || record.type === "continue") {
|
956 | this.next = record.arg;
|
957 | } else if (record.type === "return") {
|
958 | this.rval = this.arg = record.arg;
|
959 | this.method = "return";
|
960 | this.next = "end";
|
961 | } else if (record.type === "normal" && afterLoc) {
|
962 | this.next = afterLoc;
|
963 | }
|
964 |
|
965 | return ContinueSentinel;
|
966 | },
|
967 | finish: function finish(finallyLoc) {
|
968 | for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
969 | var entry = this.tryEntries[i];
|
970 |
|
971 | if (entry.finallyLoc === finallyLoc) {
|
972 | this.complete(entry.completion, entry.afterLoc);
|
973 | resetTryEntry(entry);
|
974 | return ContinueSentinel;
|
975 | }
|
976 | }
|
977 | },
|
978 | "catch": function _catch(tryLoc) {
|
979 | for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
980 | var entry = this.tryEntries[i];
|
981 |
|
982 | if (entry.tryLoc === tryLoc) {
|
983 | var record = entry.completion;
|
984 |
|
985 | if (record.type === "throw") {
|
986 | var thrown = record.arg;
|
987 | resetTryEntry(entry);
|
988 | }
|
989 |
|
990 | return thrown;
|
991 | }
|
992 | }
|
993 |
|
994 |
|
995 |
|
996 | throw new Error("illegal catch attempt");
|
997 | },
|
998 | delegateYield: function delegateYield(iterable, resultName, nextLoc) {
|
999 | this.delegate = {
|
1000 | iterator: values(iterable),
|
1001 | resultName: resultName,
|
1002 | nextLoc: nextLoc
|
1003 | };
|
1004 |
|
1005 | if (this.method === "next") {
|
1006 |
|
1007 |
|
1008 | this.arg = undefined$1;
|
1009 | }
|
1010 |
|
1011 | return ContinueSentinel;
|
1012 | }
|
1013 | };
|
1014 |
|
1015 |
|
1016 |
|
1017 |
|
1018 | return exports;
|
1019 | }(
|
1020 |
|
1021 |
|
1022 |
|
1023 | module.exports );
|
1024 |
|
1025 | try {
|
1026 | regeneratorRuntime = runtime;
|
1027 | } catch (accidentalStrictMode) {
|
1028 |
|
1029 |
|
1030 |
|
1031 |
|
1032 |
|
1033 |
|
1034 |
|
1035 |
|
1036 |
|
1037 |
|
1038 | if ((typeof globalThis === "undefined" ? "undefined" : _typeof(globalThis)) === "object") {
|
1039 | globalThis.regeneratorRuntime = runtime;
|
1040 | } else {
|
1041 | Function("r", "regeneratorRuntime = r")(runtime);
|
1042 | }
|
1043 | }
|
1044 | })(runtime);
|
1045 |
|
1046 |
|
1047 |
|
1048 | var FUNC_ERROR_TEXT = 'Expected a function';
|
1049 |
|
1050 |
|
1051 | var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
1052 |
|
1053 |
|
1054 | var INFINITY = 1 / 0;
|
1055 |
|
1056 |
|
1057 | var funcTag = '[object Function]',
|
1058 | genTag = '[object GeneratorFunction]',
|
1059 | symbolTag = '[object Symbol]';
|
1060 |
|
1061 |
|
1062 | var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
1063 | reIsPlainProp = /^\w*$/,
|
1064 | reLeadingDot = /^\./,
|
1065 | rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
1066 | |
1067 |
|
1068 |
|
1069 |
|
1070 |
|
1071 | var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
1072 |
|
1073 |
|
1074 | var reEscapeChar = /\\(\\)?/g;
|
1075 |
|
1076 |
|
1077 | var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
1078 |
|
1079 |
|
1080 | var freeGlobal = _typeof(commonjsGlobal) == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
1081 |
|
1082 |
|
1083 | var freeSelf = (typeof self === "undefined" ? "undefined" : _typeof(self)) == 'object' && self && self.Object === Object && self;
|
1084 |
|
1085 |
|
1086 | var root = freeGlobal || freeSelf || Function('return this')();
|
1087 | |
1088 |
|
1089 |
|
1090 |
|
1091 |
|
1092 |
|
1093 |
|
1094 |
|
1095 |
|
1096 | function getValue(object, key) {
|
1097 | return object == null ? undefined : object[key];
|
1098 | }
|
1099 | |
1100 |
|
1101 |
|
1102 |
|
1103 |
|
1104 |
|
1105 |
|
1106 |
|
1107 |
|
1108 | function isHostObject(value) {
|
1109 |
|
1110 |
|
1111 | var result = false;
|
1112 |
|
1113 | if (value != null && typeof value.toString != 'function') {
|
1114 | try {
|
1115 | result = !!(value + '');
|
1116 | } catch (e) {}
|
1117 | }
|
1118 |
|
1119 | return result;
|
1120 | }
|
1121 |
|
1122 |
|
1123 |
|
1124 | var arrayProto = Array.prototype,
|
1125 | funcProto = Function.prototype,
|
1126 | objectProto = Object.prototype;
|
1127 |
|
1128 |
|
1129 | var coreJsData = root['__core-js_shared__'];
|
1130 |
|
1131 |
|
1132 | var maskSrcKey = function () {
|
1133 | var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
1134 | return uid ? 'Symbol(src)_1.' + uid : '';
|
1135 | }();
|
1136 |
|
1137 |
|
1138 |
|
1139 | var funcToString = funcProto.toString;
|
1140 |
|
1141 |
|
1142 | var hasOwnProperty = objectProto.hasOwnProperty;
|
1143 | |
1144 |
|
1145 |
|
1146 |
|
1147 |
|
1148 |
|
1149 | var objectToString = objectProto.toString;
|
1150 |
|
1151 |
|
1152 | var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
|
1153 |
|
1154 |
|
1155 | var _Symbol = root.Symbol,
|
1156 | splice = arrayProto.splice;
|
1157 |
|
1158 |
|
1159 | var Map$1 = getNative(root, 'Map'),
|
1160 | nativeCreate = getNative(Object, 'create');
|
1161 |
|
1162 |
|
1163 | var symbolProto = _Symbol ? _Symbol.prototype : undefined,
|
1164 | symbolToString = symbolProto ? symbolProto.toString : undefined;
|
1165 | |
1166 |
|
1167 |
|
1168 |
|
1169 |
|
1170 |
|
1171 |
|
1172 |
|
1173 | function Hash(entries) {
|
1174 | var index = -1,
|
1175 | length = entries ? entries.length : 0;
|
1176 | this.clear();
|
1177 |
|
1178 | while (++index < length) {
|
1179 | var entry = entries[index];
|
1180 | this.set(entry[0], entry[1]);
|
1181 | }
|
1182 | }
|
1183 | |
1184 |
|
1185 |
|
1186 |
|
1187 |
|
1188 |
|
1189 |
|
1190 |
|
1191 |
|
1192 | function hashClear() {
|
1193 | this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
1194 | }
|
1195 | |
1196 |
|
1197 |
|
1198 |
|
1199 |
|
1200 |
|
1201 |
|
1202 |
|
1203 |
|
1204 |
|
1205 |
|
1206 |
|
1207 | function hashDelete(key) {
|
1208 | return this.has(key) && delete this.__data__[key];
|
1209 | }
|
1210 | |
1211 |
|
1212 |
|
1213 |
|
1214 |
|
1215 |
|
1216 |
|
1217 |
|
1218 |
|
1219 |
|
1220 |
|
1221 | function hashGet(key) {
|
1222 | var data = this.__data__;
|
1223 |
|
1224 | if (nativeCreate) {
|
1225 | var result = data[key];
|
1226 | return result === HASH_UNDEFINED ? undefined : result;
|
1227 | }
|
1228 |
|
1229 | return hasOwnProperty.call(data, key) ? data[key] : undefined;
|
1230 | }
|
1231 | |
1232 |
|
1233 |
|
1234 |
|
1235 |
|
1236 |
|
1237 |
|
1238 |
|
1239 |
|
1240 |
|
1241 |
|
1242 | function hashHas(key) {
|
1243 | var data = this.__data__;
|
1244 | return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
|
1245 | }
|
1246 | |
1247 |
|
1248 |
|
1249 |
|
1250 |
|
1251 |
|
1252 |
|
1253 |
|
1254 |
|
1255 |
|
1256 |
|
1257 |
|
1258 | function hashSet(key, value) {
|
1259 | var data = this.__data__;
|
1260 | data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value;
|
1261 | return this;
|
1262 | }
|
1263 |
|
1264 |
|
1265 | Hash.prototype.clear = hashClear;
|
1266 | Hash.prototype['delete'] = hashDelete;
|
1267 | Hash.prototype.get = hashGet;
|
1268 | Hash.prototype.has = hashHas;
|
1269 | Hash.prototype.set = hashSet;
|
1270 | |
1271 |
|
1272 |
|
1273 |
|
1274 |
|
1275 |
|
1276 |
|
1277 |
|
1278 | function ListCache(entries) {
|
1279 | var index = -1,
|
1280 | length = entries ? entries.length : 0;
|
1281 | this.clear();
|
1282 |
|
1283 | while (++index < length) {
|
1284 | var entry = entries[index];
|
1285 | this.set(entry[0], entry[1]);
|
1286 | }
|
1287 | }
|
1288 | |
1289 |
|
1290 |
|
1291 |
|
1292 |
|
1293 |
|
1294 |
|
1295 |
|
1296 |
|
1297 | function listCacheClear() {
|
1298 | this.__data__ = [];
|
1299 | }
|
1300 | |
1301 |
|
1302 |
|
1303 |
|
1304 |
|
1305 |
|
1306 |
|
1307 |
|
1308 |
|
1309 |
|
1310 |
|
1311 | function listCacheDelete(key) {
|
1312 | var data = this.__data__,
|
1313 | index = assocIndexOf(data, key);
|
1314 |
|
1315 | if (index < 0) {
|
1316 | return false;
|
1317 | }
|
1318 |
|
1319 | var lastIndex = data.length - 1;
|
1320 |
|
1321 | if (index == lastIndex) {
|
1322 | data.pop();
|
1323 | } else {
|
1324 | splice.call(data, index, 1);
|
1325 | }
|
1326 |
|
1327 | return true;
|
1328 | }
|
1329 | |
1330 |
|
1331 |
|
1332 |
|
1333 |
|
1334 |
|
1335 |
|
1336 |
|
1337 |
|
1338 |
|
1339 |
|
1340 | function listCacheGet(key) {
|
1341 | var data = this.__data__,
|
1342 | index = assocIndexOf(data, key);
|
1343 | return index < 0 ? undefined : data[index][1];
|
1344 | }
|
1345 | |
1346 |
|
1347 |
|
1348 |
|
1349 |
|
1350 |
|
1351 |
|
1352 |
|
1353 |
|
1354 |
|
1355 |
|
1356 | function listCacheHas(key) {
|
1357 | return assocIndexOf(this.__data__, key) > -1;
|
1358 | }
|
1359 | |
1360 |
|
1361 |
|
1362 |
|
1363 |
|
1364 |
|
1365 |
|
1366 |
|
1367 |
|
1368 |
|
1369 |
|
1370 |
|
1371 | function listCacheSet(key, value) {
|
1372 | var data = this.__data__,
|
1373 | index = assocIndexOf(data, key);
|
1374 |
|
1375 | if (index < 0) {
|
1376 | data.push([key, value]);
|
1377 | } else {
|
1378 | data[index][1] = value;
|
1379 | }
|
1380 |
|
1381 | return this;
|
1382 | }
|
1383 |
|
1384 |
|
1385 | ListCache.prototype.clear = listCacheClear;
|
1386 | ListCache.prototype['delete'] = listCacheDelete;
|
1387 | ListCache.prototype.get = listCacheGet;
|
1388 | ListCache.prototype.has = listCacheHas;
|
1389 | ListCache.prototype.set = listCacheSet;
|
1390 | |
1391 |
|
1392 |
|
1393 |
|
1394 |
|
1395 |
|
1396 |
|
1397 |
|
1398 | function MapCache(entries) {
|
1399 | var index = -1,
|
1400 | length = entries ? entries.length : 0;
|
1401 | this.clear();
|
1402 |
|
1403 | while (++index < length) {
|
1404 | var entry = entries[index];
|
1405 | this.set(entry[0], entry[1]);
|
1406 | }
|
1407 | }
|
1408 | |
1409 |
|
1410 |
|
1411 |
|
1412 |
|
1413 |
|
1414 |
|
1415 |
|
1416 |
|
1417 | function mapCacheClear() {
|
1418 | this.__data__ = {
|
1419 | 'hash': new Hash(),
|
1420 | 'map': new (Map$1 || ListCache)(),
|
1421 | 'string': new Hash()
|
1422 | };
|
1423 | }
|
1424 | |
1425 |
|
1426 |
|
1427 |
|
1428 |
|
1429 |
|
1430 |
|
1431 |
|
1432 |
|
1433 |
|
1434 |
|
1435 | function mapCacheDelete(key) {
|
1436 | return getMapData(this, key)['delete'](key);
|
1437 | }
|
1438 | |
1439 |
|
1440 |
|
1441 |
|
1442 |
|
1443 |
|
1444 |
|
1445 |
|
1446 |
|
1447 |
|
1448 |
|
1449 | function mapCacheGet(key) {
|
1450 | return getMapData(this, key).get(key);
|
1451 | }
|
1452 | |
1453 |
|
1454 |
|
1455 |
|
1456 |
|
1457 |
|
1458 |
|
1459 |
|
1460 |
|
1461 |
|
1462 |
|
1463 | function mapCacheHas(key) {
|
1464 | return getMapData(this, key).has(key);
|
1465 | }
|
1466 | |
1467 |
|
1468 |
|
1469 |
|
1470 |
|
1471 |
|
1472 |
|
1473 |
|
1474 |
|
1475 |
|
1476 |
|
1477 |
|
1478 | function mapCacheSet(key, value) {
|
1479 | getMapData(this, key).set(key, value);
|
1480 | return this;
|
1481 | }
|
1482 |
|
1483 |
|
1484 | MapCache.prototype.clear = mapCacheClear;
|
1485 | MapCache.prototype['delete'] = mapCacheDelete;
|
1486 | MapCache.prototype.get = mapCacheGet;
|
1487 | MapCache.prototype.has = mapCacheHas;
|
1488 | MapCache.prototype.set = mapCacheSet;
|
1489 | |
1490 |
|
1491 |
|
1492 |
|
1493 |
|
1494 |
|
1495 |
|
1496 |
|
1497 |
|
1498 | function assocIndexOf(array, key) {
|
1499 | var length = array.length;
|
1500 |
|
1501 | while (length--) {
|
1502 | if (eq(array[length][0], key)) {
|
1503 | return length;
|
1504 | }
|
1505 | }
|
1506 |
|
1507 | return -1;
|
1508 | }
|
1509 | |
1510 |
|
1511 |
|
1512 |
|
1513 |
|
1514 |
|
1515 |
|
1516 |
|
1517 |
|
1518 |
|
1519 | function baseGet(object, path) {
|
1520 | path = isKey(path, object) ? [path] : castPath(path);
|
1521 | var index = 0,
|
1522 | length = path.length;
|
1523 |
|
1524 | while (object != null && index < length) {
|
1525 | object = object[toKey(path[index++])];
|
1526 | }
|
1527 |
|
1528 | return index && index == length ? object : undefined;
|
1529 | }
|
1530 | |
1531 |
|
1532 |
|
1533 |
|
1534 |
|
1535 |
|
1536 |
|
1537 |
|
1538 |
|
1539 |
|
1540 | function baseIsNative(value) {
|
1541 | if (!isObject$2(value) || isMasked(value)) {
|
1542 | return false;
|
1543 | }
|
1544 |
|
1545 | var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
|
1546 | return pattern.test(toSource(value));
|
1547 | }
|
1548 | |
1549 |
|
1550 |
|
1551 |
|
1552 |
|
1553 |
|
1554 |
|
1555 |
|
1556 |
|
1557 |
|
1558 | function baseToString(value) {
|
1559 |
|
1560 | if (typeof value == 'string') {
|
1561 | return value;
|
1562 | }
|
1563 |
|
1564 | if (isSymbol(value)) {
|
1565 | return symbolToString ? symbolToString.call(value) : '';
|
1566 | }
|
1567 |
|
1568 | var result = value + '';
|
1569 | return result == '0' && 1 / value == -INFINITY ? '-0' : result;
|
1570 | }
|
1571 | |
1572 |
|
1573 |
|
1574 |
|
1575 |
|
1576 |
|
1577 |
|
1578 |
|
1579 |
|
1580 | function castPath(value) {
|
1581 | return isArray(value) ? value : stringToPath(value);
|
1582 | }
|
1583 | |
1584 |
|
1585 |
|
1586 |
|
1587 |
|
1588 |
|
1589 |
|
1590 |
|
1591 |
|
1592 |
|
1593 | function getMapData(map, key) {
|
1594 | var data = map.__data__;
|
1595 | return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map;
|
1596 | }
|
1597 | |
1598 |
|
1599 |
|
1600 |
|
1601 |
|
1602 |
|
1603 |
|
1604 |
|
1605 |
|
1606 |
|
1607 | function getNative(object, key) {
|
1608 | var value = getValue(object, key);
|
1609 | return baseIsNative(value) ? value : undefined;
|
1610 | }
|
1611 | |
1612 |
|
1613 |
|
1614 |
|
1615 |
|
1616 |
|
1617 |
|
1618 |
|
1619 |
|
1620 |
|
1621 | function isKey(value, object) {
|
1622 | if (isArray(value)) {
|
1623 | return false;
|
1624 | }
|
1625 |
|
1626 | var type = _typeof(value);
|
1627 |
|
1628 | if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) {
|
1629 | return true;
|
1630 | }
|
1631 |
|
1632 | return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
|
1633 | }
|
1634 | |
1635 |
|
1636 |
|
1637 |
|
1638 |
|
1639 |
|
1640 |
|
1641 |
|
1642 |
|
1643 | function isKeyable(value) {
|
1644 | var type = _typeof(value);
|
1645 |
|
1646 | return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null;
|
1647 | }
|
1648 | |
1649 |
|
1650 |
|
1651 |
|
1652 |
|
1653 |
|
1654 |
|
1655 |
|
1656 |
|
1657 | function isMasked(func) {
|
1658 | return !!maskSrcKey && maskSrcKey in func;
|
1659 | }
|
1660 | |
1661 |
|
1662 |
|
1663 |
|
1664 |
|
1665 |
|
1666 |
|
1667 |
|
1668 |
|
1669 | var stringToPath = memoize(function (string) {
|
1670 | string = toString(string);
|
1671 | var result = [];
|
1672 |
|
1673 | if (reLeadingDot.test(string)) {
|
1674 | result.push('');
|
1675 | }
|
1676 |
|
1677 | string.replace(rePropName, function (match, number, quote, string) {
|
1678 | result.push(quote ? string.replace(reEscapeChar, '$1') : number || match);
|
1679 | });
|
1680 | return result;
|
1681 | });
|
1682 | |
1683 |
|
1684 |
|
1685 |
|
1686 |
|
1687 |
|
1688 |
|
1689 |
|
1690 | function toKey(value) {
|
1691 | if (typeof value == 'string' || isSymbol(value)) {
|
1692 | return value;
|
1693 | }
|
1694 |
|
1695 | var result = value + '';
|
1696 | return result == '0' && 1 / value == -INFINITY ? '-0' : result;
|
1697 | }
|
1698 | |
1699 |
|
1700 |
|
1701 |
|
1702 |
|
1703 |
|
1704 |
|
1705 |
|
1706 |
|
1707 | function toSource(func) {
|
1708 | if (func != null) {
|
1709 | try {
|
1710 | return funcToString.call(func);
|
1711 | } catch (e) {}
|
1712 |
|
1713 | try {
|
1714 | return func + '';
|
1715 | } catch (e) {}
|
1716 | }
|
1717 |
|
1718 | return '';
|
1719 | }
|
1720 | |
1721 |
|
1722 |
|
1723 |
|
1724 |
|
1725 |
|
1726 |
|
1727 |
|
1728 |
|
1729 |
|
1730 |
|
1731 |
|
1732 |
|
1733 |
|
1734 |
|
1735 |
|
1736 |
|
1737 |
|
1738 |
|
1739 |
|
1740 |
|
1741 |
|
1742 |
|
1743 |
|
1744 |
|
1745 |
|
1746 |
|
1747 |
|
1748 |
|
1749 |
|
1750 |
|
1751 |
|
1752 |
|
1753 |
|
1754 |
|
1755 |
|
1756 |
|
1757 |
|
1758 |
|
1759 |
|
1760 |
|
1761 |
|
1762 |
|
1763 |
|
1764 |
|
1765 |
|
1766 | function memoize(func, resolver) {
|
1767 | if (typeof func != 'function' || resolver && typeof resolver != 'function') {
|
1768 | throw new TypeError(FUNC_ERROR_TEXT);
|
1769 | }
|
1770 |
|
1771 | var memoized = function memoized() {
|
1772 | var args = arguments,
|
1773 | key = resolver ? resolver.apply(this, args) : args[0],
|
1774 | cache = memoized.cache;
|
1775 |
|
1776 | if (cache.has(key)) {
|
1777 | return cache.get(key);
|
1778 | }
|
1779 |
|
1780 | var result = func.apply(this, args);
|
1781 | memoized.cache = cache.set(key, result);
|
1782 | return result;
|
1783 | };
|
1784 |
|
1785 | memoized.cache = new (memoize.Cache || MapCache)();
|
1786 | return memoized;
|
1787 | }
|
1788 |
|
1789 |
|
1790 | memoize.Cache = MapCache;
|
1791 | |
1792 |
|
1793 |
|
1794 |
|
1795 |
|
1796 |
|
1797 |
|
1798 |
|
1799 |
|
1800 |
|
1801 |
|
1802 |
|
1803 |
|
1804 |
|
1805 |
|
1806 |
|
1807 |
|
1808 |
|
1809 |
|
1810 |
|
1811 |
|
1812 |
|
1813 |
|
1814 |
|
1815 |
|
1816 |
|
1817 |
|
1818 |
|
1819 |
|
1820 |
|
1821 |
|
1822 |
|
1823 |
|
1824 | function eq(value, other) {
|
1825 | return value === other || value !== value && other !== other;
|
1826 | }
|
1827 | |
1828 |
|
1829 |
|
1830 |
|
1831 |
|
1832 |
|
1833 |
|
1834 |
|
1835 |
|
1836 |
|
1837 |
|
1838 |
|
1839 |
|
1840 |
|
1841 |
|
1842 |
|
1843 |
|
1844 |
|
1845 |
|
1846 |
|
1847 |
|
1848 |
|
1849 |
|
1850 |
|
1851 |
|
1852 | var isArray = Array.isArray;
|
1853 | |
1854 |
|
1855 |
|
1856 |
|
1857 |
|
1858 |
|
1859 |
|
1860 |
|
1861 |
|
1862 |
|
1863 |
|
1864 |
|
1865 |
|
1866 |
|
1867 |
|
1868 |
|
1869 |
|
1870 |
|
1871 | function isFunction(value) {
|
1872 |
|
1873 |
|
1874 | var tag = isObject$2(value) ? objectToString.call(value) : '';
|
1875 | return tag == funcTag || tag == genTag;
|
1876 | }
|
1877 | |
1878 |
|
1879 |
|
1880 |
|
1881 |
|
1882 |
|
1883 |
|
1884 |
|
1885 |
|
1886 |
|
1887 |
|
1888 |
|
1889 |
|
1890 |
|
1891 |
|
1892 |
|
1893 |
|
1894 |
|
1895 |
|
1896 |
|
1897 |
|
1898 |
|
1899 |
|
1900 |
|
1901 |
|
1902 |
|
1903 |
|
1904 | function isObject$2(value) {
|
1905 | var type = _typeof(value);
|
1906 |
|
1907 | return !!value && (type == 'object' || type == 'function');
|
1908 | }
|
1909 | |
1910 |
|
1911 |
|
1912 |
|
1913 |
|
1914 |
|
1915 |
|
1916 |
|
1917 |
|
1918 |
|
1919 |
|
1920 |
|
1921 |
|
1922 |
|
1923 |
|
1924 |
|
1925 |
|
1926 |
|
1927 |
|
1928 |
|
1929 |
|
1930 |
|
1931 |
|
1932 |
|
1933 |
|
1934 |
|
1935 | function isObjectLike(value) {
|
1936 | return !!value && _typeof(value) == 'object';
|
1937 | }
|
1938 | |
1939 |
|
1940 |
|
1941 |
|
1942 |
|
1943 |
|
1944 |
|
1945 |
|
1946 |
|
1947 |
|
1948 |
|
1949 |
|
1950 |
|
1951 |
|
1952 |
|
1953 |
|
1954 |
|
1955 |
|
1956 |
|
1957 | function isSymbol(value) {
|
1958 | return _typeof(value) == 'symbol' || isObjectLike(value) && objectToString.call(value) == symbolTag;
|
1959 | }
|
1960 | |
1961 |
|
1962 |
|
1963 |
|
1964 |
|
1965 |
|
1966 |
|
1967 |
|
1968 |
|
1969 |
|
1970 |
|
1971 |
|
1972 |
|
1973 |
|
1974 |
|
1975 |
|
1976 |
|
1977 |
|
1978 |
|
1979 |
|
1980 |
|
1981 |
|
1982 |
|
1983 | function toString(value) {
|
1984 | return value == null ? '' : baseToString(value);
|
1985 | }
|
1986 | |
1987 |
|
1988 |
|
1989 |
|
1990 |
|
1991 |
|
1992 |
|
1993 |
|
1994 |
|
1995 |
|
1996 |
|
1997 |
|
1998 |
|
1999 |
|
2000 |
|
2001 |
|
2002 |
|
2003 |
|
2004 |
|
2005 |
|
2006 |
|
2007 |
|
2008 |
|
2009 |
|
2010 |
|
2011 |
|
2012 |
|
2013 | function get$3(object, path, defaultValue) {
|
2014 | var result = object == null ? undefined : baseGet(object, path);
|
2015 | return result === undefined ? defaultValue : result;
|
2016 | }
|
2017 |
|
2018 | var lodash_get = get$3;
|
2019 |
|
2020 | var formDataFactory = {
|
2021 | createFormData: function createFormData() {
|
2022 | {
|
2023 | return new FormData();
|
2024 | }
|
2025 | }
|
2026 | };
|
2027 |
|
2028 | var axios = require$$0__default["default"];
|
2029 | var get$2 = lodash_get;
|
2030 | var FormDataFactory$1 = formDataFactory;
|
2031 |
|
2032 | function getInstance(options) {
|
2033 | var instance = axios.create(options);
|
2034 | instance.interceptors.response.use(function (response) {
|
2035 | var otcsticket = get$2(response, 'headers.otcsticket');
|
2036 |
|
2037 | if (otcsticket) {
|
2038 | instance.defaults.headers.common.OTCSTicket = otcsticket;
|
2039 | }
|
2040 |
|
2041 | return response;
|
2042 | }, function (error) {
|
2043 | return Promise.reject(error);
|
2044 | });
|
2045 | return instance;
|
2046 | }
|
2047 |
|
2048 | function axiosFactory$1(options) {
|
2049 | var instance = getInstance(options);
|
2050 | var username = get$2(options, 'username');
|
2051 | var password = get$2(options, 'password');
|
2052 | var otcsticket = get$2(options, 'otcsticket');
|
2053 |
|
2054 | if (otcsticket) {
|
2055 | instance.defaults.headers.common.OTCSTicket = otcsticket;
|
2056 | } else if (username && password) {
|
2057 | instance.interceptors.request.use( function () {
|
2058 | var _ref = _asyncToGenerator( regeneratorRuntime.mark(function _callee(request) {
|
2059 | var formData, response;
|
2060 | return regeneratorRuntime.wrap(function _callee$(_context) {
|
2061 | while (1) {
|
2062 | switch (_context.prev = _context.next) {
|
2063 | case 0:
|
2064 | if (!request.headers.common.OTCSTicket) {
|
2065 | _context.next = 4;
|
2066 | break;
|
2067 | }
|
2068 |
|
2069 | return _context.abrupt("return", request);
|
2070 |
|
2071 | case 4:
|
2072 | formData = FormDataFactory$1.createFormData();
|
2073 | formData.append('username', username);
|
2074 | formData.append('password', password);
|
2075 |
|
2076 | {
|
2077 | _context.next = 13;
|
2078 | break;
|
2079 | }
|
2080 |
|
2081 | case 10:
|
2082 | _context.t0 = _context.sent;
|
2083 | _context.next = 16;
|
2084 | break;
|
2085 |
|
2086 | case 13:
|
2087 | _context.next = 15;
|
2088 | return axios.post("".concat(options.baseURL, "/api/v1/auth/"), formData);
|
2089 |
|
2090 | case 15:
|
2091 | _context.t0 = _context.sent;
|
2092 |
|
2093 | case 16:
|
2094 | response = _context.t0;
|
2095 | request.headers.common.OTCSTicket = get$2(response, 'data.ticket');
|
2096 | return _context.abrupt("return", request);
|
2097 |
|
2098 | case 19:
|
2099 | case "end":
|
2100 | return _context.stop();
|
2101 | }
|
2102 | }
|
2103 | }, _callee);
|
2104 | }));
|
2105 |
|
2106 | return function (_x) {
|
2107 | return _ref.apply(this, arguments);
|
2108 | };
|
2109 | }());
|
2110 | } else {
|
2111 | throw Error('You must provide an otcsticket or username and password.');
|
2112 | }
|
2113 |
|
2114 | return instance;
|
2115 | }
|
2116 |
|
2117 | var axiosFactory_1 = axiosFactory$1;
|
2118 |
|
2119 | var auth$1 = function auth(session) {
|
2120 | return {
|
2121 | auth: function auth() {
|
2122 | return session.get('/api/v1/auth/');
|
2123 | }
|
2124 | };
|
2125 | };
|
2126 |
|
2127 | var Accession = 834;
|
2128 | var ActiveFolder = 1298;
|
2129 | var Activeview = 30309;
|
2130 | var ActivityManager = 907;
|
2131 | var Alias = 1;
|
2132 | var Appearance = 480;
|
2133 | var AppearanceFolder = 483;
|
2134 | var AppearancesVolume = 481;
|
2135 | var ArchiveFolder = 31711;
|
2136 | var BackupManager = 290;
|
2137 | var BackupProcess = 291;
|
2138 | var BestBets = 274;
|
2139 | var Blog = 356;
|
2140 | var BlogEntry = 357;
|
2141 | var BoxFolder = 530;
|
2142 | var Category = 131;
|
2143 | var CategoryFolder = 132;
|
2144 | var Channel = 207;
|
2145 | var ChannelVol = 209;
|
2146 | var Classification = 199;
|
2147 | var ClassificationTree = 196;
|
2148 | var ClassifiedItems = 194;
|
2149 | var Collection = 298;
|
2150 | var Column = 902;
|
2151 | var Comments = 345;
|
2152 | var CommentsReply = 348;
|
2153 | var CommentsVol = 346;
|
2154 | var CommExpertContainer = 3030338;
|
2155 | var CommExpertGroup = 3030339;
|
2156 | var CommStore = 3030329;
|
2157 | var CommTemplate = 3030002;
|
2158 | var CommTemplateFolder = 3030333;
|
2159 | var CommTemplateVol = 3030004;
|
2160 | var CommURLStore = 3030335;
|
2161 | var CommWorkspace = 3030334;
|
2162 | var CommXSLVolume = 3030205;
|
2163 | var CompoundDoc = 136;
|
2164 | var CompoundEMail = 557;
|
2165 | var ContentModuleFolder = 3030372;
|
2166 | var CustomView = 146;
|
2167 | var CustomViewTemplate = 844;
|
2168 | var DataFlowManager = 270;
|
2169 | var DataSourceFolder = 276;
|
2170 | var DirWalker = 277;
|
2171 | var Discussion = 215;
|
2172 | var DispositionGroup = 602;
|
2173 | var Document = 144;
|
2174 | var DocumentLLNode = 1297;
|
2175 | var DocumentServer = 283;
|
2176 | var Dossier = 32912;
|
2177 | var DossierCabinet = 32916;
|
2178 | var DossierCabinetArchive = 31707;
|
2179 | var DossierTemplate = 32914;
|
2180 | var DossierTemplateFolder = 31709;
|
2181 | var DossierTemplatesVolume = 32917;
|
2182 | var DossierTemplateVolume = 32915;
|
2183 | var DossierVolume = 32913;
|
2184 | var DPSBinding = 31602;
|
2185 | var DPSFolder = 31601;
|
2186 | var DPSVolume = 31603;
|
2187 | var DTDLLNode = 335;
|
2188 | var DynamicView = 900;
|
2189 | var EMail = 749;
|
2190 | var EmailConversationItems = 2504;
|
2191 | var Facet = 904;
|
2192 | var FacetFolder = 905;
|
2193 | var FacetTree = 903;
|
2194 | var FailedFolder = 1299;
|
2195 | var FixedSystemColumn = 906;
|
2196 | var Folder = 0;
|
2197 | var Form = 223;
|
2198 | var Generation = 2;
|
2199 | var GENERICCONTENTMODULE = 3030371;
|
2200 | var GlobalAppearance = 482;
|
2201 | var HoldContainer = 833;
|
2202 | var HTMLConversion = 282;
|
2203 | var HTMLFormView = 226;
|
2204 | var Importer = 293;
|
2205 | var Inbox = 731;
|
2206 | var IndexEngine = 368;
|
2207 | var IndexTracer = 147;
|
2208 | var IndexUpdate = 281;
|
2209 | var InternalOTDS = 924;
|
2210 | var ItemTemplateVol = 541;
|
2211 | var ItemTemplateVolFolder = 542;
|
2212 | var JournalVolume = 361;
|
2213 | var LibraryExtractor = 259;
|
2214 | var LibraryObj = 272;
|
2215 | var LLNodeFAQ = 123475;
|
2216 | var LLNodeFAQEntry = 123476;
|
2217 | var LLNodeForum = 123469;
|
2218 | var LLNodeForumEntry = 123470;
|
2219 | var LLNodeURQuestion = 430;
|
2220 | var LLNodeURReply = 432;
|
2221 | var Locators = 422;
|
2222 | var Mailbox = 732;
|
2223 | var MailStore = 3030331;
|
2224 | var ManagedSpace = 31710;
|
2225 | var MediaType = 410;
|
2226 | var MediaTypesContainer = 414;
|
2227 | var MemcachedFolder = 919;
|
2228 | var MemcachedProcess = 920;
|
2229 | var Merge = 273;
|
2230 | var MicroPost = 1281;
|
2231 | var MicroPostVolume = 1282;
|
2232 | var MultiVolClassification = 372;
|
2233 | var MultiVolClassificationProxy = 374;
|
2234 | var MultiVolClassificationTree = 373;
|
2235 | var MyReservedItems = 870;
|
2236 | var MyWorkbenches = 532;
|
2237 | var NAVMENUVOL = 3030756;
|
2238 | var News = 208;
|
2239 | var OTCIndexObj = 257;
|
2240 | var Partition = 371;
|
2241 | var PartitionMap = 370;
|
2242 | var PersonalComm = 3030203;
|
2243 | var PersonalCommSystemVolume = 3030003;
|
2244 | var PersonalCommVol = 3030204;
|
2245 | var PersonalStagingFolder = 398;
|
2246 | var PersonalWebpage = 3030343;
|
2247 | var PhysicalItemBox = 424;
|
2248 | var PhysicalItemContainer = 412;
|
2249 | var PhysicalItemCopy = 419;
|
2250 | var PhysicalItem_non_Container = 411;
|
2251 | var PhysObjAdmin = 415;
|
2252 | var PhysObjBatchLabels = 418;
|
2253 | var PhysObjCirculation = 416;
|
2254 | var PhysObjReports = 417;
|
2255 | var Poll = 218;
|
2256 | var Process = 271;
|
2257 | var Profile = 195;
|
2258 | var Project = 202;
|
2259 | var ProjectTemplate = 543;
|
2260 | var ProjectVol = 201;
|
2261 | var Prospector = 384;
|
2262 | var ProspectorQueries = 380;
|
2263 | var ProspectorSnapshot = 387;
|
2264 | var Provenance = 829;
|
2265 | var PublishingFolder = 31712;
|
2266 | var PublishingFolderVolume = 31713;
|
2267 | var QAFolder = 441;
|
2268 | var QueryFile = 296;
|
2269 | var QuestionVolume = 431;
|
2270 | var RecentItems = 327;
|
2271 | var RecordType$1 = 425;
|
2272 | var RecordTypesContainer = 428;
|
2273 | var RedForm = 32918;
|
2274 | var RedFormVolume = 32919;
|
2275 | var Release = 138;
|
2276 | var RemoteLLDataSource = 381;
|
2277 | var Reply = 134;
|
2278 | var Report = 299;
|
2279 | var Revision = 139;
|
2280 | var RIMSDisposition = 555;
|
2281 | var RIMSDispositionsContainer = 554;
|
2282 | var RIMSHoldMaintenance = 552;
|
2283 | var RIMSRsiContainer = 553;
|
2284 | var RMAdministration = 556;
|
2285 | var RMClassification = 551;
|
2286 | var RMFolder = 426;
|
2287 | var RMPart = 427;
|
2288 | var RMReportsContainer = 558;
|
2289 | var RMThesaurus = 559;
|
2290 | var ScanConfigurationVolume = 2505;
|
2291 | var ScheduledHoldCriteria = 835;
|
2292 | var ScriptNode = 32901;
|
2293 | var SearchBroker = 258;
|
2294 | var SearchEngine = 369;
|
2295 | var SearchManager = 269;
|
2296 | var SearchReport = 278;
|
2297 | var SearchResultsTemplate = 383;
|
2298 | var SearchTemplate = 292;
|
2299 | var Simplate = 31678;
|
2300 | var SkyPodLLVolume = 49547;
|
2301 | var SliceFolder = 275;
|
2302 | var SocialObject = 1280;
|
2303 | var SocialObjectVolume = 1283;
|
2304 | var SPCJOBDESCR = 797;
|
2305 | var SPCJOBDESCRFOLDER = 796;
|
2306 | var SPCVOLUME = 795;
|
2307 | var spdcommittee = 3030202;
|
2308 | var spdcommitteevol = 3030201;
|
2309 | var spdcommitteevolume = 3030001;
|
2310 | var spdemail = 3030130;
|
2311 | var Spider = 280;
|
2312 | var StorageManagement = 421;
|
2313 | var SubmitVersionNode = 231;
|
2314 | var Task = 206;
|
2315 | var TaskGroup = 205;
|
2316 | var TaskList = 204;
|
2317 | var TaskListVol = 210;
|
2318 | var TaskMilestone = 212;
|
2319 | var Template = 230;
|
2320 | var TemplateFolder = 268;
|
2321 | var TextDocument = 145;
|
2322 | var Topic = 130;
|
2323 | var Transfers = 423;
|
2324 | var TransportBox = 531;
|
2325 | var TransportItem = 526;
|
2326 | var TransportItemPart = 527;
|
2327 | var UrgentRequests = 3030330;
|
2328 | var URL = 140;
|
2329 | var VirtualFolder = 899;
|
2330 | var VolBlog = 123461;
|
2331 | var VolCategories = 133;
|
2332 | var VolClassification = 198;
|
2333 | var VolComments = 347;
|
2334 | var VolDAP = 987352;
|
2335 | var VolDeletedItems = 405;
|
2336 | var VolDirectory = 375;
|
2337 | var VolDiscussion = 143;
|
2338 | var VolDomainWorkspace = 180;
|
2339 | var VolDTD = 336;
|
2340 | var VolEditWorkflow = 162;
|
2341 | var VolFacets = 901;
|
2342 | var VolLibrary = 141;
|
2343 | var VolOrphan = 403;
|
2344 | var VolPersonalStaging = 397;
|
2345 | var VolPerspectives = 908;
|
2346 | var VolPhysObj = 413;
|
2347 | var VolRecMan = 550;
|
2348 | var VolRelease = 137;
|
2349 | var VolReports = 211;
|
2350 | var VolSystem = 148;
|
2351 | var VolTracer = 149;
|
2352 | var VolumeFolder = 484;
|
2353 | var VolumeLLVolume = 1296;
|
2354 | var VolWarehouse = 525;
|
2355 | var VolWorkbin = 142;
|
2356 | var VolWorkflow = 161;
|
2357 | var WarehouseFolder = 529;
|
2358 | var WebFormConnectionVolume = 236;
|
2359 | var WebFormDatabaseConnection = 235;
|
2360 | var WebFormLookup = 234;
|
2361 | var WebFormLookupVolume = 233;
|
2362 | var WebReports = 30303;
|
2363 | var WFMapLLNode = 128;
|
2364 | var WFStatusNode = 190;
|
2365 | var WIKI = 5573;
|
2366 | var WIKIPAGE = 5574;
|
2367 | var Workbench = 528;
|
2368 | var WorkflowAttachments = 154;
|
2369 | var XMLActivatorCon = 286;
|
2370 | var XMLActivatorProd = 285;
|
2371 | var require$$0 = {
|
2372 | "2WayTee": 294,
|
2373 | Accession: Accession,
|
2374 | ActiveFolder: ActiveFolder,
|
2375 | Activeview: Activeview,
|
2376 | ActivityManager: ActivityManager,
|
2377 | Alias: Alias,
|
2378 | Appearance: Appearance,
|
2379 | AppearanceFolder: AppearanceFolder,
|
2380 | AppearancesVolume: AppearancesVolume,
|
2381 | ArchiveFolder: ArchiveFolder,
|
2382 | BackupManager: BackupManager,
|
2383 | BackupProcess: BackupProcess,
|
2384 | BestBets: BestBets,
|
2385 | Blog: Blog,
|
2386 | BlogEntry: BlogEntry,
|
2387 | BoxFolder: BoxFolder,
|
2388 | Category: Category,
|
2389 | CategoryFolder: CategoryFolder,
|
2390 | Channel: Channel,
|
2391 | ChannelVol: ChannelVol,
|
2392 | Classification: Classification,
|
2393 | "Classification Shortcut": 197,
|
2394 | ClassificationTree: ClassificationTree,
|
2395 | ClassifiedItems: ClassifiedItems,
|
2396 | Collection: Collection,
|
2397 | Column: Column,
|
2398 | Comments: Comments,
|
2399 | CommentsReply: CommentsReply,
|
2400 | CommentsVol: CommentsVol,
|
2401 | CommExpertContainer: CommExpertContainer,
|
2402 | CommExpertGroup: CommExpertGroup,
|
2403 | CommStore: CommStore,
|
2404 | CommTemplate: CommTemplate,
|
2405 | CommTemplateFolder: CommTemplateFolder,
|
2406 | CommTemplateVol: CommTemplateVol,
|
2407 | CommURLStore: CommURLStore,
|
2408 | CommWorkspace: CommWorkspace,
|
2409 | CommXSLVolume: CommXSLVolume,
|
2410 | CompoundDoc: CompoundDoc,
|
2411 | CompoundEMail: CompoundEMail,
|
2412 | ContentModuleFolder: ContentModuleFolder,
|
2413 | "csapps CSApplicationManifest": 32658,
|
2414 | "csapps CSApplicationsVolume": 32657,
|
2415 | CustomView: CustomView,
|
2416 | CustomViewTemplate: CustomViewTemplate,
|
2417 | DataFlowManager: DataFlowManager,
|
2418 | DataSourceFolder: DataSourceFolder,
|
2419 | DirWalker: DirWalker,
|
2420 | Discussion: Discussion,
|
2421 | DispositionGroup: DispositionGroup,
|
2422 | Document: Document,
|
2423 | DocumentLLNode: DocumentLLNode,
|
2424 | DocumentServer: DocumentServer,
|
2425 | Dossier: Dossier,
|
2426 | DossierCabinet: DossierCabinet,
|
2427 | DossierCabinetArchive: DossierCabinetArchive,
|
2428 | DossierTemplate: DossierTemplate,
|
2429 | DossierTemplateFolder: DossierTemplateFolder,
|
2430 | DossierTemplatesVolume: DossierTemplatesVolume,
|
2431 | DossierTemplateVolume: DossierTemplateVolume,
|
2432 | DossierVolume: DossierVolume,
|
2433 | DPSBinding: DPSBinding,
|
2434 | DPSFolder: DPSFolder,
|
2435 | DPSVolume: DPSVolume,
|
2436 | DTDLLNode: DTDLLNode,
|
2437 | DynamicView: DynamicView,
|
2438 | EMail: EMail,
|
2439 | EmailConversationItems: EmailConversationItems,
|
2440 | "Enterprise Archive Document": 753,
|
2441 | Facet: Facet,
|
2442 | FacetFolder: FacetFolder,
|
2443 | FacetTree: FacetTree,
|
2444 | FailedFolder: FailedFolder,
|
2445 | FixedSystemColumn: FixedSystemColumn,
|
2446 | Folder: Folder,
|
2447 | Form: Form,
|
2448 | Generation: Generation,
|
2449 | GENERICCONTENTMODULE: GENERICCONTENTMODULE,
|
2450 | GlobalAppearance: GlobalAppearance,
|
2451 | HoldContainer: HoldContainer,
|
2452 | HTMLConversion: HTMLConversion,
|
2453 | HTMLFormView: HTMLFormView,
|
2454 | Importer: Importer,
|
2455 | Inbox: Inbox,
|
2456 | IndexEngine: IndexEngine,
|
2457 | IndexTracer: IndexTracer,
|
2458 | IndexUpdate: IndexUpdate,
|
2459 | InternalOTDS: InternalOTDS,
|
2460 | ItemTemplateVol: ItemTemplateVol,
|
2461 | ItemTemplateVolFolder: ItemTemplateVolFolder,
|
2462 | JournalVolume: JournalVolume,
|
2463 | LibraryExtractor: LibraryExtractor,
|
2464 | LibraryObj: LibraryObj,
|
2465 | "LLNode Email Folder": 751,
|
2466 | LLNodeFAQ: LLNodeFAQ,
|
2467 | LLNodeFAQEntry: LLNodeFAQEntry,
|
2468 | LLNodeForum: LLNodeForum,
|
2469 | LLNodeForumEntry: LLNodeForumEntry,
|
2470 | LLNodeURQuestion: LLNodeURQuestion,
|
2471 | LLNodeURReply: LLNodeURReply,
|
2472 | Locators: Locators,
|
2473 | Mailbox: Mailbox,
|
2474 | MailStore: MailStore,
|
2475 | ManagedSpace: ManagedSpace,
|
2476 | MediaType: MediaType,
|
2477 | MediaTypesContainer: MediaTypesContainer,
|
2478 | MemcachedFolder: MemcachedFolder,
|
2479 | MemcachedProcess: MemcachedProcess,
|
2480 | Merge: Merge,
|
2481 | MicroPost: MicroPost,
|
2482 | MicroPostVolume: MicroPostVolume,
|
2483 | MultiVolClassification: MultiVolClassification,
|
2484 | MultiVolClassificationProxy: MultiVolClassificationProxy,
|
2485 | MultiVolClassificationTree: MultiVolClassificationTree,
|
2486 | MyReservedItems: MyReservedItems,
|
2487 | MyWorkbenches: MyWorkbenches,
|
2488 | NAVMENUVOL: NAVMENUVOL,
|
2489 | News: News,
|
2490 | OTCIndexObj: OTCIndexObj,
|
2491 | Partition: Partition,
|
2492 | PartitionMap: PartitionMap,
|
2493 | PersonalComm: PersonalComm,
|
2494 | PersonalCommSystemVolume: PersonalCommSystemVolume,
|
2495 | PersonalCommVol: PersonalCommVol,
|
2496 | PersonalStagingFolder: PersonalStagingFolder,
|
2497 | PersonalWebpage: PersonalWebpage,
|
2498 | PhysicalItemBox: PhysicalItemBox,
|
2499 | PhysicalItemContainer: PhysicalItemContainer,
|
2500 | PhysicalItemCopy: PhysicalItemCopy,
|
2501 | PhysicalItem_non_Container: PhysicalItem_non_Container,
|
2502 | PhysObjAdmin: PhysObjAdmin,
|
2503 | PhysObjBatchLabels: PhysObjBatchLabels,
|
2504 | PhysObjCirculation: PhysObjCirculation,
|
2505 | PhysObjReports: PhysObjReports,
|
2506 | Poll: Poll,
|
2507 | Process: Process,
|
2508 | Profile: Profile,
|
2509 | Project: Project,
|
2510 | ProjectTemplate: ProjectTemplate,
|
2511 | ProjectVol: ProjectVol,
|
2512 | Prospector: Prospector,
|
2513 | ProspectorQueries: ProspectorQueries,
|
2514 | ProspectorSnapshot: ProspectorSnapshot,
|
2515 | Provenance: Provenance,
|
2516 | "Proxy": 260,
|
2517 | PublishingFolder: PublishingFolder,
|
2518 | PublishingFolderVolume: PublishingFolderVolume,
|
2519 | QAFolder: QAFolder,
|
2520 | QueryFile: QueryFile,
|
2521 | QuestionVolume: QuestionVolume,
|
2522 | RecentItems: RecentItems,
|
2523 | RecordType: RecordType$1,
|
2524 | RecordTypesContainer: RecordTypesContainer,
|
2525 | RedForm: RedForm,
|
2526 | RedFormVolume: RedFormVolume,
|
2527 | Release: Release,
|
2528 | RemoteLLDataSource: RemoteLLDataSource,
|
2529 | Reply: Reply,
|
2530 | Report: Report,
|
2531 | Revision: Revision,
|
2532 | RIMSDisposition: RIMSDisposition,
|
2533 | RIMSDispositionsContainer: RIMSDispositionsContainer,
|
2534 | RIMSHoldMaintenance: RIMSHoldMaintenance,
|
2535 | RIMSRsiContainer: RIMSRsiContainer,
|
2536 | RMAdministration: RMAdministration,
|
2537 | RMClassification: RMClassification,
|
2538 | RMFolder: RMFolder,
|
2539 | RMPart: RMPart,
|
2540 | RMReportsContainer: RMReportsContainer,
|
2541 | RMThesaurus: RMThesaurus,
|
2542 | ScanConfigurationVolume: ScanConfigurationVolume,
|
2543 | ScheduledHoldCriteria: ScheduledHoldCriteria,
|
2544 | ScriptNode: ScriptNode,
|
2545 | SearchBroker: SearchBroker,
|
2546 | SearchEngine: SearchEngine,
|
2547 | SearchManager: SearchManager,
|
2548 | SearchReport: SearchReport,
|
2549 | SearchResultsTemplate: SearchResultsTemplate,
|
2550 | SearchTemplate: SearchTemplate,
|
2551 | Simplate: Simplate,
|
2552 | SkyPodLLVolume: SkyPodLLVolume,
|
2553 | SliceFolder: SliceFolder,
|
2554 | SocialObject: SocialObject,
|
2555 | SocialObjectVolume: SocialObjectVolume,
|
2556 | SPCJOBDESCR: SPCJOBDESCR,
|
2557 | SPCJOBDESCRFOLDER: SPCJOBDESCRFOLDER,
|
2558 | SPCVOLUME: SPCVOLUME,
|
2559 | spdcommittee: spdcommittee,
|
2560 | spdcommitteevol: spdcommitteevol,
|
2561 | spdcommitteevolume: spdcommitteevolume,
|
2562 | spdemail: spdemail,
|
2563 | Spider: Spider,
|
2564 | StorageManagement: StorageManagement,
|
2565 | SubmitVersionNode: SubmitVersionNode,
|
2566 | Task: Task,
|
2567 | TaskGroup: TaskGroup,
|
2568 | TaskList: TaskList,
|
2569 | TaskListVol: TaskListVol,
|
2570 | TaskMilestone: TaskMilestone,
|
2571 | Template: Template,
|
2572 | TemplateFolder: TemplateFolder,
|
2573 | TextDocument: TextDocument,
|
2574 | Topic: Topic,
|
2575 | Transfers: Transfers,
|
2576 | TransportBox: TransportBox,
|
2577 | TransportItem: TransportItem,
|
2578 | TransportItemPart: TransportItemPart,
|
2579 | UrgentRequests: UrgentRequests,
|
2580 | URL: URL,
|
2581 | VirtualFolder: VirtualFolder,
|
2582 | VolBlog: VolBlog,
|
2583 | VolCategories: VolCategories,
|
2584 | VolClassification: VolClassification,
|
2585 | VolComments: VolComments,
|
2586 | VolDAP: VolDAP,
|
2587 | VolDeletedItems: VolDeletedItems,
|
2588 | VolDirectory: VolDirectory,
|
2589 | VolDiscussion: VolDiscussion,
|
2590 | VolDomainWorkspace: VolDomainWorkspace,
|
2591 | VolDTD: VolDTD,
|
2592 | VolEditWorkflow: VolEditWorkflow,
|
2593 | VolFacets: VolFacets,
|
2594 | VolLibrary: VolLibrary,
|
2595 | VolOrphan: VolOrphan,
|
2596 | VolPersonalStaging: VolPersonalStaging,
|
2597 | VolPerspectives: VolPerspectives,
|
2598 | VolPhysObj: VolPhysObj,
|
2599 | VolRecMan: VolRecMan,
|
2600 | VolRelease: VolRelease,
|
2601 | VolReports: VolReports,
|
2602 | VolSystem: VolSystem,
|
2603 | VolTracer: VolTracer,
|
2604 | VolumeFolder: VolumeFolder,
|
2605 | VolumeLLVolume: VolumeLLVolume,
|
2606 | VolWarehouse: VolWarehouse,
|
2607 | VolWorkbin: VolWorkbin,
|
2608 | VolWorkflow: VolWorkflow,
|
2609 | WarehouseFolder: WarehouseFolder,
|
2610 | WebFormConnectionVolume: WebFormConnectionVolume,
|
2611 | WebFormDatabaseConnection: WebFormDatabaseConnection,
|
2612 | WebFormLookup: WebFormLookup,
|
2613 | WebFormLookupVolume: WebFormLookupVolume,
|
2614 | WebReports: WebReports,
|
2615 | WFMapLLNode: WFMapLLNode,
|
2616 | WFStatusNode: WFStatusNode,
|
2617 | WIKI: WIKI,
|
2618 | WIKIPAGE: WIKIPAGE,
|
2619 | Workbench: Workbench,
|
2620 | WorkflowAttachments: WorkflowAttachments,
|
2621 | XMLActivatorCon: XMLActivatorCon,
|
2622 | XMLActivatorProd: XMLActivatorProd
|
2623 | };
|
2624 |
|
2625 |
|
2626 |
|
2627 | var SubTypes = require$$0;
|
2628 |
|
2629 | var nodes$1 = function nodes(session) {
|
2630 | return {
|
2631 | addablenodetypes: function addablenodetypes(dataid) {
|
2632 | return session.get("api/v1/nodes/".concat(dataid, "/addablenodetypes"));
|
2633 | },
|
2634 | addDocument: function addDocument(_ref) {
|
2635 | return _asyncToGenerator( regeneratorRuntime.mark(function _callee() {
|
2636 | var parent_id, fileHandler, _ref$apiVersion, apiVersion, _ref$name, name, _ref$options, options, url, path, f, csName, params, _csName, _params;
|
2637 |
|
2638 | return regeneratorRuntime.wrap(function _callee$(_context) {
|
2639 | while (1) {
|
2640 | switch (_context.prev = _context.next) {
|
2641 | case 0:
|
2642 | parent_id = _ref.parent_id, fileHandler = _ref.fileHandler, _ref$apiVersion = _ref.apiVersion, apiVersion = _ref$apiVersion === void 0 ? 'v1' : _ref$apiVersion, _ref$name = _ref.name, name = _ref$name === void 0 ? null : _ref$name, _ref$options = _ref.options, options = _ref$options === void 0 ? {} : _ref$options;
|
2643 | console.assert(parent_id != null, 'parent_id cannot be null');
|
2644 | console.assert(fileHandler != null, 'fileHandler cannot be null');
|
2645 | console.assert(['v1', 'v2'].includes(apiVersion), "apiVersion must be in ['v1','v2']");
|
2646 | url = "api/".concat(apiVersion, "/nodes");
|
2647 |
|
2648 | {
|
2649 | _context.next = 16;
|
2650 | break;
|
2651 | }
|
2652 |
|
2653 | case 10:
|
2654 | f = _context.sent;
|
2655 | csName = name || path.basename(fileHandler);
|
2656 | params = _objectSpread2(_objectSpread2({}, options), {}, {
|
2657 | type: SubTypes.Document,
|
2658 | name: csName,
|
2659 | parent_id: parent_id,
|
2660 | file: {
|
2661 | file: f,
|
2662 | name: csName
|
2663 | }
|
2664 | });
|
2665 | return _context.abrupt("return", session.postForm(url, params));
|
2666 |
|
2667 | case 16:
|
2668 |
|
2669 | _csName = name || fileHandler.name;
|
2670 | _params = _objectSpread2(_objectSpread2({}, options), {}, {
|
2671 | type: SubTypes.Document,
|
2672 | name: _csName,
|
2673 | parent_id: parent_id,
|
2674 | file: {
|
2675 | file: fileHandler,
|
2676 | name: _csName
|
2677 | }
|
2678 | });
|
2679 | return _context.abrupt("return", session.postForm(url, _params));
|
2680 |
|
2681 | case 19:
|
2682 | case "end":
|
2683 | return _context.stop();
|
2684 | }
|
2685 | }
|
2686 | }, _callee);
|
2687 | }))();
|
2688 | },
|
2689 | addDocumentMajor: function addDocumentMajor(_ref2) {
|
2690 | var _this = this;
|
2691 |
|
2692 | return _asyncToGenerator( regeneratorRuntime.mark(function _callee2() {
|
2693 | var parent_id, fileHandler, _ref2$name, name, _ref2$description, description, _ref2$options, options, response, dataid;
|
2694 |
|
2695 | return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
2696 | while (1) {
|
2697 | switch (_context2.prev = _context2.next) {
|
2698 | case 0:
|
2699 | parent_id = _ref2.parent_id, fileHandler = _ref2.fileHandler, _ref2$name = _ref2.name, name = _ref2$name === void 0 ? null : _ref2$name, _ref2$description = _ref2.description, description = _ref2$description === void 0 ? null : _ref2$description, _ref2$options = _ref2.options, options = _ref2$options === void 0 ? {} : _ref2$options;
|
2700 | _context2.next = 3;
|
2701 | return _this.addDocument({
|
2702 | parent_id: parent_id,
|
2703 | fileHandler: fileHandler,
|
2704 | name: name,
|
2705 | options: _objectSpread2(_objectSpread2({}, options), {}, {
|
2706 | advanced_versioning: true
|
2707 | })
|
2708 | });
|
2709 |
|
2710 | case 3:
|
2711 | response = _context2.sent;
|
2712 | dataid = response.data.id;
|
2713 | _context2.next = 7;
|
2714 | return session.versions.promote({
|
2715 | dataid: dataid,
|
2716 | versionNumber: 1,
|
2717 | description: description
|
2718 | });
|
2719 |
|
2720 | case 7:
|
2721 | _context2.next = 9;
|
2722 | return session.versions.deleteVersion({
|
2723 | dataid: dataid,
|
2724 | versionNumber: 1
|
2725 | });
|
2726 |
|
2727 | case 9:
|
2728 | return _context2.abrupt("return", response);
|
2729 |
|
2730 | case 10:
|
2731 | case "end":
|
2732 | return _context2.stop();
|
2733 | }
|
2734 | }
|
2735 | }, _callee2);
|
2736 | }))();
|
2737 | },
|
2738 | addItem: function addItem(type, parent_id, name) {
|
2739 | var params = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
2740 | return session.postBody('api/v2/nodes', _objectSpread2({
|
2741 | type: type,
|
2742 | parent_id: parent_id,
|
2743 | name: name
|
2744 | }, params));
|
2745 | },
|
2746 | node: function node(_ref3) {
|
2747 | var dataid = _ref3.dataid,
|
2748 | _ref3$apiVersion = _ref3.apiVersion,
|
2749 | apiVersion = _ref3$apiVersion === void 0 ? 'v2' : _ref3$apiVersion,
|
2750 | _ref3$params = _ref3.params,
|
2751 | params = _ref3$params === void 0 ? {} : _ref3$params;
|
2752 | return session.get("api/".concat(apiVersion, "/nodes/").concat(dataid), {
|
2753 | params: params
|
2754 | });
|
2755 | },
|
2756 | ancestors: function ancestors(dataid) {
|
2757 | var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
2758 | return session.get("api/v1/nodes/".concat(dataid, "/ancestors"), {
|
2759 | params: params
|
2760 | });
|
2761 | },
|
2762 | volumeInfo: function volumeInfo(objType) {
|
2763 | return session.get("api/v1/volumes/".concat(objType));
|
2764 | },
|
2765 | volumes: function volumes() {
|
2766 | return session.get('api/v2/volumes');
|
2767 | },
|
2768 | addFolder: function addFolder(parent_id, name) {
|
2769 | var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
2770 | return this.addItem(SubTypes.Folder, parent_id, name, params);
|
2771 | },
|
2772 | addGeneration: function addGeneration(parent_id, name, original_id, version_number) {
|
2773 | var params = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
|
2774 | return this.addItem(SubTypes.Generation, parent_id, name, _objectSpread2({
|
2775 | original_id: original_id,
|
2776 | version_number: version_number
|
2777 | }, params));
|
2778 | },
|
2779 | nodes: function nodes(dataid) {
|
2780 | var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
2781 |
|
2782 | return session.get("api/v2/nodes/".concat(dataid, "/nodes"), {
|
2783 | params: params
|
2784 | });
|
2785 | },
|
2786 | children: function children(dataid) {
|
2787 | var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
2788 | return this.nodes(dataid, params);
|
2789 | },
|
2790 | delete: function _delete(dataid) {
|
2791 | return session.delete("api/v1/nodes/".concat(dataid));
|
2792 | },
|
2793 | download: function download(_ref4) {
|
2794 | _ref4.dataid;
|
2795 | _ref4.apiVersion;
|
2796 | _ref4.filePath;
|
2797 |
|
2798 |
|
2799 | {
|
2800 | return Promise.reject('Not implemented yet');
|
2801 | }
|
2802 | },
|
2803 | audit: function audit(_ref5) {
|
2804 | var dataid = _ref5.dataid,
|
2805 | _ref5$apiVersion = _ref5.apiVersion,
|
2806 | apiVersion = _ref5$apiVersion === void 0 ? 'v2' : _ref5$apiVersion,
|
2807 | _ref5$params = _ref5.params,
|
2808 | params = _ref5$params === void 0 ? {} : _ref5$params;
|
2809 | return session.get("api/".concat(apiVersion, "/nodes/").concat(dataid, "/audit"), {
|
2810 | params: params
|
2811 | });
|
2812 | }
|
2813 | };
|
2814 | };
|
2815 |
|
2816 | var workflow$1 = function workflow(session) {
|
2817 | return {
|
2818 | start: function start(map_id) {
|
2819 | var _this = this;
|
2820 |
|
2821 | return this.draftprocesses(map_id).then(function (response) {
|
2822 | return get(response, 'data.results.draftprocess_id');
|
2823 | }).then(function (draftprocess_id) {
|
2824 | return _this.draftprocesses_update(draftprocess_id);
|
2825 | });
|
2826 | },
|
2827 | draftprocesses: function draftprocesses(workflow_id) {
|
2828 | return session.postForm('api/v2/draftprocesses', {
|
2829 | workflow_id: workflow_id
|
2830 | });
|
2831 | },
|
2832 | draftprocesses_update: function draftprocesses_update(draftprocess_id) {
|
2833 | return session.get('api/v1/forms/draftprocesses/update', {
|
2834 | params: {
|
2835 | draftprocess_id: draftprocess_id
|
2836 | }
|
2837 | });
|
2838 | },
|
2839 | draftprocesses_put: function draftprocesses_put(draftprocess_id, body) {
|
2840 | return session.putForm("api/v2/draftprocesses/".concat(draftprocess_id), {
|
2841 | body: body
|
2842 | });
|
2843 | }
|
2844 |
|
2845 |
|
2846 |
|
2847 |
|
2848 |
|
2849 |
|
2850 |
|
2851 | };
|
2852 | };
|
2853 |
|
2854 | var rhcore$1 = function rhcore(session) {
|
2855 | return {
|
2856 | scriptNode: function scriptNode(id) {
|
2857 | var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
2858 | return session.get("api/v1/rhcore/".concat(id), {
|
2859 | params: params
|
2860 | });
|
2861 | }
|
2862 | };
|
2863 | };
|
2864 |
|
2865 | var search$1 = function search(session) {
|
2866 | return {
|
2867 |
|
2868 | search: function search(where) {
|
2869 | var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
2870 | return session.postBody('api/v2/search', _objectSpread2({
|
2871 | where: where
|
2872 | }, params));
|
2873 | },
|
2874 | regions: function regions() {
|
2875 | var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
2876 | return session.get('api/v1/regions', params);
|
2877 | }
|
2878 | };
|
2879 | };
|
2880 |
|
2881 | var members$1 = function members(session) {
|
2882 | return {
|
2883 | USER: 0,
|
2884 | GROUP: 1,
|
2885 | userQuery: function userQuery(query) {
|
2886 | var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
2887 | var version = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'v2';
|
2888 |
|
2889 | var params = _objectSpread2({
|
2890 | limit: 20,
|
2891 | where_type: JSON.stringify([this.USER, this.GROUP]),
|
2892 | query: query
|
2893 | }, options);
|
2894 |
|
2895 | return session.get("api/".concat(version, "/members"), {
|
2896 | params: params
|
2897 | });
|
2898 | },
|
2899 | member: function member(id) {
|
2900 | var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'v2';
|
2901 | return session.get("api/".concat(version, "/members/").concat(id));
|
2902 | }
|
2903 | };
|
2904 | };
|
2905 |
|
2906 |
|
2907 |
|
2908 | var versions$1 = function versions(session) {
|
2909 | return {
|
2910 | addVersion: function addVersion(_ref) {
|
2911 | return _asyncToGenerator( regeneratorRuntime.mark(function _callee() {
|
2912 | var dataid, fileHandler, _ref$apiVersion, apiVersion, _ref$fileName, fileName, _ref$options, options, url, path, f, name, params, _name, _params;
|
2913 |
|
2914 | return regeneratorRuntime.wrap(function _callee$(_context) {
|
2915 | while (1) {
|
2916 | switch (_context.prev = _context.next) {
|
2917 | case 0:
|
2918 | dataid = _ref.dataid, fileHandler = _ref.fileHandler, _ref$apiVersion = _ref.apiVersion, apiVersion = _ref$apiVersion === void 0 ? 'v1' : _ref$apiVersion, _ref$fileName = _ref.fileName, fileName = _ref$fileName === void 0 ? null : _ref$fileName, _ref$options = _ref.options, options = _ref$options === void 0 ? {} : _ref$options;
|
2919 | console.assert(dataid != null, 'dataid cannot be null');
|
2920 | console.assert(fileHandler != null, 'fileHandler cannot be null');
|
2921 | url = "api/".concat(apiVersion, "/nodes/").concat(dataid, "/versions");
|
2922 |
|
2923 | {
|
2924 | _context.next = 15;
|
2925 | break;
|
2926 | }
|
2927 |
|
2928 | case 9:
|
2929 | f = _context.sent;
|
2930 | name = fileName || path.basename(fileHandler);
|
2931 | params = _objectSpread2({
|
2932 | file: {
|
2933 | file: f,
|
2934 | name: name
|
2935 | }
|
2936 | }, options);
|
2937 |
|
2938 | return _context.abrupt("return", session.postForm(url, params));
|
2939 |
|
2940 | case 15:
|
2941 |
|
2942 | _name = fileName || fileHandler.name;
|
2943 | _params = _objectSpread2({
|
2944 | file: {
|
2945 | file: fileHandler,
|
2946 | name: _name
|
2947 | }
|
2948 | }, options);
|
2949 | return _context.abrupt("return", session.postForm(url, _params));
|
2950 |
|
2951 | case 18:
|
2952 | case "end":
|
2953 | return _context.stop();
|
2954 | }
|
2955 | }
|
2956 | }, _callee);
|
2957 | }))();
|
2958 | },
|
2959 | download: function download(_ref2) {
|
2960 | return _asyncToGenerator( regeneratorRuntime.mark(function _callee2() {
|
2961 | var dataid, version, filePath;
|
2962 | return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
2963 | while (1) {
|
2964 | switch (_context2.prev = _context2.next) {
|
2965 | case 0:
|
2966 | dataid = _ref2.dataid, version = _ref2.version, filePath = _ref2.filePath;
|
2967 | console.assert(dataid != null, 'dataid cannot be null');
|
2968 | console.assert(version != null, 'version cannot be null');
|
2969 | console.assert(filePath != null, 'filePath cannot be null');
|
2970 |
|
2971 | {
|
2972 | _context2.next = 8;
|
2973 | break;
|
2974 | }
|
2975 |
|
2976 | case 8:
|
2977 | return _context2.abrupt("return", Promise.reject('Not implemented yet'));
|
2978 |
|
2979 | case 9:
|
2980 | case "end":
|
2981 | return _context2.stop();
|
2982 | }
|
2983 | }
|
2984 | }, _callee2);
|
2985 | }))();
|
2986 | },
|
2987 | list: function list(dataid) {
|
2988 | return _asyncToGenerator( regeneratorRuntime.mark(function _callee3() {
|
2989 | var url;
|
2990 | return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
2991 | while (1) {
|
2992 | switch (_context3.prev = _context3.next) {
|
2993 | case 0:
|
2994 | url = "api/v1/nodes/".concat(dataid, "/versions");
|
2995 | return _context3.abrupt("return", session.get(url));
|
2996 |
|
2997 | case 2:
|
2998 | case "end":
|
2999 | return _context3.stop();
|
3000 | }
|
3001 | }
|
3002 | }, _callee3);
|
3003 | }))();
|
3004 | },
|
3005 | version: function version(dataid) {
|
3006 | var _arguments = arguments;
|
3007 | return _asyncToGenerator( regeneratorRuntime.mark(function _callee4() {
|
3008 | var version_number, url;
|
3009 | return regeneratorRuntime.wrap(function _callee4$(_context4) {
|
3010 | while (1) {
|
3011 | switch (_context4.prev = _context4.next) {
|
3012 | case 0:
|
3013 | version_number = _arguments.length > 1 && _arguments[1] !== undefined ? _arguments[1] : 'latest';
|
3014 |
|
3015 | url = "api/v1/nodes/".concat(dataid, "/versions/").concat(version_number);
|
3016 | return _context4.abrupt("return", session.get(url));
|
3017 |
|
3018 | case 3:
|
3019 | case "end":
|
3020 | return _context4.stop();
|
3021 | }
|
3022 | }
|
3023 | }, _callee4);
|
3024 | }))();
|
3025 | },
|
3026 | promote: function promote(_ref3) {
|
3027 | return _asyncToGenerator( regeneratorRuntime.mark(function _callee5() {
|
3028 | var dataid, versionNumber, _ref3$description, description, url;
|
3029 |
|
3030 | return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
3031 | while (1) {
|
3032 | switch (_context5.prev = _context5.next) {
|
3033 | case 0:
|
3034 | dataid = _ref3.dataid, versionNumber = _ref3.versionNumber, _ref3$description = _ref3.description, description = _ref3$description === void 0 ? null : _ref3$description;
|
3035 | console.assert(dataid != null, 'dataid cannot be null');
|
3036 | console.assert(versionNumber != null, 'number_to_keep must be an integer');
|
3037 | url = "api/v2/nodes/".concat(dataid, "/versions/").concat(versionNumber, "/promote");
|
3038 | return _context5.abrupt("return", session.postBody(url, _objectSpread2({}, !!description && {
|
3039 | description: description
|
3040 | })));
|
3041 |
|
3042 | case 5:
|
3043 | case "end":
|
3044 | return _context5.stop();
|
3045 | }
|
3046 | }
|
3047 | }, _callee5);
|
3048 | }))();
|
3049 | },
|
3050 | deleteVersion: function deleteVersion(_ref4) {
|
3051 | return _asyncToGenerator( regeneratorRuntime.mark(function _callee6() {
|
3052 | var dataid, versionNumber, _ref4$apiVersion, apiVersion, url;
|
3053 |
|
3054 | return regeneratorRuntime.wrap(function _callee6$(_context6) {
|
3055 | while (1) {
|
3056 | switch (_context6.prev = _context6.next) {
|
3057 | case 0:
|
3058 | dataid = _ref4.dataid, versionNumber = _ref4.versionNumber, _ref4$apiVersion = _ref4.apiVersion, apiVersion = _ref4$apiVersion === void 0 ? 'v1' : _ref4$apiVersion;
|
3059 | console.assert(dataid != null, 'dataid cannot be null');
|
3060 | console.assert(versionNumber != null, 'number_to_keep must be an integer');
|
3061 | url = "api/".concat(apiVersion, "/nodes/").concat(dataid, "/versions/").concat(versionNumber);
|
3062 |
|
3063 | return _context6.abrupt("return", session.delete(url));
|
3064 |
|
3065 | case 5:
|
3066 | case "end":
|
3067 | return _context6.stop();
|
3068 | }
|
3069 | }
|
3070 | }, _callee6);
|
3071 | }))();
|
3072 | },
|
3073 | purge: function purge(_ref5) {
|
3074 | return _asyncToGenerator( regeneratorRuntime.mark(function _callee7() {
|
3075 | var dataid, _ref5$number_to_keep, number_to_keep, url;
|
3076 |
|
3077 | return regeneratorRuntime.wrap(function _callee7$(_context7) {
|
3078 | while (1) {
|
3079 | switch (_context7.prev = _context7.next) {
|
3080 | case 0:
|
3081 | dataid = _ref5.dataid, _ref5$number_to_keep = _ref5.number_to_keep, number_to_keep = _ref5$number_to_keep === void 0 ? 1 : _ref5$number_to_keep;
|
3082 | console.assert(dataid != null, 'dataid cannot be null');
|
3083 | console.assert(!isNaN(number_to_keep), 'number_to_keep must be an integer');
|
3084 |
|
3085 |
|
3086 |
|
3087 | url = "api/v2/nodes/".concat(dataid, "/versions");
|
3088 | return _context7.abrupt("return", session.deleteForm(url, {
|
3089 | number_to_keep: number_to_keep
|
3090 | }));
|
3091 |
|
3092 | case 5:
|
3093 | case "end":
|
3094 | return _context7.stop();
|
3095 | }
|
3096 | }
|
3097 | }, _callee7);
|
3098 | }))();
|
3099 | }
|
3100 | };
|
3101 | };
|
3102 |
|
3103 | var webreports$1 = function webreports(session) {
|
3104 | return {
|
3105 | run: function run(dataid) {
|
3106 | var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
3107 | var url = "api/v1/nodes/".concat(dataid, "/output");
|
3108 | return session.get(url, {
|
3109 | params: params
|
3110 | });
|
3111 | }
|
3112 | };
|
3113 | };
|
3114 |
|
3115 | |
3116 |
|
3117 |
|
3118 |
|
3119 |
|
3120 |
|
3121 |
|
3122 |
|
3123 | |
3124 |
|
3125 |
|
3126 |
|
3127 |
|
3128 |
|
3129 |
|
3130 |
|
3131 |
|
3132 |
|
3133 |
|
3134 |
|
3135 |
|
3136 |
|
3137 |
|
3138 |
|
3139 |
|
3140 |
|
3141 |
|
3142 |
|
3143 | function isNil(value) {
|
3144 | return value == null;
|
3145 | }
|
3146 |
|
3147 | var lodash_isnil = isNil;
|
3148 |
|
3149 | var isObject$1 = function isObject(x) {
|
3150 | return _typeof(x) === 'object' && x !== null;
|
3151 | };
|
3152 |
|
3153 | var isObject = isObject$1;
|
3154 | var ErrorCodes = {
|
3155 | PARSEERROR: {
|
3156 | code: -32700,
|
3157 | message: 'Parse error'
|
3158 | },
|
3159 | INVALIDREQUEST: {
|
3160 | code: -32600,
|
3161 | message: 'Invalid Request'
|
3162 | },
|
3163 | METHODNOTFOUND: {
|
3164 | code: -32601,
|
3165 | message: 'Method not found'
|
3166 | },
|
3167 | INVALIDPARAMS: {
|
3168 | code: -32602,
|
3169 | message: 'Invalid params'
|
3170 | },
|
3171 | INTERNALERROR: {
|
3172 | code: -32603,
|
3173 | message: 'Internal error'
|
3174 | }
|
3175 | };
|
3176 |
|
3177 | var CustomError$1 = function (_Error) {
|
3178 | _inherits(CustomError, _Error);
|
3179 |
|
3180 | var _super = _createSuper(CustomError);
|
3181 |
|
3182 | function CustomError() {
|
3183 | var _this;
|
3184 |
|
3185 | var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ErrorCodes.INTERNALERROR.message;
|
3186 | var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
3187 | var code = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ErrorCodes.INTERNALERROR.code;
|
3188 |
|
3189 | _classCallCheck(this, CustomError);
|
3190 |
|
3191 | if (isObject(message)) {
|
3192 | _this = _super.call(this, message.message);
|
3193 | _this.code = message.code;
|
3194 | _this.data = message.data;
|
3195 | } else {
|
3196 | _this = _super.call(this, message);
|
3197 | _this.code = code;
|
3198 | _this.data = data;
|
3199 | }
|
3200 |
|
3201 | return _possibleConstructorReturn(_this);
|
3202 | }
|
3203 |
|
3204 | return _createClass(CustomError);
|
3205 | }( _wrapNativeSuper(Error));
|
3206 |
|
3207 | var errorCodes = {
|
3208 | CustomError: CustomError$1,
|
3209 | ErrorCodes: ErrorCodes
|
3210 | };
|
3211 |
|
3212 | var CustomError = errorCodes.CustomError;
|
3213 | var get$1 = lodash_get; // to be tested...
|
3214 |
|
3215 | var sequence = {
|
3216 | index: 0,
|
3217 |
|
3218 | get next() {
|
3219 | this.index = this.index + 1;
|
3220 | return this.index;
|
3221 | }
|
3222 |
|
3223 | };
|
3224 |
|
3225 | var rpcClient = function () {
|
3226 | function RPCClient(session, baseURL) {
|
3227 | _classCallCheck(this, RPCClient);
|
3228 |
|
3229 | this.session = session;
|
3230 | this.baseURL = baseURL;
|
3231 | this.resetQueue();
|
3232 | }
|
3233 |
|
3234 | _createClass(RPCClient, [{
|
3235 | key: "requestObject",
|
3236 | value: function requestObject(method, params, id) {
|
3237 | return {
|
3238 | jsonrpc: '2.0',
|
3239 | method: method,
|
3240 | id: id,
|
3241 | params: params
|
3242 | };
|
3243 | }
|
3244 | }, {
|
3245 | key: "handleResponse",
|
3246 | value: function handleResponse(data) {
|
3247 | if (Object.prototype.hasOwnProperty.call(data, 'result')) {
|
3248 | return data.result;
|
3249 | } else if (Object.prototype.hasOwnProperty.call(data, 'error')) {
|
3250 | var err = data.error;
|
3251 | throw new CustomError(err.message, err.data, err.code);
|
3252 | } else {
|
3253 | throw Error('The server did not respond correctly.');
|
3254 | }
|
3255 | }
|
3256 |
|
3257 |
|
3258 |
|
3259 | }, {
|
3260 | key: "request",
|
3261 | value: function () {
|
3262 | var _request = _asyncToGenerator( regeneratorRuntime.mark(function _callee(method, params) {
|
3263 | var id,
|
3264 | response,
|
3265 | _args = arguments;
|
3266 | return regeneratorRuntime.wrap(function _callee$(_context) {
|
3267 | while (1) {
|
3268 | switch (_context.prev = _context.next) {
|
3269 | case 0:
|
3270 | id = _args.length > 2 && _args[2] !== undefined ? _args[2] : sequence.next;
|
3271 | _context.next = 3;
|
3272 | return this.session.postBody(this.baseURL, {
|
3273 | rpc: this.requestObject(method, params, id)
|
3274 | });
|
3275 |
|
3276 | case 3:
|
3277 | response = _context.sent;
|
3278 | return _context.abrupt("return", this.handleResponse(response.data));
|
3279 |
|
3280 | case 5:
|
3281 | case "end":
|
3282 | return _context.stop();
|
3283 | }
|
3284 | }
|
3285 | }, _callee, this);
|
3286 | }));
|
3287 |
|
3288 | function request(_x, _x2) {
|
3289 | return _request.apply(this, arguments);
|
3290 | }
|
3291 |
|
3292 | return request;
|
3293 | }()
|
3294 | }, {
|
3295 | key: "resetQueue",
|
3296 | value: function resetQueue() {
|
3297 | this._batchQueue = [];
|
3298 | }
|
3299 | }, {
|
3300 | key: "queue",
|
3301 | value: function queue(method, params) {
|
3302 | var id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : sequence.next;
|
3303 |
|
3304 | this._batchQueue.push(this.requestObject(method, params, id));
|
3305 |
|
3306 | return this;
|
3307 | }
|
3308 | }, {
|
3309 | key: "batch",
|
3310 | value: function () {
|
3311 | var _batch = _asyncToGenerator( regeneratorRuntime.mark(function _callee2() {
|
3312 | var _this = this;
|
3313 |
|
3314 | var throwOnError,
|
3315 | queue,
|
3316 | response,
|
3317 | _args2 = arguments;
|
3318 | return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
3319 | while (1) {
|
3320 | switch (_context2.prev = _context2.next) {
|
3321 | case 0:
|
3322 | throwOnError = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : false;
|
3323 | queue = this._batchQueue;
|
3324 | this.resetQueue();
|
3325 | _context2.next = 5;
|
3326 | return this.session.postBody(this.baseURL, {
|
3327 | rpc: queue
|
3328 | });
|
3329 |
|
3330 | case 5:
|
3331 | response = _context2.sent;
|
3332 | return _context2.abrupt("return", get$1(response, 'data.data', []).map(function (item) {
|
3333 | if (throwOnError) {
|
3334 | return _this.handleResponse(item);
|
3335 | } else {
|
3336 | try {
|
3337 | return _this.handleResponse(item);
|
3338 | } catch (e) {
|
3339 | return e;
|
3340 | }
|
3341 | }
|
3342 | }));
|
3343 |
|
3344 | case 7:
|
3345 | case "end":
|
3346 | return _context2.stop();
|
3347 | }
|
3348 | }
|
3349 | }, _callee2, this);
|
3350 | }));
|
3351 |
|
3352 | function batch() {
|
3353 | return _batch.apply(this, arguments);
|
3354 | }
|
3355 |
|
3356 | return batch;
|
3357 | }()
|
3358 | }, {
|
3359 | key: "rhnode",
|
3360 | value: function rhnode(dataid, method) {
|
3361 | var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
3362 | var id = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : sequence.next;
|
3363 | var params = {
|
3364 | dataid: dataid,
|
3365 | args: args
|
3366 | };
|
3367 | return this.request(method, params, id);
|
3368 | }
|
3369 | }, {
|
3370 | key: "rhnodeQueue",
|
3371 | value: function rhnodeQueue(dataid, method) {
|
3372 | var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
3373 | var id = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : sequence.next;
|
3374 | var params = {
|
3375 | dataid: dataid,
|
3376 | args: args
|
3377 | };
|
3378 | return this.queue(method, params, id);
|
3379 | }
|
3380 | }]);
|
3381 |
|
3382 | return RPCClient;
|
3383 | }();
|
3384 |
|
3385 | var AssocType = -18;
|
3386 | var BooleanType = 5;
|
3387 | var ClassType = 9;
|
3388 | var DapiNodeType = -72;
|
3389 | var DapiSessionType = -74;
|
3390 | var DapiStreamType = -68;
|
3391 | var DapiVersionType = -69;
|
3392 | var DateType = -7;
|
3393 | var DynamicType = -127;
|
3394 | var ErrorType = 1;
|
3395 | var FileType = -107;
|
3396 | var FrameType = 10;
|
3397 | var IntegerType = 2;
|
3398 | var JavaObjectType = -42;
|
3399 | var ListType = -2;
|
3400 | var LongType = -8;
|
3401 | var ObjectType = -128;
|
3402 | var ObjRefType = 3;
|
3403 | var RealType = -4;
|
3404 | var RecArrayType = -110;
|
3405 | var RecordType = -109;
|
3406 | var ScriptType = -3;
|
3407 | var SocketType = -102;
|
3408 | var StringType = -1;
|
3409 | var UAPIType = -196;
|
3410 | var UndefinedType = 0;
|
3411 | var VoidType = 8;
|
3412 | var WAPIWorkType = -75;
|
3413 | var require$$12 = {
|
3414 | AssocType: AssocType,
|
3415 | BooleanType: BooleanType,
|
3416 | ClassType: ClassType,
|
3417 | DapiNodeType: DapiNodeType,
|
3418 | DapiSessionType: DapiSessionType,
|
3419 | DapiStreamType: DapiStreamType,
|
3420 | DapiVersionType: DapiVersionType,
|
3421 | DateType: DateType,
|
3422 | DynamicType: DynamicType,
|
3423 | ErrorType: ErrorType,
|
3424 | FileType: FileType,
|
3425 | FrameType: FrameType,
|
3426 | IntegerType: IntegerType,
|
3427 | JavaObjectType: JavaObjectType,
|
3428 | ListType: ListType,
|
3429 | LongType: LongType,
|
3430 | ObjectType: ObjectType,
|
3431 | ObjRefType: ObjRefType,
|
3432 | RealType: RealType,
|
3433 | RecArrayType: RecArrayType,
|
3434 | RecordType: RecordType,
|
3435 | ScriptType: ScriptType,
|
3436 | SocketType: SocketType,
|
3437 | StringType: StringType,
|
3438 | UAPIType: UAPIType,
|
3439 | UndefinedType: UndefinedType,
|
3440 | VoidType: VoidType,
|
3441 | WAPIWorkType: WAPIWorkType
|
3442 | };
|
3443 |
|
3444 | var axiosFactory = axiosFactory_1;
|
3445 | var auth = auth$1;
|
3446 | var nodes = nodes$1;
|
3447 | var workflow = workflow$1;
|
3448 | var rhcore = rhcore$1;
|
3449 | var search = search$1;
|
3450 | var members = members$1;
|
3451 | var versions = versions$1;
|
3452 | var webreports = webreports$1;
|
3453 | var FormDataFactory = formDataFactory;
|
3454 | var isnil = lodash_isnil;
|
3455 | var RPCClient = rpcClient;
|
3456 | var dataTypesEnum = require$$12;
|
3457 |
|
3458 | var Session_1$1 = function () {
|
3459 | function Session(options) {
|
3460 | _classCallCheck(this, Session);
|
3461 |
|
3462 | this.axios = axiosFactory(options);
|
3463 | }
|
3464 |
|
3465 | _createClass(Session, [{
|
3466 | key: "nodes",
|
3467 | get: function get() {
|
3468 |
|
3469 | if (this._nodes == null) {
|
3470 | this._nodes = nodes(this);
|
3471 | }
|
3472 |
|
3473 | return this._nodes;
|
3474 | }
|
3475 | }, {
|
3476 | key: "auth",
|
3477 | get: function get() {
|
3478 | if (this._auth == null) {
|
3479 | this._auth = auth(this);
|
3480 | }
|
3481 |
|
3482 | return this._auth;
|
3483 | }
|
3484 | }, {
|
3485 | key: "workflow",
|
3486 | get: function get() {
|
3487 |
|
3488 | if (this._workflow == null) {
|
3489 | this._workflow = workflow(this);
|
3490 | }
|
3491 |
|
3492 | return this._workflow;
|
3493 | }
|
3494 | }, {
|
3495 | key: "rhcore",
|
3496 | get: function get() {
|
3497 |
|
3498 | if (this._rhcore == null) {
|
3499 | this._rhcore = rhcore(this);
|
3500 | }
|
3501 |
|
3502 | return this._rhcore;
|
3503 | }
|
3504 | }, {
|
3505 | key: "members",
|
3506 | get: function get() {
|
3507 |
|
3508 | if (this._members == null) {
|
3509 | this._members = members(this);
|
3510 | }
|
3511 |
|
3512 | return this._members;
|
3513 | }
|
3514 | }, {
|
3515 | key: "search",
|
3516 | get: function get() {
|
3517 |
|
3518 | if (this._search == null) {
|
3519 | this._search = search(this);
|
3520 | }
|
3521 |
|
3522 | return this._search;
|
3523 | }
|
3524 | }, {
|
3525 | key: "webreports",
|
3526 | get: function get() {
|
3527 |
|
3528 | if (this._webreports == null) {
|
3529 | this._webreports = webreports(this);
|
3530 | }
|
3531 |
|
3532 | return this._webreports;
|
3533 | }
|
3534 | }, {
|
3535 | key: "versions",
|
3536 | get: function get() {
|
3537 |
|
3538 | if (this._versions == null) {
|
3539 | this._versions = versions(this);
|
3540 | }
|
3541 |
|
3542 | return this._versions;
|
3543 | }
|
3544 | }, {
|
3545 | key: "dataTypesEnum",
|
3546 | get: function get() {
|
3547 | return dataTypesEnum;
|
3548 | }
|
3549 | }, {
|
3550 | key: "rpcClient",
|
3551 | value: function rpcClient() {
|
3552 | var baseURL = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '/api/v1/rh/rpc/rhnode/';
|
3553 | return new RPCClient(this, baseURL);
|
3554 | }
|
3555 | }, {
|
3556 | key: "_isObject",
|
3557 | value: function _isObject(value) {
|
3558 | return value && _typeof(value) === 'object' && value.constructor === Object;
|
3559 | }
|
3560 | }, {
|
3561 | key: "_isString",
|
3562 | value: function _isString(value) {
|
3563 | return typeof value === 'string' || value instanceof String;
|
3564 | }
|
3565 | }, {
|
3566 | key: "_isBoolean",
|
3567 | value: function _isBoolean(value) {
|
3568 | return typeof value === 'boolean';
|
3569 | }
|
3570 | }, {
|
3571 | key: "objectToForm",
|
3572 | value: function objectToForm(obj) {
|
3573 | var formData = FormDataFactory.createFormData();
|
3574 |
|
3575 | for (var _i = 0, _Object$entries = Object.entries(obj); _i < _Object$entries.length; _i++) {
|
3576 | var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
|
3577 | key = _Object$entries$_i[0],
|
3578 | value = _Object$entries$_i[1];
|
3579 |
|
3580 | if (value && value.name && value.file) {
|
3581 | formData.append(key, value.file, value.name);
|
3582 | } else if (Array.isArray(value) || this._isObject(value) || this._isBoolean(value)) {
|
3583 | formData.append(key, JSON.stringify(value));
|
3584 | } else if (!isnil(value)) {
|
3585 |
|
3586 | formData.append(key, value);
|
3587 | }
|
3588 | }
|
3589 |
|
3590 | return formData;
|
3591 | }
|
3592 | }, {
|
3593 | key: "get",
|
3594 | value: function get() {
|
3595 | var _this$axios;
|
3596 |
|
3597 | return (_this$axios = this.axios).get.apply(_this$axios, arguments);
|
3598 | }
|
3599 | |
3600 |
|
3601 |
|
3602 |
|
3603 |
|
3604 |
|
3605 |
|
3606 |
|
3607 |
|
3608 |
|
3609 |
|
3610 |
|
3611 |
|
3612 |
|
3613 |
|
3614 | }, {
|
3615 | key: "putForm",
|
3616 | value: function putForm(url, params) {
|
3617 | var formData = this.objectToForm(params);
|
3618 | return this.put(url, formData);
|
3619 | }
|
3620 | }, {
|
3621 | key: "postForm",
|
3622 | value: function postForm(url, params) {
|
3623 | var formData = this.objectToForm(params);
|
3624 | return this.post(url, formData, {
|
3625 | maxBodyLength: Infinity
|
3626 | });
|
3627 | }
|
3628 | }, {
|
3629 | key: "patchForm",
|
3630 | value: function patchForm(url, params) {
|
3631 | var formData = this.objectToForm(params);
|
3632 | return this.patch(url, formData);
|
3633 | }
|
3634 | }, {
|
3635 | key: "deleteForm",
|
3636 | value: function deleteForm(url, params) {
|
3637 |
|
3638 |
|
3639 | var formData = this.objectToForm(params);
|
3640 | return this.delete(url, formData);
|
3641 | }
|
3642 | }, {
|
3643 | key: "putBody",
|
3644 | value: function putBody(url, body) {
|
3645 | return this.putForm(url, {
|
3646 | body: body
|
3647 | });
|
3648 | }
|
3649 | }, {
|
3650 | key: "postBody",
|
3651 | value: function postBody(url, body) {
|
3652 | return this.postForm(url, {
|
3653 | body: body
|
3654 | });
|
3655 | }
|
3656 | }, {
|
3657 | key: "patchBody",
|
3658 | value: function patchBody(url, body) {
|
3659 | return this.patchForm(url, {
|
3660 | body: body
|
3661 | });
|
3662 | }
|
3663 | }, {
|
3664 | key: "deleteBody",
|
3665 | value: function deleteBody(url, body) {
|
3666 | return this.deleteForm(url, {
|
3667 | body: body
|
3668 | });
|
3669 | }
|
3670 | }, {
|
3671 | key: "post",
|
3672 | value: function post() {
|
3673 | var _this$axios2;
|
3674 |
|
3675 | return (_this$axios2 = this.axios).post.apply(_this$axios2, arguments);
|
3676 | }
|
3677 | }, {
|
3678 | key: "put",
|
3679 | value: function put() {
|
3680 | var _this$axios3;
|
3681 |
|
3682 | return (_this$axios3 = this.axios).put.apply(_this$axios3, arguments);
|
3683 | }
|
3684 | }, {
|
3685 | key: "delete",
|
3686 | value: function _delete() {
|
3687 | var _this$axios4;
|
3688 |
|
3689 | return (_this$axios4 = this.axios).delete.apply(_this$axios4, arguments);
|
3690 |
|
3691 |
|
3692 |
|
3693 |
|
3694 |
|
3695 |
|
3696 |
|
3697 |
|
3698 |
|
3699 | }
|
3700 | }, {
|
3701 | key: "options",
|
3702 | value: function options() {
|
3703 | var _this$axios5;
|
3704 |
|
3705 | return (_this$axios5 = this.axios).options.apply(_this$axios5, arguments);
|
3706 | }
|
3707 | }, {
|
3708 | key: "patch",
|
3709 | value: function patch() {
|
3710 | var _this$axios6;
|
3711 |
|
3712 | return (_this$axios6 = this.axios).patch.apply(_this$axios6, arguments);
|
3713 | }
|
3714 | }]);
|
3715 |
|
3716 | return Session;
|
3717 | }();
|
3718 |
|
3719 | var Session = Session_1$1;
|
3720 | var Session_1 = src.Session = Session;
|
3721 |
|
3722 | exports.Session = Session_1;
|
3723 | exports["default"] = src;
|
3724 |
|
3725 | Object.defineProperty(exports, '__esModule', { value: true });
|
3726 |
|
3727 | }));
|
3728 |
|