@sassoftware/restaflib 5.3.0-alpha.0 → 5.3.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/restaflib.js CHANGED
@@ -97,86 +97,86 @@ return /******/ (function(modules) { // webpackBootstrap
97
97
  /******/ ({
98
98
 
99
99
  /***/ "../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js":
100
- /*!******************************************************************************!*\
101
- !*** C:/temp/restaf/node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
102
- \******************************************************************************/
100
+ /*!*************************************************************************************!*\
101
+ !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
102
+ \*************************************************************************************/
103
103
  /*! no static exports found */
104
104
  /*! exports used: default */
105
105
  /***/ (function(module, exports) {
106
106
 
107
- eval("function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nmodule.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/temp/restaf/node_modules/@babel/runtime/helpers/asyncToGenerator.js?");
107
+ eval("function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nmodule.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/asyncToGenerator.js?");
108
108
 
109
109
  /***/ }),
110
110
 
111
111
  /***/ "../../../node_modules/@babel/runtime/helpers/defineProperty.js":
112
- /*!****************************************************************************!*\
113
- !*** C:/temp/restaf/node_modules/@babel/runtime/helpers/defineProperty.js ***!
114
- \****************************************************************************/
112
+ /*!***********************************************************************************!*\
113
+ !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/defineProperty.js ***!
114
+ \***********************************************************************************/
115
115
  /*! no static exports found */
116
116
  /*! exports used: default */
117
117
  /***/ (function(module, exports, __webpack_require__) {
118
118
 
119
- eval("var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ \"../../../node_modules/@babel/runtime/helpers/toPropertyKey.js\");\nfunction _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/temp/restaf/node_modules/@babel/runtime/helpers/defineProperty.js?");
119
+ eval("var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ \"../../../node_modules/@babel/runtime/helpers/toPropertyKey.js\");\nfunction _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/defineProperty.js?");
120
120
 
121
121
  /***/ }),
122
122
 
123
123
  /***/ "../../../node_modules/@babel/runtime/helpers/regeneratorRuntime.js":
124
- /*!********************************************************************************!*\
125
- !*** C:/temp/restaf/node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
126
- \********************************************************************************/
124
+ /*!***************************************************************************************!*\
125
+ !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
126
+ \***************************************************************************************/
127
127
  /*! no static exports found */
128
128
  /*! all exports used */
129
129
  /***/ (function(module, exports, __webpack_require__) {
130
130
 
131
- eval("var _typeof = __webpack_require__(/*! ./typeof.js */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw new Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw new Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/temp/restaf/node_modules/@babel/runtime/helpers/regeneratorRuntime.js?");
131
+ eval("var _typeof = __webpack_require__(/*! ./typeof.js */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw new Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw new Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/regeneratorRuntime.js?");
132
132
 
133
133
  /***/ }),
134
134
 
135
135
  /***/ "../../../node_modules/@babel/runtime/helpers/toPrimitive.js":
136
- /*!*************************************************************************!*\
137
- !*** C:/temp/restaf/node_modules/@babel/runtime/helpers/toPrimitive.js ***!
138
- \*************************************************************************/
136
+ /*!********************************************************************************!*\
137
+ !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/toPrimitive.js ***!
138
+ \********************************************************************************/
139
139
  /*! no static exports found */
140
140
  /*! all exports used */
141
141
  /***/ (function(module, exports, __webpack_require__) {
142
142
 
143
- eval("var _typeof = __webpack_require__(/*! ./typeof.js */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\")[\"default\"];\nfunction _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\nmodule.exports = _toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/temp/restaf/node_modules/@babel/runtime/helpers/toPrimitive.js?");
143
+ eval("var _typeof = __webpack_require__(/*! ./typeof.js */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\")[\"default\"];\nfunction _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\nmodule.exports = _toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/toPrimitive.js?");
144
144
 
145
145
  /***/ }),
146
146
 
147
147
  /***/ "../../../node_modules/@babel/runtime/helpers/toPropertyKey.js":
148
- /*!***************************************************************************!*\
149
- !*** C:/temp/restaf/node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
150
- \***************************************************************************/
148
+ /*!**********************************************************************************!*\
149
+ !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
150
+ \**********************************************************************************/
151
151
  /*! no static exports found */
152
152
  /*! all exports used */
153
153
  /***/ (function(module, exports, __webpack_require__) {
154
154
 
155
- eval("var _typeof = __webpack_require__(/*! ./typeof.js */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\")[\"default\"];\nvar toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ \"../../../node_modules/@babel/runtime/helpers/toPrimitive.js\");\nfunction _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}\nmodule.exports = _toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/temp/restaf/node_modules/@babel/runtime/helpers/toPropertyKey.js?");
155
+ eval("var _typeof = __webpack_require__(/*! ./typeof.js */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\")[\"default\"];\nvar toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ \"../../../node_modules/@babel/runtime/helpers/toPrimitive.js\");\nfunction _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}\nmodule.exports = _toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/toPropertyKey.js?");
156
156
 
157
157
  /***/ }),
158
158
 
159
159
  /***/ "../../../node_modules/@babel/runtime/helpers/typeof.js":
160
- /*!********************************************************************!*\
161
- !*** C:/temp/restaf/node_modules/@babel/runtime/helpers/typeof.js ***!
162
- \********************************************************************/
160
+ /*!***************************************************************************!*\
161
+ !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/typeof.js ***!
162
+ \***************************************************************************/
163
163
  /*! no static exports found */
164
164
  /*! all exports used */
165
165
  /***/ (function(module, exports) {
166
166
 
167
- eval("function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/temp/restaf/node_modules/@babel/runtime/helpers/typeof.js?");
167
+ eval("function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/typeof.js?");
168
168
 
169
169
  /***/ }),
170
170
 
171
171
  /***/ "../../../node_modules/@babel/runtime/regenerator/index.js":
172
- /*!***********************************************************************!*\
173
- !*** C:/temp/restaf/node_modules/@babel/runtime/regenerator/index.js ***!
174
- \***********************************************************************/
172
+ /*!******************************************************************************!*\
173
+ !*** C:/sassoftware/restaf/node_modules/@babel/runtime/regenerator/index.js ***!
174
+ \******************************************************************************/
175
175
  /*! no static exports found */
176
176
  /*! exports used: default */
177
177
  /***/ (function(module, exports, __webpack_require__) {
178
178
 
179
- eval("// TODO(Babel 8): Remove this file.\n\nvar runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ \"../../../node_modules/@babel/runtime/helpers/regeneratorRuntime.js\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n\n\n//# sourceURL=webpack://restaflib/C:/temp/restaf/node_modules/@babel/runtime/regenerator/index.js?");
179
+ eval("// TODO(Babel 8): Remove this file.\n\nvar runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ \"../../../node_modules/@babel/runtime/helpers/regeneratorRuntime.js\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/regenerator/index.js?");
180
180
 
181
181
  /***/ }),
182
182
 
@@ -501,7 +501,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
501
501
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
502
502
 
503
503
  "use strict";
504
- eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n/**\r\n * @description Search for a named report(async)\r\n * @async\r\n * @module findReport\r\n * @category restaflib/report\r\n * \r\n * @param {object} store - restaf store\r\n * @param {string} name - name of the VA report (null to get a list of all reports)\r\n * \r\n * @returns {object} - either null or rafObject for the report\r\n */\n\n\nfunction findReport(_x, _x2) {\n return _findReport.apply(this, arguments);\n}\nfunction _findReport() {\n _findReport = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, name) {\n var reports, payload, reportsList;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n reports = store.getService('reports');\n payload = null;\n if (name !== null) {\n payload = {\n qs: {\n filter: \"eq(name,'\".concat(name, \"')\")\n }\n };\n }\n // call the reports service\n _context.next = 5;\n return store.apiCall(reports.links('reports'), payload);\n case 5:\n reportsList = _context.sent;\n return _context.abrupt(\"return\", reportsList.itemsList().size === 0 ? null : reportsList);\n case 7:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _findReport.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (findReport);\n\n//# sourceURL=webpack://restaflib/./findReport.js?");
504
+ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n/**\r\n * @description Search for a named report(async)\r\n * @async\r\n * @module findReport\r\n * @category restaflib/report\r\n * \r\n * @param {object} store - restaf store\r\n * @param {string} name - name of the VA report (null to get a list of all reports)\r\n * \r\n * @returns {object} - either null or rafObject for the report\r\n */\n\n\nfunction findReport(_x, _x2) {\n return _findReport.apply(this, arguments);\n}\nfunction _findReport() {\n _findReport = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, name) {\n var reports, payload, reportsList;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n reports = store.addServices('reports');\n payload = null;\n if (name !== null) {\n payload = {\n qs: {\n filter: \"eq(name,'\".concat(name, \"')\")\n }\n };\n }\n // call the reports service\n _context.next = 5;\n return store.apiCall(reports.links('reports'), payload);\n case 5:\n reportsList = _context.sent;\n return _context.abrupt(\"return\", reportsList.itemsList().size === 0 ? null : reportsList);\n case 7:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _findReport.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (findReport);\n\n//# sourceURL=webpack://restaflib/./findReport.js?");
505
505
 
506
506
  /***/ }),
507
507
 
@@ -798,7 +798,7 @@ eval("/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights
798
798
  /*! all exports used */
799
799
  /***/ (function(module, exports, __webpack_require__) {
800
800
 
801
- eval("module.exports = __webpack_require__(/*! C:\\temp\\restaf\\packages\\restaflib\\src/index */\"./index.js\");\n\n\n//# sourceURL=webpack://restaflib/multi_./index?");
801
+ eval("module.exports = __webpack_require__(/*! C:\\sassoftware\\restaf\\packages\\restaflib\\src/index */\"./index.js\");\n\n\n//# sourceURL=webpack://restaflib/multi_./index?");
802
802
 
803
803
  /***/ })
804
804
 
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("restaflib",[],t):"object"==typeof exports?exports.restaflib=t():e.restaflib=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t,n){var r=n(6)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},function(e,t){function n(e,t,n,r,a,s,o){try{var c=e[s](o),i=c.value}catch(e){return void n(e)}c.done?t(i):Promise.resolve(i).then(r,a)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(a,s){var o=e.apply(t,r);function c(e){n(o,a,s,c,i,"next",e)}function i(e){n(o,a,s,c,i,"throw",e)}c(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(t){return e.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(7);e.exports=function(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){return"\n result = runMain(_args_); \n send_response(result); \n /* print result; */\n \n \n function runMain(_args_) ; \n r = {Error= 'No path'}; \n if ( _args_.path eq '/selectors') then do; \n r = selectionLists(_args_.selectors, _args_.table.caslib, _args_.table.name); \n end; \n else if ( _args_.path eq '/contents') then do; \n r = contents(_args_.table.caslib, _args_.table.name); \n end; \n else if (_args_.path eq '/describe') then do; \n r = describeModel(_args_); \n end; \n else if (_args_.path eq '/scenario' ) then do;\n r = fetchData(_args_.filter, _args_.table);\n end;\n else if (_args_.path eq '/score') then do; \n if( exists(_args_, 'modelName') eq false ) then\n modelname = '';\n else modelName =_args_.modelName;\n r = runScoreCode(_args_.model, _args_.scenario, modelName); \n end; \n else do; \n r = {icasResults={Errors = 'Invalid action option specified' || _args_.path}, statusCode=404}; \n end; \n print r;\n if ( r.statusCode ne 0) then do;\n print r.icasResults;\n exit({severity=2,reason=6, status=r.iCasResults.Errors,statusCode=r.statusCode});\n end;\n result = {casResults = r.icasResults}; \n print '***************************************************************'; \n print result; \n print '***************************************************************'; \n return result; \n end; \n \n /*-----------------------------------------*/ \n /* describeModel */ \n /*-----------------------------------------*/ \n \n function describeModel(_args_) ; \n s = checkAndLoadTable(_args_.model.caslib, _args_.model.name); \n if ( s ne true) then do; \n results = {Errors= 'Unable to access ' ||_args_.model.caslib||'.'||_args_.model.name}; \n return {icasResults=results, statusCode=404}; \n end; \n \n mtype = isModel(_args_.model.caslib, _args_.model.name); \n if ( mtype EQ 'astore' ) then do; \n r = astoreDescribe(_args_.model); \n end; \n else if (mtype EQ 'ds' or mtype EQ 'ds2') then do;\n s = checkAndLoadTable(_args_.table.caslib, _args_.table.name); \n if ( s ne true ) then do; \n results = {Errors= 'Unable to access ' ||_args_.table.caslib||'.'||_args_.table.name}; \n return {icasResults=results, statusCode=404}; \n end; \n r = contents( _args_.table.caslib, _args_.table.name); \n end; \n return {icasResults= r, statusCode=0} ;\n end; \n \n /*------------------------------------------*/ \n /* astoreDescribe */ \n /*------------------------------------------*/ \n \n function astoreDescribe(model); \n action astore.describe r=result/ \n rstore = { caslib= model.caslib name = model.name }; \n rows = resultsToDict(result.InputVariables); \n return {describe = rows, table = result.InputVariables}; \n end; \n \n /*------------------------------------------*/ \n /* score */ \n /*------------------------------------------*/ \n function runScoreCode( model, scenario, modelName); \n print model; \n s = checkAndLoadTable(model.caslib, model.name); \n if ( s ne true ) then do; \n results = {Errors= 'Unable to access ' ||model.caslib||'.'||model.name}; \n return {icasResults=results, statusCode=404}; \n end;\n \n mtype = isModel(model.caslib, model.name); \n \n if ( mtype eq 'bad' ) then do; \n results = {Error= model.caslib||'.'||model.name || ' is not recognized as a valid supported model. Please check your values'};\n return {icasResults=results, statusCode=400};\n end; \n destroyTable('casuser', 'input'); \n argsToTable(scenario, 'casuser', 'input'); \n \n destroyTable('casuser', 'output'); \n \n if (mtype eq 'astore') then do; \n print 'Scoring with astore'; \n action astore.score r = result/ \n rstore = {caslib=model.caslib name=model.name} \n out = {caslib='casuser' name='output'} \n table = {caslib='casuser' name='input'}; \n end; \n else if (mtype eq 'ds') then do; \n print 'scoring with datastep code'; \n action datastep.runcodetable r = result/ \n single='YES' \n codeTable= {caslib=model.caslib name=model.name} \n casout = {caslib='casuser' name='output'} \n table = {caslib='casuser' name='input'}; \n end; \n else if (mtype eq 'ds2' ) then do; \n print 'Scoring with d2'; \n if ( missing(modelName) eq true) then do;\n results = {Error= 'modelName is missing. Please check your values'};\n return {icasResults=results, statusCode=400};\n end;\n\n action ds2.runModel r = result/ \n modelTable = {caslib=model.caslib, name=model.name} \n modelName = modelName \n table = {caslib= 'casuser', name='input'} \n casOut = {caslib= 'casuser' name='output'}; \n end; \n \n \n action table.fetch r = result / \n table={caslib='casuser' name='output'}; \n \n rows = resultsToDict(result.Fetch); \n \n return {icasResults= rows, statusCode=0} ;\n end; \n \n \n "}},function(e,t,n){e.exports=n(9)},function(e,t,n){var r=n(2).default;function a(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e.exports=a=function(){return n},e.exports.__esModule=!0,e.exports.default=e.exports;var t,n={},s=Object.prototype,o=s.hasOwnProperty,c=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},u=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",p=i.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(t){f=function(e,t,n){return e[t]=n}}function d(e,t,n,r){var a=t&&t.prototype instanceof x?t:x,s=Object.create(a.prototype),o=new q(r||[]);return c(s,"_invoke",{value:T(e,n,o)}),s}function m(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}n.wrap=d;var b="suspendedStart",h="executing",v="completed",y={};function x(){}function g(){}function w(){}var _={};f(_,u,(function(){return this}));var k=Object.getPrototypeOf,C=k&&k(k(A([])));C&&C!==s&&o.call(C,u)&&(_=C);var S=w.prototype=x.prototype=Object.create(_);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function n(a,s,c,i){var u=m(e[a],e,s);if("throw"!==u.type){var l=u.arg,p=l.value;return p&&"object"==r(p)&&o.call(p,"__await")?t.resolve(p.__await).then((function(e){n("next",e,c,i)}),(function(e){n("throw",e,c,i)})):t.resolve(p).then((function(e){l.value=e,c(l)}),(function(e){return n("throw",e,c,i)}))}i(u.arg)}var a;c(this,"_invoke",{value:function(e,r){function s(){return new t((function(t,a){n(e,r,t,a)}))}return a=a?a.then(s,s):s()}})}function T(e,n,r){var a=b;return function(s,o){if(a===h)throw new Error("Generator is already running");if(a===v){if("throw"===s)throw o;return{value:t,done:!0}}for(r.method=s,r.arg=o;;){var c=r.delegate;if(c){var i=E(c,r);if(i){if(i===y)continue;return i}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===b)throw a=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=h;var u=m(e,n,r);if("normal"===u.type){if(a=r.done?v:"suspendedYield",u.arg===y)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(a=v,r.method="throw",r.arg=u.arg)}}}function E(e,n){var r=n.method,a=e.iterator[r];if(a===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,E(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var s=m(a,e.iterator,n.arg);if("throw"===s.type)return n.method="throw",n.arg=s.arg,n.delegate=null,y;var o=s.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function R(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function q(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(R,this),this.reset(!0)}function A(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,s=function n(){for(;++a<e.length;)if(o.call(e,a))return n.value=e[a],n.done=!1,n;return n.value=t,n.done=!0,n};return s.next=s}}throw new TypeError(r(e)+" is not iterable")}return g.prototype=w,c(S,"constructor",{value:w,configurable:!0}),c(w,"constructor",{value:g,configurable:!0}),g.displayName=f(w,p,"GeneratorFunction"),n.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,f(e,p,"GeneratorFunction")),e.prototype=Object.create(S),e},n.awrap=function(e){return{__await:e}},j(O.prototype),f(O.prototype,l,(function(){return this})),n.AsyncIterator=O,n.async=function(e,t,r,a,s){void 0===s&&(s=Promise);var o=new O(d(e,t,r,a),s);return n.isGeneratorFunction(t)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},j(S),f(S,p,"Generator"),f(S,u,(function(){return this})),f(S,"toString",(function(){return"[object Generator]"})),n.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},n.values=A,q.prototype={constructor:q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(r,a){return c.type="throw",c.arg=e,n.next=r,a&&(n.method="next",n.arg=t),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],c=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var i=o.call(s,"catchLoc"),u=o.call(s,"finallyLoc");if(i&&u){if(this.prev<s.catchLoc)return r(s.catchLoc,!0);if(this.prev<s.finallyLoc)return r(s.finallyLoc)}else if(i){if(this.prev<s.catchLoc)return r(s.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return r(s.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=e,s.arg=t,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;L(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:A(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},n}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(2).default,a=n(8);e.exports=function(e){var t=a(e,"string");return"symbol"===r(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(2).default;e.exports=function(e,t){if("object"!==r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!==r(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";n.r(t),n.d(t,"caslRun",(function(){return x})),n.d(t,"caslRunBase",(function(){return d})),n.d(t,"casSetup",(function(){return L})),n.d(t,"casActionRun",(function(){return A})),n.d(t,"casTableToJson",(function(){return B})),n.d(t,"casFetchData",(function(){return D})),n.d(t,"casFetchRows",(function(){return N})),n.d(t,"casAppendTable",(function(){return Y})),n.d(t,"casUpdateData",(function(){return M})),n.d(t,"casSaveTable",(function(){return z})),n.d(t,"casLoadTable",(function(){return V})),n.d(t,"computeRun",(function(){return ae})),n.d(t,"computeSetup",(function(){return oe})),n.d(t,"computeSummary",(function(){return ee})),n.d(t,"computeSetupTables",(function(){return le})),n.d(t,"computeFetchData",(function(){return be})),n.d(t,"computeFileContent",(function(){return ve})),n.d(t,"computeResults",(function(){return ie})),n.d(t,"computeAppendTable",(function(){return xe})),n.d(t,"computeUpdateData",(function(){return _e})),n.d(t,"computeUpload",(function(){return Ce})),n.d(t,"findReport",(function(){return je})),n.d(t,"getReportImage",(function(){return Te})),n.d(t,"getReportUri",(function(){return Re})),n.d(t,"getSasTableRows",(function(){return qe})),n.d(t,"jesSetup",(function(){return Pe})),n.d(t,"jesRun",(function(){return Qe})),n.d(t,"jesSummary",(function(){return Ie})),n.d(t,"jsonToDict",(function(){return p})),n.d(t,"caslScore",(function(){return S})),n.d(t,"caslDescribe",(function(){return E})),n.d(t,"masSetup",(function(){return Ve})),n.d(t,"masAddModel",(function(){return Ge})),n.d(t,"masDescribe",(function(){return We})),n.d(t,"masRun",(function(){return Xe})),n.d(t,"masScore",(function(){return Ze})),n.d(t,"lib",(function(){return et}));var r=n(1),a=n.n(r),s=n(0),o=n.n(s),c=n(2),i=n.n(c);function u(e){var t="{ ",n=" ";for(var r in e){if(!0===Array.isArray(e[r])){var a=l(e[r]);t=t+n+"".concat(r,"=")+a}else{var s=i()(e[r]);if("object"===s){var o=u(e[r]);t=t+n+"".concat(r,"=")+o}else t=t+n+"".concat(r,"=")+("string"===s?' "'.concat(e[r],'" '):"".concat(e[r]," "))}n=","}return t+="} "}function l(e){for(var t="{",n=" ",r=e.length,a=0;a<r;a++)if(!0===Array.isArray(e[a])){var s=l(e[a]);t=t+n+"".concat(a,"=")+s}else{var o=i()(e[a]);if("object"===o)t=t+n+u(e[a]);else t=t+n+("string"===o?' "'.concat(e[a],'" '):"".concat(e[a]," "));n=","}return t+="}"}var p=function(e,t){var n;return n=null===e?"{}":!0===Array.isArray(e)?l(e):u(e),"".concat(t," = ").concat(n,";")};function f(){return(f=a()(o.a.mark((function e(t,n,r,a){var s,c,i,u,l,f,d,m=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(s=p(null!==a?a:{},"_args_"),c=(c=s+" "+r).replace(/\r?\n|\r/g,""),i={action:"sccasl.runcasl",data:{code:c}},u=m.length,l=new Array(u>4?u-4:0),f=4;f<u;f++)l[f-4]=m[f];return e.next=7,t.runAction.apply(t,[n,i].concat(l));case 7:return d=e.sent,e.abrupt("return",d);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var d=function(e,t,n,r){return f.apply(this,arguments)},m=n(4);var b=function(){return"\n print _args_;\n\n results = casFetchRows(_args_.table.caslib, _args_.table.name , _args_.start + 1, _args_.limit, _args_.format, _args_.where); \n send_response({casResults = results}); \n \n function casFetchRows(caslib, name, from, count, format, where) ; \n \n rc = checkAndLoadTable(caslib, name);\n \n if (rc ne true) then do;\n text = 'Unable to access ' ||caslib||'.'||name; \n rx = {severity=2,reason=6, status='error',statusCode=2, formatted=text};\n exit(rx); \n end; \n\n /*\n * get tableoinfo to get rowCount\n */\n\n action table.tableinfo r= result/ \n caslib = caslib \n name = name; \n \n rowCount = result.TableInfo[1, 'rows'];\n to = from + count - 1;\n\n \n /*\n * get column information\n */\n\n action table.columninfo r=infoResult /\n table = {caslib=caslib name=name};\n\n columns ={{Column='_Index_',ID=0,Type='double',RawLength=5,FormattedLength=5,NFL=0,NFD=0}};\n i = 2;\n do c over inforesult.columninfo;\n columns[i] = c;\n i = i + 1;\n end;\n \n /*\n * Fetch the current set of rows\n */\n\n rows = {};\n if (from <= rowCount) then do;\n action table.fetch r = result status=rcx/ \n table = {caslib=caslib, name=name where=where} \n from= from to=to format=format sastypes=true\n ;\n if (rcx.severity eq 2) then do;\n exit(rcx);\n end;\n /* \n * create payload to return\n */\n\n i = 1;\n rows ={};\n do row over result.fetch;\n rr = {};\n j = 1;\n do key,v over row;\n rr[j] = override(columns[j].Type, v);\n j = j + 1;\n end;\n rows[i] = rr;\n i = i + 1;\n end;\n end;\n\n currentCount = DIM(rows);\n pagination = {}; \n table = {caslib=caslib, name=name};\n\n pagination = setPagination(from, count, format, where, currentCount, rowCount, table);\n \n lastRequest={start=from-1, limit=count, format=format, currentCount=currentCount, \n rowCount=rowCount, where=where, table=table, version='3'};\n scrollOptions = getKeys(pagination);\n return( \n {pagination = pagination, data = {schema=columns, rows=rows , scrollOptions=scrollOptions}, lasRequest=lastRequest}\n );\n end; \n \n \n /*\n * For non-primary column types set new content\n */\n\n function setPagination(from, count, format, where, currentCount, rowCount, table);\n\n\n prevStart = max(from - count - 1, 0);\n\n if (currentCount lt count) then do; \n pagination.prev = {start=prevStart, limit=count, format=format, where=' ', table=table};\n if (prevStart ne 0) then do;\n pagination.first = {start=0, limit=count, format=format, where=' ', table=table};\n end; \n return pagination;\n end;\n currentStart = from -1;\n if (currentStart eq 0) then do;\n pagination.next = {start=count, limit=count, format=format, where=' ', table=table};\n return pagination;\n end;\n\n nextStart = currentStart + count;\n pagination.next = {start=nextStart, limit=count, format=format, where=' ', table=table};\n pagination.prev = {start=prevStart, limit=count, format=format, where=' ', table=table};\n if (prevStart ne 0) then do;\n pagination.first = {start=0, limit=count, format=format, where=' ', table=table};\n end; \n return pagination;\n end;\n\n\n\n\n function override(type, iv);\n if (type EQ 'varbinary') then v = '...varbinary';\n else if (type EQ 'blob') then v = '...blob';\n else if (type EQ 'table') then v = '...table';\n else if (type EQ 'dictionary') then v = '...dictionary';\n else if (type EQ 'list') then v = '...list';\n else if (type EQ 'isArray') then v = '...array';\n else v = iv;\n return v;\n end;\n\n \n "};var h=function(){return"\n rc = checkAndLoadTable(_args_.masterTable.caslib, _args_.masterTable.name);\n\n if (rc ne true) then do;\n text = 'Unable to access ' ||_args_.masterTable.caslib||'.'||_args_.masterTable.name; \n rx = {severity=2,reason=6, status='error',statusCode=2, formatted=text};\n exit(rx); \n end; \n \n rc = checkAndLoadTable(_args_.setTable.caslib, _args_.setTable.name);\n if (rc ne true) then do;\n text = 'Unable to access ' ||_args_.setTable.caslib||'.'||_args_.setTable.name; \n rx = {severity=2,reason=6, status='error',statusCode=2, formatted=text};\n return rx;\n end;\n\n\n setdata = _args_.setTable.caslib ||'.'||_args_.setTable.name;\n masterdata = _args_.masterTable.caslib ||'.'||_args_.masterTable.name;\n\n action datastep.runCode r=result status=rc/\n code='data ' ||masterdata||'(append=YES);set ' || setdata ||'; run;';\n\n if (rc.statusCode ne 0) then do;\n exit(rc);\n end; \n else do;\n results = {msg= 'Append succeeded', statusCode=true};\n end;\n \n send_response({casResults = results});\n "},v={commonCasl:function(){return"\n function checkAndLoadTable(caslib, name); \n \n /* verify caslib is there */\n table.queryCaslib status=status result=result/\n caslib = caslib;\n do k,v over result; /* to handle casuser[user] */ \n rc = v;\n end;\n if ( rc eq false ) then \n return -1;\n /* \n * Check to see if table is already loaded \n */ \n action table.tableExists r=result/ \n caslib = caslib \n name = name; \n /* \n * if not loaded then try to load it \n */ \n rc = true;\n if (result.exists eq 0 or result.exists eq 2) then do; \n path = lookupPath(caslib, name);\n if (path eq '*') then do;\n rc = false;\n end;\n else do;\n action table.loadTable status=status/ \n caslib = caslib \n source = path \n casout={caslib= caslib name=name}; \n if (status.statusCode ne 0 ) then rc = false;\n end; \n end; \n return rc; \n end; \n \n function saveAndLoadTable(caslib, source, targetlib, targetname,promote);\n \n /* load source */\n r = checkAndLoadTable(caslib, source);\n \n sashdat = target||\".sashdat\";\n table.save /\n caslib= targetlib name=sashdat\n table = {caslib=caslib name=source} replace=true;\n \n table.droptable /\n caslib=targetlib name=target quiet=true;\n \n table.loadtable result=r status=rc/\n caslib=targetlib casout={caslib=targetlib name=target replace=TRUE}\n path=sashdat;\n \n if (promote eq true) then do;\n table.promote result=r status=rc/\n caslib=caslib name=target quiet=true\n targetLib=caslib target=target;\n end;\n if (rc.severity eq 2) then do;\n print rc;\n print 'Ignoring error';\n end;\n r = 0;\n return r;\n \n end;\n \n function lookupPath(caslib, name ) ; \n table.fileInfo r = result/\n caslib=caslib; \n \n names = result.fileInfo[,4]; \n nameu = upcase(name)||'.SASHDAT'; \n cpath = '*'; \n count = 0; \n \n do n over names; \n if (upcase(n) eq nameu) then do; \n count = count + 1; \n if ( cpath eq '*') then do; \n cpath = n; \n end; \n end; \n end; \n \n if (count GT 1 ) then do; \n print 'Warning: ' count 'Files with names only different in case exist - First one chosen';\n print 'Path: ' cpath ' will be used****'; \n end; \n r = cpath; \n return r; \n end; \n /*-----------------------------------------*/ \n /* isModel: is it model table */ \n /*-----------------------------------------*/ \n \n function isModel(caslib, name) ; \n table.columnInfo r = result / \n table = {caslib=caslib , name=name}; \n validTable = false; \n mtype = 'bad'; \n do c over result.columninfo; \n cu = upCase(c.Column); \n if ( cu eq 'DATASTEPSRC') then do; \n mtype = 'ds'; \n end; \n else if ( cu eq '_STATE_' ) then do; \n mtype = 'astore'; \n end; \n else if (cu eq 'MODELMETADATA') then do; \n mtype = 'ds2'; \n end; \n end; \n print 'Specified model type: ' || mtype; \n return mtype; \n end; \n \n /*-----------------------------------------*/ \n /* Returns contents of the specified table */ \n /*-----------------------------------------*/ \n \n function contents(caslib, name) ; \n table.columnInfo r = result / \n table = {caslib=caslib , name=name}; \n /* columns ={{Column='_Index_',ID=0,Type='double',RawLength=5,FormattedLength=5,NFL=0,NFD=0}}; */ \n i = 1; \n columns = {}; \n do c over result.columninfo; \n columns[i] = c; \n i = i + 1; \n end; \n return {describe = columns, table = {}}; \n end; \n \n /*------------------------------------------*/ \n /* Returns unique values */ \n /*-----------------------------------------*/ \n \n function selectionLists(idvars,caslib, name, where); \n \n s = checkAndLoadTable(caslib, name); \n if ( s ne true) then do; \n results = {Errors= 'Unable to access ' ||caslib||'.'||name, statusCode = s}; \n \n end; \n print idvars;\n do k over idvars; \n r = _getValues(k, caslib, name, where); \n results[k] = r; \n end; \n return { data=results, statusCode=0}; \n end; \n function _getValues(id, caslib, name, where) ; \n \n action table.dropTable/ \n caslib='casuser' name='dtemp1' quiet=TRUE; \n \n action table.deleteSource status=src / \n caslib='casuser' source= 'dtemp1.sashdat' quiet=TRUE; \n \n action simple.groupby result=r status=rc/ \n aggregator = 'N' \n inputs = {id} \n table = {caslib=caslib name=name, where=where} \n casout = {caslib='casuser' name='dtemp1'} \n ; \n action table.fetch result=r/ \n table={caslib='casuser' name='dtemp1'} \n sortby={{name=id, order='ascending'}}; \n result = r.Fetch[,2]; \n return result; \n end; \n /*------------------------------------------*/ \n /* get a record */ \n /*------------------------------------------*/ \n \n function _fetchData(filter, table); \n s = checkAndLoadTable(table.caslib, table.name); \n if ( s ne 0 ) then do; \n results = {Errors= 'Unable to access ' ||table.caslib||'.'||table.name}; \n return results; \n end; \n wherex = dictTowhere(filter); \n /* wherex = table.caslib||'.'||table.name||'(where=('||wherex||'));'; \n \n destroyTable('casuser', 'input'); \n \n action datastep.runCode r=result status=rc/ \n single='yes' \n code = 'data casuser.input; set ' || wherex||'run;'; \n */ \n \n action table.fetch r = result / \n table={caslib=table.caslib name=table.name where=wherex}; \n \n rows = resultsToDict(result.Fetch); \n return {scenario = rows, table = result.Fetch}; \n \n end; \n function destroyTable(caslib,name); \n action table.dropTable/ \n caslib=caslib name=name quiet=TRUE; \n \n action table.deleteSource status=src / \n caslib=caslib source= name||'.sashdat' quiet=TRUE; \n \n return true; \n end; \n \n \n function dictToWhere(filter); \n where =''; \n andbit=' '; \n do k,v over filter; \n if (isString(v) ) then do; \n where = where || andbit || k || ' eq ' || '\"'||v||'\"'; \n end; \n else do; \n where = where || andbit || k || ' eq ' || v ; \n end; \n andbit =' and '; \n end; \n return where; \n end; \n \n function resultsToDict(r); \n casResults = {}; \n i = 1; \n do row over r; \n casResults[i] = row; \n i = i + 1; \n end; \n return casResults; \n end; \n \n function argsToTable(_arg_, caslib, name ); \n action table.droptable/ \n caslib=caslib name=name quiet=TRUE; \n i = 1; \n do key,obj over _arg_; \n columns[i] = key; \n row[i] = obj; \n if ( isString(obj) ) then \n type[i] = 'varchar'; \n else if ( isInteger(obj) ) then \n type[i] = 'int'; \n else type[i] = 'double'; \n i = i + 1; \n end; \n \n data1 = newTable('data1', columns, type, row ); \n \n saveresult data1 casout=name caslib=caslib replace; \n end; \n \n function saveAndPromoteTable(caslib, target, source);\n sashdat = target||\".sashdat\";\n rc = checkAndLoadTable(caslib, source);\n table.droptable /\n caslib=caslib name=target quiet=true;\n \n table.save /\n caslib= caslib name=sashdat\n table = {caslib=caslib name=source} replace=true;\n \n table.loadtable result=r/\n caslib=caslib casout={caslib=caslib name=target replace=TRUE}\n path=sashdat;\n \n table.promote result=r status=rc/\n caslib=caslib name=target quiet=true\n targetLib=caslib target=target;\n print rc;\n r = rc.severity;\n if (rc.severity gt 0) then do;\n print rc;\n print 'Ignoring error';\n rc = 0;\n end;\n \n return r;\n end; \n \n "},casFetchData:b,casFetchRows:function(){return"\n results = casFetchRows(_args_.table.caslib, _args_.table.name , _args_.from, _args_.count, _args_.format, _args_.where); \n send_response({casResults = results}); \n \n function casFetchRows(caslib, name, from, count, format, where) ; \n \n rc = checkAndLoadTable(caslib, name);\n \n if (rc ne true) then do;\n text = 'Unable to access ' ||caslib||'.'||name; \n rx = {severity=2,reason=6, status='error',statusCode=2, formatted=text};\n exit(rx); \n end; \n\n /*\n * get all table to get rowCount\n */\n\n action table.tableinfo r= result/ \n caslib = caslib \n name = name; \n \n rowCount = result.TableInfo[1, 'rows']; \n \n to = from + count - 1; \n \n /*\n * get column information\n */\n\n action table.columninfo r=infoResult /\n table = {caslib=caslib name=name};\n\n columns ={{Column='_Index_',ID=0,Type='double',RawLength=5,FormattedLength=5,NFL=0,NFD=0}};\n i = 2;\n do c over inforesult.columninfo;\n columns[i] = c;\n i = i + 1;\n end;\n \n /*\n * Fetch the current set of rows\n */\n /* wherex = dictTowhere(where); let user send in the where clause */\n print where;\n\n action table.fetch r = result / \n table = {caslib=caslib, name=name where=where} \n from= from to=to format=format sastypes=true\n ;\n\n /* \n * create payload to return\n */\n\n i = 1;\n rows ={};\n do row over result.fetch;\n rr = {};\n j = 1;\n do key,v over row;\n rr[j] = override(columns[j].Type, v);\n j = j + 1;\n end;\n rows[i] = rr;\n i = i + 1;\n end;\n\n pagePrev = max(from - count, 1);\n \n if ( to eq rowCount ) then do; \n pageNext = -1; \n end; \n else do ; \n pageNext = min(to + 1, rowCount); \n end; \n table = {caslib=caslib, name=name};\n pagination = {next= {from=pageNext, count=count, format=format, where=where table=table}, prev={from=pagePrev, count=count, format=format, where=where, table=table}};\n pagination.current = {from = from, to=to, rowCount=rowCount, version=1};\n return( \n {pagination = pagination, data = {schema=columns, rows=rows }}\n );\n end; \n \n \n /*\n * For non-primary column types set new content\n */\n\n function override(type, iv);\n if (type EQ 'varbinary') then v = '...varbinary';\n else if (type EQ 'blob') then v = '...blob';\n else if (type EQ 'table') then v = '...table';\n else if (type EQ 'dictionary') then v = '...dictionary';\n else if (type EQ 'list') then v = '...list';\n else if (type EQ 'isArray') then v = '...array';\n else v = iv;\n return v;\n end;\n\n \n "},scoreCasl:n.n(m).a,casAppendTable:h,casRowSets:b};function y(){return(y=a()(o.a.mark((function e(t,n,r,a,s){var c,i,u,l,p,f=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(c=r,!1!==s&&(c=r+" "+v.commonCasl()),i=f.length,u=new Array(i>5?i-5:0),l=5;l<i;l++)u[l-5]=f[l];return e.next=5,d.apply(void 0,[t,n,c,a].concat(u));case 5:return p=e.sent,e.abrupt("return",p.items().toJS());case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var x=function(e,t,n,r,a){return y.apply(this,arguments)},g=n(3),w=n.n(g);function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){w()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function C(){return(C=a()(o.a.mark((function e(t,n,r){var a,s,c,i;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=v.commonCasl()+" "+v.scoreCasl(),s=k({path:"/score"},r),e.next=4,d(t,n,a,s);case 4:return c=e.sent,i=c.items("results","casResults").toJS()[0],e.abrupt("return",i);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var S=function(e,t,n){return C.apply(this,arguments)};function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){w()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function T(){return(T=a()(o.a.mark((function e(t,n,r){var a,s,c,i;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=v.commonCasl()+" "+v.scoreCasl(),s=O({path:"/describe"},r),e.next=4,d(t,n,a,s);case 4:return c=e.sent,i=c.items("results").toJS(),e.abrupt("return",i);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var E=function(e,t,n){return T.apply(this,arguments)};function R(){return(R=a()(o.a.mark((function e(t,n,r,a){var s,c,u,l,p,f,d,m,b,h;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==n){e.next=4;break}return e.next=3,t.logon(n);case 3:e.sent;case 4:return e.next=6,t.addServices("casManagement");case 6:return s=e.sent,c=s.casManagement,e.next=10,t.apiCall(c.links("servers"));case 10:if(0!==(u=e.sent).itemsList().size){e.next=13;break}throw{Error:"No cas servers were found"};case 13:if(l=null,null!=a){e.next=18;break}l=u.itemsList(0),e.next=25;break;case 18:if(p=u.itemsList().toJS(),-1!==(f=p.findIndex((function(e){return e===a})))){e.next=24;break}throw{Error:"server with name of ".concat(a," was not found")};case 24:l=u.itemsList(f);case 25:if(d=null,null!=r){e.next=32;break}return e.next=29,t.apiCall(u.itemsCmd(l,"createSession"));case 29:d=e.sent,e.next=46;break;case 32:if("object"!==i()(r)){e.next=36;break}d=r,e.next=46;break;case 36:return m={qs:{filter:"eq( id,'".concat(r,"')")}},e.next=39,t.apiCall(u.itemsCmd(l,"sessions"),m);case 39:if(0!==(b=e.sent).items().size){e.next=42;break}throw"ERROR: The sessionID ".concat(r," was not found.");case 42:return h=b.itemsCmd(b.itemsList(0),"self"),e.next=45,t.apiCall(h);case 45:d=e.sent;case 46:return e.abrupt("return",{servers:u,session:d});case 47:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var L=function(e,t,n,r){return R.apply(this,arguments)};function q(){return(q=a()(o.a.mark((function e(t){var n,r,a,s,c=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(n=c.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=c[a];return e.next=3,t.runAction.apply(t,r);case 3:return s=e.sent,e.abrupt("return",s.items().toJS());case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var A=function(e){return q.apply(this,arguments)};function P(){return(P=a()(o.a.mark((function e(t,n,r){var a,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=v.commonCasl()+" "+v.casFetchData(),e.next=3,d(t,n,a,r);case 3:return s=e.sent,e.abrupt("return",s.items("results","casResults").toJS());case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var D=function(e,t,n){return P.apply(this,arguments)};function I(){return(I=a()(o.a.mark((function e(t,n,r){var a,s,c;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return null==r.where&&(r.where=" "),a=v.commonCasl()+" "+v.casFetchRows(),e.next=4,d(t,n,a,r);case 4:return s=e.sent,null==(c=s.items("results","casResults").toJS()).data&&(c.data={rows:[]}),e.abrupt("return",c);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var N=function(e,t,n){return I.apply(this,arguments)};function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){w()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function U(){return(U=a()(o.a.mark((function e(t,n,r){var a,s,c,i,u,l,p,f,d,m,b,h,v,y,x,g,w;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(l in a=r.data,s=r.where,c=r.table,i="",u=" ",s)p=s[l],f="string"==typeof p?"'".concat(p.toString(),"'"):p,i=i+u+l+"= ".concat(f," "),u=" AND ";for(m in d=[],a)b=a[m],h=void 0,h=null==b?".":"string"==typeof b?JSON.stringify(b):b.toString(),d.push({var:m,value:h});return v=J(J({},c),{},{where:"".concat(i)}),y={action:"table.update",data:{table:v,set:d}},e.next=11,t.runAction(n,y);case 11:return x=e.sent,g={msg:"Update completed",statusCode:0},0!==(w=x.items().toJS().disposition).statusCode&&(g.statusCode=w.statusCode,g.msg=w.reason),e.abrupt("return",g);case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var M=function(e,t,n){return U.apply(this,arguments)};function Q(){return(Q=a()(o.a.mark((function e(t,n,r,a,s){var c,i,u;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=r.caslib,i=r.name,u={action:"table.save",data:{name:"".concat(i),caslib:"".concat(c),replace:!1!==a,table:r}},e.next=4,t.runAction(n,u);case 4:return e.abrupt("return",{msg:"".concat(c,".").concat(i," saved}"),statusCode:0});case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var z=function(e,t,n,r,a){return Q.apply(this,arguments)};function G(){return(G=a()(o.a.mark((function e(t,n,r,a,s){var c,i,u,l;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=v.commonCasl()+" "+v.casAppendTable(),i={masterTable:a,setTable:r,save:null==s||s},e.next=4,d(t,n,c,i);case 4:if(u=e.sent,l=u.items("results","casResults").toJS(),!0!==s){e.next=9;break}return e.next=9,z(t,n,a);case 9:return e.abrupt("return",l);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Y=function(e,t,n,r,a){return G.apply(this,arguments)};var B=function(e,t){var n=e.items("tables",t),r=n.get("rows"),a=[];n.get("schema").map((function(e){a.push(e.get("name"))}));var s=[];return r.map((function(e){var t={};e.map((function(e,n){t[a[n]]=e})),s.push(t)})),s};function H(){return(H=a()(o.a.mark((function e(t,n,r,a){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"\n\t print _args_;\n rc = checkAndLoadTable(_args_.caslib, _args_.name);\n\t\tif (rc ne true) then do;\n\t\t\ttext = 'Unable to access ' ||_args_.caslib||'.'||_args_.name; \n\t\t\trx = {severity=2,reason=6, status='error',statusCode=2, formatted=text};\n\t\t\texit(rx); \n\t\tend; \n\t print 'return code = ' || rc;\n\t send_response({casResults={status='ok'}});\n ",e.next=3,x(t,n,"\n\t print _args_;\n rc = checkAndLoadTable(_args_.caslib, _args_.name);\n\t\tif (rc ne true) then do;\n\t\t\ttext = 'Unable to access ' ||_args_.caslib||'.'||_args_.name; \n\t\t\trx = {severity=2,reason=6, status='error',statusCode=2, formatted=text};\n\t\t\texit(rx); \n\t\tend; \n\t print 'return code = ' || rc;\n\t send_response({casResults={status='ok'}});\n ",r,!0);case 3:return e.sent,e.abrupt("return",{msg:"".concat(r.caslib,".").concat(r.name," loaded}"),statusCode:0});case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var V=function(e,t,n,r){return H.apply(this,arguments)};function W(){return(W=a()(o.a.mark((function e(t,n,r,a){var s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==r||null!=a){e.next=6;break}return e.next=3,K(t,n,r);case 3:s=e.sent,e.next=9;break;case 6:return e.next=8,$(t,n,a);case 8:s=e.sent;case 9:return e.abrupt("return",s);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function K(e,t,n){return X.apply(this,arguments)}function X(){return(X=a()(o.a.mark((function e(t,n,r){var a,s,c,i,u,l,p,f,d,m;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((a={session:n,log:null,listing:null,ods:null,job:r,tables:{},files:{}}).log=r.links("log"),a.listing=r.links("listing"),null===(s=r.links("results"))){e.next=10;break}return e.next=7,t.apiCall(s);case 7:if(c=e.sent,(i=c.itemsList().size)>0)for(u=0;u<i;u++)l=c.itemsList(u),"ods"===(p=c.items(l,"data","type").toLowerCase())?a.ods=c.itemsCmd(l,"self"):"table"===p?(f={self:c.itemsCmd(l,"self"),current:null},a.tables[l.toUpperCase()]=f):"file"===p?(d={self:l,current:null,data:null},a.files[l]=d):(m={self:l,current:null,data:null},a[p]=m);case 10:return e.abrupt("return",a);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function $(e,t,n){return Z.apply(this,arguments)}function Z(){return(Z=a()(o.a.mark((function e(t,n,r){var a,s,c,u,l,p,f,d,m,b,h,v,y;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a={session:n,log:null,listing:null,ods:null,job:null,tables:{},files:{}},s="object"===i()(r)?[r]:r,c=0;case 3:if(!(c<s.length)){e.next=29;break}return u=s[c],l=u.libref.toUpperCase(),p=u.name.toUpperCase(),f={qs:{filter:"eq(name,'".concat(l,"')")}},e.next=10,t.apiCall(n.links("librefs"),f);case 10:if(0!==(d=e.sent).itemsList().size){e.next=13;break}throw"ERROR: Libref ".concat(l," not found");case 13:return m=d.itemsCmd(l,"self"),e.next=16,t.apiCall(m);case 16:return b=e.sent,f={qs:{filter:"eq(name,'".concat(p,"')")}},e.next=20,t.apiCall(b.links("tables"),f);case 20:if(0!==(h=e.sent).itemsList().size){e.next=23;break}throw"ERROR: Table ".concat(p," not found");case 23:v="".concat(l,".").concat(p).toLowerCase(),y={self:h.itemsCmd(p,"self"),current:null},a.tables[v.toUpperCase()]=y;case 26:c++,e.next=3;break;case 29:return e.abrupt("return",a);case 30:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ee=function(e,t,n,r){return W.apply(this,arguments)};function te(){return(te=a()(o.a.mark((function e(t,n,r,a,s,c){var i,u,l,p,f;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={data:{code:r}},e.next=3,t.apiCall(n.links("execute"),i);case 3:return u=e.sent,l={qs:{wait:null!=a?a:5},headers:{"If-None-Match":u.headers("etag")}},e.next=7,t.jobState(u,l,"longpoll",0,s,c);case 7:return p=e.sent,e.next=10,ee(t,n,p.job);case 10:return(f=e.sent).SASJobStatus=p.data,f.jobStateStatus=p,e.abrupt("return",f);case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ne=function(e,t,n,r,a,s){return te.apply(this,arguments)};function re(){return(re=a()(o.a.mark((function e(t,n,r,a,s,c,i){var u,l,p,f,d;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("number"==typeof c&&(c=null),u=["options NOSYNTAXCHECK OBS=MAX;%let syscc=0;"],null!=a)for(l in a)p="%let ".concat(l,"=").concat(a[l],";"),u.push(p);return f=(f=r.replace(/\t/g," ")).split(/\r?\n/),u=u.concat(f).concat(";"),e.next=8,ne(t,n,u,s,c,i);case 8:return d=e.sent,e.abrupt("return",d);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ae=function(e,t,n,r,a,s,o){return re.apply(this,arguments)};function se(){return(se=a()(o.a.mark((function e(t,n,r,a,s){var c,u,l,p,f,d,m,b,h,v,y;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.addServices("compute");case 2:if(c=e.sent,u=c.compute,null==s||"object"!==i()(s)){e.next=6;break}return e.abrupt("return",s);case 6:if(null==r){e.next=10;break}return e.next=9,t.logon(r);case 9:e.sent;case 10:if(l=null,null==s){e.next=24;break}return p={start:0,limit:100,qs:{filter:"eq(id,'".concat(s,"')")}},e.next=15,t.apiCall(u.links("sessions"),p);case 15:if(f=e.sent,!((d=f.itemsList().toJS().indexOf(s))<0)){e.next=19;break}throw"ERROR: The sessionID ".concat(s," was not found.");case 19:return m=f.itemsCmd(f.itemsList(d),"self"),e.next=22,t.apiCall(m);case 22:return l=e.sent,e.abrupt("return",l);case 24:if(null==t.store.config.options.computeServerId){e.next=30;break}return console.log("NOTE: Detected Workbench"),e.next=28,t.apiCall(u.links("createSession"));case 28:return l=e.sent,e.abrupt("return",l);case 30:return null==n&&(n="SAS Job Execution compute context"),b={qs:{filter:"contains(name,'".concat(n,"')")}},h=null,e.prev=33,e.next=36,t.apiCall(u.links("contexts"),b);case 36:if(0!==(h=e.sent).itemsList().size){e.next=39;break}throw"Context ".concat(n," not found");case 39:e.next=45;break;case 41:throw e.prev=41,e.t0=e.catch(33),console.log("Error: Not able to get context"),e.t0;case 45:if(v=h.itemsList(0),null!=s){e.next=52;break}return b=null==a?null:a,y=h.itemsCmd(v,"createSession"),e.next=51,t.apiCall(y,a);case 51:l=e.sent;case 52:return e.abrupt("return",l);case 53:case"end":return e.stop()}}),e,null,[[33,41]])})))).apply(this,arguments)}var oe=function(e,t,n,r,a){return se.apply(this,arguments)};function ce(){return(ce=a()(o.a.mark((function e(t,n,r){var a,s,c,i;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("log"!==r&&"listing"!==r){e.next=20;break}if(a=[],null===n[r]){e.next=16;break}return e.next=5,t.apiCall(n[r]);case 5:s=e.sent,a=a.concat(s.items().toJS());case 7:if(null===(c=s.scrollCmds("next"))){e.next=14;break}return e.next=10,t.apiCall(c);case 10:s=e.sent,a=a.concat(s.items().toJS()),e.next=7;break;case 14:e.next=17;break;case 16:a[0]="Note: No ".concat(r);case 17:return e.abrupt("return",a);case 20:if("ods"!==r){e.next=31;break}if(null===n.ods){e.next=28;break}return e.next=24,t.apiCall(n.ods);case 24:return i=e.sent,e.abrupt("return",i.items());case 28:return e.abrupt("return","<h2> No ODS output </h2>");case 29:e.next=40;break;case 31:if("tables"!==r){e.next=35;break}return e.abrupt("return",Object.keys(n.tables));case 35:if("files"!==r){e.next=39;break}return e.abrupt("return",Object.keys(n.files));case 39:throw"Error: Invalid type ".concat(r);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ie=function(e,t,n){return ce.apply(this,arguments)};function ue(){return(ue=a()(o.a.mark((function e(t,n,r,a){var s,c;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==a){e.next=6;break}return e.next=3,ae(t,n,a);case 3:if("completed"===(s=e.sent).SASJobStatus){e.next=6;break}throw"Error: Preamble failed with completion code of ".concat(s.SASJobStatus);case 6:return e.next=8,ee(t,n,null,r);case 8:return c=e.sent,e.abrupt("return",c);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var le=function(e,t,n,r){return ue.apply(this,arguments)};function pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pe(Object(n),!0).forEach((function(t){w()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function de(){return(de=a()(o.a.mark((function e(t,n,r,a,s,c){var i,u,l,p,f,d,m,b,h,v,y,x,g,w,_,k,C,S,j,O,T,E;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=null,u=(u="string"==typeof r?r:"".concat(r.libref,".").concat(r.name)).toUpperCase(),(l=null!=s?fe({},s):{qs:{}}).qs.includeIndex=!0,p=null==c?"rows":c,f=null!=s&&null==a,null==(d=n.tables[u])){e.next=45;break}if(!0===f&&(d.current=null),null!==d.current&&null!=a&&"first"!==a){e.next=33;break}return e.next=13,t.apiCall(d.self);case 13:return m=e.sent,b=m.items().toJS().columnCount,h={qs:{start:0,limit:b}},e.next=18,t.apiCall(m.links("columns"),h);case 18:for(g in v=e.sent,y=[],x=v.items().toJS(),"rows"===p&&y.push({name:"_index_",Column:"_Index_",Label:"Index",length:8,type:"FLOAT",format:"BEST",informat:"BEST"}),x)w=x[g],console.log(w.name,w.data.type,w.data.format,w.data.informat),_={name:w.name.toLowerCase(),Column:w.name.toLowerCase(),Label:w.data.label,length:w.data.length,type:w.data.type,format:null!=w.data.format?w.data.format.name:null,informat:null!=w.data.informat?w.data.informat.name:null,custom:!1},k=!0===l.qs.includeIndex?1:0,y[w.data.index+k]=_;return e.next=25,t.apiCall(m.links(p),l);case 25:C=e.sent,S="rowSet"===p?C.items("rows").toJS():me(C),d.current=C,d.schema=y,d.columns=v,i={columns:v,schema:y,rows:S,scrollOptions:C.scrollCmds().keySeq().toJS()},e.next=45;break;case 33:if(j=d.current,O=a,"next"===a&&null===j.scrollCmds("next")&&(O=null!==j.links("last")?"last":null),"prev"===a&&null===j.scrollCmds("prev")&&(O=null!==j.links("first")?"first":null),i={schema:d.schema,columns:d.columns,currentColumns:d.currentColumns,rows:[],scrollOptions:j.scrollCmds().keySeq().toJS()},null===O||null===j.scrollCmds(O)){e.next=45;break}return e.next=41,t.apiCall(j.scrollCmds(O),l);case 41:T=e.sent,d.current=T,E="rows"!==p?T.items("rows").toJS():me(T),i={schema:d.schema,columns:d.schema,rows:E,scrollOptions:T.scrollCmds().keySeq().toJS()};case 45:return e.abrupt("return",i);case 46:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function me(e){return e.items().toJS().map((function(e){return e.cells}))}var be=function(e,t,n,r,a,s){return de.apply(this,arguments)};function he(){return(he=a()(o.a.mark((function e(t,n,r,a){var s,c,i,u,l,p;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=(s=n.files[r])){e.next=3;break}throw"Invalid fileref ".concat(r);case 3:if(null!==s.current){e.next=12;break}return c={qs:{filter:"eq(name,'".concat(r,"')")}},e.next=7,t.apiCall(n.session.links("files"),c);case 7:return i=e.sent,e.next=10,t.apiCall(i.itemsCmd(r,"self"));case 10:i=e.sent,s.current=i;case 12:if(!0!==a){e.next=17;break}return u="".concat(n.session.host).concat(s.current.links("content","link","uri")),e.abrupt("return",u);case 17:if(null!==s.data){e.next=26;break}return e.next=20,t.apiCall(s.current.links("content"));case 20:return l=e.sent,p=l.items(),s.data=p,e.abrupt("return",p);case 26:return e.abrupt("return",s.data);case 27:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ve=function(e,t,n,r){return he.apply(this,arguments)};function ye(){return(ye=a()(o.a.mark((function e(t,n,r,a){var s,c,i;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s="\n proc append base=".concat(a.libref,".{output.name} \n data= ").concat(r.libref,".").concat(r.name,"; run;\n "),e.next=3,ae(t,n,s);case 3:return c=e.sent,i="completed"===c.SASJobStatus?0:1,e.abrupt("return",{msg:"Append Completed. Status is: ".concat(c.SASJobStatus),statusCode:i});case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var xe=function(e,t,n,r){return ye.apply(this,arguments)};function ge(){return(ge=a()(o.a.mark((function e(t,n,r){var a,s,c,i,u,l,p,f,d,m,b,h,v,y,x,g,w,_;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(p in a=r.data,s=r.table,c=r.where,i="proc sql; update ".concat(s.libref,".").concat(s.name),u="SET ",l=" ",a)u=u+l+p+"="+we(a[p]),l=", ";if(i=i+" "+u,f=" WHERE ",d=" ","string"==typeof c)f+=c;else for(m in c)b=c[m],h=we(b),f=f+d+m+"= ".concat(h," "),d=" AND ";return v=(i=i+" "+f+";run;").split(/\r?\n/),y={data:{code:v}},e.next=14,t.apiCall(n.links("execute"),y);case 14:return x=e.sent,g={qs:{newState:"Completed",timeout:1}},e.next=18,t.jobState(x,g);case 18:return w=e.sent,_="completed"===w.data?0:1,e.abrupt("return",{statusCode:_,msg:w.data});case 21:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function we(e){return null==e?".":"string"==typeof e?JSON.stringify(e):e.toString()}var _e=function(e,t,n){return ge.apply(this,arguments)};function ke(){return(ke=a()(o.a.mark((function e(t,n,r,a,s){var c,i,u,l,p,f;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(l in c="data ".concat(r.libref,".").concat(r.name,"; INFILE datalines delimiter=',' ;\n"),i="",u="INPUT ",s)p=s[l],u=u+p.Column+" ","CHAR"===p.Type&&(f=" ".concat(p.Column," $ ").concat(p.length," \n"),i=i+" "+f);return i.length>0&&(i="LENGTH "+i+";\n"),c=c+";\n"+i+(u+=";\n")+"datalines;\n"+a+"\n; run; proc print;run;\n",e.next=9,ae(t,n,c);case 9:return e.abrupt("return",{msg:"done",statusCode:0});case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ce=function(e,t,n,r,a){return ke.apply(this,arguments)};function Se(){return(Se=a()(o.a.mark((function e(t,n){var r,a,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.getService("reports"),a=null,null!==n&&(a={qs:{filter:"eq(name,'".concat(n,"')")}}),e.next=5,t.apiCall(r.links("reports"),a);case 5:return s=e.sent,e.abrupt("return",0===s.itemsList().size?null:s);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var je=function(e,t){return Se.apply(this,arguments)};function Oe(){return(Oe=a()(o.a.mark((function e(t,n){var r,a,s,c,i,u,l;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.rafObject("reportImages"),e.next=3,je(t,n);case 3:if(null!==(a=e.sent)){e.next=6;break}return e.abrupt("return","".concat(n," was not found"));case 6:return s=a.itemsCmd(a.itemsList(0),"self","link","uri"),c={data:{reportUri:s,sectionIndex:0,layoutType:"entireSection",size:"400x400"}},e.next=11,t.apiCall(r.links("createJob"),c);case 11:return i=e.sent,e.next=14,t.jobState(i,{qs:{wait:1.5}},10,2);case 14:if("completed"===(u=e.sent).data){e.next=17;break}return e.abrupt("return","Job failed ".concat(u.data));case 17:return e.next=19,t.apiCall(u.job.itemsCmd(u.job.itemsList(0),"image"));case 19:return l=e.sent,e.abrupt("return",l.items());case 21:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Te=function(e,t){return Oe.apply(this,arguments)};function Ee(){return(Ee=a()(o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,je(t,n);case 2:if(null!==(r=e.sent)){e.next=6;break}throw null==n?"No reports were found":"".concat(n," was not found");case 6:return a=[],r.items().map((function(e,t){var n={name:t,uri:r.itemsCmd(t,"self","link","uri")};a.push(n)})),e.abrupt("return",a);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Re=function(e,t){return Ee.apply(this,arguments)};function Le(){return(Le=a()(o.a.mark((function e(t,n,r){var a,s,c,i,u,l,p,f,d;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.tables[r],e.next=3,t.apiCall(a);case 3:return s=e.sent,e.next=6,t.apiCall(s.links("rowSet"));case 6:c=e.sent,i=c.items("columns"),u=c.items("rows"),l=[],p=u.size,f=o.a.mark((function e(){var t,n;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=u.get(d),n={},i.map((function(e,r){var a=e.toLowerCase();n[a]=t.get(r)})),l.push(n);case 4:case"end":return e.stop()}}),e)})),d=0;case 13:if(!(d<p)){e.next=18;break}return e.delegateYield(f(),"t0",15);case 15:d++,e.next=13;break;case 18:return e.abrupt("return",l);case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var qe=function(e,t,n){return Le.apply(this,arguments)};function Ae(){return(Ae=a()(o.a.mark((function e(t,n){var r;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==n){e.next=3;break}return e.next=3,t.logon(n);case 3:return e.next=5,t.addServices("jobExecution","compute","jobDefinitions");case 5:return r=e.sent,e.abrupt("return",r.jobExecution);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Pe=function(e,t){return Ae.apply(this,arguments)};function De(){return(De=a()(o.a.mark((function e(t,n){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n);case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ie=function(e,t){return De.apply(this,arguments)};function Ne(){return(Ne=a()(o.a.mark((function e(t,n,r){var a,s,c;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.apiCall(n.links("create"),r);case 2:return a=e.sent,e.next=5,t.jobState(a,null,5,2);case 5:if("running"!==(s=e.sent).data){e.next=10;break}throw"ERROR: Job did not complete in allotted time";case 10:if("failed"!==s.data){e.next=14;break}throw JSON.stringify(s);case 14:return e.next=16,Ie(t,s.job);case 16:return c=e.sent,e.abrupt("return",c);case 18:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Fe=function(e,t,n){return Ne.apply(this,arguments)};function Je(){return(Je=a()(o.a.mark((function e(t,n,r,a,s){var c,i,u,l;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c={},i={},null===a){e.next=6;break}return e.next=5,Ue(t,a);case 5:c.jobDefinitionUri=e.sent;case 6:return-0!=r&&(i.code=r),i.type="Compute",c.arguments=s,c.jobDefinition=i,u={data:c},e.next=13,Fe(t,n,u);case 13:return l=e.sent,e.abrupt("return",l);case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ue(e,t){return Me.apply(this,arguments)}function Me(){return(Me=a()(o.a.mark((function e(t,n){var r,a,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.getService("jobDefinitions"),r=null,a={qs:{filter:"eq(name,'".concat(n,"')")}},e.next=5,Fe(t,a);case 5:if(0!==(s=e.sent).itemsList().size){e.next=10;break}throw"Error: ".concat(n," not found in the system");case 10:r=s.itemsCmd(n,"self","link","uri");case 11:return e.abrupt("return",r);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Qe=function(e,t,n,r,a){return Je.apply(this,arguments)};function ze(){return(ze=a()(o.a.mark((function e(t,n,r){var a,s,c,i;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=n.service,s=0;case 2:if(!(s<r.length)){e.next=12;break}if(c=r[s],null!=n.steps[c]){e.next=9;break}return e.next=7,Be(t,a,c);case 7:i=e.sent,n.steps[c]=i;case 9:s++,e.next=2;break;case 12:return e.abrupt("return",!0);case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ge=function(e,t,n){return ze.apply(this,arguments)};function Ye(){return(Ye=a()(o.a.mark((function e(t,n,r){var a,s,c,i,u;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a={qs:{filter:"eq(name,'".concat(r.trim(),"')")}},e.next=3,t.apiCall(n.links("modules"),a);case 3:if(0!==(s=e.sent).itemsList().size){e.next=6;break}return e.abrupt("return",null);case 6:return c=s.itemsCmd(r,"steps"),e.next=9,t.apiCall(c);case 9:return i=e.sent,u={name:r,stepsRafLink:i,stepIds:s.items(r,"data","stepIds").toJS(),microanalyticScore:n},e.abrupt("return",u);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Be=function(e,t,n){return Ye.apply(this,arguments)};function He(){return(He=a()(o.a.mark((function e(t,n,r){var a,s,c,i,u,l;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==r){e.next=3;break}return e.next=3,t.logon(r);case 3:return e.next=5,t.addServices("microanalyticScore");case 5:a=e.sent,s=a.microanalyticScore,c={service:s,steps:{}},i=0;case 9:if(!(i<n.length)){e.next=18;break}return u=n[i],e.next=13,Be(t,s,u);case 13:l=e.sent,c.steps[u]=l;case 15:i++,e.next=9;break;case 18:return e.abrupt("return",c);case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ve=function(e,t,n){return He.apply(this,arguments)};var We=function(e,t,n){var r=e.steps[t];if(null===r)return[];var a=null;if(null==n){var s=r.stepIds.findIndex((function(e){return"execute"===e||"score"===e}));if(-1===s)return[];a=r.stepIds[s]}else{if(-1===r.stepIds.findIndex((function(e){return e===n})))return[];a=n}var o=r.stepsRafLink.items(a,"data","inputs");return null===o?[]:o.toJS()};function Ke(){return(Ke=a()(o.a.mark((function e(t,n,r,a,s,c){var i,u,l,p,f,d,m,b,h,v,y,x,g;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.steps[r],u=!1,l=[],!1===Array.isArray(a))for(p in a)f={name:p,value:a[p]},l.push(f);else u=!0;if(d={data:{inputs:!0===u?a:l}},m=null,null!=s){e.next=15;break}if(-1!==(b=i.stepIds.findIndex((function(e){return"execute"===e||"score"===e})))){e.next=12;break}return e.abrupt("return",[]);case 12:m=i.stepIds[b];case 13:e.next=21;break;case 15:if(-1!==i.stepIds.findIndex((function(e){return e===s}))){e.next=20;break}return e.abrupt("return",[]);case 20:m=s;case 21:if(null==c&&(c="execute"),null!==(h=i.stepsRafLink.itemsCmd(m,c))){e.next=26;break}return v=[{name:"Error",type:"string",value:"name: ".concat(r," step: ").concat(s," operation: ").concat(c," is an invalid combination")}],e.abrupt("return",v);case 26:return e.next=28,t.apiCall(h,d);case 28:return y=e.sent,x=y.items("outputs").toJS(),!0===u?g=x:(g={},x.map((function(e){g[e.name]=e.value}))),e.abrupt("return",g);case 32:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Xe=function(e,t,n,r,a,s){return Ke.apply(this,arguments)};function $e(){return($e=a()(o.a.mark((function e(t,n,r){var a,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ve(t,[n]);case 2:return a=e.sent,e.next=5,Xe(t,a,n,r,"score","execute");case 5:return s=e.sent,e.abrupt("return",s);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ze=function(e,t,n){return $e.apply(this,arguments)};var et=function(){return{caslRun:x,caslRunBase:d,casSetup:L,casActionRun:A,casFetchData:D,casUpdateData:M,computeRun:ae,computeSetup:oe,computeSummary:ee,computeFetchData:be,computeFileContent:ve,computeResults:ie,findReport:je,getReportImage:Te,getReportUri:Re,getSASTableRows:qe,jesSetup:Pe,jesRun:Qe,jesSummary:Ie,jsonToDict:p,casTableToJson:B,caslScore:S,caslDescribe:E,masSetup:Ve,masAddModel:Ge,masDescribe:We,masRun:Xe}}()}])}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("restaflib",[],t):"object"==typeof exports?exports.restaflib=t():e.restaflib=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t,n){var r=n(6)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},function(e,t){function n(e,t,n,r,a,s,o){try{var c=e[s](o),i=c.value}catch(e){return void n(e)}c.done?t(i):Promise.resolve(i).then(r,a)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(a,s){var o=e.apply(t,r);function c(e){n(o,a,s,c,i,"next",e)}function i(e){n(o,a,s,c,i,"throw",e)}c(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(t){return e.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(7);e.exports=function(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){return"\n result = runMain(_args_); \n send_response(result); \n /* print result; */\n \n \n function runMain(_args_) ; \n r = {Error= 'No path'}; \n if ( _args_.path eq '/selectors') then do; \n r = selectionLists(_args_.selectors, _args_.table.caslib, _args_.table.name); \n end; \n else if ( _args_.path eq '/contents') then do; \n r = contents(_args_.table.caslib, _args_.table.name); \n end; \n else if (_args_.path eq '/describe') then do; \n r = describeModel(_args_); \n end; \n else if (_args_.path eq '/scenario' ) then do;\n r = fetchData(_args_.filter, _args_.table);\n end;\n else if (_args_.path eq '/score') then do; \n if( exists(_args_, 'modelName') eq false ) then\n modelname = '';\n else modelName =_args_.modelName;\n r = runScoreCode(_args_.model, _args_.scenario, modelName); \n end; \n else do; \n r = {icasResults={Errors = 'Invalid action option specified' || _args_.path}, statusCode=404}; \n end; \n print r;\n if ( r.statusCode ne 0) then do;\n print r.icasResults;\n exit({severity=2,reason=6, status=r.iCasResults.Errors,statusCode=r.statusCode});\n end;\n result = {casResults = r.icasResults}; \n print '***************************************************************'; \n print result; \n print '***************************************************************'; \n return result; \n end; \n \n /*-----------------------------------------*/ \n /* describeModel */ \n /*-----------------------------------------*/ \n \n function describeModel(_args_) ; \n s = checkAndLoadTable(_args_.model.caslib, _args_.model.name); \n if ( s ne true) then do; \n results = {Errors= 'Unable to access ' ||_args_.model.caslib||'.'||_args_.model.name}; \n return {icasResults=results, statusCode=404}; \n end; \n \n mtype = isModel(_args_.model.caslib, _args_.model.name); \n if ( mtype EQ 'astore' ) then do; \n r = astoreDescribe(_args_.model); \n end; \n else if (mtype EQ 'ds' or mtype EQ 'ds2') then do;\n s = checkAndLoadTable(_args_.table.caslib, _args_.table.name); \n if ( s ne true ) then do; \n results = {Errors= 'Unable to access ' ||_args_.table.caslib||'.'||_args_.table.name}; \n return {icasResults=results, statusCode=404}; \n end; \n r = contents( _args_.table.caslib, _args_.table.name); \n end; \n return {icasResults= r, statusCode=0} ;\n end; \n \n /*------------------------------------------*/ \n /* astoreDescribe */ \n /*------------------------------------------*/ \n \n function astoreDescribe(model); \n action astore.describe r=result/ \n rstore = { caslib= model.caslib name = model.name }; \n rows = resultsToDict(result.InputVariables); \n return {describe = rows, table = result.InputVariables}; \n end; \n \n /*------------------------------------------*/ \n /* score */ \n /*------------------------------------------*/ \n function runScoreCode( model, scenario, modelName); \n print model; \n s = checkAndLoadTable(model.caslib, model.name); \n if ( s ne true ) then do; \n results = {Errors= 'Unable to access ' ||model.caslib||'.'||model.name}; \n return {icasResults=results, statusCode=404}; \n end;\n \n mtype = isModel(model.caslib, model.name); \n \n if ( mtype eq 'bad' ) then do; \n results = {Error= model.caslib||'.'||model.name || ' is not recognized as a valid supported model. Please check your values'};\n return {icasResults=results, statusCode=400};\n end; \n destroyTable('casuser', 'input'); \n argsToTable(scenario, 'casuser', 'input'); \n \n destroyTable('casuser', 'output'); \n \n if (mtype eq 'astore') then do; \n print 'Scoring with astore'; \n action astore.score r = result/ \n rstore = {caslib=model.caslib name=model.name} \n out = {caslib='casuser' name='output'} \n table = {caslib='casuser' name='input'}; \n end; \n else if (mtype eq 'ds') then do; \n print 'scoring with datastep code'; \n action datastep.runcodetable r = result/ \n single='YES' \n codeTable= {caslib=model.caslib name=model.name} \n casout = {caslib='casuser' name='output'} \n table = {caslib='casuser' name='input'}; \n end; \n else if (mtype eq 'ds2' ) then do; \n print 'Scoring with d2'; \n if ( missing(modelName) eq true) then do;\n results = {Error= 'modelName is missing. Please check your values'};\n return {icasResults=results, statusCode=400};\n end;\n\n action ds2.runModel r = result/ \n modelTable = {caslib=model.caslib, name=model.name} \n modelName = modelName \n table = {caslib= 'casuser', name='input'} \n casOut = {caslib= 'casuser' name='output'}; \n end; \n \n \n action table.fetch r = result / \n table={caslib='casuser' name='output'}; \n \n rows = resultsToDict(result.Fetch); \n \n return {icasResults= rows, statusCode=0} ;\n end; \n \n \n "}},function(e,t,n){e.exports=n(9)},function(e,t,n){var r=n(2).default;function a(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e.exports=a=function(){return n},e.exports.__esModule=!0,e.exports.default=e.exports;var t,n={},s=Object.prototype,o=s.hasOwnProperty,c=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},u=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",p=i.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(t){f=function(e,t,n){return e[t]=n}}function d(e,t,n,r){var a=t&&t.prototype instanceof x?t:x,s=Object.create(a.prototype),o=new q(r||[]);return c(s,"_invoke",{value:T(e,n,o)}),s}function m(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}n.wrap=d;var b="suspendedStart",h="executing",v="completed",y={};function x(){}function g(){}function w(){}var _={};f(_,u,(function(){return this}));var k=Object.getPrototypeOf,C=k&&k(k(A([])));C&&C!==s&&o.call(C,u)&&(_=C);var S=w.prototype=x.prototype=Object.create(_);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function n(a,s,c,i){var u=m(e[a],e,s);if("throw"!==u.type){var l=u.arg,p=l.value;return p&&"object"==r(p)&&o.call(p,"__await")?t.resolve(p.__await).then((function(e){n("next",e,c,i)}),(function(e){n("throw",e,c,i)})):t.resolve(p).then((function(e){l.value=e,c(l)}),(function(e){return n("throw",e,c,i)}))}i(u.arg)}var a;c(this,"_invoke",{value:function(e,r){function s(){return new t((function(t,a){n(e,r,t,a)}))}return a=a?a.then(s,s):s()}})}function T(e,n,r){var a=b;return function(s,o){if(a===h)throw new Error("Generator is already running");if(a===v){if("throw"===s)throw o;return{value:t,done:!0}}for(r.method=s,r.arg=o;;){var c=r.delegate;if(c){var i=E(c,r);if(i){if(i===y)continue;return i}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===b)throw a=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=h;var u=m(e,n,r);if("normal"===u.type){if(a=r.done?v:"suspendedYield",u.arg===y)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(a=v,r.method="throw",r.arg=u.arg)}}}function E(e,n){var r=n.method,a=e.iterator[r];if(a===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,E(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var s=m(a,e.iterator,n.arg);if("throw"===s.type)return n.method="throw",n.arg=s.arg,n.delegate=null,y;var o=s.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function R(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function q(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(R,this),this.reset(!0)}function A(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,s=function n(){for(;++a<e.length;)if(o.call(e,a))return n.value=e[a],n.done=!1,n;return n.value=t,n.done=!0,n};return s.next=s}}throw new TypeError(r(e)+" is not iterable")}return g.prototype=w,c(S,"constructor",{value:w,configurable:!0}),c(w,"constructor",{value:g,configurable:!0}),g.displayName=f(w,p,"GeneratorFunction"),n.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,f(e,p,"GeneratorFunction")),e.prototype=Object.create(S),e},n.awrap=function(e){return{__await:e}},j(O.prototype),f(O.prototype,l,(function(){return this})),n.AsyncIterator=O,n.async=function(e,t,r,a,s){void 0===s&&(s=Promise);var o=new O(d(e,t,r,a),s);return n.isGeneratorFunction(t)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},j(S),f(S,p,"Generator"),f(S,u,(function(){return this})),f(S,"toString",(function(){return"[object Generator]"})),n.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},n.values=A,q.prototype={constructor:q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(r,a){return c.type="throw",c.arg=e,n.next=r,a&&(n.method="next",n.arg=t),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],c=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var i=o.call(s,"catchLoc"),u=o.call(s,"finallyLoc");if(i&&u){if(this.prev<s.catchLoc)return r(s.catchLoc,!0);if(this.prev<s.finallyLoc)return r(s.finallyLoc)}else if(i){if(this.prev<s.catchLoc)return r(s.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return r(s.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=e,s.arg=t,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;L(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:A(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},n}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(2).default,a=n(8);e.exports=function(e){var t=a(e,"string");return"symbol"===r(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(2).default;e.exports=function(e,t){if("object"!==r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!==r(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";n.r(t),n.d(t,"caslRun",(function(){return x})),n.d(t,"caslRunBase",(function(){return d})),n.d(t,"casSetup",(function(){return L})),n.d(t,"casActionRun",(function(){return A})),n.d(t,"casTableToJson",(function(){return B})),n.d(t,"casFetchData",(function(){return D})),n.d(t,"casFetchRows",(function(){return N})),n.d(t,"casAppendTable",(function(){return Y})),n.d(t,"casUpdateData",(function(){return M})),n.d(t,"casSaveTable",(function(){return z})),n.d(t,"casLoadTable",(function(){return V})),n.d(t,"computeRun",(function(){return ae})),n.d(t,"computeSetup",(function(){return oe})),n.d(t,"computeSummary",(function(){return ee})),n.d(t,"computeSetupTables",(function(){return le})),n.d(t,"computeFetchData",(function(){return be})),n.d(t,"computeFileContent",(function(){return ve})),n.d(t,"computeResults",(function(){return ie})),n.d(t,"computeAppendTable",(function(){return xe})),n.d(t,"computeUpdateData",(function(){return _e})),n.d(t,"computeUpload",(function(){return Ce})),n.d(t,"findReport",(function(){return je})),n.d(t,"getReportImage",(function(){return Te})),n.d(t,"getReportUri",(function(){return Re})),n.d(t,"getSasTableRows",(function(){return qe})),n.d(t,"jesSetup",(function(){return Pe})),n.d(t,"jesRun",(function(){return Qe})),n.d(t,"jesSummary",(function(){return Ie})),n.d(t,"jsonToDict",(function(){return p})),n.d(t,"caslScore",(function(){return S})),n.d(t,"caslDescribe",(function(){return E})),n.d(t,"masSetup",(function(){return Ve})),n.d(t,"masAddModel",(function(){return Ge})),n.d(t,"masDescribe",(function(){return We})),n.d(t,"masRun",(function(){return Xe})),n.d(t,"masScore",(function(){return Ze})),n.d(t,"lib",(function(){return et}));var r=n(1),a=n.n(r),s=n(0),o=n.n(s),c=n(2),i=n.n(c);function u(e){var t="{ ",n=" ";for(var r in e){if(!0===Array.isArray(e[r])){var a=l(e[r]);t=t+n+"".concat(r,"=")+a}else{var s=i()(e[r]);if("object"===s){var o=u(e[r]);t=t+n+"".concat(r,"=")+o}else t=t+n+"".concat(r,"=")+("string"===s?' "'.concat(e[r],'" '):"".concat(e[r]," "))}n=","}return t+="} "}function l(e){for(var t="{",n=" ",r=e.length,a=0;a<r;a++)if(!0===Array.isArray(e[a])){var s=l(e[a]);t=t+n+"".concat(a,"=")+s}else{var o=i()(e[a]);if("object"===o)t=t+n+u(e[a]);else t=t+n+("string"===o?' "'.concat(e[a],'" '):"".concat(e[a]," "));n=","}return t+="}"}var p=function(e,t){var n;return n=null===e?"{}":!0===Array.isArray(e)?l(e):u(e),"".concat(t," = ").concat(n,";")};function f(){return(f=a()(o.a.mark((function e(t,n,r,a){var s,c,i,u,l,f,d,m=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(s=p(null!==a?a:{},"_args_"),c=(c=s+" "+r).replace(/\r?\n|\r/g,""),i={action:"sccasl.runcasl",data:{code:c}},u=m.length,l=new Array(u>4?u-4:0),f=4;f<u;f++)l[f-4]=m[f];return e.next=7,t.runAction.apply(t,[n,i].concat(l));case 7:return d=e.sent,e.abrupt("return",d);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var d=function(e,t,n,r){return f.apply(this,arguments)},m=n(4);var b=function(){return"\n print _args_;\n\n results = casFetchRows(_args_.table.caslib, _args_.table.name , _args_.start + 1, _args_.limit, _args_.format, _args_.where); \n send_response({casResults = results}); \n \n function casFetchRows(caslib, name, from, count, format, where) ; \n \n rc = checkAndLoadTable(caslib, name);\n \n if (rc ne true) then do;\n text = 'Unable to access ' ||caslib||'.'||name; \n rx = {severity=2,reason=6, status='error',statusCode=2, formatted=text};\n exit(rx); \n end; \n\n /*\n * get tableoinfo to get rowCount\n */\n\n action table.tableinfo r= result/ \n caslib = caslib \n name = name; \n \n rowCount = result.TableInfo[1, 'rows'];\n to = from + count - 1;\n\n \n /*\n * get column information\n */\n\n action table.columninfo r=infoResult /\n table = {caslib=caslib name=name};\n\n columns ={{Column='_Index_',ID=0,Type='double',RawLength=5,FormattedLength=5,NFL=0,NFD=0}};\n i = 2;\n do c over inforesult.columninfo;\n columns[i] = c;\n i = i + 1;\n end;\n \n /*\n * Fetch the current set of rows\n */\n\n rows = {};\n if (from <= rowCount) then do;\n action table.fetch r = result status=rcx/ \n table = {caslib=caslib, name=name where=where} \n from= from to=to format=format sastypes=true\n ;\n if (rcx.severity eq 2) then do;\n exit(rcx);\n end;\n /* \n * create payload to return\n */\n\n i = 1;\n rows ={};\n do row over result.fetch;\n rr = {};\n j = 1;\n do key,v over row;\n rr[j] = override(columns[j].Type, v);\n j = j + 1;\n end;\n rows[i] = rr;\n i = i + 1;\n end;\n end;\n\n currentCount = DIM(rows);\n pagination = {}; \n table = {caslib=caslib, name=name};\n\n pagination = setPagination(from, count, format, where, currentCount, rowCount, table);\n \n lastRequest={start=from-1, limit=count, format=format, currentCount=currentCount, \n rowCount=rowCount, where=where, table=table, version='3'};\n scrollOptions = getKeys(pagination);\n return( \n {pagination = pagination, data = {schema=columns, rows=rows , scrollOptions=scrollOptions}, lasRequest=lastRequest}\n );\n end; \n \n \n /*\n * For non-primary column types set new content\n */\n\n function setPagination(from, count, format, where, currentCount, rowCount, table);\n\n\n prevStart = max(from - count - 1, 0);\n\n if (currentCount lt count) then do; \n pagination.prev = {start=prevStart, limit=count, format=format, where=' ', table=table};\n if (prevStart ne 0) then do;\n pagination.first = {start=0, limit=count, format=format, where=' ', table=table};\n end; \n return pagination;\n end;\n currentStart = from -1;\n if (currentStart eq 0) then do;\n pagination.next = {start=count, limit=count, format=format, where=' ', table=table};\n return pagination;\n end;\n\n nextStart = currentStart + count;\n pagination.next = {start=nextStart, limit=count, format=format, where=' ', table=table};\n pagination.prev = {start=prevStart, limit=count, format=format, where=' ', table=table};\n if (prevStart ne 0) then do;\n pagination.first = {start=0, limit=count, format=format, where=' ', table=table};\n end; \n return pagination;\n end;\n\n\n\n\n function override(type, iv);\n if (type EQ 'varbinary') then v = '...varbinary';\n else if (type EQ 'blob') then v = '...blob';\n else if (type EQ 'table') then v = '...table';\n else if (type EQ 'dictionary') then v = '...dictionary';\n else if (type EQ 'list') then v = '...list';\n else if (type EQ 'isArray') then v = '...array';\n else v = iv;\n return v;\n end;\n\n \n "};var h=function(){return"\n rc = checkAndLoadTable(_args_.masterTable.caslib, _args_.masterTable.name);\n\n if (rc ne true) then do;\n text = 'Unable to access ' ||_args_.masterTable.caslib||'.'||_args_.masterTable.name; \n rx = {severity=2,reason=6, status='error',statusCode=2, formatted=text};\n exit(rx); \n end; \n \n rc = checkAndLoadTable(_args_.setTable.caslib, _args_.setTable.name);\n if (rc ne true) then do;\n text = 'Unable to access ' ||_args_.setTable.caslib||'.'||_args_.setTable.name; \n rx = {severity=2,reason=6, status='error',statusCode=2, formatted=text};\n return rx;\n end;\n\n\n setdata = _args_.setTable.caslib ||'.'||_args_.setTable.name;\n masterdata = _args_.masterTable.caslib ||'.'||_args_.masterTable.name;\n\n action datastep.runCode r=result status=rc/\n code='data ' ||masterdata||'(append=YES);set ' || setdata ||'; run;';\n\n if (rc.statusCode ne 0) then do;\n exit(rc);\n end; \n else do;\n results = {msg= 'Append succeeded', statusCode=true};\n end;\n \n send_response({casResults = results});\n "},v={commonCasl:function(){return"\n function checkAndLoadTable(caslib, name); \n \n /* verify caslib is there */\n table.queryCaslib status=status result=result/\n caslib = caslib;\n do k,v over result; /* to handle casuser[user] */ \n rc = v;\n end;\n if ( rc eq false ) then \n return -1;\n /* \n * Check to see if table is already loaded \n */ \n action table.tableExists r=result/ \n caslib = caslib \n name = name; \n /* \n * if not loaded then try to load it \n */ \n rc = true;\n if (result.exists eq 0 or result.exists eq 2) then do; \n path = lookupPath(caslib, name);\n if (path eq '*') then do;\n rc = false;\n end;\n else do;\n action table.loadTable status=status/ \n caslib = caslib \n source = path \n casout={caslib= caslib name=name}; \n if (status.statusCode ne 0 ) then rc = false;\n end; \n end; \n return rc; \n end; \n \n function saveAndLoadTable(caslib, source, targetlib, targetname,promote);\n \n /* load source */\n r = checkAndLoadTable(caslib, source);\n \n sashdat = target||\".sashdat\";\n table.save /\n caslib= targetlib name=sashdat\n table = {caslib=caslib name=source} replace=true;\n \n table.droptable /\n caslib=targetlib name=target quiet=true;\n \n table.loadtable result=r status=rc/\n caslib=targetlib casout={caslib=targetlib name=target replace=TRUE}\n path=sashdat;\n \n if (promote eq true) then do;\n table.promote result=r status=rc/\n caslib=caslib name=target quiet=true\n targetLib=caslib target=target;\n end;\n if (rc.severity eq 2) then do;\n print rc;\n print 'Ignoring error';\n end;\n r = 0;\n return r;\n \n end;\n \n function lookupPath(caslib, name ) ; \n table.fileInfo r = result/\n caslib=caslib; \n \n names = result.fileInfo[,4]; \n nameu = upcase(name)||'.SASHDAT'; \n cpath = '*'; \n count = 0; \n \n do n over names; \n if (upcase(n) eq nameu) then do; \n count = count + 1; \n if ( cpath eq '*') then do; \n cpath = n; \n end; \n end; \n end; \n \n if (count GT 1 ) then do; \n print 'Warning: ' count 'Files with names only different in case exist - First one chosen';\n print 'Path: ' cpath ' will be used****'; \n end; \n r = cpath; \n return r; \n end; \n /*-----------------------------------------*/ \n /* isModel: is it model table */ \n /*-----------------------------------------*/ \n \n function isModel(caslib, name) ; \n table.columnInfo r = result / \n table = {caslib=caslib , name=name}; \n validTable = false; \n mtype = 'bad'; \n do c over result.columninfo; \n cu = upCase(c.Column); \n if ( cu eq 'DATASTEPSRC') then do; \n mtype = 'ds'; \n end; \n else if ( cu eq '_STATE_' ) then do; \n mtype = 'astore'; \n end; \n else if (cu eq 'MODELMETADATA') then do; \n mtype = 'ds2'; \n end; \n end; \n print 'Specified model type: ' || mtype; \n return mtype; \n end; \n \n /*-----------------------------------------*/ \n /* Returns contents of the specified table */ \n /*-----------------------------------------*/ \n \n function contents(caslib, name) ; \n table.columnInfo r = result / \n table = {caslib=caslib , name=name}; \n /* columns ={{Column='_Index_',ID=0,Type='double',RawLength=5,FormattedLength=5,NFL=0,NFD=0}}; */ \n i = 1; \n columns = {}; \n do c over result.columninfo; \n columns[i] = c; \n i = i + 1; \n end; \n return {describe = columns, table = {}}; \n end; \n \n /*------------------------------------------*/ \n /* Returns unique values */ \n /*-----------------------------------------*/ \n \n function selectionLists(idvars,caslib, name, where); \n \n s = checkAndLoadTable(caslib, name); \n if ( s ne true) then do; \n results = {Errors= 'Unable to access ' ||caslib||'.'||name, statusCode = s}; \n \n end; \n print idvars;\n do k over idvars; \n r = _getValues(k, caslib, name, where); \n results[k] = r; \n end; \n return { data=results, statusCode=0}; \n end; \n function _getValues(id, caslib, name, where) ; \n \n action table.dropTable/ \n caslib='casuser' name='dtemp1' quiet=TRUE; \n \n action table.deleteSource status=src / \n caslib='casuser' source= 'dtemp1.sashdat' quiet=TRUE; \n \n action simple.groupby result=r status=rc/ \n aggregator = 'N' \n inputs = {id} \n table = {caslib=caslib name=name, where=where} \n casout = {caslib='casuser' name='dtemp1'} \n ; \n action table.fetch result=r/ \n table={caslib='casuser' name='dtemp1'} \n sortby={{name=id, order='ascending'}}; \n result = r.Fetch[,2]; \n return result; \n end; \n /*------------------------------------------*/ \n /* get a record */ \n /*------------------------------------------*/ \n \n function _fetchData(filter, table); \n s = checkAndLoadTable(table.caslib, table.name); \n if ( s ne 0 ) then do; \n results = {Errors= 'Unable to access ' ||table.caslib||'.'||table.name}; \n return results; \n end; \n wherex = dictTowhere(filter); \n /* wherex = table.caslib||'.'||table.name||'(where=('||wherex||'));'; \n \n destroyTable('casuser', 'input'); \n \n action datastep.runCode r=result status=rc/ \n single='yes' \n code = 'data casuser.input; set ' || wherex||'run;'; \n */ \n \n action table.fetch r = result / \n table={caslib=table.caslib name=table.name where=wherex}; \n \n rows = resultsToDict(result.Fetch); \n return {scenario = rows, table = result.Fetch}; \n \n end; \n function destroyTable(caslib,name); \n action table.dropTable/ \n caslib=caslib name=name quiet=TRUE; \n \n action table.deleteSource status=src / \n caslib=caslib source= name||'.sashdat' quiet=TRUE; \n \n return true; \n end; \n \n \n function dictToWhere(filter); \n where =''; \n andbit=' '; \n do k,v over filter; \n if (isString(v) ) then do; \n where = where || andbit || k || ' eq ' || '\"'||v||'\"'; \n end; \n else do; \n where = where || andbit || k || ' eq ' || v ; \n end; \n andbit =' and '; \n end; \n return where; \n end; \n \n function resultsToDict(r); \n casResults = {}; \n i = 1; \n do row over r; \n casResults[i] = row; \n i = i + 1; \n end; \n return casResults; \n end; \n \n function argsToTable(_arg_, caslib, name ); \n action table.droptable/ \n caslib=caslib name=name quiet=TRUE; \n i = 1; \n do key,obj over _arg_; \n columns[i] = key; \n row[i] = obj; \n if ( isString(obj) ) then \n type[i] = 'varchar'; \n else if ( isInteger(obj) ) then \n type[i] = 'int'; \n else type[i] = 'double'; \n i = i + 1; \n end; \n \n data1 = newTable('data1', columns, type, row ); \n \n saveresult data1 casout=name caslib=caslib replace; \n end; \n \n function saveAndPromoteTable(caslib, target, source);\n sashdat = target||\".sashdat\";\n rc = checkAndLoadTable(caslib, source);\n table.droptable /\n caslib=caslib name=target quiet=true;\n \n table.save /\n caslib= caslib name=sashdat\n table = {caslib=caslib name=source} replace=true;\n \n table.loadtable result=r/\n caslib=caslib casout={caslib=caslib name=target replace=TRUE}\n path=sashdat;\n \n table.promote result=r status=rc/\n caslib=caslib name=target quiet=true\n targetLib=caslib target=target;\n print rc;\n r = rc.severity;\n if (rc.severity gt 0) then do;\n print rc;\n print 'Ignoring error';\n rc = 0;\n end;\n \n return r;\n end; \n \n "},casFetchData:b,casFetchRows:function(){return"\n results = casFetchRows(_args_.table.caslib, _args_.table.name , _args_.from, _args_.count, _args_.format, _args_.where); \n send_response({casResults = results}); \n \n function casFetchRows(caslib, name, from, count, format, where) ; \n \n rc = checkAndLoadTable(caslib, name);\n \n if (rc ne true) then do;\n text = 'Unable to access ' ||caslib||'.'||name; \n rx = {severity=2,reason=6, status='error',statusCode=2, formatted=text};\n exit(rx); \n end; \n\n /*\n * get all table to get rowCount\n */\n\n action table.tableinfo r= result/ \n caslib = caslib \n name = name; \n \n rowCount = result.TableInfo[1, 'rows']; \n \n to = from + count - 1; \n \n /*\n * get column information\n */\n\n action table.columninfo r=infoResult /\n table = {caslib=caslib name=name};\n\n columns ={{Column='_Index_',ID=0,Type='double',RawLength=5,FormattedLength=5,NFL=0,NFD=0}};\n i = 2;\n do c over inforesult.columninfo;\n columns[i] = c;\n i = i + 1;\n end;\n \n /*\n * Fetch the current set of rows\n */\n /* wherex = dictTowhere(where); let user send in the where clause */\n print where;\n\n action table.fetch r = result / \n table = {caslib=caslib, name=name where=where} \n from= from to=to format=format sastypes=true\n ;\n\n /* \n * create payload to return\n */\n\n i = 1;\n rows ={};\n do row over result.fetch;\n rr = {};\n j = 1;\n do key,v over row;\n rr[j] = override(columns[j].Type, v);\n j = j + 1;\n end;\n rows[i] = rr;\n i = i + 1;\n end;\n\n pagePrev = max(from - count, 1);\n \n if ( to eq rowCount ) then do; \n pageNext = -1; \n end; \n else do ; \n pageNext = min(to + 1, rowCount); \n end; \n table = {caslib=caslib, name=name};\n pagination = {next= {from=pageNext, count=count, format=format, where=where table=table}, prev={from=pagePrev, count=count, format=format, where=where, table=table}};\n pagination.current = {from = from, to=to, rowCount=rowCount, version=1};\n return( \n {pagination = pagination, data = {schema=columns, rows=rows }}\n );\n end; \n \n \n /*\n * For non-primary column types set new content\n */\n\n function override(type, iv);\n if (type EQ 'varbinary') then v = '...varbinary';\n else if (type EQ 'blob') then v = '...blob';\n else if (type EQ 'table') then v = '...table';\n else if (type EQ 'dictionary') then v = '...dictionary';\n else if (type EQ 'list') then v = '...list';\n else if (type EQ 'isArray') then v = '...array';\n else v = iv;\n return v;\n end;\n\n \n "},scoreCasl:n.n(m).a,casAppendTable:h,casRowSets:b};function y(){return(y=a()(o.a.mark((function e(t,n,r,a,s){var c,i,u,l,p,f=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(c=r,!1!==s&&(c=r+" "+v.commonCasl()),i=f.length,u=new Array(i>5?i-5:0),l=5;l<i;l++)u[l-5]=f[l];return e.next=5,d.apply(void 0,[t,n,c,a].concat(u));case 5:return p=e.sent,e.abrupt("return",p.items().toJS());case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var x=function(e,t,n,r,a){return y.apply(this,arguments)},g=n(3),w=n.n(g);function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){w()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function C(){return(C=a()(o.a.mark((function e(t,n,r){var a,s,c,i;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=v.commonCasl()+" "+v.scoreCasl(),s=k({path:"/score"},r),e.next=4,d(t,n,a,s);case 4:return c=e.sent,i=c.items("results","casResults").toJS()[0],e.abrupt("return",i);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var S=function(e,t,n){return C.apply(this,arguments)};function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){w()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function T(){return(T=a()(o.a.mark((function e(t,n,r){var a,s,c,i;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=v.commonCasl()+" "+v.scoreCasl(),s=O({path:"/describe"},r),e.next=4,d(t,n,a,s);case 4:return c=e.sent,i=c.items("results").toJS(),e.abrupt("return",i);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var E=function(e,t,n){return T.apply(this,arguments)};function R(){return(R=a()(o.a.mark((function e(t,n,r,a){var s,c,u,l,p,f,d,m,b,h;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==n){e.next=4;break}return e.next=3,t.logon(n);case 3:e.sent;case 4:return e.next=6,t.addServices("casManagement");case 6:return s=e.sent,c=s.casManagement,e.next=10,t.apiCall(c.links("servers"));case 10:if(0!==(u=e.sent).itemsList().size){e.next=13;break}throw{Error:"No cas servers were found"};case 13:if(l=null,null!=a){e.next=18;break}l=u.itemsList(0),e.next=25;break;case 18:if(p=u.itemsList().toJS(),-1!==(f=p.findIndex((function(e){return e===a})))){e.next=24;break}throw{Error:"server with name of ".concat(a," was not found")};case 24:l=u.itemsList(f);case 25:if(d=null,null!=r){e.next=32;break}return e.next=29,t.apiCall(u.itemsCmd(l,"createSession"));case 29:d=e.sent,e.next=46;break;case 32:if("object"!==i()(r)){e.next=36;break}d=r,e.next=46;break;case 36:return m={qs:{filter:"eq( id,'".concat(r,"')")}},e.next=39,t.apiCall(u.itemsCmd(l,"sessions"),m);case 39:if(0!==(b=e.sent).items().size){e.next=42;break}throw"ERROR: The sessionID ".concat(r," was not found.");case 42:return h=b.itemsCmd(b.itemsList(0),"self"),e.next=45,t.apiCall(h);case 45:d=e.sent;case 46:return e.abrupt("return",{servers:u,session:d});case 47:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var L=function(e,t,n,r){return R.apply(this,arguments)};function q(){return(q=a()(o.a.mark((function e(t){var n,r,a,s,c=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(n=c.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=c[a];return e.next=3,t.runAction.apply(t,r);case 3:return s=e.sent,e.abrupt("return",s.items().toJS());case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var A=function(e){return q.apply(this,arguments)};function P(){return(P=a()(o.a.mark((function e(t,n,r){var a,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=v.commonCasl()+" "+v.casFetchData(),e.next=3,d(t,n,a,r);case 3:return s=e.sent,e.abrupt("return",s.items("results","casResults").toJS());case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var D=function(e,t,n){return P.apply(this,arguments)};function I(){return(I=a()(o.a.mark((function e(t,n,r){var a,s,c;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return null==r.where&&(r.where=" "),a=v.commonCasl()+" "+v.casFetchRows(),e.next=4,d(t,n,a,r);case 4:return s=e.sent,null==(c=s.items("results","casResults").toJS()).data&&(c.data={rows:[]}),e.abrupt("return",c);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var N=function(e,t,n){return I.apply(this,arguments)};function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){w()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function U(){return(U=a()(o.a.mark((function e(t,n,r){var a,s,c,i,u,l,p,f,d,m,b,h,v,y,x,g,w;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(l in a=r.data,s=r.where,c=r.table,i="",u=" ",s)p=s[l],f="string"==typeof p?"'".concat(p.toString(),"'"):p,i=i+u+l+"= ".concat(f," "),u=" AND ";for(m in d=[],a)b=a[m],h=void 0,h=null==b?".":"string"==typeof b?JSON.stringify(b):b.toString(),d.push({var:m,value:h});return v=J(J({},c),{},{where:"".concat(i)}),y={action:"table.update",data:{table:v,set:d}},e.next=11,t.runAction(n,y);case 11:return x=e.sent,g={msg:"Update completed",statusCode:0},0!==(w=x.items().toJS().disposition).statusCode&&(g.statusCode=w.statusCode,g.msg=w.reason),e.abrupt("return",g);case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var M=function(e,t,n){return U.apply(this,arguments)};function Q(){return(Q=a()(o.a.mark((function e(t,n,r,a,s){var c,i,u;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=r.caslib,i=r.name,u={action:"table.save",data:{name:"".concat(i),caslib:"".concat(c),replace:!1!==a,table:r}},e.next=4,t.runAction(n,u);case 4:return e.abrupt("return",{msg:"".concat(c,".").concat(i," saved}"),statusCode:0});case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var z=function(e,t,n,r,a){return Q.apply(this,arguments)};function G(){return(G=a()(o.a.mark((function e(t,n,r,a,s){var c,i,u,l;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=v.commonCasl()+" "+v.casAppendTable(),i={masterTable:a,setTable:r,save:null==s||s},e.next=4,d(t,n,c,i);case 4:if(u=e.sent,l=u.items("results","casResults").toJS(),!0!==s){e.next=9;break}return e.next=9,z(t,n,a);case 9:return e.abrupt("return",l);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Y=function(e,t,n,r,a){return G.apply(this,arguments)};var B=function(e,t){var n=e.items("tables",t),r=n.get("rows"),a=[];n.get("schema").map((function(e){a.push(e.get("name"))}));var s=[];return r.map((function(e){var t={};e.map((function(e,n){t[a[n]]=e})),s.push(t)})),s};function H(){return(H=a()(o.a.mark((function e(t,n,r,a){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"\n\t print _args_;\n rc = checkAndLoadTable(_args_.caslib, _args_.name);\n\t\tif (rc ne true) then do;\n\t\t\ttext = 'Unable to access ' ||_args_.caslib||'.'||_args_.name; \n\t\t\trx = {severity=2,reason=6, status='error',statusCode=2, formatted=text};\n\t\t\texit(rx); \n\t\tend; \n\t print 'return code = ' || rc;\n\t send_response({casResults={status='ok'}});\n ",e.next=3,x(t,n,"\n\t print _args_;\n rc = checkAndLoadTable(_args_.caslib, _args_.name);\n\t\tif (rc ne true) then do;\n\t\t\ttext = 'Unable to access ' ||_args_.caslib||'.'||_args_.name; \n\t\t\trx = {severity=2,reason=6, status='error',statusCode=2, formatted=text};\n\t\t\texit(rx); \n\t\tend; \n\t print 'return code = ' || rc;\n\t send_response({casResults={status='ok'}});\n ",r,!0);case 3:return e.sent,e.abrupt("return",{msg:"".concat(r.caslib,".").concat(r.name," loaded}"),statusCode:0});case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var V=function(e,t,n,r){return H.apply(this,arguments)};function W(){return(W=a()(o.a.mark((function e(t,n,r,a){var s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==r||null!=a){e.next=6;break}return e.next=3,K(t,n,r);case 3:s=e.sent,e.next=9;break;case 6:return e.next=8,$(t,n,a);case 8:s=e.sent;case 9:return e.abrupt("return",s);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function K(e,t,n){return X.apply(this,arguments)}function X(){return(X=a()(o.a.mark((function e(t,n,r){var a,s,c,i,u,l,p,f,d,m;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((a={session:n,log:null,listing:null,ods:null,job:r,tables:{},files:{}}).log=r.links("log"),a.listing=r.links("listing"),null===(s=r.links("results"))){e.next=10;break}return e.next=7,t.apiCall(s);case 7:if(c=e.sent,(i=c.itemsList().size)>0)for(u=0;u<i;u++)l=c.itemsList(u),"ods"===(p=c.items(l,"data","type").toLowerCase())?a.ods=c.itemsCmd(l,"self"):"table"===p?(f={self:c.itemsCmd(l,"self"),current:null},a.tables[l.toUpperCase()]=f):"file"===p?(d={self:l,current:null,data:null},a.files[l]=d):(m={self:l,current:null,data:null},a[p]=m);case 10:return e.abrupt("return",a);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function $(e,t,n){return Z.apply(this,arguments)}function Z(){return(Z=a()(o.a.mark((function e(t,n,r){var a,s,c,u,l,p,f,d,m,b,h,v,y;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a={session:n,log:null,listing:null,ods:null,job:null,tables:{},files:{}},s="object"===i()(r)?[r]:r,c=0;case 3:if(!(c<s.length)){e.next=29;break}return u=s[c],l=u.libref.toUpperCase(),p=u.name.toUpperCase(),f={qs:{filter:"eq(name,'".concat(l,"')")}},e.next=10,t.apiCall(n.links("librefs"),f);case 10:if(0!==(d=e.sent).itemsList().size){e.next=13;break}throw"ERROR: Libref ".concat(l," not found");case 13:return m=d.itemsCmd(l,"self"),e.next=16,t.apiCall(m);case 16:return b=e.sent,f={qs:{filter:"eq(name,'".concat(p,"')")}},e.next=20,t.apiCall(b.links("tables"),f);case 20:if(0!==(h=e.sent).itemsList().size){e.next=23;break}throw"ERROR: Table ".concat(p," not found");case 23:v="".concat(l,".").concat(p).toLowerCase(),y={self:h.itemsCmd(p,"self"),current:null},a.tables[v.toUpperCase()]=y;case 26:c++,e.next=3;break;case 29:return e.abrupt("return",a);case 30:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ee=function(e,t,n,r){return W.apply(this,arguments)};function te(){return(te=a()(o.a.mark((function e(t,n,r,a,s,c){var i,u,l,p,f;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={data:{code:r}},e.next=3,t.apiCall(n.links("execute"),i);case 3:return u=e.sent,l={qs:{wait:null!=a?a:5},headers:{"If-None-Match":u.headers("etag")}},e.next=7,t.jobState(u,l,"longpoll",0,s,c);case 7:return p=e.sent,e.next=10,ee(t,n,p.job);case 10:return(f=e.sent).SASJobStatus=p.data,f.jobStateStatus=p,e.abrupt("return",f);case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ne=function(e,t,n,r,a,s){return te.apply(this,arguments)};function re(){return(re=a()(o.a.mark((function e(t,n,r,a,s,c,i){var u,l,p,f,d;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("number"==typeof c&&(c=null),u=["options NOSYNTAXCHECK OBS=MAX;%let syscc=0;"],null!=a)for(l in a)p="%let ".concat(l,"=").concat(a[l],";"),u.push(p);return f=(f=r.replace(/\t/g," ")).split(/\r?\n/),u=u.concat(f).concat(";"),e.next=8,ne(t,n,u,s,c,i);case 8:return d=e.sent,e.abrupt("return",d);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ae=function(e,t,n,r,a,s,o){return re.apply(this,arguments)};function se(){return(se=a()(o.a.mark((function e(t,n,r,a,s){var c,u,l,p,f,d,m,b,h,v,y;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.addServices("compute");case 2:if(c=e.sent,u=c.compute,null==s||"object"!==i()(s)){e.next=6;break}return e.abrupt("return",s);case 6:if(null==r){e.next=10;break}return e.next=9,t.logon(r);case 9:e.sent;case 10:if(l=null,null==s){e.next=24;break}return p={start:0,limit:100,qs:{filter:"eq(id,'".concat(s,"')")}},e.next=15,t.apiCall(u.links("sessions"),p);case 15:if(f=e.sent,!((d=f.itemsList().toJS().indexOf(s))<0)){e.next=19;break}throw"ERROR: The sessionID ".concat(s," was not found.");case 19:return m=f.itemsCmd(f.itemsList(d),"self"),e.next=22,t.apiCall(m);case 22:return l=e.sent,e.abrupt("return",l);case 24:if(null==t.store.config.options.computeServerId){e.next=30;break}return console.log("NOTE: Detected Workbench"),e.next=28,t.apiCall(u.links("createSession"));case 28:return l=e.sent,e.abrupt("return",l);case 30:return null==n&&(n="SAS Job Execution compute context"),b={qs:{filter:"contains(name,'".concat(n,"')")}},h=null,e.prev=33,e.next=36,t.apiCall(u.links("contexts"),b);case 36:if(0!==(h=e.sent).itemsList().size){e.next=39;break}throw"Context ".concat(n," not found");case 39:e.next=45;break;case 41:throw e.prev=41,e.t0=e.catch(33),console.log("Error: Not able to get context"),e.t0;case 45:if(v=h.itemsList(0),null!=s){e.next=52;break}return b=null==a?null:a,y=h.itemsCmd(v,"createSession"),e.next=51,t.apiCall(y,a);case 51:l=e.sent;case 52:return e.abrupt("return",l);case 53:case"end":return e.stop()}}),e,null,[[33,41]])})))).apply(this,arguments)}var oe=function(e,t,n,r,a){return se.apply(this,arguments)};function ce(){return(ce=a()(o.a.mark((function e(t,n,r){var a,s,c,i;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("log"!==r&&"listing"!==r){e.next=20;break}if(a=[],null===n[r]){e.next=16;break}return e.next=5,t.apiCall(n[r]);case 5:s=e.sent,a=a.concat(s.items().toJS());case 7:if(null===(c=s.scrollCmds("next"))){e.next=14;break}return e.next=10,t.apiCall(c);case 10:s=e.sent,a=a.concat(s.items().toJS()),e.next=7;break;case 14:e.next=17;break;case 16:a[0]="Note: No ".concat(r);case 17:return e.abrupt("return",a);case 20:if("ods"!==r){e.next=31;break}if(null===n.ods){e.next=28;break}return e.next=24,t.apiCall(n.ods);case 24:return i=e.sent,e.abrupt("return",i.items());case 28:return e.abrupt("return","<h2> No ODS output </h2>");case 29:e.next=40;break;case 31:if("tables"!==r){e.next=35;break}return e.abrupt("return",Object.keys(n.tables));case 35:if("files"!==r){e.next=39;break}return e.abrupt("return",Object.keys(n.files));case 39:throw"Error: Invalid type ".concat(r);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ie=function(e,t,n){return ce.apply(this,arguments)};function ue(){return(ue=a()(o.a.mark((function e(t,n,r,a){var s,c;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==a){e.next=6;break}return e.next=3,ae(t,n,a);case 3:if("completed"===(s=e.sent).SASJobStatus){e.next=6;break}throw"Error: Preamble failed with completion code of ".concat(s.SASJobStatus);case 6:return e.next=8,ee(t,n,null,r);case 8:return c=e.sent,e.abrupt("return",c);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var le=function(e,t,n,r){return ue.apply(this,arguments)};function pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pe(Object(n),!0).forEach((function(t){w()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function de(){return(de=a()(o.a.mark((function e(t,n,r,a,s,c){var i,u,l,p,f,d,m,b,h,v,y,x,g,w,_,k,C,S,j,O,T,E;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=null,u=(u="string"==typeof r?r:"".concat(r.libref,".").concat(r.name)).toUpperCase(),(l=null!=s?fe({},s):{qs:{}}).qs.includeIndex=!0,p=null==c?"rows":c,f=null!=s&&null==a,null==(d=n.tables[u])){e.next=45;break}if(!0===f&&(d.current=null),null!==d.current&&null!=a&&"first"!==a){e.next=33;break}return e.next=13,t.apiCall(d.self);case 13:return m=e.sent,b=m.items().toJS().columnCount,h={qs:{start:0,limit:b}},e.next=18,t.apiCall(m.links("columns"),h);case 18:for(g in v=e.sent,y=[],x=v.items().toJS(),"rows"===p&&y.push({name:"_index_",Column:"_Index_",Label:"Index",length:8,type:"FLOAT",format:"BEST",informat:"BEST"}),x)w=x[g],console.log(w.name,w.data.type,w.data.format,w.data.informat),_={name:w.name.toLowerCase(),Column:w.name.toLowerCase(),Label:w.data.label,length:w.data.length,type:w.data.type,format:null!=w.data.format?w.data.format.name:null,informat:null!=w.data.informat?w.data.informat.name:null,custom:!1},k=!0===l.qs.includeIndex?1:0,y[w.data.index+k]=_;return e.next=25,t.apiCall(m.links(p),l);case 25:C=e.sent,S="rowSet"===p?C.items("rows").toJS():me(C),d.current=C,d.schema=y,d.columns=v,i={columns:v,schema:y,rows:S,scrollOptions:C.scrollCmds().keySeq().toJS()},e.next=45;break;case 33:if(j=d.current,O=a,"next"===a&&null===j.scrollCmds("next")&&(O=null!==j.links("last")?"last":null),"prev"===a&&null===j.scrollCmds("prev")&&(O=null!==j.links("first")?"first":null),i={schema:d.schema,columns:d.columns,currentColumns:d.currentColumns,rows:[],scrollOptions:j.scrollCmds().keySeq().toJS()},null===O||null===j.scrollCmds(O)){e.next=45;break}return e.next=41,t.apiCall(j.scrollCmds(O),l);case 41:T=e.sent,d.current=T,E="rows"!==p?T.items("rows").toJS():me(T),i={schema:d.schema,columns:d.schema,rows:E,scrollOptions:T.scrollCmds().keySeq().toJS()};case 45:return e.abrupt("return",i);case 46:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function me(e){return e.items().toJS().map((function(e){return e.cells}))}var be=function(e,t,n,r,a,s){return de.apply(this,arguments)};function he(){return(he=a()(o.a.mark((function e(t,n,r,a){var s,c,i,u,l,p;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=(s=n.files[r])){e.next=3;break}throw"Invalid fileref ".concat(r);case 3:if(null!==s.current){e.next=12;break}return c={qs:{filter:"eq(name,'".concat(r,"')")}},e.next=7,t.apiCall(n.session.links("files"),c);case 7:return i=e.sent,e.next=10,t.apiCall(i.itemsCmd(r,"self"));case 10:i=e.sent,s.current=i;case 12:if(!0!==a){e.next=17;break}return u="".concat(n.session.host).concat(s.current.links("content","link","uri")),e.abrupt("return",u);case 17:if(null!==s.data){e.next=26;break}return e.next=20,t.apiCall(s.current.links("content"));case 20:return l=e.sent,p=l.items(),s.data=p,e.abrupt("return",p);case 26:return e.abrupt("return",s.data);case 27:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ve=function(e,t,n,r){return he.apply(this,arguments)};function ye(){return(ye=a()(o.a.mark((function e(t,n,r,a){var s,c,i;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s="\n proc append base=".concat(a.libref,".{output.name} \n data= ").concat(r.libref,".").concat(r.name,"; run;\n "),e.next=3,ae(t,n,s);case 3:return c=e.sent,i="completed"===c.SASJobStatus?0:1,e.abrupt("return",{msg:"Append Completed. Status is: ".concat(c.SASJobStatus),statusCode:i});case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var xe=function(e,t,n,r){return ye.apply(this,arguments)};function ge(){return(ge=a()(o.a.mark((function e(t,n,r){var a,s,c,i,u,l,p,f,d,m,b,h,v,y,x,g,w,_;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(p in a=r.data,s=r.table,c=r.where,i="proc sql; update ".concat(s.libref,".").concat(s.name),u="SET ",l=" ",a)u=u+l+p+"="+we(a[p]),l=", ";if(i=i+" "+u,f=" WHERE ",d=" ","string"==typeof c)f+=c;else for(m in c)b=c[m],h=we(b),f=f+d+m+"= ".concat(h," "),d=" AND ";return v=(i=i+" "+f+";run;").split(/\r?\n/),y={data:{code:v}},e.next=14,t.apiCall(n.links("execute"),y);case 14:return x=e.sent,g={qs:{newState:"Completed",timeout:1}},e.next=18,t.jobState(x,g);case 18:return w=e.sent,_="completed"===w.data?0:1,e.abrupt("return",{statusCode:_,msg:w.data});case 21:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function we(e){return null==e?".":"string"==typeof e?JSON.stringify(e):e.toString()}var _e=function(e,t,n){return ge.apply(this,arguments)};function ke(){return(ke=a()(o.a.mark((function e(t,n,r,a,s){var c,i,u,l,p,f;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(l in c="data ".concat(r.libref,".").concat(r.name,"; INFILE datalines delimiter=',' ;\n"),i="",u="INPUT ",s)p=s[l],u=u+p.Column+" ","CHAR"===p.Type&&(f=" ".concat(p.Column," $ ").concat(p.length," \n"),i=i+" "+f);return i.length>0&&(i="LENGTH "+i+";\n"),c=c+";\n"+i+(u+=";\n")+"datalines;\n"+a+"\n; run; proc print;run;\n",e.next=9,ae(t,n,c);case 9:return e.abrupt("return",{msg:"done",statusCode:0});case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ce=function(e,t,n,r,a){return ke.apply(this,arguments)};function Se(){return(Se=a()(o.a.mark((function e(t,n){var r,a,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.addServices("reports"),a=null,null!==n&&(a={qs:{filter:"eq(name,'".concat(n,"')")}}),e.next=5,t.apiCall(r.links("reports"),a);case 5:return s=e.sent,e.abrupt("return",0===s.itemsList().size?null:s);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var je=function(e,t){return Se.apply(this,arguments)};function Oe(){return(Oe=a()(o.a.mark((function e(t,n){var r,a,s,c,i,u,l;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.rafObject("reportImages"),e.next=3,je(t,n);case 3:if(null!==(a=e.sent)){e.next=6;break}return e.abrupt("return","".concat(n," was not found"));case 6:return s=a.itemsCmd(a.itemsList(0),"self","link","uri"),c={data:{reportUri:s,sectionIndex:0,layoutType:"entireSection",size:"400x400"}},e.next=11,t.apiCall(r.links("createJob"),c);case 11:return i=e.sent,e.next=14,t.jobState(i,{qs:{wait:1.5}},10,2);case 14:if("completed"===(u=e.sent).data){e.next=17;break}return e.abrupt("return","Job failed ".concat(u.data));case 17:return e.next=19,t.apiCall(u.job.itemsCmd(u.job.itemsList(0),"image"));case 19:return l=e.sent,e.abrupt("return",l.items());case 21:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Te=function(e,t){return Oe.apply(this,arguments)};function Ee(){return(Ee=a()(o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,je(t,n);case 2:if(null!==(r=e.sent)){e.next=6;break}throw null==n?"No reports were found":"".concat(n," was not found");case 6:return a=[],r.items().map((function(e,t){var n={name:t,uri:r.itemsCmd(t,"self","link","uri")};a.push(n)})),e.abrupt("return",a);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Re=function(e,t){return Ee.apply(this,arguments)};function Le(){return(Le=a()(o.a.mark((function e(t,n,r){var a,s,c,i,u,l,p,f,d;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.tables[r],e.next=3,t.apiCall(a);case 3:return s=e.sent,e.next=6,t.apiCall(s.links("rowSet"));case 6:c=e.sent,i=c.items("columns"),u=c.items("rows"),l=[],p=u.size,f=o.a.mark((function e(){var t,n;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=u.get(d),n={},i.map((function(e,r){var a=e.toLowerCase();n[a]=t.get(r)})),l.push(n);case 4:case"end":return e.stop()}}),e)})),d=0;case 13:if(!(d<p)){e.next=18;break}return e.delegateYield(f(),"t0",15);case 15:d++,e.next=13;break;case 18:return e.abrupt("return",l);case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var qe=function(e,t,n){return Le.apply(this,arguments)};function Ae(){return(Ae=a()(o.a.mark((function e(t,n){var r;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==n){e.next=3;break}return e.next=3,t.logon(n);case 3:return e.next=5,t.addServices("jobExecution","compute","jobDefinitions");case 5:return r=e.sent,e.abrupt("return",r.jobExecution);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Pe=function(e,t){return Ae.apply(this,arguments)};function De(){return(De=a()(o.a.mark((function e(t,n){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n);case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ie=function(e,t){return De.apply(this,arguments)};function Ne(){return(Ne=a()(o.a.mark((function e(t,n,r){var a,s,c;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.apiCall(n.links("create"),r);case 2:return a=e.sent,e.next=5,t.jobState(a,null,5,2);case 5:if("running"!==(s=e.sent).data){e.next=10;break}throw"ERROR: Job did not complete in allotted time";case 10:if("failed"!==s.data){e.next=14;break}throw JSON.stringify(s);case 14:return e.next=16,Ie(t,s.job);case 16:return c=e.sent,e.abrupt("return",c);case 18:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Fe=function(e,t,n){return Ne.apply(this,arguments)};function Je(){return(Je=a()(o.a.mark((function e(t,n,r,a,s){var c,i,u,l;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c={},i={},null===a){e.next=6;break}return e.next=5,Ue(t,a);case 5:c.jobDefinitionUri=e.sent;case 6:return-0!=r&&(i.code=r),i.type="Compute",c.arguments=s,c.jobDefinition=i,u={data:c},e.next=13,Fe(t,n,u);case 13:return l=e.sent,e.abrupt("return",l);case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ue(e,t){return Me.apply(this,arguments)}function Me(){return(Me=a()(o.a.mark((function e(t,n){var r,a,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.getService("jobDefinitions"),r=null,a={qs:{filter:"eq(name,'".concat(n,"')")}},e.next=5,Fe(t,a);case 5:if(0!==(s=e.sent).itemsList().size){e.next=10;break}throw"Error: ".concat(n," not found in the system");case 10:r=s.itemsCmd(n,"self","link","uri");case 11:return e.abrupt("return",r);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Qe=function(e,t,n,r,a){return Je.apply(this,arguments)};function ze(){return(ze=a()(o.a.mark((function e(t,n,r){var a,s,c,i;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=n.service,s=0;case 2:if(!(s<r.length)){e.next=12;break}if(c=r[s],null!=n.steps[c]){e.next=9;break}return e.next=7,Be(t,a,c);case 7:i=e.sent,n.steps[c]=i;case 9:s++,e.next=2;break;case 12:return e.abrupt("return",!0);case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ge=function(e,t,n){return ze.apply(this,arguments)};function Ye(){return(Ye=a()(o.a.mark((function e(t,n,r){var a,s,c,i,u;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a={qs:{filter:"eq(name,'".concat(r.trim(),"')")}},e.next=3,t.apiCall(n.links("modules"),a);case 3:if(0!==(s=e.sent).itemsList().size){e.next=6;break}return e.abrupt("return",null);case 6:return c=s.itemsCmd(r,"steps"),e.next=9,t.apiCall(c);case 9:return i=e.sent,u={name:r,stepsRafLink:i,stepIds:s.items(r,"data","stepIds").toJS(),microanalyticScore:n},e.abrupt("return",u);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Be=function(e,t,n){return Ye.apply(this,arguments)};function He(){return(He=a()(o.a.mark((function e(t,n,r){var a,s,c,i,u,l;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==r){e.next=3;break}return e.next=3,t.logon(r);case 3:return e.next=5,t.addServices("microanalyticScore");case 5:a=e.sent,s=a.microanalyticScore,c={service:s,steps:{}},i=0;case 9:if(!(i<n.length)){e.next=18;break}return u=n[i],e.next=13,Be(t,s,u);case 13:l=e.sent,c.steps[u]=l;case 15:i++,e.next=9;break;case 18:return e.abrupt("return",c);case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ve=function(e,t,n){return He.apply(this,arguments)};var We=function(e,t,n){var r=e.steps[t];if(null===r)return[];var a=null;if(null==n){var s=r.stepIds.findIndex((function(e){return"execute"===e||"score"===e}));if(-1===s)return[];a=r.stepIds[s]}else{if(-1===r.stepIds.findIndex((function(e){return e===n})))return[];a=n}var o=r.stepsRafLink.items(a,"data","inputs");return null===o?[]:o.toJS()};function Ke(){return(Ke=a()(o.a.mark((function e(t,n,r,a,s,c){var i,u,l,p,f,d,m,b,h,v,y,x,g;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.steps[r],u=!1,l=[],!1===Array.isArray(a))for(p in a)f={name:p,value:a[p]},l.push(f);else u=!0;if(d={data:{inputs:!0===u?a:l}},m=null,null!=s){e.next=15;break}if(-1!==(b=i.stepIds.findIndex((function(e){return"execute"===e||"score"===e})))){e.next=12;break}return e.abrupt("return",[]);case 12:m=i.stepIds[b];case 13:e.next=21;break;case 15:if(-1!==i.stepIds.findIndex((function(e){return e===s}))){e.next=20;break}return e.abrupt("return",[]);case 20:m=s;case 21:if(null==c&&(c="execute"),null!==(h=i.stepsRafLink.itemsCmd(m,c))){e.next=26;break}return v=[{name:"Error",type:"string",value:"name: ".concat(r," step: ").concat(s," operation: ").concat(c," is an invalid combination")}],e.abrupt("return",v);case 26:return e.next=28,t.apiCall(h,d);case 28:return y=e.sent,x=y.items("outputs").toJS(),!0===u?g=x:(g={},x.map((function(e){g[e.name]=e.value}))),e.abrupt("return",g);case 32:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Xe=function(e,t,n,r,a,s){return Ke.apply(this,arguments)};function $e(){return($e=a()(o.a.mark((function e(t,n,r){var a,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ve(t,[n]);case 2:return a=e.sent,e.next=5,Xe(t,a,n,r,"score","execute");case 5:return s=e.sent,e.abrupt("return",s);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ze=function(e,t,n){return $e.apply(this,arguments)};var et=function(){return{caslRun:x,caslRunBase:d,casSetup:L,casActionRun:A,casFetchData:D,casUpdateData:M,computeRun:ae,computeSetup:oe,computeSummary:ee,computeFetchData:be,computeFileContent:ve,computeResults:ie,findReport:je,getReportImage:Te,getReportUri:Re,getSASTableRows:qe,jesSetup:Pe,jesRun:Qe,jesSummary:Ie,jsonToDict:p,casTableToJson:B,caslScore:S,caslDescribe:E,masSetup:Ve,masAddModel:Ge,masDescribe:We,masRun:Xe}}()}])}));
package/lib/restaflib.js CHANGED
@@ -97,86 +97,86 @@ return /******/ (function(modules) { // webpackBootstrap
97
97
  /******/ ({
98
98
 
99
99
  /***/ "../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js":
100
- /*!******************************************************************************!*\
101
- !*** C:/temp/restaf/node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
102
- \******************************************************************************/
100
+ /*!*************************************************************************************!*\
101
+ !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
102
+ \*************************************************************************************/
103
103
  /*! no static exports found */
104
104
  /*! exports used: default */
105
105
  /***/ (function(module, exports) {
106
106
 
107
- eval("function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nmodule.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/temp/restaf/node_modules/@babel/runtime/helpers/asyncToGenerator.js?");
107
+ eval("function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nmodule.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/asyncToGenerator.js?");
108
108
 
109
109
  /***/ }),
110
110
 
111
111
  /***/ "../../../node_modules/@babel/runtime/helpers/defineProperty.js":
112
- /*!****************************************************************************!*\
113
- !*** C:/temp/restaf/node_modules/@babel/runtime/helpers/defineProperty.js ***!
114
- \****************************************************************************/
112
+ /*!***********************************************************************************!*\
113
+ !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/defineProperty.js ***!
114
+ \***********************************************************************************/
115
115
  /*! no static exports found */
116
116
  /*! exports used: default */
117
117
  /***/ (function(module, exports, __webpack_require__) {
118
118
 
119
- eval("var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ \"../../../node_modules/@babel/runtime/helpers/toPropertyKey.js\");\nfunction _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/temp/restaf/node_modules/@babel/runtime/helpers/defineProperty.js?");
119
+ eval("var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ \"../../../node_modules/@babel/runtime/helpers/toPropertyKey.js\");\nfunction _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/defineProperty.js?");
120
120
 
121
121
  /***/ }),
122
122
 
123
123
  /***/ "../../../node_modules/@babel/runtime/helpers/regeneratorRuntime.js":
124
- /*!********************************************************************************!*\
125
- !*** C:/temp/restaf/node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
126
- \********************************************************************************/
124
+ /*!***************************************************************************************!*\
125
+ !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
126
+ \***************************************************************************************/
127
127
  /*! no static exports found */
128
128
  /*! all exports used */
129
129
  /***/ (function(module, exports, __webpack_require__) {
130
130
 
131
- eval("var _typeof = __webpack_require__(/*! ./typeof.js */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw new Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw new Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/temp/restaf/node_modules/@babel/runtime/helpers/regeneratorRuntime.js?");
131
+ eval("var _typeof = __webpack_require__(/*! ./typeof.js */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw new Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw new Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/regeneratorRuntime.js?");
132
132
 
133
133
  /***/ }),
134
134
 
135
135
  /***/ "../../../node_modules/@babel/runtime/helpers/toPrimitive.js":
136
- /*!*************************************************************************!*\
137
- !*** C:/temp/restaf/node_modules/@babel/runtime/helpers/toPrimitive.js ***!
138
- \*************************************************************************/
136
+ /*!********************************************************************************!*\
137
+ !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/toPrimitive.js ***!
138
+ \********************************************************************************/
139
139
  /*! no static exports found */
140
140
  /*! all exports used */
141
141
  /***/ (function(module, exports, __webpack_require__) {
142
142
 
143
- eval("var _typeof = __webpack_require__(/*! ./typeof.js */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\")[\"default\"];\nfunction _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\nmodule.exports = _toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/temp/restaf/node_modules/@babel/runtime/helpers/toPrimitive.js?");
143
+ eval("var _typeof = __webpack_require__(/*! ./typeof.js */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\")[\"default\"];\nfunction _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\nmodule.exports = _toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/toPrimitive.js?");
144
144
 
145
145
  /***/ }),
146
146
 
147
147
  /***/ "../../../node_modules/@babel/runtime/helpers/toPropertyKey.js":
148
- /*!***************************************************************************!*\
149
- !*** C:/temp/restaf/node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
150
- \***************************************************************************/
148
+ /*!**********************************************************************************!*\
149
+ !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
150
+ \**********************************************************************************/
151
151
  /*! no static exports found */
152
152
  /*! all exports used */
153
153
  /***/ (function(module, exports, __webpack_require__) {
154
154
 
155
- eval("var _typeof = __webpack_require__(/*! ./typeof.js */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\")[\"default\"];\nvar toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ \"../../../node_modules/@babel/runtime/helpers/toPrimitive.js\");\nfunction _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}\nmodule.exports = _toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/temp/restaf/node_modules/@babel/runtime/helpers/toPropertyKey.js?");
155
+ eval("var _typeof = __webpack_require__(/*! ./typeof.js */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\")[\"default\"];\nvar toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ \"../../../node_modules/@babel/runtime/helpers/toPrimitive.js\");\nfunction _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}\nmodule.exports = _toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/toPropertyKey.js?");
156
156
 
157
157
  /***/ }),
158
158
 
159
159
  /***/ "../../../node_modules/@babel/runtime/helpers/typeof.js":
160
- /*!********************************************************************!*\
161
- !*** C:/temp/restaf/node_modules/@babel/runtime/helpers/typeof.js ***!
162
- \********************************************************************/
160
+ /*!***************************************************************************!*\
161
+ !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/typeof.js ***!
162
+ \***************************************************************************/
163
163
  /*! no static exports found */
164
164
  /*! all exports used */
165
165
  /***/ (function(module, exports) {
166
166
 
167
- eval("function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/temp/restaf/node_modules/@babel/runtime/helpers/typeof.js?");
167
+ eval("function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/typeof.js?");
168
168
 
169
169
  /***/ }),
170
170
 
171
171
  /***/ "../../../node_modules/@babel/runtime/regenerator/index.js":
172
- /*!***********************************************************************!*\
173
- !*** C:/temp/restaf/node_modules/@babel/runtime/regenerator/index.js ***!
174
- \***********************************************************************/
172
+ /*!******************************************************************************!*\
173
+ !*** C:/sassoftware/restaf/node_modules/@babel/runtime/regenerator/index.js ***!
174
+ \******************************************************************************/
175
175
  /*! no static exports found */
176
176
  /*! exports used: default */
177
177
  /***/ (function(module, exports, __webpack_require__) {
178
178
 
179
- eval("// TODO(Babel 8): Remove this file.\n\nvar runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ \"../../../node_modules/@babel/runtime/helpers/regeneratorRuntime.js\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n\n\n//# sourceURL=webpack://restaflib/C:/temp/restaf/node_modules/@babel/runtime/regenerator/index.js?");
179
+ eval("// TODO(Babel 8): Remove this file.\n\nvar runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ \"../../../node_modules/@babel/runtime/helpers/regeneratorRuntime.js\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/regenerator/index.js?");
180
180
 
181
181
  /***/ }),
182
182
 
@@ -501,7 +501,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
501
501
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
502
502
 
503
503
  "use strict";
504
- eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n/**\r\n * @description Search for a named report(async)\r\n * @async\r\n * @module findReport\r\n * @category restaflib/report\r\n * \r\n * @param {object} store - restaf store\r\n * @param {string} name - name of the VA report (null to get a list of all reports)\r\n * \r\n * @returns {object} - either null or rafObject for the report\r\n */\n\n\nfunction findReport(_x, _x2) {\n return _findReport.apply(this, arguments);\n}\nfunction _findReport() {\n _findReport = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, name) {\n var reports, payload, reportsList;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n reports = store.getService('reports');\n payload = null;\n if (name !== null) {\n payload = {\n qs: {\n filter: \"eq(name,'\".concat(name, \"')\")\n }\n };\n }\n // call the reports service\n _context.next = 5;\n return store.apiCall(reports.links('reports'), payload);\n case 5:\n reportsList = _context.sent;\n return _context.abrupt(\"return\", reportsList.itemsList().size === 0 ? null : reportsList);\n case 7:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _findReport.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (findReport);\n\n//# sourceURL=webpack://restaflib/./findReport.js?");
504
+ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n/**\r\n * @description Search for a named report(async)\r\n * @async\r\n * @module findReport\r\n * @category restaflib/report\r\n * \r\n * @param {object} store - restaf store\r\n * @param {string} name - name of the VA report (null to get a list of all reports)\r\n * \r\n * @returns {object} - either null or rafObject for the report\r\n */\n\n\nfunction findReport(_x, _x2) {\n return _findReport.apply(this, arguments);\n}\nfunction _findReport() {\n _findReport = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, name) {\n var reports, payload, reportsList;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n reports = store.addServices('reports');\n payload = null;\n if (name !== null) {\n payload = {\n qs: {\n filter: \"eq(name,'\".concat(name, \"')\")\n }\n };\n }\n // call the reports service\n _context.next = 5;\n return store.apiCall(reports.links('reports'), payload);\n case 5:\n reportsList = _context.sent;\n return _context.abrupt(\"return\", reportsList.itemsList().size === 0 ? null : reportsList);\n case 7:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _findReport.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (findReport);\n\n//# sourceURL=webpack://restaflib/./findReport.js?");
505
505
 
506
506
  /***/ }),
507
507
 
@@ -798,7 +798,7 @@ eval("/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights
798
798
  /*! all exports used */
799
799
  /***/ (function(module, exports, __webpack_require__) {
800
800
 
801
- eval("module.exports = __webpack_require__(/*! C:\\temp\\restaf\\packages\\restaflib\\src/index */\"./index.js\");\n\n\n//# sourceURL=webpack://restaflib/multi_./index?");
801
+ eval("module.exports = __webpack_require__(/*! C:\\sassoftware\\restaf\\packages\\restaflib\\src/index */\"./index.js\");\n\n\n//# sourceURL=webpack://restaflib/multi_./index?");
802
802
 
803
803
  /***/ })
804
804
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sassoftware/restaflib",
3
- "version": "5.3.0-alpha.0",
3
+ "version": "5.3.0-alpha.2",
4
4
  "description": "collection of useful functions for common scenarios",
5
5
  "repository": {
6
6
  "type": "git",
@@ -30,6 +30,7 @@
30
30
  },
31
31
  "scripts": {
32
32
  "build": "rimraf dist && rimraf lib && webpack --env target=node p=n --config webpack.config.js && webpack --env target=web p=n --config webpack.config.js && webpack --env target=web p=y --config webpack.config.js",
33
+ "build:es": "webpack --config webpack.config.es.js",
33
34
  "pub": "npm publish --tag alpha --access public",
34
35
  "jsdoc": "jsdoc -c jsdoc.json",
35
36
  "dlink": "npm link",