UNPKG

38.6 kBJavaScriptView Raw
1!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("core-js/modules/es.object.entries.js"),require("core-js/modules/es.function.name.js"),require("core-js/modules/es.symbol.js"),require("core-js/modules/es.symbol.description.js"),require("core-js/modules/es.object.to-string.js"),require("core-js/modules/es.symbol.iterator.js"),require("core-js/modules/es.array.iterator.js"),require("core-js/modules/es.string.iterator.js"),require("core-js/modules/web.dom-collections.iterator.js"),require("core-js/modules/es.symbol.async-iterator.js"),require("core-js/modules/es.symbol.to-string-tag.js"),require("core-js/modules/es.json.to-string-tag.js"),require("core-js/modules/es.math.to-string-tag.js"),require("core-js/modules/es.object.get-prototype-of.js"),require("core-js/modules/es.promise.js"),require("core-js/modules/web.dom-collections.for-each.js"),require("core-js/modules/es.array.slice.js"),require("core-js/modules/esnext.global-this.js"),require("axios"),require("core-js/modules/es.regexp.to-string.js"),require("core-js/modules/es.regexp.exec.js"),require("core-js/modules/es.regexp.constructor.js"),require("core-js/modules/es.string.replace.js"),require("core-js/modules/es.array.splice.js"),require("core-js/modules/es.array.map.js"),require("core-js/modules/es.array.includes.js"),require("core-js/modules/es.array.concat.js")):"function"==typeof define&&define.amd?define(["exports","core-js/modules/es.object.entries.js","core-js/modules/es.function.name.js","core-js/modules/es.symbol.js","core-js/modules/es.symbol.description.js","core-js/modules/es.object.to-string.js","core-js/modules/es.symbol.iterator.js","core-js/modules/es.array.iterator.js","core-js/modules/es.string.iterator.js","core-js/modules/web.dom-collections.iterator.js","core-js/modules/es.symbol.async-iterator.js","core-js/modules/es.symbol.to-string-tag.js","core-js/modules/es.json.to-string-tag.js","core-js/modules/es.math.to-string-tag.js","core-js/modules/es.object.get-prototype-of.js","core-js/modules/es.promise.js","core-js/modules/web.dom-collections.for-each.js","core-js/modules/es.array.slice.js","core-js/modules/esnext.global-this.js","axios","core-js/modules/es.regexp.to-string.js","core-js/modules/es.regexp.exec.js","core-js/modules/es.regexp.constructor.js","core-js/modules/es.string.replace.js","core-js/modules/es.array.splice.js","core-js/modules/es.array.map.js","core-js/modules/es.array.includes.js","core-js/modules/es.array.concat.js"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).CSREST={},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,e.axios)}(this,(function(e,t,r,n,o,i,a,s,u,c,l,p,d,f,h,m,y,v,g,b){"use strict";function j(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var w=j(b),_="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},T={};function R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?R(Object(r),!0).forEach((function(t){C(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function O(e){return O="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},O(e)}function k(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,o)}function S(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){k(i,n,o,a,s,"next",e)}function s(e){k(i,n,o,a,s,"throw",e)}a(void 0)}))}}function P(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function L(e,t,r){return t&&F(e.prototype,t),r&&F(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function C(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}function V(e,t){return V=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},V(e,t)}function D(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function M(e,t,r){return M=D()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&V(o,r.prototype),o},M.apply(null,arguments)}function I(e){var t="function"==typeof Map?new Map:void 0;return I=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return M(e,arguments,E(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),V(n,e)},I(e)}function A(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function N(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return q(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return q(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}!function(e){var t=function(e){var t,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var o=t&&t.prototype instanceof y?t:y,i=Object.create(o.prototype),a=new P(n||[]);return i._invoke=function(e,t,r){var n=p;return function(o,i){if(n===f)throw new Error("Generator is already running");if(n===h){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=x(a,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===p)throw n=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=f;var u=l(e,t,r);if("normal"===u.type){if(n=r.done?h:d,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=h,r.method="throw",r.arg=u.arg)}}}(e,r,a),i}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var p="suspendedStart",d="suspendedYield",f="executing",h="completed",m={};function y(){}function v(){}function g(){}var b={};u(b,i,(function(){return this}));var j=Object.getPrototypeOf,w=j&&j(j(F([])));w&&w!==r&&n.call(w,i)&&(b=w);var _=g.prototype=y.prototype=Object.create(b);function T(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function r(o,i,a,s){var u=l(e[o],e,i);if("throw"!==u.type){var c=u.arg,p=c.value;return p&&"object"===O(p)&&n.call(p,"__await")?t.resolve(p.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(p).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var o;this._invoke=function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}}function x(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,x(e,r),"throw"===r.method))return m;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var o=l(n,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function k(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 S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function F(e){if(e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}return{next:L}}function L(){return{value:t,done:!0}}return v.prototype=g,u(_,"constructor",g),u(g,"constructor",v),v.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,s,"GeneratorFunction")),e.prototype=Object.create(_),e},e.awrap=function(e){return{__await:e}},T(R.prototype),u(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new R(c(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},T(_),u(_,s,"Generator"),u(_,i,(function(){return this})),u(_,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=F,P.prototype={constructor:P,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(S),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=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 r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},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),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:F(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"===("undefined"==typeof globalThis?"undefined":O(globalThis))?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}({exports:{}});var B="__lodash_hash_undefined__",W="[object Function]",U="[object GeneratorFunction]",G=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,H=/^\./,$=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,J=/\\(\\)?/g,X=/^\[object .+?Constructor\]$/,Y="object"==O(_)&&_&&_.Object===Object&&_,K="object"==("undefined"==typeof self?"undefined":O(self))&&self&&self.Object===Object&&self,z=Y||K||Function("return this")();var Z,ee=Array.prototype,te=Function.prototype,re=Object.prototype,ne=z["__core-js_shared__"],oe=(Z=/[^.]+$/.exec(ne&&ne.keys&&ne.keys.IE_PROTO||""))?"Symbol(src)_1."+Z:"",ie=te.toString,ae=re.hasOwnProperty,se=re.toString,ue=RegExp("^"+ie.call(ae).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ce=z.Symbol,le=ee.splice,pe=_e(z,"Map"),de=_e(Object,"create"),fe=ce?ce.prototype:void 0,he=fe?fe.toString:void 0;function me(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ye(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ve(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ge(e,t){for(var r,n,o=e.length;o--;)if((r=e[o][0])===(n=t)||r!=r&&n!=n)return o;return-1}function be(e,t){var r;t=function(e,t){if(Oe(e))return!1;var r=O(e);if("number"==r||"symbol"==r||"boolean"==r||null==e||Se(e))return!0;return Q.test(e)||!G.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:Oe(r=t)?r:Te(r);for(var n=0,o=t.length;null!=e&&n<o;)e=e[Re(t[n++])];return n&&n==o?e:void 0}function je(e){if(!ke(e)||(t=e,oe&&oe in t))return!1;var t,r=function(e){var t=ke(e)?se.call(e):"";return t==W||t==U}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?ue:X;return r.test(function(e){if(null!=e){try{return ie.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function we(e,t){var r,n,o=e.__data__;return("string"==(n=O(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function _e(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return je(r)?r:void 0}me.prototype.clear=function(){this.__data__=de?de(null):{}},me.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},me.prototype.get=function(e){var t=this.__data__;if(de){var r=t[e];return r===B?void 0:r}return ae.call(t,e)?t[e]:void 0},me.prototype.has=function(e){var t=this.__data__;return de?void 0!==t[e]:ae.call(t,e)},me.prototype.set=function(e,t){return this.__data__[e]=de&&void 0===t?B:t,this},ye.prototype.clear=function(){this.__data__=[]},ye.prototype.delete=function(e){var t=this.__data__,r=ge(t,e);return!(r<0)&&(r==t.length-1?t.pop():le.call(t,r,1),!0)},ye.prototype.get=function(e){var t=this.__data__,r=ge(t,e);return r<0?void 0:t[r][1]},ye.prototype.has=function(e){return ge(this.__data__,e)>-1},ye.prototype.set=function(e,t){var r=this.__data__,n=ge(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},ve.prototype.clear=function(){this.__data__={hash:new me,map:new(pe||ye),string:new me}},ve.prototype.delete=function(e){return we(this,e).delete(e)},ve.prototype.get=function(e){return we(this,e).get(e)},ve.prototype.has=function(e){return we(this,e).has(e)},ve.prototype.set=function(e,t){return we(this,e).set(e,t),this};var Te=xe((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(Se(e))return he?he.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var r=[];return H.test(e)&&r.push(""),e.replace($,(function(e,t,n,o){r.push(n?o.replace(J,"$1"):t||e)})),r}));function Re(e){if("string"==typeof e||Se(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function xe(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function r(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a),a};return r.cache=new(xe.Cache||ve),r}xe.Cache=ve;var Oe=Array.isArray;function ke(e){var t=O(e);return!!e&&("object"==t||"function"==t)}function Se(e){return"symbol"==O(e)||function(e){return!!e&&"object"==O(e)}(e)&&"[object Symbol]"==se.call(e)}var Pe=function(e,t,r){var n=null==e?void 0:be(e,t);return void 0===n?r:n},Fe={createFormData:function(){return new FormData}},Le=w.default,Ce=Pe,Ee=Fe;var Ve=function(e){var t=function(e){var t=Le.create(e);return t.interceptors.response.use((function(e){var r=Ce(e,"headers.otcsticket");return r&&(t.defaults.headers.common.OTCSTicket=r),e}),(function(e){return Promise.reject(e)})),t}(e),r=Ce(e,"username"),n=Ce(e,"password"),o=Ce(e,"otcsticket");if(o)t.defaults.headers.common.OTCSTicket=o;else{if(!r||!n)throw Error("You must provide an otcsticket or username and password.");t.interceptors.request.use(function(){var t=S(regeneratorRuntime.mark((function t(o){var i,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o.headers.common.OTCSTicket){t.next=4;break}return t.abrupt("return",o);case 4:(i=Ee.createFormData()).append("username",r),i.append("password",n),t.next=13;break;case 10:t.t0=t.sent,t.next=16;break;case 13:return t.next=15,Le.post("".concat(e.baseURL,"/api/v1/auth/"),i);case 15:t.t0=t.sent;case 16:return a=t.t0,o.headers.common.OTCSTicket=Ce(a,"data.ticket"),t.abrupt("return",o);case 19:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}return t},De={"2WayTee":294,Accession:834,ActiveFolder:1298,Activeview:30309,ActivityManager:907,Alias:1,Appearance:480,AppearanceFolder:483,AppearancesVolume:481,ArchiveFolder:31711,BackupManager:290,BackupProcess:291,BestBets:274,Blog:356,BlogEntry:357,BoxFolder:530,Category:131,CategoryFolder:132,Channel:207,ChannelVol:209,Classification:199,"Classification Shortcut":197,ClassificationTree:196,ClassifiedItems:194,Collection:298,Column:902,Comments:345,CommentsReply:348,CommentsVol:346,CommExpertContainer:3030338,CommExpertGroup:3030339,CommStore:3030329,CommTemplate:3030002,CommTemplateFolder:3030333,CommTemplateVol:3030004,CommURLStore:3030335,CommWorkspace:3030334,CommXSLVolume:3030205,CompoundDoc:136,CompoundEMail:557,ContentModuleFolder:3030372,"csapps CSApplicationManifest":32658,"csapps CSApplicationsVolume":32657,CustomView:146,CustomViewTemplate:844,DataFlowManager:270,DataSourceFolder:276,DirWalker:277,Discussion:215,DispositionGroup:602,Document:144,DocumentLLNode:1297,DocumentServer:283,Dossier:32912,DossierCabinet:32916,DossierCabinetArchive:31707,DossierTemplate:32914,DossierTemplateFolder:31709,DossierTemplatesVolume:32917,DossierTemplateVolume:32915,DossierVolume:32913,DPSBinding:31602,DPSFolder:31601,DPSVolume:31603,DTDLLNode:335,DynamicView:900,EMail:749,EmailConversationItems:2504,"Enterprise Archive Document":753,Facet:904,FacetFolder:905,FacetTree:903,FailedFolder:1299,FixedSystemColumn:906,Folder:0,Form:223,Generation:2,GENERICCONTENTMODULE:3030371,GlobalAppearance:482,HoldContainer:833,HTMLConversion:282,HTMLFormView:226,Importer:293,Inbox:731,IndexEngine:368,IndexTracer:147,IndexUpdate:281,InternalOTDS:924,ItemTemplateVol:541,ItemTemplateVolFolder:542,JournalVolume:361,LibraryExtractor:259,LibraryObj:272,"LLNode Email Folder":751,LLNodeFAQ:123475,LLNodeFAQEntry:123476,LLNodeForum:123469,LLNodeForumEntry:123470,LLNodeURQuestion:430,LLNodeURReply:432,Locators:422,Mailbox:732,MailStore:3030331,ManagedSpace:31710,MediaType:410,MediaTypesContainer:414,MemcachedFolder:919,MemcachedProcess:920,Merge:273,MicroPost:1281,MicroPostVolume:1282,MultiVolClassification:372,MultiVolClassificationProxy:374,MultiVolClassificationTree:373,MyReservedItems:870,MyWorkbenches:532,NAVMENUVOL:3030756,News:208,OTCIndexObj:257,Partition:371,PartitionMap:370,PersonalComm:3030203,PersonalCommSystemVolume:3030003,PersonalCommVol:3030204,PersonalStagingFolder:398,PersonalWebpage:3030343,PhysicalItemBox:424,PhysicalItemContainer:412,PhysicalItemCopy:419,PhysicalItem_non_Container:411,PhysObjAdmin:415,PhysObjBatchLabels:418,PhysObjCirculation:416,PhysObjReports:417,Poll:218,Process:271,Profile:195,Project:202,ProjectTemplate:543,ProjectVol:201,Prospector:384,ProspectorQueries:380,ProspectorSnapshot:387,Provenance:829,Proxy:260,PublishingFolder:31712,PublishingFolderVolume:31713,QAFolder:441,QueryFile:296,QuestionVolume:431,RecentItems:327,RecordType:425,RecordTypesContainer:428,RedForm:32918,RedFormVolume:32919,Release:138,RemoteLLDataSource:381,Reply:134,Report:299,Revision:139,RIMSDisposition:555,RIMSDispositionsContainer:554,RIMSHoldMaintenance:552,RIMSRsiContainer:553,RMAdministration:556,RMClassification:551,RMFolder:426,RMPart:427,RMReportsContainer:558,RMThesaurus:559,ScanConfigurationVolume:2505,ScheduledHoldCriteria:835,ScriptNode:32901,SearchBroker:258,SearchEngine:369,SearchManager:269,SearchReport:278,SearchResultsTemplate:383,SearchTemplate:292,Simplate:31678,SkyPodLLVolume:49547,SliceFolder:275,SocialObject:1280,SocialObjectVolume:1283,SPCJOBDESCR:797,SPCJOBDESCRFOLDER:796,SPCVOLUME:795,spdcommittee:3030202,spdcommitteevol:3030201,spdcommitteevolume:3030001,spdemail:3030130,Spider:280,StorageManagement:421,SubmitVersionNode:231,Task:206,TaskGroup:205,TaskList:204,TaskListVol:210,TaskMilestone:212,Template:230,TemplateFolder:268,TextDocument:145,Topic:130,Transfers:423,TransportBox:531,TransportItem:526,TransportItemPart:527,UrgentRequests:3030330,URL:140,VirtualFolder:899,VolBlog:123461,VolCategories:133,VolClassification:198,VolComments:347,VolDAP:987352,VolDeletedItems:405,VolDirectory:375,VolDiscussion:143,VolDomainWorkspace:180,VolDTD:336,VolEditWorkflow:162,VolFacets:901,VolLibrary:141,VolOrphan:403,VolPersonalStaging:397,VolPerspectives:908,VolPhysObj:413,VolRecMan:550,VolRelease:137,VolReports:211,VolSystem:148,VolTracer:149,VolumeFolder:484,VolumeLLVolume:1296,VolWarehouse:525,VolWorkbin:142,VolWorkflow:161,WarehouseFolder:529,WebFormConnectionVolume:236,WebFormDatabaseConnection:235,WebFormLookup:234,WebFormLookupVolume:233,WebReports:30303,WFMapLLNode:128,WFStatusNode:190,WIKI:5573,WIKIPAGE:5574,Workbench:528,WorkflowAttachments:154,XMLActivatorCon:286,XMLActivatorProd:285};var Me=function(e){return null==e},Ie=function(e){return"object"===O(e)&&null!==e},Ae={PARSEERROR:{code:-32700,message:"Parse error"},INVALIDREQUEST:{code:-32600,message:"Invalid Request"},METHODNOTFOUND:{code:-32601,message:"Method not found"},INVALIDPARAMS:{code:-32602,message:"Invalid params"},INTERNALERROR:{code:-32603,message:"Internal error"}},Ne=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&V(e,t)}(o,e);var t,r,n=(t=o,r=D(),function(){var e,n=E(t);if(r){var o=E(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return A(this,e)});function o(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ae.INTERNALERROR.message,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ae.INTERNALERROR.code;return P(this,o),Ie(t)?((e=n.call(this,t.message)).code=t.code,e.data=t.data):((e=n.call(this,t)).code=i,e.data=r),A(e)}return L(o)}(I(Error)),qe={CustomError:Ne,ErrorCodes:Ae}.CustomError,Be=Pe,We={index:0,get next(){return this.index=this.index+1,this.index}},Ue=function(){function e(t,r){P(this,e),this.session=t,this.baseURL=r,this.resetQueue()}var t,r;return L(e,[{key:"requestObject",value:function(e,t,r){return{jsonrpc:"2.0",method:e,id:r,params:t}}},{key:"handleResponse",value:function(e){if(Object.prototype.hasOwnProperty.call(e,"result"))return e.result;if(Object.prototype.hasOwnProperty.call(e,"error")){var t=e.error;throw new qe(t.message,t.data,t.code)}throw Error("The server did not respond correctly.")}},{key:"request",value:(r=S(regeneratorRuntime.mark((function e(t,r){var n,o,i=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.length>2&&void 0!==i[2]?i[2]:We.next,e.next=3,this.session.postBody(this.baseURL,{rpc:this.requestObject(t,r,n)});case 3:return o=e.sent,e.abrupt("return",this.handleResponse(o.data));case 5:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"resetQueue",value:function(){this._batchQueue=[]}},{key:"queue",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:We.next;return this._batchQueue.push(this.requestObject(e,t,r)),this}},{key:"batch",value:(t=S(regeneratorRuntime.mark((function e(){var t,r,n,o=this,i=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.length>0&&void 0!==i[0]&&i[0],r=this._batchQueue,this.resetQueue(),e.next=5,this.session.postBody(this.baseURL,{rpc:r});case 5:return n=e.sent,e.abrupt("return",Be(n,"data.data",[]).map((function(e){if(t)return o.handleResponse(e);try{return o.handleResponse(e)}catch(e){return e}})));case 7:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"rhnode",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:We.next,o={dataid:e,args:r};return this.request(t,o,n)}},{key:"rhnodeQueue",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:We.next,o={dataid:e,args:r};return this.queue(t,o,n)}}]),e}(),Ge=Ve,Qe=function(e){return{auth:function(){return e.get("/api/v1/auth/")}}},He=function(e){return{addablenodetypes:function(t){return e.get("api/v1/nodes/".concat(t,"/addablenodetypes"))},addDocument:function(t){return S(regeneratorRuntime.mark((function r(){var n,o,i,a,s,u,c,l,p,d,f,h,m,y;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:n=t.parent_id,o=t.fileHandler,i=t.apiVersion,a=void 0===i?"v1":i,s=t.name,u=void 0===s?null:s,c=t.options,l=void 0===c?{}:c,console.assert(null!=n,"parent_id cannot be null"),console.assert(null!=o,"fileHandler cannot be null"),console.assert(["v1","v2"].includes(a),"apiVersion must be in ['v1','v2']"),p="api/".concat(a,"/nodes"),r.next=16;break;case 10:return d=r.sent,f=u||undefined.basename(o),h=x(x({},l),{},{type:De.Document,name:f,parent_id:n,file:{file:d,name:f}}),r.abrupt("return",e.postForm(p,h));case 16:return m=u||o.name,y=x(x({},l),{},{type:De.Document,name:m,parent_id:n,file:{file:o,name:m}}),r.abrupt("return",e.postForm(p,y));case 19:case"end":return r.stop()}}),r)})))()},addDocumentMajor:function(t){var r=this;return S(regeneratorRuntime.mark((function n(){var o,i,a,s,u,c,l,p,d,f;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return o=t.parent_id,i=t.fileHandler,a=t.name,s=void 0===a?null:a,u=t.description,c=void 0===u?null:u,l=t.options,p=void 0===l?{}:l,n.next=3,r.addDocument({parent_id:o,fileHandler:i,name:s,options:x(x({},p),{},{advanced_versioning:!0})});case 3:return d=n.sent,f=d.data.id,n.next=7,e.versions.promote({dataid:f,versionNumber:1,description:c});case 7:return n.next=9,e.versions.deleteVersion({dataid:f,versionNumber:1});case 9:return n.abrupt("return",d);case 10:case"end":return n.stop()}}),n)})))()},addItem:function(t,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return e.postBody("api/v2/nodes",x({type:t,parent_id:r,name:n},o))},node:function(t){var r=t.dataid,n=t.apiVersion,o=void 0===n?"v2":n,i=t.params,a=void 0===i?{}:i;return e.get("api/".concat(o,"/nodes/").concat(r),{params:a})},ancestors:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.get("api/v1/nodes/".concat(t,"/ancestors"),{params:r})},volumeInfo:function(t){return e.get("api/v1/volumes/".concat(t))},volumes:function(){return e.get("api/v2/volumes")},addFolder:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.addItem(De.Folder,e,t,r)},addGeneration:function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return this.addItem(De.Generation,e,t,x({original_id:r,version_number:n},o))},nodes:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.get("api/v2/nodes/".concat(t,"/nodes"),{params:r})},children:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.nodes(e,t)},delete:function(t){return e.delete("api/v1/nodes/".concat(t))},download:function(e){return e.dataid,e.apiVersion,e.filePath,Promise.reject("Not implemented yet")},audit:function(t){var r=t.dataid,n=t.apiVersion,o=void 0===n?"v2":n,i=t.params,a=void 0===i?{}:i;return e.get("api/".concat(o,"/nodes/").concat(r,"/audit"),{params:a})}}},$e=function(e){return{start:function(e){var t=this;return this.draftprocesses(e).then((function(e){return get(e,"data.results.draftprocess_id")})).then((function(e){return t.draftprocesses_update(e)}))},draftprocesses:function(t){return e.postForm("api/v2/draftprocesses",{workflow_id:t})},draftprocesses_update:function(t){return e.get("api/v1/forms/draftprocesses/update",{params:{draftprocess_id:t}})},draftprocesses_put:function(t,r){return e.putForm("api/v2/draftprocesses/".concat(t),{body:r})}}},Je=function(e){return{scriptNode:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.get("api/v1/rhcore/".concat(t),{params:r})}}},Xe=function(e){return{search:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.postBody("api/v2/search",x({where:t},r))},regions:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.get("api/v1/regions",t)}}},Ye=function(e){return{USER:0,GROUP:1,userQuery:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"v2",o=x({limit:20,where_type:JSON.stringify([this.USER,this.GROUP]),query:t},r);return e.get("api/".concat(n,"/members"),{params:o})},member:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"v2";return e.get("api/".concat(r,"/members/").concat(t))}}},Ke=function(e){return{addVersion:function(t){return S(regeneratorRuntime.mark((function r(){var n,o,i,a,s,u,c,l,p,d,f,h,m,y;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:n=t.dataid,o=t.fileHandler,i=t.apiVersion,a=void 0===i?"v1":i,s=t.fileName,u=void 0===s?null:s,c=t.options,l=void 0===c?{}:c,console.assert(null!=n,"dataid cannot be null"),console.assert(null!=o,"fileHandler cannot be null"),p="api/".concat(a,"/nodes/").concat(n,"/versions"),r.next=15;break;case 9:return d=r.sent,f=u||undefined.basename(o),h=x({file:{file:d,name:f}},l),r.abrupt("return",e.postForm(p,h));case 15:return m=u||o.name,y=x({file:{file:o,name:m}},l),r.abrupt("return",e.postForm(p,y));case 18:case"end":return r.stop()}}),r)})))()},download:function(e){return S(regeneratorRuntime.mark((function t(){var r,n,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=e.dataid,n=e.version,o=e.filePath,console.assert(null!=r,"dataid cannot be null"),console.assert(null!=n,"version cannot be null"),console.assert(null!=o,"filePath cannot be null"),t.next=8;break;case 8:return t.abrupt("return",Promise.reject("Not implemented yet"));case 9:case"end":return t.stop()}}),t)})))()},list:function(t){return S(regeneratorRuntime.mark((function r(){var n;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n="api/v1/nodes/".concat(t,"/versions"),r.abrupt("return",e.get(n));case 2:case"end":return r.stop()}}),r)})))()},version:function(t){var r=arguments;return S(regeneratorRuntime.mark((function n(){var o,i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return o=r.length>1&&void 0!==r[1]?r[1]:"latest",i="api/v1/nodes/".concat(t,"/versions/").concat(o),n.abrupt("return",e.get(i));case 3:case"end":return n.stop()}}),n)})))()},promote:function(t){return S(regeneratorRuntime.mark((function r(){var n,o,i,a,s;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=t.dataid,o=t.versionNumber,i=t.description,a=void 0===i?null:i,console.assert(null!=n,"dataid cannot be null"),console.assert(null!=o,"number_to_keep must be an integer"),s="api/v2/nodes/".concat(n,"/versions/").concat(o,"/promote"),r.abrupt("return",e.postBody(s,x({},!!a&&{description:a})));case 5:case"end":return r.stop()}}),r)})))()},deleteVersion:function(t){return S(regeneratorRuntime.mark((function r(){var n,o,i,a,s;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=t.dataid,o=t.versionNumber,i=t.apiVersion,a=void 0===i?"v1":i,console.assert(null!=n,"dataid cannot be null"),console.assert(null!=o,"number_to_keep must be an integer"),s="api/".concat(a,"/nodes/").concat(n,"/versions/").concat(o),r.abrupt("return",e.delete(s));case 5:case"end":return r.stop()}}),r)})))()},purge:function(t){return S(regeneratorRuntime.mark((function r(){var n,o,i,a;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=t.dataid,o=t.number_to_keep,i=void 0===o?1:o,console.assert(null!=n,"dataid cannot be null"),console.assert(!isNaN(i),"number_to_keep must be an integer"),a="api/v2/nodes/".concat(n,"/versions"),r.abrupt("return",e.deleteForm(a,{number_to_keep:i}));case 5:case"end":return r.stop()}}),r)})))()}}},ze=function(e){return{run:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="api/v1/nodes/".concat(t,"/output");return e.get(n,{params:r})}}},Ze=Fe,et=Me,tt=Ue,rt={AssocType:-18,BooleanType:5,ClassType:9,DapiNodeType:-72,DapiSessionType:-74,DapiStreamType:-68,DapiVersionType:-69,DateType:-7,DynamicType:-127,ErrorType:1,FileType:-107,FrameType:10,IntegerType:2,JavaObjectType:-42,ListType:-2,LongType:-8,ObjectType:-128,ObjRefType:3,RealType:-4,RecArrayType:-110,RecordType:-109,ScriptType:-3,SocketType:-102,StringType:-1,UAPIType:-196,UndefinedType:0,VoidType:8,WAPIWorkType:-75},nt=function(){function e(t){P(this,e),this.axios=Ge(t)}return L(e,[{key:"nodes",get:function(){return null==this._nodes&&(this._nodes=He(this)),this._nodes}},{key:"auth",get:function(){return null==this._auth&&(this._auth=Qe(this)),this._auth}},{key:"workflow",get:function(){return null==this._workflow&&(this._workflow=$e(this)),this._workflow}},{key:"rhcore",get:function(){return null==this._rhcore&&(this._rhcore=Je(this)),this._rhcore}},{key:"members",get:function(){return null==this._members&&(this._members=Ye(this)),this._members}},{key:"search",get:function(){return null==this._search&&(this._search=Xe(this)),this._search}},{key:"webreports",get:function(){return null==this._webreports&&(this._webreports=ze(this)),this._webreports}},{key:"versions",get:function(){return null==this._versions&&(this._versions=Ke(this)),this._versions}},{key:"dataTypesEnum",get:function(){return rt}},{key:"rpcClient",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/api/v1/rh/rpc/rhnode/";return new tt(this,e)}},{key:"_isObject",value:function(e){return e&&"object"===O(e)&&e.constructor===Object}},{key:"_isString",value:function(e){return"string"==typeof e||e instanceof String}},{key:"_isBoolean",value:function(e){return"boolean"==typeof e}},{key:"objectToForm",value:function(e){for(var t=Ze.createFormData(),r=0,n=Object.entries(e);r<n.length;r++){var o=N(n[r],2),i=o[0],a=o[1];a&&a.name&&a.file?t.append(i,a.file,a.name):Array.isArray(a)||this._isObject(a)||this._isBoolean(a)?t.append(i,JSON.stringify(a)):et(a)||t.append(i,a)}return t}},{key:"get",value:function(){var e;return(e=this.axios).get.apply(e,arguments)}},{key:"putForm",value:function(e,t){var r=this.objectToForm(t);return this.put(e,r)}},{key:"postForm",value:function(e,t){var r=this.objectToForm(t);return this.post(e,r,{maxBodyLength:1/0})}},{key:"patchForm",value:function(e,t){var r=this.objectToForm(t);return this.patch(e,r)}},{key:"deleteForm",value:function(e,t){var r=this.objectToForm(t);return this.delete(e,r)}},{key:"putBody",value:function(e,t){return this.putForm(e,{body:t})}},{key:"postBody",value:function(e,t){return this.postForm(e,{body:t})}},{key:"patchBody",value:function(e,t){return this.patchForm(e,{body:t})}},{key:"deleteBody",value:function(e,t){return this.deleteForm(e,{body:t})}},{key:"post",value:function(){var e;return(e=this.axios).post.apply(e,arguments)}},{key:"put",value:function(){var e;return(e=this.axios).put.apply(e,arguments)}},{key:"delete",value:function(){var e;return(e=this.axios).delete.apply(e,arguments)}},{key:"options",value:function(){var e;return(e=this.axios).options.apply(e,arguments)}},{key:"patch",value:function(){var e;return(e=this.axios).patch.apply(e,arguments)}}]),e}(),ot=nt,it=T.Session=ot;e.Session=it,e.default=T,Object.defineProperty(e,"__esModule",{value:!0})}));
2//# sourceMappingURL=index.umd.min.js.map