@hpcc-js/comms 3.1.0 → 3.3.0

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.
Files changed (46) hide show
  1. package/dist/index.browser.js +6318 -0
  2. package/dist/index.browser.js.map +1 -0
  3. package/dist/index.browser.umd.cjs +7 -0
  4. package/dist/index.browser.umd.cjs.map +1 -0
  5. package/dist/index.node.js +2 -2
  6. package/dist/index.node.js.map +3 -3
  7. package/package.json +23 -18
  8. package/src/__package__.ts +2 -2
  9. package/src/ecl/activity.ts +1 -3
  10. package/src/ecl/logicalFile.ts +4 -1
  11. package/src/ecl/query.ts +4 -1
  12. package/src/ecl/targetCluster.ts +1 -3
  13. package/src/ecl/topology.ts +4 -1
  14. package/src/espConnection.ts +8 -0
  15. package/src/index.browser.ts +1 -0
  16. package/src/index.node.ts +1 -1
  17. package/src/services/wsAccount.ts +1 -1
  18. package/src/services/wsCloud.ts +1 -1
  19. package/src/services/wsDali.ts +1 -1
  20. package/src/services/wsEcl.ts +1 -1
  21. package/src/services/wsElk.ts +1 -1
  22. package/src/services/wsMachine.ts +1 -1
  23. package/src/services/wsPackageProcess.ts +1 -1
  24. package/src/services/wsResources.ts +1 -1
  25. package/src/services/wsWorkunits.ts +0 -8
  26. package/types/__package__.d.ts +2 -2
  27. package/types/ecl/logicalFile.d.ts +1 -1
  28. package/types/ecl/query.d.ts +1 -1
  29. package/types/ecl/topology.d.ts +1 -1
  30. package/types/espConnection.d.ts +2 -0
  31. package/types/index.browser.d.ts +1 -0
  32. package/types/index.node.d.ts +1 -1
  33. package/types/services/wsAccount.d.ts +1 -1
  34. package/types/services/wsCloud.d.ts +1 -1
  35. package/types/services/wsDali.d.ts +1 -1
  36. package/types/services/wsEcl.d.ts +1 -1
  37. package/types/services/wsElk.d.ts +1 -1
  38. package/types/services/wsMachine.d.ts +1 -1
  39. package/types/services/wsPackageProcess.d.ts +1 -1
  40. package/types/services/wsResources.d.ts +1 -1
  41. package/types/services/wsWorkunits.d.ts +0 -3
  42. package/dist/index.js +0 -7
  43. package/dist/index.js.map +0 -7
  44. package/src/index.ts +0 -1
  45. /package/src/{index-common.ts → index.common.ts} +0 -0
  46. /package/types/{index-common.d.ts → index.common.d.ts} +0 -0
package/dist/index.js DELETED
@@ -1,7 +0,0 @@
1
- var fa="@hpcc-js/comms",ha="3.1.0",ma="2.107.0";function wn(t,e){for(;t.length<e;)t="0"+t;return t}function le(t,e){if(e.length===0)return t;for(let s=0;s<e.length;++s){let r=e.charCodeAt(s);t=(t<<5)-t+r,t|=0}return t<0?t*-2:t}function Gn(t,e,s){return typeof e.hashSum=="function"?e.hashSum():Object.keys(e).sort().reduce((r,n)=>$s(r,e[n],n,s),t)}function $s(t,e,s,r){let n=le(le(le(t,s),Qn(e)),typeof e);return e===null?le(n,"null"):e===void 0?le(n,"undefined"):typeof e=="object"?r.indexOf(e)!==-1?le(n,"[Circular]"+s):(r.push(e),Gn(n,e,r)):le(n,e.toString())}function Qn(t){return Object.prototype.toString.call(t)}function zs(t){return wn($s(0,t,"",[]).toString(16),8)}var T=class{_cache={};_calcID;static hash(...t){return zs({...t})}constructor(t){this._calcID=t}has(t){return this._calcID(t)in this._cache}set(t){return this._cache[this._calcID(t)]=t,t}get(t,e){return this._cache[this._calcID(t)]||(e?this.set(e()):null)}};function Zs(t,e){let s={};return(...r)=>{let n=zs(r);return s[n]||(s[n]={clockStart:Date.now(),promise:t(...r).then(i=>(e===void 0?s[n]=null:setTimeout(()=>{s[n]=null},Math.max(e-(Date.now()-s[n].clockStart),0)),i)).catch(i=>{throw s[n]=null,i})}),s[n].promise}}function Ys(t,e){let s,r=new Promise((n,i)=>{s=setTimeout(()=>{clearTimeout(s),i("Timed out in "+t+"ms.")},t)});return Promise.race([e,r]).then(n=>(clearTimeout(s),n)).catch(n=>{throw clearTimeout(s),n})}function er(t){if(t){if(!isNaN(Number(t)))return Number(t)}else return 0;let e=t.indexOf("ns");if(e!==-1)return parseFloat(t.substr(0,e))/1e9;let s=t.indexOf("ms");if(s!==-1)return parseFloat(t.substr(0,s))/1e3;let r=t.indexOf("s");if(r!==-1&&t.indexOf("days")===-1)return parseFloat(t.substr(0,r));let n=t.split(" days "),i=n.length>1?parseFloat(n[0]):0,o=n.length>1?n[1]:n[0],a=0,c=o.split(":").reverse();for(let p=0;p<c.length;++p)a+=parseFloat(c[p])*Math.pow(60,p);return i*24*60*60+a}var is=class{_graph;parent;props={};constructor(t,e){this._graph=t,this.parent=e}},Fe=class tr extends is{subgraphs=[];vertices=[];edges=[];_;constructor(e,s,r){super(e,s),s&&s._addSubgraph(this),this._=r}remove(e=!0){this._graph.removeSubgraph(this,e)}createSubgraph(e){return this._graph.createSubgraph(this,e)}_addSubgraph(e){if(this.subgraphs.indexOf(e)>=0)throw new Error("Subgraph already exists");this.subgraphs.push(e)}_removeSubgraph(e){let s=this.subgraphs.indexOf(e);if(s<0)throw new Error("Subgraph does not exist");this.subgraphs.splice(s,1)}removeAllSubgraphs(){for(let e=this.subgraphs.length-1;e>=0;--e)this._graph.removeSubgraph(this.subgraphs[e],!0)}createVertex(e){return this._graph.createVertex(this,e)}_addVertex(e){if(this.vertices.indexOf(e)>=0)throw new Error("Vertex already exists");this.vertices.push(e)}_removeVertex(e){let s=this.vertices.indexOf(e);if(s<0)throw new Error("Vertex does not exist");this.vertices.splice(s,1)}removeAllVertices(){for(let e=this.vertices.length-1;e>=0;--e)this._graph.removeVertex(this.vertices[e],!0)}createEdge(e,s,r){return this._graph.createEdge(this,e,s,r)}_addEdge(e){if(this.edges.indexOf(e)>=0)throw new Error("Edge already exists");this.edges.push(e)}_removeEdge(e){let s=this.edges.indexOf(e);if(s<0)throw new Error("Edge does not exist");this.edges.splice(s,1)}_add(e){e instanceof tr?this._addSubgraph(e):e instanceof Ee?this._addVertex(e):this._addEdge(e)}},Ee=class extends is{inEdges=[];outEdges=[];get edges(){return[...this.inEdges,...this.outEdges]}_;constructor(t,e,s){super(t,e),e._addVertex(this),this._=s}remove(t=!0,e){return this._graph.removeVertex(this,t,e)}addInEdge(t){this.inEdges.push(t)}removeInEdge(t){let e=this.inEdges.indexOf(t);if(e<0)throw new Error("In edge does not exist");this.inEdges.splice(e,1)}addOutEdge(t){this.outEdges.push(t)}removeOutEdge(t){let e=this.outEdges.indexOf(t);if(e<0)throw new Error("Out edge does not exist");this.outEdges.splice(e,1)}},Le=class extends is{source;target;_;constructor(t,e,s,r,n){if(super(t,e),!s)throw new Error("Missing source vertex");if(!r)throw new Error("Missing target vertex");e._addEdge(this),this.source=s,this.source.addOutEdge(this),this.target=r,this.target.addInEdge(this),this._=n}remove(){this._graph.removeEdge(this)}},os=class{root;_allSubgraphs=[];_allSubgraphsMap={};_allVertices=[];_allVerticesMap={};_allEdges=[];_allEdgesMap={};idOf;constructor(t=s=>""+s._,e){this.root=new Fe(this,null,e),this.idOf=t}createSubgraph(t,e){let s=new Fe(this,t||this.root,e);return this._allSubgraphs.push(s),this._allSubgraphsMap[this.idOf(s)]=s,s}removeSubgraph(t,e=!0){let s=this._allSubgraphs.indexOf(t);if(s<0)throw new Error("Subgraph does not exist");this._allSubgraphs.splice(s,1),delete this._allSubgraphsMap[this.idOf(t)],t.parent&&t.parent._removeSubgraph(t),t.edges.forEach(r=>e?this.removeEdge(r):t.parent._addEdge(r)),t.vertices.forEach(r=>e?this.removeVertex(r,e):t.parent._addVertex(r)),t.subgraphs.forEach(r=>e?this.removeSubgraph(r,e):t.parent._addSubgraph(r))}get subgraphs(){return this._allSubgraphs}subgraph(t){return this._allSubgraphsMap[t]}createVertex(t,e){let s=new Ee(this,t,e);return this._allVertices.push(s),this._allVerticesMap[this.idOf(s)]=s,s}removeVertex(t,e=!0,s){let r=this._allVertices.indexOf(t);if(r<0)throw new Error("Vertex does not exist");this._allVertices.splice(r,1),delete this._allVerticesMap[this.idOf(t)],t.parent&&t.parent._removeVertex(t),e||t.inEdges.forEach(n=>{t.outEdges.forEach(i=>{this.createEdge(this.root,n.source,i.target,s?s(n.source._,i.target._):void 0)})}),t.inEdges.forEach(n=>this.removeEdge(n)),t.outEdges.forEach(n=>this.removeEdge(n))}get vertices(){return this._allVertices}vertex(t){return this._allVerticesMap[t]}createEdge(t,e,s,r){let n=new Le(this,t,e,s,r);return this._allEdges.push(n),this._allEdgesMap[this.idOf(n)]=n,n}removeEdge(t){let e=this._allEdges.indexOf(t);if(e<0)throw new Error("Edge does not exist");this._allEdges.splice(e,1),delete this._allEdgesMap[this.idOf(t)],t.parent&&t.parent._removeEdge(t),t.source.removeOutEdge(t),t.target.removeInEdge(t)}get edges(){return this._allEdges}edge(t){return this._allEdgesMap[t]}_walk(t,e){for(let s of t.subgraphs)switch(e(s)){case"abort":return!0;case"stepover":break;default:if(this._walk(s,e))return!0}for(let s of t.vertices)if(e(s)==="abort")return!0}walk(t){this._walk(this.root,t);for(let e of this._allEdges)if(t(e)==="abort")return!0}clone(){let t=this.constructor,e=new t(this.idOf,this.root._),s=Vn();return s.put(this.root,e.root),this.walk(r=>{let n=s.get(r.parent);if(r instanceof Fe)s.put(r,n.createSubgraph(r._));else if(r instanceof Ee)s.put(r,n.createVertex(r._));else if(r instanceof Le){let i=s.get(r.source),o=s.get(r.target);n.createEdge(i,o,r._)}}),e}};function Vn(){let t=[],e=[];return{put(s,r){let n=t.indexOf(s);n===-1?(t.push(s),e.push(r)):e[n]=r},get(s){return e[t.indexOf(s)]}}}var Ks=Array.isArray,Hs=Object.keys,On=Object.prototype.hasOwnProperty;function rs(t,e,s=!1){if(t===e)return!0;if(t&&e){if(typeof t=="object"&&typeof e=="object"){let r=Ks(t),n=Ks(e),i,o,a;if(r&&n){if(o=t.length,o!==e.length)return!1;for(i=o;i--!==0;)if(!rs(t[i],e[i],s))return!1;return!0}if(r!==n)return!1;let c=t instanceof Date,p=e instanceof Date;if(c!==p)return!1;if(c&&p)return t.getTime()===e.getTime();let u=t instanceof RegExp,l=e instanceof RegExp;if(u!==l)return!1;if(u&&l)return t.toString()===e.toString();let d=Hs(t);if(o=d.length,o!==Hs(e).length)return!1;for(i=o;i--!==0;)if(!On.call(e,d[i]))return!1;for(i=o;i--!==0;)if(a=d[i],!rs(t[a],e[a],s))return!1;return!0}else if(!s&&typeof t=="function"&&typeof e=="function")return t.toString()===e.toString()}return t!==t&&e!==e}var Js=typeof globalThis<"u"?globalThis:window;var sr=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,Sa=sr&&process.env!=null&&(process.env.TRAVIS!=null||process.env.GITHUB_ACTIONS!=null);var Ae=class{stack=[];push(t){return this.stack.push(t),t}pop(){return this.stack.pop()}top(){return this.stack.length?this.stack[this.stack.length-1]:void 0}depth(){return this.stack.length}},it=(t=>(t[t.debug=0]="debug",t[t.info=1]="info",t[t.notice=2]="notice",t[t.warning=3]="warning",t[t.error=4]="error",t[t.critical=5]="critical",t[t.alert=6]="alert",t[t.emergency=7]="emergency",t))(it||{}),qn={debug:"cyan",info:"green",notice:"grey",warning:"blue",error:"red",critical:"magenta",alert:"magenta",emergency:"magenta"},Bn=class{write(t,e,s,r){sr?console.log(`[${t}] ${it[e].toUpperCase()} ${s}: ${r}`):console.log(`[${t}] %c${it[e].toUpperCase()}%c ${s}: ${r}`,`color:${qn[it[e]]}`,"")}},jn=class{static _instance;_levelStack=new Ae;_level=1;_filter="";_writer=new Bn;static Instance(){return this._instance||(this._instance=new this)}constructor(){}stringify(t){let e=[];return JSON.stringify(t,function(s,r){if(typeof r=="object"&&r!==null){if(e.indexOf(r)!==-1)return;e.push(r)}return r},2)}writer(t){return t===void 0?this._writer:(this._writer=t,this)}log(t,e,s){if(t<this._level||this._filter&&this._filter!==e)return;let r=new Date().toISOString();this._writer.rawWrite?this._writer.rawWrite(r,t,e,s):(typeof s!="string"&&(s=this.stringify(s)),this._writer.write&&this._writer.write(r,t,e,s))}debug(t,e){this.log(0,t,e)}info(t,e){this.log(1,t,e)}notice(t,e){this.log(2,t,e)}warning(t,e){this.log(3,t,e)}error(t,e){this.log(4,t,e)}critical(t,e){this.log(5,t,e)}alert(t,e){this.log(6,t,e)}emergency(t,e){this.log(7,t,e)}level(t){return t===void 0?this._level:(this._level=t,this)}pushLevel(t){return this._levelStack.push(this._level),this._level=t,this}popLevel(){return this._level=this._levelStack.pop(),this}filter(t){return t===void 0?this._filter:(this._filter=t,this)}},X=jn.Instance(),Xn=class{_scopeID;constructor(t){this._scopeID=t}debug(t){X.debug(this._scopeID,t)}info(t){X.info(this._scopeID,t)}notice(t){X.notice(this._scopeID,t)}warning(t){X.warning(this._scopeID,t)}error(t){X.error(this._scopeID,t)}critical(t){X.critical(this._scopeID,t)}alert(t){X.alert(this._scopeID,t)}emergency(t){X.emergency(this._scopeID,t)}pushLevel(t){return X.pushLevel(t),this}popLevel(){return X.popLevel(),this}};function O(t,e=!1){return e&&X.filter(t),new Xn(t)}function Kn(t,e){if(!(t===void 0||e===void 0)){for(let s of t.split(".")){if(!e.hasOwnProperty(s))return;e=e[s]}return e}}function $(t,e){return Kn(t,e)!==void 0}function Hn(t,e){let s={};for(let r in e){if(!e.hasOwnProperty(r)||r==="__proto__"||r==="constructor")continue;let n=e[r];n instanceof Array||typeof n=="object"&&(n=ot(t[r],n)),(!(r in t)||t[r]!==n&&(!(r in s)||s[r]!==n))&&(t[r]=n)}return t}function ot(t={},...e){if(typeof t!="object")throw new Error(`Destination "${t}" must be an object.`);for(let s of e)Hn(t,s);return t}function at(t={},...e){return ot(t,...e)}var ns;(function(){if(Js.requestAnimationFrame)ns=Js.requestAnimationFrame;else{let t=0;ns=function(e){let s=new Date().getTime(),r=Math.max(0,16-(s-t)),n=setTimeout(()=>e(s+r),r);return t=s+r,n}}})();var as=class{get canConflate(){return!1}conflate(t){return!1}void(){return!1}},us=class{_observerID=0;_observers=[];_messageBuffer=[];constructor(){}observers(){return this._observers}messages(){let t=[];return this._messageBuffer.forEach(e=>{t.some(s=>s.canConflate&&s.conflate(e))||t.push(e)}),t}dispatchAll(){this.dispatch(this.messages()),this.flush()}dispatch(t){t.length!==0&&this.observers().forEach(e=>{let s=t.filter(r=>!r.void()&&(e.type===void 0||r instanceof e.type));s.length&&e.callback(s)})}hasObserver(){return this._observers.length>0}flush(){this._messageBuffer=[]}send(t){this.dispatch([t])}post(t){this._messageBuffer.push(t),ns(()=>this.dispatchAll())}attach(t,e){let s=this,r=++this._observerID;return this._observers.push({id:r,type:e,callback:t}),{release(){s._observers=s._observers.filter(n=>n.id!==r)},unwatch(){this.release()}}}},we=class{name="";$={};_children=[];content="";constructor(t){this.name=t}appendAttribute(t,e){this.$[t]=e}appendContent(t){this.content+=t}appendChild(t){this._children.push(t)}children(t){return t===void 0?this._children:this._children.filter(e=>e.name===t)}},cs=class{root;stack=new Ae;constructor(){}walkDoc(t){let e=this._startXMLNode(t);if(t.attributes)for(let s=0;s<t.attributes.length;++s){let r=t.attributes.item(s);this.attributes(r.nodeName,r.nodeValue)}if(this.startXMLNode(e),t.childNodes)for(let s=0;s<t.childNodes.length;++s){let r=t.childNodes.item(s);r.nodeType===r.TEXT_NODE?this.characters(r.nodeValue):this.walkDoc(r)}this.endXMLNode(this.stack.pop())}_startXMLNode(t){let e=new we(t.nodeName);return this.stack.depth()?this.stack.top().appendChild(e):this.root=e,this.stack.push(e)}parse(t){let e=new DOMParser().parseFromString(t,"application/xml");this.startDocument(),this.walkDoc(e),this.endDocument()}startDocument(){}endDocument(){}startXMLNode(t){}endXMLNode(t){}attributes(t,e){this.stack.top().appendAttribute(t,e)}characters(t){this.stack.top().appendContent(t)}},Jn=class extends cs{startXMLNode(t){switch(super.startXMLNode(t),t.name){case"xs:element":break;case"xs:simpleType":break;default:break}}endXMLNode(t){switch(t.name){case"xs:element":break;case"xs:simpleType":break;default:break}super.endXMLNode(t)}};function rr(t){let e=new Jn;return e.parse(t),e.root}var $n=class extends as{constructor(t,e,s){super(),this.property=t,this.newValue=e,this.oldValue=s}get canConflate(){return!0}conflate(t){return this.property===t.property?(this.newValue=t.newValue,!0):!1}void(){return rs(this.newValue,this.oldValue)}},P=class{_espState={};_dispatch=new us;_monitorHandle;_monitorTickCount=0;clear(t){this._espState={},t!==void 0&&this.set(t),this._monitorTickCount=0}get(t,e){return t===void 0?this._espState:this.has(t)?this._espState[t]:e}set(t,e){if(typeof t=="string")return this.setSingle(t,e);this.setAll(t)}setSingle(t,e){let s=this._espState[t];this._espState[t]=e,this._dispatch.post(new $n(t,e,s))}setAll(t){for(let e in t)t.hasOwnProperty(e)&&this.setSingle(e,t[e])}has(t){return this._espState[t]!==void 0}addObserver(t,e,s){if(this.isCallback(e)){if(t!=="changed")throw new Error("Invalid eventID: "+t);return this._dispatch.attach(r=>{e(r.map(n=>({id:n.property,oldValue:n.oldValue,newValue:n.newValue})))})}else{if(t!=="propChanged")throw new Error("Invalid eventID: "+t);return this._dispatch.attach(r=>{let n=r.filter(i=>i.property===e);if(n.length){n.length>1&&console.warn("Should only be 1 message?");let i=n[n.length-1];s({id:i.property,oldValue:i.oldValue,newValue:i.newValue})}})}}on(t,e,s){return this.addObserver(t,e,s),this}isCallback(t){return typeof t=="function"}hasEventListener(){return this._dispatch.hasObserver()}async refresh(t=!1){return await Promise.resolve(),this}_monitor(){if(this._monitorHandle){this._monitorTickCount=0;return}this._monitorHandle=setTimeout(()=>{(this.hasEventListener()?this.refresh():Promise.resolve()).then(()=>{this._monitor()}),delete this._monitorHandle},this._monitorTimeoutDuration())}_monitorTimeoutDuration(){return++this._monitorTickCount,this._monitorTickCount<=1?0:3e4}watch(t,e=!0){if(typeof t!="function")throw new Error("Invalid Callback");e&&setTimeout(()=>{let r=this.get(),n=[];for(let i in r)r.hasOwnProperty(r)&&n.push({id:i,newValue:r[i],oldValue:void 0});t(n)},0);let s=this.addObserver("changed",t);return this._monitor(),s}};function z(...t){let e=t.reduce((r,n)=>(r.length>0&&(n=n.replace(/^\//,"")),n=n.replace(/\/$/,""),[...r,...n.split("/")]),[]),s=[];for(let r of e)if(r!=="."){if(r===".."){s.pop();continue}s.push(r)}return s.join("/")}var nr=O("comms/connection.ts");function Aa(t){return"baseUrl"in t}var zn={type:"post",baseUrl:"",userID:"",password:"",rejectUnauthorized:!0,timeoutSecs:60};function wa(t){return typeof t.opts=="function"&&typeof t.send=="function"&&typeof t.clone=="function"}function K(t,e){return e===void 0||e===!0?encodeURIComponent(t):""+t}function pe(t,e=!0,s=""){if(s&&(s+="."),typeof t!="object")return K(t,e);let r=[];for(let n in t)if(t.hasOwnProperty(n))if(t[n]instanceof Array){let i=!1;t[n].forEach((o,a)=>{typeof o=="object"?(i=!0,r.push(pe(o,e,s+K(`${n}.${a}`,e)))):r.push(s+K(`${n}_i${a}`,e)+"="+pe(o,e))}),i&&r.push(s+K(`${n}.itemcount`,e)+"="+t[n].length)}else typeof t[n]=="object"?t[n]&&t[n].Item instanceof Array?(r.push(pe(t[n].Item,e,s+K(n,e))),r.push(s+K(`${n}.itemcount`,e)+"="+t[n].Item.length)):r.push(pe(t[n],e,s+K(n,e))):t[n]!==void 0?r.push(s+K(n,e)+"="+K(t[n],e)):r.push(s+K(n,e));return r.join("&")}function Zn(t){return JSON.parse(t)}function Yn(t,e,s={},r="json",n){return n&&console.warn("Header attributes ignored for JSONP connections"),new Promise((i,o)=>{let a=t.timeoutSecs*1e3,c=5e3,p="jsonp_callback_"+Math.round(Math.random()*999999);window[p]=function(I){a=0,U(),i(r==="json"&&typeof I=="string"?Zn(I):I)};let u=document.createElement("script"),l=z(t.baseUrl,e);l+=l.indexOf("?")>=0?"&":"?",u.src=l+"jsonp="+p+"&"+pe(s,t.encodeRequest),document.body.appendChild(u);let d=setInterval(function(){a<=0?clearInterval(d):(a-=c,a<=0?(clearInterval(d),nr.error("Request timeout: "+u.src),U(),o(Error("Request timeout: "+u.src))):nr.debug("Request pending ("+a/1e3+" sec): "+u.src))},c);function U(){delete window[p],document.body.removeChild(u)}})}function ei(t){return t.userID?{Authorization:`Basic ${btoa(`${t.userID}:${t.password}`)}`}:{}}var ut={};function ir(t,e,s,r,n){r={...ei(t),...r},s={credentials:ut[t.baseUrl]?"omit":"include",...s,headers:r},fetch.__setGlobalDispatcher&&fetch.__setGlobalDispatcher(fetch.__defaultAgent),t.baseUrl.indexOf("https:")===0&&(t.rejectUnauthorized===!1&&fetch.__rejectUnauthorizedAgent?fetch.__setGlobalDispatcher?fetch.__setGlobalDispatcher(fetch.__rejectUnauthorizedAgent):s.agent=fetch.__rejectUnauthorizedAgent:fetch.__trustwaveAgent&&(s.agent=fetch.__trustwaveAgent));function i(o){if(o.ok)return n==="json"?o.json():o.text();throw new Error(o.statusText)}return Ys(t.timeoutSecs*1e3,fetch(z(t.baseUrl,e),s).then(i).catch(o=>(s.credentials=ut[t.baseUrl]?"include":"omit",fetch(z(t.baseUrl,e),s).then(i).then(a=>(ut[t.baseUrl]=!ut[t.baseUrl],a)))))}function ti(t,e,s,r="json",n){s.upload_&&(delete s.upload_,e+="?upload_");let i;return s.abortSignal_&&(i=s.abortSignal_,delete s.abortSignal_),ir(t,e,{method:"post",body:pe(s,t.encodeRequest),signal:i},{"Content-Type":"application/x-www-form-urlencoded",...n},r)}function si(t,e,s,r="json",n){let i;return s.abortSignal_&&(i=s.abortSignal_,delete s.abortSignal_),ir(t,`${e}?${pe(s,t.encodeRequest)}`,{method:"get",signal:i},{...n},r)}function ri(t,e,s,r="json",n){let i;switch(t.type){case"jsonp":i=Yn(t,e,s,r,n);break;case"get":i=si(t,e,s,r,n);break;case"post":default:i=ti(t,e,s,r,n);break}return i}var ct=ri;function Ga(t){let e=ct;return t&&(ct=t),e}var ls=class t{_opts;get baseUrl(){return this._opts.baseUrl}constructor(e){this.opts(e)}opts(e){return arguments.length===0?this._opts:(this._opts={...zn,...e},this)}send(e,s,r="json",n){return this._opts.hookSend?this._opts.hookSend(this._opts,e,s,r,ct,n):ct(this._opts,e,s,r,n)}clone(){return new t(this.opts())}},lt=function(t){return new ls(t)};function Qa(t){let e=lt;return lt=t,e}function ni(t){return Object.prototype.toString.call(t)==="[object Array]"}var Y=class extends Error{isESPExceptions=!0;action;request;Source;Exception;constructor(e,s,r){super("ESPException: "+r.Source),this.action=e,this.request=s,this.Source=r.Source,this.Exception=r.Exception,r.Exception.length?this.message=`${r.Exception[0].Code}: ${r.Exception[0].Message}`:this.message=""}};function Ka(t){return t instanceof Y||t.isESPExceptions&&Array.isArray(t.Exception)}function ii(t){return t.send!==void 0}var Ge=class t{_connection;get baseUrl(){return this._connection.opts().baseUrl}_service;_version;constructor(e,s,r){this._connection=ii(e)?e:lt(e),this._service=s,this._version=r}service(e){return e===void 0?this._service:(this._service=e,this)}version(e){return e===void 0?this._version:(this._version=e,this)}toESPStringArray(e,s){if(ni(e[s])){for(let r=0;r<e[s].length;++r)e[s+"_i"+r]=e[s][r];delete e[s]}return e}opts(e){return e===void 0?this._connection.opts():(this._connection.opts(e),this)}send(e,s={},r="json",n=!1,i,o){let a={...s,ver_:this._version};n&&(a.upload_=!0),i&&(a.abortSignal_=i);let c,p="json";switch(r){case"text":c=z(this._service,e),p="text";break;case"xsd":c=z(this._service,e+".xsd"),p="text";break;case"json2":c=z(this._service,e+"/json"),r="json",e=e.split("/").pop();break;default:c=z(this._service,e+".json")}return this._connection.send(c,a,p).then(u=>{if(r==="json"){let l;if(u&&u.Exceptions)throw new Y(e,a,u.Exceptions);if(u&&(l=u[o||e+"Response"]),!l)throw new Y(e,a,{Source:"ESPConnection.send",Exception:[{Code:0,Message:"Missing Response"}]});return l}return u}).catch(u=>{throw u.isESPExceptions?u:new Y(e,a,{Source:"ESPConnection.send",Exception:[{Code:0,Message:u.message}]})})}clone(){return new t(this._connection.clone(),this._service,this._version)}},S=class{_connection;get baseUrl(){return this._connection.opts().baseUrl}constructor(e,s,r){this._connection=new Ge(e,s,r)}};var Qe;(e=>{let t;(c=>(c.Delete="Delete",c.Protect="Protect",c.Unprotect="Unprotect",c.Restore="Restore",c.SetToFailed="SetToFailed",c.Archive="Archive"))(t=e.DFUWUActions||={})})(Qe||={});var pt=class extends S{constructor(e){super(e,"FileSpray","1.26")}AbortDFUWorkunit(e){return this._connection.send("AbortDFUWorkunit",e,"json",!1,void 0,"AbortDFUWorkunitResponse")}Copy(e){return this._connection.send("Copy",e,"json",!1,void 0,"CopyResponse")}CreateDFUPublisherWorkunit(e){return this._connection.send("CreateDFUPublisherWorkunit",e,"json",!1,void 0,"CreateDFUPublisherWorkunitResponse")}CreateDFUWorkunit(e){return this._connection.send("CreateDFUWorkunit",e,"json",!1,void 0,"CreateDFUWorkunitResponse")}DFUWUFile(e){return this._connection.send("DFUWUFile",e,"json",!1,void 0,"DFUWUFileResponse")}DFUWUSearch(e){return this._connection.send("DFUWUSearch",e,"json",!1,void 0,"DFUWUSearchResponse")}DFUWorkunitsAction(e){return this._connection.send("DFUWorkunitsAction",e,"json",!1,void 0,"DFUWorkunitsActionResponse")}DeleteDFUWorkunit(e){return this._connection.send("DeleteDFUWorkunit",e,"json",!1,void 0,"DeleteDFUWorkunitResponse")}DeleteDFUWorkunits(e){return this._connection.send("DeleteDFUWorkunits",e,"json",!1,void 0,"DeleteDFUWorkunitsResponse")}DeleteDropZoneFiles(e){return this._connection.send("DeleteDropZoneFiles",e,"json",!1,void 0,"DFUWorkunitsActionResponse")}Despray(e){return this._connection.send("Despray",e,"json",!1,void 0,"DesprayResponse")}DfuMonitor(e){return this._connection.send("DfuMonitor",e,"json",!1,void 0,"DfuMonitorResponse")}DropZoneFileSearch(e){return this._connection.send("DropZoneFileSearch",e,"json",!1,void 0,"DropZoneFileSearchResponse")}DropZoneFiles(e){return this._connection.send("DropZoneFiles",e,"json",!1,void 0,"DropZoneFilesResponse")}EchoDateTime(e){return this._connection.send("EchoDateTime",e,"json",!1,void 0,"EchoDateTimeResponse")}FileList(e){return this._connection.send("FileList",e,"json",!1,void 0,"FileListResponse")}GetDFUExceptions(e){return this._connection.send("GetDFUExceptions",e,"json",!1,void 0,"GetDFUExceptionsResponse")}GetDFUProgress(e){return this._connection.send("GetDFUProgress",e,"json",!1,void 0,"ProgressResponse")}GetDFUServerQueues(e){return this._connection.send("GetDFUServerQueues",e,"json",!1,void 0,"GetDFUServerQueuesResponse")}GetDFUWorkunit(e){return this._connection.send("GetDFUWorkunit",e,"json",!1,void 0,"GetDFUWorkunitResponse")}GetDFUWorkunits(e){return this._connection.send("GetDFUWorkunits",e,"json",!1,void 0,"GetDFUWorkunitsResponse")}GetRemoteTargets(e){return this._connection.send("GetRemoteTargets",e,"json",!1,void 0,"GetRemoteTargetsResponse")}GetSprayTargets(e){return this._connection.send("GetSprayTargets",e,"json",!1,void 0,"GetSprayTargetsResponse")}OpenSave(e){return this._connection.send("OpenSave",e,"json",!1,void 0,"OpenSaveResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"FileSprayPingResponse")}Rename(e){return this._connection.send("Rename",e,"json",!1,void 0,"RenameResponse")}Replicate(e){return this._connection.send("Replicate",e,"json",!1,void 0,"ReplicateResponse")}ShowResult(e){return this._connection.send("ShowResult",e,"json",!1,void 0,"ShowResultResponse")}SprayFixed(e){return this._connection.send("SprayFixed",e,"json",!1,void 0,"SprayFixedResponse")}SprayVariable(e){return this._connection.send("SprayVariable",e,"json",!1,void 0,"SprayResponse")}SubmitDFUWorkunit(e){return this._connection.send("SubmitDFUWorkunit",e,"json",!1,void 0,"SubmitDFUWorkunitResponse")}UpdateDFUWorkunit(e){return this._connection.send("UpdateDFUWorkunit",e,"json",!1,void 0,"UpdateDFUWorkunitResponse")}};var oi=(u=>(u[u.unknown=0]="unknown",u[u.scheduled=1]="scheduled",u[u.queued=2]="queued",u[u.started=3]="started",u[u.aborted=4]="aborted",u[u.failed=5]="failed",u[u.finished=6]="finished",u[u.monitoring=7]="monitoring",u[u.aborting=8]="aborting",u[u.notfound=999]="notfound",u))(oi||{}),ge=class extends pt{DFUWUFileEx(e){return this._connection.send("DFUWUFile",e,"text")}SprayFixedEx(e){return this._connection.send("SprayFixed",e)}SprayVariableEx(e){return this._connection.send("SprayVariable",e,"json",!1,null,"SprayResponse")}DesprayEx(e){return this._connection.send("Despray",e)}UpdateDFUWorkunitEx(e){return this._connection.send("UpdateDFUWorkunit",e,"json",!1,void 0,"UpdateDFUWorkunitResponse")}};var or;(o=>{let t;(p=>(p.User="User",p.Group="Group"))(t=o.ViewMemberType||={});let e;(d=>(d.username="username",d.fullname="fullname",d.passwordexpiration="passwordexpiration",d.employeeID="employeeID",d.employeeNumber="employeeNumber"))(e=o.UserSortBy||={});let s;(p=>(p.Name="Name",p.ManagedBy="ManagedBy"))(s=o.GroupSortBy||={});let r;(u=>(u.Any="Any",u.User="User",u.Group="Group"))(r=o.AccountTypeReq||={});let n;(p=>(p.Name="Name",p.Type="Type"))(n=o.ResourcePermissionSortBy||={});let i;(c=>c.Name="Name")(i=o.ResourceSortBy||={})})(or||={});var gt=class extends S{constructor(e){super(e,"ws_access","1.17")}AccountPermissions(e){return this._connection.send("AccountPermissions",e,"json",!1,void 0,"AccountPermissionsResponse")}AccountPermissionsV2(e){return this._connection.send("AccountPermissionsV2",e,"json",!1,void 0,"AccountPermissionsV2Response")}AddUser(e){return this._connection.send("AddUser",e,"json",!1,void 0,"AddUserResponse")}AddView(e){return this._connection.send("AddView",e,"json",!1,void 0,"AddViewResponse")}AddViewColumn(e){return this._connection.send("AddViewColumn",e,"json",!1,void 0,"AddViewColumnResponse")}AddViewMember(e){return this._connection.send("AddViewMember",e,"json",!1,void 0,"AddViewMemberResponse")}ClearPermissionsCache(e){return this._connection.send("ClearPermissionsCache",e,"json",!1,void 0,"ClearPermissionsCacheResponse")}DeleteView(e){return this._connection.send("DeleteView",e,"json",!1,void 0,"DeleteViewResponse")}DeleteViewColumn(e){return this._connection.send("DeleteViewColumn",e,"json",!1,void 0,"DeleteViewColumnResponse")}DeleteViewMember(e){return this._connection.send("DeleteViewMember",e,"json",!1,void 0,"DeleteViewMemberResponse")}DisableScopeScans(e){return this._connection.send("DisableScopeScans",e,"json",!1,void 0,"DisableScopeScansResponse")}EnableScopeScans(e){return this._connection.send("EnableScopeScans",e,"json",!1,void 0,"EnableScopeScansResponse")}FilePermission(e){return this._connection.send("FilePermission",e,"json",!1,void 0,"FilePermissionResponse")}GroupAction(e){return this._connection.send("GroupAction",e,"json",!1,void 0,"GroupActionResponse")}GroupAdd(e){return this._connection.send("GroupAdd",e,"json",!1,void 0,"GroupAddResponse")}GroupEdit(e){return this._connection.send("GroupEdit",e,"json",!1,void 0,"GroupEditResponse")}GroupMemberEdit(e){return this._connection.send("GroupMemberEdit",e,"json",!1,void 0,"GroupMemberEditResponse")}GroupMemberEditInput(e){return this._connection.send("GroupMemberEditInput",e,"json",!1,void 0,"GroupMemberEditInputResponse")}GroupMemberQuery(e){return this._connection.send("GroupMemberQuery",e,"json",!1,void 0,"GroupMemberQueryResponse")}GroupQuery(e){return this._connection.send("GroupQuery",e,"json",!1,void 0,"GroupQueryResponse")}Groups(e){return this._connection.send("Groups",e,"json",!1,void 0,"GroupResponse")}PermissionAction(e){return this._connection.send("PermissionAction",e,"json",!1,void 0,"PermissionActionResponse")}Permissions(e){return this._connection.send("Permissions",e,"json",!1,void 0,"BasednsResponse")}PermissionsReset(e){return this._connection.send("PermissionsReset",e,"json",!1,void 0,"PermissionsResetResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"ws_accessPingResponse")}QueryScopeScansEnabled(e){return this._connection.send("QueryScopeScansEnabled",e,"json",!1,void 0,"QueryScopeScansEnabledResponse")}QueryUserViewColumns(e){return this._connection.send("QueryUserViewColumns",e,"json",!1,void 0,"QueryUserViewColumnsResponse")}QueryViewColumns(e){return this._connection.send("QueryViewColumns",e,"json",!1,void 0,"QueryViewColumnsResponse")}QueryViewMembers(e){return this._connection.send("QueryViewMembers",e,"json",!1,void 0,"QueryViewMembersResponse")}QueryViews(e){return this._connection.send("QueryViews",e,"json",!1,void 0,"QueryViewsResponse")}ResourceAdd(e){return this._connection.send("ResourceAdd",e,"json",!1,void 0,"ResourceAddResponse")}ResourceDelete(e){return this._connection.send("ResourceDelete",e,"json",!1,void 0,"ResourceDeleteResponse")}ResourcePermissionQuery(e){return this._connection.send("ResourcePermissionQuery",e,"json",!1,void 0,"ResourcePermissionQueryResponse")}ResourcePermissions(e){return this._connection.send("ResourcePermissions",e,"json",!1,void 0,"ResourcePermissionsResponse")}ResourceQuery(e){return this._connection.send("ResourceQuery",e,"json",!1,void 0,"ResourceQueryResponse")}Resources(e){return this._connection.send("Resources",e,"json",!1,void 0,"ResourcesResponse")}UserAccountExport(e){return this._connection.send("UserAccountExport",e,"json",!1,void 0,"UserAccountExportResponse")}UserAction(e){return this._connection.send("UserAction",e,"json",!1,void 0,"UserActionResponse")}UserEdit(e){return this._connection.send("UserEdit",e,"json",!1,void 0,"UserEditResponse")}UserGroupEdit(e){return this._connection.send("UserGroupEdit",e,"json",!1,void 0,"UserGroupEditResponse")}UserGroupEditInput(e){return this._connection.send("UserGroupEditInput",e,"json",!1,void 0,"UserGroupEditInputResponse")}UserInfoEdit(e){return this._connection.send("UserInfoEdit",e,"json",!1,void 0,"UserInfoEditResponse")}UserInfoEditInput(e){return this._connection.send("UserInfoEditInput",e,"json",!1,void 0,"UserInfoEditInputResponse")}UserPosix(e){return this._connection.send("UserPosix",e,"json",!1,void 0,"UserPosixResponse")}UserPosixInput(e){return this._connection.send("UserPosixInput",e,"json",!1,void 0,"UserPosixInputResponse")}UserQuery(e){return this._connection.send("UserQuery",e,"json",!1,void 0,"UserQueryResponse")}UserResetPass(e){return this._connection.send("UserResetPass",e,"json",!1,void 0,"UserResetPassResponse")}UserResetPassInput(e){return this._connection.send("UserResetPassInput",e,"json",!1,void 0,"UserResetPassInputResponse")}UserSudoers(e){return this._connection.send("UserSudoers",e,"json",!1,void 0,"UserSudoersResponse")}UserSudoersInput(e){return this._connection.send("UserSudoersInput",e,"json",!1,void 0,"UserSudoersInputResponse")}Users(e){return this._connection.send("Users",e,"json",!1,void 0,"UserResponse")}};var ar=class extends gt{};var dt=class extends S{constructor(e){super(e,"ws_account","1.06")}MyAccount(e){return this._connection.send("MyAccount",e,"json",!1,void 0,"MyAccountResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"ws_accountPingResponse")}UpdateUser(e){return this._connection.send("UpdateUser",e,"json",!1,void 0,"UpdateUserResponse")}UpdateUserInput(e){return this._connection.send("UpdateUserInput",e,"json",!1,void 0,"UpdateUserInputResponse")}VerifyUser(e){return this._connection.send("VerifyUser",e,"json",!1,void 0,"VerifyUserResponse")}};var ur=class extends dt{VerifyUser(e){return this._connection.send("VerifyUser",e).catch(s=>{if(s.isESPExceptions&&s.Exception.some(r=>r.Code===20043))return{retcode:20043,Exceptions:{Source:"wsAccount",Exception:s.Exception}};throw s})}};var ft=class extends S{constructor(e){super(e,"WsCloud","1")}GetPODs(e){return this._connection.send("GetPODs",e)}Ping(e){return this._connection.send("Ping",e)}};var cr=class extends ft{getPODs(){return super.GetPODs({}).then(e=>{try{return(typeof e.Result=="string"?JSON.parse(e.Result):e.Result)?.items??[]}catch{return[]}})}};var lr=class{_connection;constructor(e){this._connection=new Ge(e,"ws_codesign","1.1")}connectionOptions(){return this._connection.opts()}ListUserIDs(e){return this._connection.send("ListUserIDs",e).then(s=>s.UserIDs.Item).catch(s=>[])}Sign(e){return this._connection.send("Sign",{SigningMethod:"gpg",...e})}Verify(e){return this._connection.send("Verify",e)}};var ht=class extends S{constructor(e){super(e,"WSDali","1.07")}Add(e){return this._connection.send("Add",e,"json",!1,void 0,"ResultResponse")}ClearTraceTransactions(e){return this._connection.send("ClearTraceTransactions",e,"json",!1,void 0,"ResultResponse")}Count(e){return this._connection.send("Count",e,"json",!1,void 0,"CountResponse")}DFSCheck(e){return this._connection.send("DFSCheck",e,"json",!1,void 0,"ResultResponse")}DFSExists(e){return this._connection.send("DFSExists",e,"json",!1,void 0,"BooleanResponse")}DFSLS(e){return this._connection.send("DFSLS",e,"json",!1,void 0,"ResultResponse")}Delete(e){return this._connection.send("Delete",e,"json",!1,void 0,"ResultResponse")}DisconnectClientConnection(e){return this._connection.send("DisconnectClientConnection",e,"json",!1,void 0,"ResultResponse")}GetClients(e){return this._connection.send("GetClients",e,"json",!1,void 0,"ResultResponse")}GetConnections(e){return this._connection.send("GetConnections",e,"json",!1,void 0,"ResultResponse")}GetDFSCSV(e){return this._connection.send("GetDFSCSV",e,"json",!1,void 0,"ResultResponse")}GetDFSMap(e){return this._connection.send("GetDFSMap",e,"json",!1,void 0,"ResultResponse")}GetDFSParents(e){return this._connection.send("GetDFSParents",e,"json",!1,void 0,"ResultResponse")}GetLogicalFile(e){return this._connection.send("GetLogicalFile",e,"json",!1,void 0,"ResultResponse")}GetLogicalFilePart(e){return this._connection.send("GetLogicalFilePart",e,"json",!1,void 0,"ResultResponse")}GetProtectedList(e){return this._connection.send("GetProtectedList",e,"json",!1,void 0,"ResultResponse")}GetSDSStats(e){return this._connection.send("GetSDSStats",e,"json",!1,void 0,"ResultResponse")}GetSDSSubscribers(e){return this._connection.send("GetSDSSubscribers",e,"json",!1,void 0,"ResultResponse")}GetValue(e){return this._connection.send("GetValue",e,"json",!1,void 0,"ResultResponse")}Import(e){return this._connection.send("Import",e,"json",!1,void 0,"ResultResponse")}ListSDSLocks(e){return this._connection.send("ListSDSLocks",e,"json",!1,void 0,"ResultResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"WSDaliPingResponse")}SaveSDSStore(e){return this._connection.send("SaveSDSStore",e,"json",!1,void 0,"ResultResponse")}SetLogicalFilePartAttr(e){return this._connection.send("SetLogicalFilePartAttr",e,"json",!1,void 0,"ResultResponse")}SetProtected(e){return this._connection.send("SetProtected",e,"json",!1,void 0,"ResultResponse")}SetTraceSlowTransactions(e){return this._connection.send("SetTraceSlowTransactions",e,"json",!1,void 0,"ResultResponse")}SetTraceTransactions(e){return this._connection.send("SetTraceTransactions",e,"json",!1,void 0,"ResultResponse")}SetUnprotected(e){return this._connection.send("SetUnprotected",e,"json",!1,void 0,"ResultResponse")}SetValue(e){return this._connection.send("SetValue",e,"json",!1,void 0,"ResultResponse")}UnlockSDSLock(e){return this._connection.send("UnlockSDSLock",e,"json",!1,void 0,"ResultResponse")}};var pr=class extends ht{};var Te;(a=>{let t;(d=>(d.Delete="Delete",d.AddToSuperfile="Add To Superfile",d.ChangeProtection="Change Protection",d.ChangeRestriction="Change Restriction"))(t=a.DFUArrayActions||={});let e;(d=>(d[d.NoChange=0]="NoChange",d[d.Protect=1]="Protect",d[d.Unprotect=2]="Unprotect",d[d.UnprotectAll=3]="UnprotectAll"))(e=a.DFUChangeProtection||={});let s;(l=>(l[l.NoChange=0]="NoChange",l[l.Restrict=1]="Restrict",l[l.Unrestricted=2]="Unrestricted"))(s=a.DFUChangeRestriction||={});let r;(u=>(u.xml="xml",u.def="def"))(r=a.DFUDefFileFormat||={});let n;(l=>(l.Token="Token",l.Engine="Engine",l.External="External"))(n=a.FileAccessRole||={});let i;(U=>(U.None="None",U.Access="Access",U.Read="Read",U.Write="Write",U.Full="Full"))(i=a.SecAccessType||={});let o;(y=>(y.Flat="Flat",y.Index="Index",y.Xml="Xml",y.Csv="Csv",y.Json="Json",y.IndexLocal="IndexLocal",y.IndexPartitioned="IndexPartitioned",y.Unset="Unset"))(o=a.DFUFileType||={})})(Te||={});var mt=class extends S{constructor(e){super(e,"WsDfu","1.65")}Add(e){return this._connection.send("Add",e,"json",!1,void 0,"AddResponse")}AddRemote(e){return this._connection.send("AddRemote",e,"json",!1,void 0,"AddRemoteResponse")}AddtoSuperfile(e){return this._connection.send("AddtoSuperfile",e,"json",!1,void 0,"AddtoSuperfileResponse")}DFUArrayAction(e){return this._connection.send("DFUArrayAction",e,"json",!1,void 0,"DFUArrayActionResponse")}DFUBrowseData(e){return this._connection.send("DFUBrowseData",e,"json",!1,void 0,"DFUBrowseDataResponse")}DFUDefFile(e){return this._connection.send("DFUDefFile",e,"json",!1,void 0,"DFUDefFileResponse")}DFUFileAccess(e){return this._connection.send("DFUFileAccess",e,"json",!1,void 0,"DFUFileAccessResponse")}DFUFileAccessV2(e){return this._connection.send("DFUFileAccessV2",e,"json",!1,void 0,"DFUFileAccessResponse")}DFUFileCreate(e){return this._connection.send("DFUFileCreate",e,"json",!1,void 0,"DFUFileCreateResponse")}DFUFileCreateV2(e){return this._connection.send("DFUFileCreateV2",e,"json",!1,void 0,"DFUFileCreateResponse")}DFUFilePublish(e){return this._connection.send("DFUFilePublish",e,"json",!1,void 0,"DFUFilePublishResponse")}DFUFileView(e){return this._connection.send("DFUFileView",e,"json",!1,void 0,"DFUFileViewResponse")}DFUGetDataColumns(e){return this._connection.send("DFUGetDataColumns",e,"json",!1,void 0,"DFUGetDataColumnsResponse")}DFUGetFileMetaData(e){return this._connection.send("DFUGetFileMetaData",e,"json",!1,void 0,"DFUGetFileMetaDataResponse")}DFUInfo(e){return this._connection.send("DFUInfo",e,"json",!1,void 0,"DFUInfoResponse")}DFUQuery(e){return this._connection.send("DFUQuery",e,"json",!1,void 0,"DFUQueryResponse")}DFURecordTypeInfo(e){return this._connection.send("DFURecordTypeInfo",e,"json",!1,void 0,"DFURecordTypeInfoResponse")}DFUSearch(e){return this._connection.send("DFUSearch",e,"json",!1,void 0,"DFUSearchResponse")}DFUSearchData(e){return this._connection.send("DFUSearchData",e,"json",!1,void 0,"DFUSearchDataResponse")}DFUSpace(e){return this._connection.send("DFUSpace",e,"json",!1,void 0,"DFUSpaceResponse")}EclRecordTypeInfo(e){return this._connection.send("EclRecordTypeInfo",e,"json",!1,void 0,"EclRecordTypeInfoResponse")}EraseHistory(e){return this._connection.send("EraseHistory",e,"json",!1,void 0,"EraseHistoryResponse")}ListHistory(e){return this._connection.send("ListHistory",e,"json",!1,void 0,"ListHistoryResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"WsDfuPingResponse")}Savexml(e){return this._connection.send("Savexml",e,"json",!1,void 0,"SavexmlResponse")}SuperfileAction(e){return this._connection.send("SuperfileAction",e,"json",!1,void 0,"SuperfileActionResponse")}SuperfileList(e){return this._connection.send("SuperfileList",e,"json",!1,void 0,"SuperfileListResponse")}};var Cu=Te.DFUArrayActions,bu=Te.DFUDefFileFormat,Uu=Te.DFUChangeProtection,Pu=Te.DFUChangeRestriction,Ve=class extends mt{DFUFile(e){return this._connection.send("DFUDefFile",e,"text")}};var gr=class extends S{constructor(e){super(e,"WsDFUXRef","1.01")}DFUXRefArrayAction(e){return this._connection.send("DFUXRefArrayAction",e)}DFUXRefBuild(e){return this._connection.send("DFUXRefBuild",e)}DFUXRefBuildCancel(e){return this._connection.send("DFUXRefBuildCancel",e)}DFUXRefCleanDirectories(e){return this._connection.send("DFUXRefCleanDirectories",e)}DFUXRefDirectories(e){return this._connection.send("DFUXRefDirectories",e,void 0,void 0,void 0,"DFUXRefDirectoriesQueryResponse")}DFUXRefFoundFiles(e){return this._connection.send("DFUXRefFoundFiles",e,void 0,void 0,void 0,"DFUXRefFoundFilesQueryResponse")}DFUXRefList(e={}){return this._connection.send("DFUXRefList",e)}DFUXRefLostFiles(e){return this._connection.send("DFUXRefLostFiles",e,void 0,void 0,void 0,"DFUXRefLostFilesQueryResponse")}DFUXRefMessages(e){return this._connection.send("DFUXRefMessages",e,void 0,void 0,void 0,"DFUXRefMessagesQueryResponse")}DFUXRefOrphanFiles(e){return this._connection.send("DFUXRefOrphanFiles",e,void 0,void 0,void 0,"DFUXRefOrphanFilesQueryResponse")}DFUXRefUnusedFiles(e){return this._connection.send("DFUXRefUnusedFiles",e)}};function dr(t,e){let s=typeof e;switch(s){case"boolean":case"number":case"string":return{id:t,type:s};case"object":if(e.Row instanceof Array&&(e=e.Row),e instanceof Array)return{id:t,type:"dataset",children:ps(e[0])};if(e instanceof Object){if(e.Item&&e.Item instanceof Array&&e.Item.length===1){let r=typeof e.Item[0];if(r==="string"||r==="number")return{id:t,type:"set",fieldType:r};throw new Error("Unknown field type")}return{id:t,type:"object",fields:ai(e)}}default:throw new Error("Unknown field type")}}function ps(t){t.Row&&t.Row instanceof Array&&(t=t.Row[0]);let e=[];for(let s in t)e.push(dr(s,t[s]));return e}function ai(t){let e={};for(let s in t)e[s]=dr(s,t[s]);return e}var xt=class extends S{constructor(e){super(e,"WsEcl","0")}opts(){return this._connection.opts()}requestJson(e,s){return this._connection.send(`example/request/query/${e}/${s}/json`,{},"text").then(r=>{let n=JSON.parse(r);for(let i in n)return n[i];return{}}).then(ps)}responseJson(e,s){return this._connection.send(`example/response/query/${e}/${s}/json`,{},"text").then(r=>{let n=JSON.parse(r);for(let i in n)return n[i].Results;return{}}).then(r=>{let n={};for(let i in r)n[i]=ps(r[i]);return n})}submit(e,s,r){let n=`submit/query/${e}/${s}`;return this._connection.send(n,r,"json2").then(i=>{if(i.Results&&i.Results.Exception)throw new Y(n,r,{Source:"wsEcl.submit",Exception:i.Results.Exception});return i.Results})}};var St=class extends S{constructor(e){super(e,"ws_elk","1")}GetConfigDetails(e){return this._connection.send("GetConfigDetails",e)}Ping(e){return this._connection.send("Ping",e)}};var fr=class extends St{};var k;(a=>{let t;(m=>(m.global="global",m.workunits="workunits",m.components="components",m.audience="audience",m.class="class",m.instance="instance",m.node="node",m.message="message",m.logid="logid",m.processid="processid",m.threadid="threadid",m.timestamp="timestamp",m.pod="pod"))(t=a.LogColumnType||={});let e;(d=>(d.string="string",d.numeric="numeric",d.datetime="datetime",d.enum="enum"))(e=a.LogColumnValueType||={});let s;(x=>(x[x.All=0]="All",x[x.ByJobID=1]="ByJobID",x[x.ByComponent=2]="ByComponent",x[x.ByLogType=3]="ByLogType",x[x.ByTargetAudience=4]="ByTargetAudience",x[x.BySourceInstance=5]="BySourceInstance",x[x.BySourceNode=6]="BySourceNode",x[x.ByFieldName=7]="ByFieldName",x[x.ByPod=8]="ByPod"))(s=a.LogAccessType||={});let r;(l=>(l[l.NONE=0]="NONE",l[l.AND=1]="AND",l[l.OR=2]="OR"))(r=a.LogAccessFilterOperator||={});let n;(d=>(d[d.MIN=0]="MIN",d[d.DEFAULT=1]="DEFAULT",d[d.ALL=2]="ALL",d[d.CUSTOM=3]="CUSTOM"))(n=a.LogSelectColumnMode||={});let i;(x=>(x[x.ByDate=0]="ByDate",x[x.ByJobID=1]="ByJobID",x[x.ByComponent=2]="ByComponent",x[x.ByLogType=3]="ByLogType",x[x.ByTargetAudience=4]="ByTargetAudience",x[x.BySourceInstance=5]="BySourceInstance",x[x.BySourceNode=6]="BySourceNode",x[x.ByFieldName=7]="ByFieldName",x[x.ByPod=8]="ByPod"))(i=a.SortColumType||={});let o;(u=>(u[u.ASC=0]="ASC",u[u.DSC=1]="DSC"))(o=a.SortDirection||={})})(k||={});var yt=class extends S{constructor(e){super(e,"ws_logaccess","1.05")}GetLogAccessInfo(e){return this._connection.send("GetLogAccessInfo",e,"json",!1,void 0,"GetLogAccessInfoResponse")}GetLogs(e){return this._connection.send("GetLogs",e,"json",!1,void 0,"GetLogsResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"ws_logaccessPingResponse")}};var hr=O("@hpcc-js/comms/services/wsLogaccess.ts");var ui=(o=>(o.Disaster="DIS",o.Error="ERR",o.Warning="WRN",o.Information="INF",o.Progress="PRO",o.Metric="MET",o))(ui||{}),ci=(n=>(n.Operator="OPR",n.User="USR",n.Programmer="PRO",n.Audit="ADT",n))(ci||{}),mr=class extends yt{_logAccessInfo;GetLogAccessInfo(e={}){return this._logAccessInfo||(this._logAccessInfo=super.GetLogAccessInfo(e)),this._logAccessInfo}GetLogs(e){return super.GetLogs(e)}async GetLogsEx(e){let s=await this.GetLogAccessInfo(),r={};s.Columns.Column.forEach(a=>r[a.LogType]=a.Name);let n=a=>{let c={};for(let p in r)a?.fields?c[p]=Object.assign({},...a.fields)[r[p]]??"":c[p]="";return c},i={Filter:{leftBinaryFilter:{BinaryLogFilter:[{leftFilter:{LogCategory:k.LogAccessType.All}}]}},Range:{StartDate:new Date(0).toISOString()},LogLineStartFrom:e.LogLineStartFrom??0,LogLineLimit:e.LogLineLimit??100,SelectColumnMode:k.LogSelectColumnMode.DEFAULT,Format:"JSON",SortBy:{SortCondition:[{BySortType:k.SortColumType.ByDate,ColumnName:"",Direction:0}]}},o=[];for(let a in e){let c;a in r&&(Object.values(k.LogColumnType).includes(a)?c=a:c=r[a]);let p;if(c){switch(c){case k.LogColumnType.workunits:case"hpcc.log.jobid":p=k.LogAccessType.ByJobID;break;case k.LogColumnType.audience:case"hpcc.log.audience":p=k.LogAccessType.ByTargetAudience;break;case k.LogColumnType.class:case"hpcc.log.class":p=k.LogAccessType.ByLogType;break;case k.LogColumnType.components:case"kubernetes.container.name":p=k.LogAccessType.ByComponent;break;default:p=k.LogAccessType.ByFieldName,c=r[a]}if(Array.isArray(e[a]))e[a].forEach(u=>{p===k.LogAccessType.ByComponent&&(u+="*"),o.push({LogCategory:p,SearchField:c,SearchByValue:u})});else{let u=e[a];p===k.LogAccessType.ByComponent&&(u+="*"),o.push({LogCategory:p,SearchField:c,SearchByValue:u})}}}if(o.length>2){let a=i.Filter.leftBinaryFilter.BinaryLogFilter[0];o.forEach((c,p)=>{let u=k.LogAccessFilterOperator.AND;p>0?(o[p-1].SearchField===c.SearchField&&(u=k.LogAccessFilterOperator.OR),p===o.length-1?(a.Operator=u,a.rightFilter=c):(a.Operator=u,a.rightBinaryFilter={BinaryLogFilter:[{leftFilter:c}]},a=a.rightBinaryFilter.BinaryLogFilter[0])):a.leftFilter=c})}else delete i.Filter.leftBinaryFilter,i.Filter.leftFilter={LogCategory:k.LogAccessType.All},o[0]?.SearchField&&(i.Filter.leftFilter={LogCategory:o[0]?.LogCategory,SearchField:o[0]?.SearchField,SearchByValue:o[0]?.SearchByValue}),o[1]?.SearchField&&(i.Filter.Operator=k.LogAccessFilterOperator.AND,o[0].SearchField===o[1].SearchField&&(i.Filter.Operator=k.LogAccessFilterOperator.OR),i.Filter.rightFilter={LogCategory:o[1]?.LogCategory,SearchField:o[1]?.SearchField,SearchByValue:o[1]?.SearchByValue});return e.StartDate&&(i.Range.StartDate=e.StartDate.toISOString()),e.EndDate&&(i.Range.EndDate=e.EndDate.toISOString()),this.GetLogs(i).then(a=>{try{let c=JSON.parse(a.LogLines),p=[];switch(s.RemoteLogManagerType){case"azureloganalyticscurl":case"elasticstack":case"grafanacurl":p=c.lines?.map(n)??[];break;default:hr.warning(`Unknown RemoteLogManagerType: ${s.RemoteLogManagerType}`),p=[]}return{lines:p,total:a.TotalLogLinesAvailable??1e4}}catch(c){hr.error(c.message??c)}return{lines:[],total:0}})}};function ee(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function gs(t){return t.length===1&&(t=li(t)),{left:function(e,s,r,n){for(r==null&&(r=0),n==null&&(n=e.length);r<n;){var i=r+n>>>1;t(e[i],s)<0?r=i+1:n=i}return r},right:function(e,s,r,n){for(r==null&&(r=0),n==null&&(n=e.length);r<n;){var i=r+n>>>1;t(e[i],s)>0?n=i:r=i+1}return r}}}function li(t){return function(e,s){return ee(t(e),s)}}var xr=gs(ee),pi=xr.right,gi=xr.left;function de(t){return t===null?NaN:+t}var Sr=Array.prototype,fi=Sr.slice,hi=Sr.map;var cc=Math.sqrt(50),lc=Math.sqrt(10),pc=Math.sqrt(2);function Oe(t,e){var s=t.length,r=-1,n,i;if(e==null){for(;++r<s;)if((n=t[r])!=null&&n>=n)for(i=n;++r<s;)(n=t[r])!=null&&n>i&&(i=n)}else for(;++r<s;)if((n=e(t[r],r,t))!=null&&n>=n)for(i=n;++r<s;)(n=e(t[r],r,t))!=null&&n>i&&(i=n);return i}function qe(t,e){var s=t.length,r=s,n=-1,i,o=0;if(e==null)for(;++n<s;)isNaN(i=de(t[n]))?--r:o+=i;else for(;++n<s;)isNaN(i=de(e(t[n],n,t)))?--r:o+=i;if(r)return o/r}var Wt=class extends S{constructor(e){super(e,"ws_machine","1.17")}GetComponentStatus(e){return this._connection.send("GetComponentStatus",e)}GetComponentUsage(e){return this._connection.send("GetComponentUsage",e)}GetMachineInfo(e){return this._connection.send("GetMachineInfo",e)}GetMachineInfoEx(e){return this._connection.send("GetMachineInfoEx",e)}GetMetrics(e){return this._connection.send("GetMetrics",e)}GetNodeGroupUsage(e){return this._connection.send("GetNodeGroupUsage",e)}GetTargetClusterInfo(e){return this._connection.send("GetTargetClusterInfo",e)}GetTargetClusterUsage(e){return this._connection.send("GetTargetClusterUsage",e)}Ping(e){return this._connection.send("Ping",e)}UpdateComponentStatus(e){return this._connection.send("UpdateComponentStatus",e)}};var te=class extends Wt{GetTargetClusterUsageEx(e,s=!1){return this._connection.send("GetTargetClusterUsage",{TargetClusters:e?{Item:e}:{},BypassCachedResult:s}).then(r=>$("TargetClusterUsages.TargetClusterUsage",r)?r.TargetClusterUsages.TargetClusterUsage:[]).then(r=>r.filter(n=>!!n.ComponentUsages).map(n=>{let i=n.ComponentUsages.ComponentUsage.map(o=>{let a=(o.MachineUsages&&o.MachineUsages.MachineUsage?o.MachineUsages.MachineUsage:[]).map(c=>{let p=c.DiskUsages&&c.DiskUsages.DiskUsage?c.DiskUsages.DiskUsage.map(u=>({...u,InUse:u.InUse*1024,Total:(u.InUse+u.Available)*1024,PercentUsed:100-u.PercentAvailable})):[];return{Name:c.Name,NetAddress:c.NetAddress,Description:c.Description,DiskUsages:p,mean:qe(p.filter(u=>!isNaN(u.PercentUsed)),u=>u.PercentUsed),max:Oe(p.filter(u=>!isNaN(u.PercentUsed)),u=>u.PercentUsed)}});return{Type:o.Type,Name:o.Name,Description:o.Description,MachineUsages:a,MachineUsagesDescription:a.reduce((c,p)=>c+(p.Description||""),""),mean:qe(a.filter(c=>!isNaN(c.mean)),c=>c.mean),max:Oe(a.filter(c=>!isNaN(c.max)),c=>c.max)}});return{Name:n.Name,Description:n.Description,ComponentUsages:i,ComponentUsagesDescription:i.reduce((o,a)=>o+(a.MachineUsagesDescription||""),""),mean:qe(i.filter(o=>!isNaN(o.mean)),o=>o.mean),max:Oe(i.filter(o=>!isNaN(o.max)),o=>o.max)}}))}};var Dt=class extends S{constructor(e){super(e,"WsPackageProcess","1.04")}ActivatePackage(e){return this._connection.send("ActivatePackage",e)}AddPackage(e){return this._connection.send("AddPackage",e)}AddPartToPackageMap(e){return this._connection.send("AddPartToPackageMap",e)}CopyPackageMap(e){return this._connection.send("CopyPackageMap",e)}DeActivatePackage(e){return this._connection.send("DeActivatePackage",e)}DeletePackage(e){return this._connection.send("DeletePackage",e)}Echo(e){return this._connection.send("Echo",e)}GetPackage(e){return this._connection.send("GetPackage",e)}GetPackageMapById(e){return this._connection.send("GetPackageMapById",e)}GetPackageMapSelectOptions(e){return this._connection.send("GetPackageMapSelectOptions",e)}GetPartFromPackageMap(e){return this._connection.send("GetPartFromPackageMap",e)}GetQueryFileMapping(e){return this._connection.send("GetQueryFileMapping",e)}ListPackage(e){return this._connection.send("ListPackage",e)}ListPackages(e){return this._connection.send("ListPackages",e)}Ping(e){return this._connection.send("Ping",e)}RemovePartFromPackageMap(e){return this._connection.send("RemovePartFromPackageMap",e)}ValidatePackage(e){return this._connection.send("ValidatePackage",e)}};var Wr=class extends Dt{};var Rt=class extends S{constructor(e){super(e,"WsResources","1.01")}Ping(e){return this._connection.send("Ping",e)}ServiceQuery(e){return this._connection.send("ServiceQuery",e)}WebLinksQuery(e){return this._connection.send("WebLinksQuery",e)}};var Dr=class extends Rt{};var Rr;(e=>{let t;(n=>(n.ECL="ECL",n.DFU="DFU"))(t=e.WUTypes||={})})(Rr||={});var Ct=class extends S{constructor(e){super(e,"WSSasha","1.01")}ArchiveWU(e){return this._connection.send("ArchiveWU",e,"json",!1,void 0,"ResultResponse")}GetVersion(e){return this._connection.send("GetVersion",e,"json",!1,void 0,"ResultResponse")}ListWU(e){return this._connection.send("ListWU",e,"json",!1,void 0,"ResultResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"WSSashaPingResponse")}RestoreWU(e){return this._connection.send("RestoreWU",e,"json",!1,void 0,"ResultResponse")}};var Cr=class extends Ct{};var br;(s=>{let t;(c=>(c.ALL="ALL",c.READ="READ",c.WRITE="WRITE",c.HOLD="HOLD",c.SUB="SUB"))(t=s.LockModes||={});let e;(l=>(l.Attach="Attach",l.Detach="Detach",l.State="State",l.Reload="Reload",l.ReloadRetry="ReloadRetry",l.MemLock="MemLock",l.MemUnlock="MemUnlock",l.GetMemLocked="GetMemLocked"))(e=s.RoxieControlCmdType||={})})(br||={});var bt=class extends S{constructor(e){super(e,"WsSMC","1.27")}Activity(e){return this._connection.send("Activity",e,"json",!1,void 0,"ActivityResponse")}BrowseResources(e){return this._connection.send("BrowseResources",e,"json",!1,void 0,"BrowseResourcesResponse")}ClearQueue(e){return this._connection.send("ClearQueue",e,"json",!1,void 0,"SMCQueueResponse")}GetBuildInfo(e){return this._connection.send("GetBuildInfo",e,"json",!1,void 0,"GetBuildInfoResponse")}GetStatusServerInfo(e){return this._connection.send("GetStatusServerInfo",e,"json",!1,void 0,"GetStatusServerInfoResponse")}GetThorQueueAvailability(e){return this._connection.send("GetThorQueueAvailability",e,"json",!1,void 0,"GetThorQueueAvailabilityResponse")}Index(e){return this._connection.send("Index",e,"json",!1,void 0,"SMCIndexResponse")}LockQuery(e){return this._connection.send("LockQuery",e,"json",!1,void 0,"LockQueryResponse")}MoveJobBack(e){return this._connection.send("MoveJobBack",e,"json",!1,void 0,"SMCJobResponse")}MoveJobDown(e){return this._connection.send("MoveJobDown",e,"json",!1,void 0,"SMCJobResponse")}MoveJobFront(e){return this._connection.send("MoveJobFront",e,"json",!1,void 0,"SMCJobResponse")}MoveJobUp(e){return this._connection.send("MoveJobUp",e,"json",!1,void 0,"SMCJobResponse")}NotInCommunityEdition(e){return this._connection.send("NotInCommunityEdition",e,"json",!1,void 0,"NotInCommunityEditionResponse")}PauseQueue(e){return this._connection.send("PauseQueue",e,"json",!1,void 0,"SMCQueueResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"WsSMCPingResponse")}RemoveJob(e){return this._connection.send("RemoveJob",e,"json",!1,void 0,"SMCJobResponse")}ResumeQueue(e){return this._connection.send("ResumeQueue",e,"json",!1,void 0,"SMCQueueResponse")}RoxieControlCmd(e){return this._connection.send("RoxieControlCmd",e,"json",!1,void 0,"RoxieControlCmdResponse")}RoxieXrefCmd(e){return this._connection.send("RoxieXrefCmd",e,"json",!1,void 0,"RoxieXrefCmdResponse")}SetBanner(e){return this._connection.send("SetBanner",e,"json",!1,void 0,"SetBannerResponse")}SetJobPriority(e){return this._connection.send("SetJobPriority",e,"json",!1,void 0,"SMCPriorityResponse")}StopQueue(e){return this._connection.send("StopQueue",e,"json",!1,void 0,"SMCQueueResponse")}};var Be=class extends bt{connectionOptions(){return this._connection.opts()}Activity(e){return super.Activity(e).then(s=>({Running:{ActiveWorkunit:[]},...s}))}};var je=class extends S{constructor(e){super(e,"WsStore","1")}CreateStore(e){return this._connection.send("Fetch",e)}Delete(e){return this._connection.send("Delete",e).catch(s=>{if(s.isESPExceptions&&s.Exception.some(r=>r.Code===-1))return{Exceptions:void 0,Success:!0};throw s})}DeleteNamespace(e){return this._connection.send("DeleteNamespace",e)}Fetch(e){return this._connection.send("Fetch",e).catch(s=>{if(s.isESPExceptions&&s.Exception.some(r=>r.Code===-1))return{Exceptions:void 0,Value:void 0};throw s})}FetchAll(e){return this._connection.send("FetchAll",e)}FetchKeyMD(e){return this._connection.send("FetchKeyMD",e)}ListKeys(e){return this._connection.send("ListKeys",e)}ListNamespaces(e){return this._connection.send("ListNamespaces",e)}Set(e){return this._connection.send("Set",e)}};var Ur;(e=>{let t;(i=>(i.All="All",i.QueriesOnly="QueriesOnly",i.WorkunitsOnly="WorkunitsOnly"))(t=e.RoxieQueueFilter||={})})(Ur||={});var Ut=class extends S{constructor(e){super(e,"WsTopology","1.32")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"WsTopologyPingResponse")}SystemLog(e){return this._connection.send("SystemLog",e,"json",!1,void 0,"SystemLogResponse")}TpClusterInfo(e){return this._connection.send("TpClusterInfo",e,"json",!1,void 0,"TpClusterInfoResponse")}TpClusterQuery(e){return this._connection.send("TpClusterQuery",e,"json",!1,void 0,"TpClusterQueryResponse")}TpDropZoneQuery(e){return this._connection.send("TpDropZoneQuery",e,"json",!1,void 0,"TpDropZoneQueryResponse")}TpGetComponentFile(e){return this._connection.send("TpGetComponentFile",e,"json",!1,void 0,"TpGetComponentFileResponse")}TpGetServicePlugins(e){return this._connection.send("TpGetServicePlugins",e,"json",!1,void 0,"TpGetServicePluginsResponse")}TpGroupQuery(e){return this._connection.send("TpGroupQuery",e,"json",!1,void 0,"TpGroupQueryResponse")}TpListLogFiles(e){return this._connection.send("TpListLogFiles",e,"json",!1,void 0,"TpListLogFilesResponse")}TpListTargetClusters(e){return this._connection.send("TpListTargetClusters",e,"json",!1,void 0,"TpListTargetClustersResponse")}TpLogFile(e){return this._connection.send("TpLogFile",e,"json",!1,void 0,"TpLogFileResponse")}TpLogFileDisplay(e){return this._connection.send("TpLogFileDisplay",e,"json",!1,void 0,"TpLogFileResponse")}TpLogicalClusterQuery(e){return this._connection.send("TpLogicalClusterQuery",e,"json",!1,void 0,"TpLogicalClusterQueryResponse")}TpMachineInfo(e){return this._connection.send("TpMachineInfo",e,"json",!1,void 0,"TpMachineInfoResponse")}TpMachineQuery(e){return this._connection.send("TpMachineQuery",e,"json",!1,void 0,"TpMachineQueryResponse")}TpServiceQuery(e){return this._connection.send("TpServiceQuery",e,"json",!1,void 0,"TpServiceQueryResponse")}TpSetMachineStatus(e){return this._connection.send("TpSetMachineStatus",e,"json",!1,void 0,"TpSetMachineStatusResponse")}TpSwapNode(e){return this._connection.send("TpSwapNode",e,"json",!1,void 0,"TpSwapNodeResponse")}TpTargetClusterQuery(e){return this._connection.send("TpTargetClusterQuery",e,"json",!1,void 0,"TpTargetClusterQueryResponse")}TpThorStatus(e){return this._connection.send("TpThorStatus",e,"json",!1,void 0,"TpThorStatusResponse")}TpXMLFile(e){return this._connection.send("TpXMLFile",e,"json",!1,void 0,"TpXMLFileResponse")}};var L=class extends Ut{connectionOptions(){return this._connection.opts()}protocol(){return this._connection.opts().baseUrl.split("//")[0]}ip(){return this._connection.opts().baseUrl.split("//")[1].split(":")[0]}DefaultTpLogicalClusterQuery(e={}){return this.TpLogicalClusterQuery(e).then(s=>{if(s.default)return s.default;let r,n;return s.TpLogicalClusters.TpLogicalCluster.some((i,o)=>(o===0&&(n=i),i.Type==="hthor"?(r=i,!0):!1)),r||n})}};var w;(y=>{let t;(F=>(F.Abort="Abort",F.Delete="Delete",F.Deschedule="Deschedule",F.Reschedule="Reschedule",F.Pause="Pause",F.PauseNow="PauseNow",F.Protect="Protect",F.Unprotect="Unprotect",F.Restore="Restore",F.Resume="Resume",F.SetToFailed="SetToFailed",F.Archive="Archive"))(t=y.ECLWUActions||={});let e;(m=>(m[m.MIN=0]="MIN",m[m.DEFAULT=1]="DEFAULT",m[m.ALL=2]="ALL",m[m.CUSTOM=3]="CUSTOM"))(e=y.LogSelectColumnMode||={});let s;(f=>(f[f.ASC=0]="ASC",f[f.DSC=1]="DSC"))(s=y.SortDirection||={});let r;(_=>(_.ALL="ALL",_.DIS="DIS",_.ERR="ERR",_.WRN="WRN",_.INF="INF",_.PRO="PRO",_.MET="MET",_.EVT="EVT"))(r=y.LogEventClass||={});let n;(R=>(R.Single="Single",R.List="List",R.Multi="Multi"))(n=y.WUDetailsAttrValueType||={});let i;(R=>(R.SyntaxCheck="SyntaxCheck",R.Deploy="Deploy",R.Publish="Publish"))(i=y.EclDefinitionActions||={});let o;(R=>(R.xml="xml",R.json="json",R.text="text"))(o=y.ErrorMessageFormat||={});let a;(R=>(R[R.XML=0]="XML",R[R.JSON=1]="JSON",R[R.CSV=2]="CSV"))(a=y.LogAccessLogFormat||={});let c;(m=>(m.info="info",m.warning="warning",m.error="error",m.alert="alert"))(c=y.WUExceptionSeverity||={});let p;(B=>(B.Allqueries="All queries",B.Notsuspended="Not suspended",B.Suspended="Suspended",B.Suspendedbyuser="Suspended by user",B.Suspendedbyfirstnode="Suspended by first node",B.Suspendedbyanynode="Suspended by any node"))(p=y.WUQueryFilterSuspendedType||={});let u;(M=>(M.All="All",M.Id="Id",M.Name="Name",M.Alias="Alias",M.Status="Status"))(u=y.WUQuerySetFilterType||={});let l;(R=>(R.All="All",R.Protected="Protected",R.NotProtected="NotProtected"))(l=y.WUProtectFilter||={});let d;(ae=>ae.Deactivate="Deactivate")(d=y.QuerySetAliasActionTypes||={});let U;(f=>(f.None="None",f.ActivateImportedActive="ActivateImportedActive"))(U=y.QuerysetImportActivation||={});let I;(_=>(_.Suspend="Suspend",_.Unsuspend="Unsuspend",_.ToggleSuspend="ToggleSuspend",_.Activate="Activate",_.Delete="Delete",_.DeleteQueriesAndWUs="DeleteQueriesAndWUs",_.RemoveAllAliases="RemoveAllAliases",_.ResetQueryStats="ResetQueryStats"))(I=y.QuerySetQueryActionTypes||={});let q;(m=>(m[m.DoNotActivateQuery=0]="DoNotActivateQuery",m[m.ActivateQuery=1]="ActivateQuery",m[m.ActivateQuerySuspendPrevious=2]="ActivateQuerySuspendPrevious",m[m.ActivateQueryDeletePrevious=3]="ActivateQueryDeletePrevious"))(q=y.WUQueryActivationMode||={})})(w||={});var Xe=class extends S{constructor(e){super(e,"WsWorkunits","2")}GVCAjaxGraph(e){return this._connection.send("GVCAjaxGraph",e,"json",!1,void 0,"GVCAjaxGraphResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"WsWorkunitsPingResponse")}WUAbort(e){return this._connection.send("WUAbort",e,"json",!1,void 0,"WUAbortResponse")}WUAction(e){return this._connection.send("WUAction",e,"json",!1,void 0,"WUActionResponse")}WUAddLocalFileToWorkunit(e){return this._connection.send("WUAddLocalFileToWorkunit",e,"json",!1,void 0,"WUAddLocalFileToWorkunitResponse")}WUAnalyseHotspot(e){return this._connection.send("WUAnalyseHotspot",e,"json",!1,void 0,"WUAnalyseHotspotResponse")}WUCDebug(e){return this._connection.send("WUCDebug",e,"json",!1,void 0,"WUDebugResponse")}WUCheckFeatures(e){return this._connection.send("WUCheckFeatures",e,"json",!1,void 0,"WUCheckFeaturesResponse")}WUClusterJobQueueLOG(e){return this._connection.send("WUClusterJobQueueLOG",e,"json",!1,void 0,"WUClusterJobQueueLOGResponse")}WUClusterJobQueueXLS(e){return this._connection.send("WUClusterJobQueueXLS",e,"json",!1,void 0,"WUClusterJobQueueXLSResponse")}WUClusterJobSummaryXLS(e){return this._connection.send("WUClusterJobSummaryXLS",e,"json",!1,void 0,"WUClusterJobSummaryXLSResponse")}WUClusterJobXLS(e){return this._connection.send("WUClusterJobXLS",e,"json",!1,void 0,"WUClusterJobXLSResponse")}WUCompileECL(e){return this._connection.send("WUCompileECL",e,"json",!1,void 0,"WUCompileECLResponse")}WUCopyLogicalFiles(e){return this._connection.send("WUCopyLogicalFiles",e,"json",!1,void 0,"WUCopyLogicalFilesResponse")}WUCopyQuerySet(e){return this._connection.send("WUCopyQuerySet",e,"json",!1,void 0,"WUCopyQuerySetResponse")}WUCreate(e){return this._connection.send("WUCreate",e,"json",!1,void 0,"WUCreateResponse")}WUCreateAndUpdate(e){return this._connection.send("WUCreateAndUpdate",e,"json",!1,void 0,"WUUpdateResponse")}WUCreateZAPInfo(e){return this._connection.send("WUCreateZAPInfo",e,"json",!1,void 0,"WUCreateZAPInfoResponse")}WUDelete(e){return this._connection.send("WUDelete",e,"json",!1,void 0,"WUDeleteResponse")}WUDeployWorkunit(e){return this._connection.send("WUDeployWorkunit",e,"json",!1,void 0,"WUDeployWorkunitResponse")}WUDetails(e){return this._connection.send("WUDetails",e,"json",!1,void 0,"WUDetailsResponse")}WUDetailsMeta(e){return this._connection.send("WUDetailsMeta",e,"json",!1,void 0,"WUDetailsMetaResponse")}WUEclDefinitionAction(e){return this._connection.send("WUEclDefinitionAction",e,"json",!1,void 0,"WUEclDefinitionActionResponse")}WUExport(e){return this._connection.send("WUExport",e,"json",!1,void 0,"WUExportResponse")}WUFile(e){return this._connection.send("WUFile",e,"json",!1,void 0,"WULogFileResponse")}WUFullResult(e){return this._connection.send("WUFullResult",e,"json",!1,void 0,"WUFullResultResponse")}WUGVCGraphInfo(e){return this._connection.send("WUGVCGraphInfo",e,"json",!1,void 0,"WUGVCGraphInfoResponse")}WUGetArchiveFile(e){return this._connection.send("WUGetArchiveFile",e,"json",!1,void 0,"WUGetArchiveFileResponse")}WUGetDependancyTrees(e){return this._connection.send("WUGetDependancyTrees",e,"json",!1,void 0,"WUGetDependancyTreesResponse")}WUGetGraph(e){return this._connection.send("WUGetGraph",e,"json",!1,void 0,"WUGetGraphResponse")}WUGetGraphNameAndTypes(e){return this._connection.send("WUGetGraphNameAndTypes",e,"json",!1,void 0,"WUGetGraphNameAndTypesResponse")}WUGetNumFileToCopy(e){return this._connection.send("WUGetNumFileToCopy",e,"json",!1,void 0,"WUGetNumFileToCopyResponse")}WUGetPlugins(e){return this._connection.send("WUGetPlugins",e,"json",!1,void 0,"WUGetPluginsResponse")}WUGetStats(e){return this._connection.send("WUGetStats",e,"json",!1,void 0,"WUGetStatsResponse")}WUGetThorJobList(e){return this._connection.send("WUGetThorJobList",e,"json",!1,void 0,"WUGetThorJobListResponse")}WUGetThorJobQueue(e){return this._connection.send("WUGetThorJobQueue",e,"json",!1,void 0,"WUGetThorJobQueueResponse")}WUGetZAPInfo(e){return this._connection.send("WUGetZAPInfo",e,"json",!1,void 0,"WUGetZAPInfoResponse")}WUGraphInfo(e){return this._connection.send("WUGraphInfo",e,"json",!1,void 0,"WUGraphInfoResponse")}WUGraphTiming(e){return this._connection.send("WUGraphTiming",e,"json",!1,void 0,"WUGraphTimingResponse")}WUInfo(e){return this._connection.send("WUInfo",e,"json",!1,void 0,"WUInfoResponse")}WUInfoDetails(e){return this._connection.send("WUInfoDetails",e,"json",!1,void 0,"WUInfoResponse")}WUJobList(e){return this._connection.send("WUJobList",e,"json",!1,void 0,"WUJobListResponse")}WULightWeightQuery(e){return this._connection.send("WULightWeightQuery",e,"json",!1,void 0,"WULightWeightQueryResponse")}WUListArchiveFiles(e){return this._connection.send("WUListArchiveFiles",e,"json",!1,void 0,"WUListArchiveFilesResponse")}WUListLocalFileRequired(e){return this._connection.send("WUListLocalFileRequired",e,"json",!1,void 0,"WUListLocalFileRequiredResponse")}WUListQueries(e){return this._connection.send("WUListQueries",e,"json",!1,void 0,"WUListQueriesResponse")}WUListQueriesUsingFile(e){return this._connection.send("WUListQueriesUsingFile",e,"json",!1,void 0,"WUListQueriesUsingFileResponse")}WUMultiQuerysetDetails(e){return this._connection.send("WUMultiQuerysetDetails",e,"json",!1,void 0,"WUMultiQuerySetDetailsResponse")}WUProcessGraph(e){return this._connection.send("WUProcessGraph",e,"json",!1,void 0,"WUProcessGraphResponse")}WUProtect(e){return this._connection.send("WUProtect",e,"json",!1,void 0,"WUProtectResponse")}WUPublishWorkunit(e){return this._connection.send("WUPublishWorkunit",e,"json",!1,void 0,"WUPublishWorkunitResponse")}WUPushEvent(e){return this._connection.send("WUPushEvent",e,"json",!1,void 0,"WUPushEventResponse")}WUQuery(e){return this._connection.send("WUQuery",e,"json",!1,void 0,"WUQueryResponse")}WUQueryConfig(e){return this._connection.send("WUQueryConfig",e,"json",!1,void 0,"WUQueryConfigResponse")}WUQueryDetails(e){return this._connection.send("WUQueryDetails",e,"json",!1,void 0,"WUQueryDetailsResponse")}WUQueryDetailsLightWeight(e){return this._connection.send("WUQueryDetailsLightWeight",e,"json",!1,void 0,"WUQueryDetailsResponse")}WUQueryFiles(e){return this._connection.send("WUQueryFiles",e,"json",!1,void 0,"WUQueryFilesResponse")}WUQueryGetGraph(e){return this._connection.send("WUQueryGetGraph",e,"json",!1,void 0,"WUQueryGetGraphResponse")}WUQueryGetSummaryStats(e){return this._connection.send("WUQueryGetSummaryStats",e,"json",!1,void 0,"WUQueryGetSummaryStatsResponse")}WUQuerysetAliasAction(e){return this._connection.send("WUQuerysetAliasAction",e,"json",!1,void 0,"WUQuerySetAliasActionResponse")}WUQuerysetCopyQuery(e){return this._connection.send("WUQuerysetCopyQuery",e,"json",!1,void 0,"WUQuerySetCopyQueryResponse")}WUQuerysetDetails(e){return this._connection.send("WUQuerysetDetails",e,"json",!1,void 0,"WUQuerySetDetailsResponse")}WUQuerysetExport(e){return this._connection.send("WUQuerysetExport",e,"json",!1,void 0,"WUQuerysetExportResponse")}WUQuerysetImport(e){return this._connection.send("WUQuerysetImport",e,"json",!1,void 0,"WUQuerysetImportResponse")}WUQuerysetQueryAction(e){return this._connection.send("WUQuerysetQueryAction",e,"json",!1,void 0,"WUQuerySetQueryActionResponse")}WUQuerysets(e){return this._connection.send("WUQuerysets",e,"json",!1,void 0,"WUQuerysetsResponse")}WURecreateQuery(e){return this._connection.send("WURecreateQuery",e,"json",!1,void 0,"WURecreateQueryResponse")}WUResubmit(e){return this._connection.send("WUResubmit",e,"json",!1,void 0,"WUResubmitResponse")}WUResult(e){return this._connection.send("WUResult",e,"json",!1,void 0,"WUResultResponse")}WUResultBin(e){return this._connection.send("WUResultBin",e,"json",!1,void 0,"WUResultBinResponse")}WUResultSummary(e){return this._connection.send("WUResultSummary",e,"json",!1,void 0,"WUResultSummaryResponse")}WUResultView(e){return this._connection.send("WUResultView",e,"json",!1,void 0,"WUResultViewResponse")}WURun(e){return this._connection.send("WURun",e,"json",!1,void 0,"WURunResponse")}WUSchedule(e){return this._connection.send("WUSchedule",e,"json",!1,void 0,"WUScheduleResponse")}WUShowScheduled(e){return this._connection.send("WUShowScheduled",e,"json",!1,void 0,"WUShowScheduledResponse")}WUSubmit(e){return this._connection.send("WUSubmit",e,"json",!1,void 0,"WUSubmitResponse")}WUSyntaxCheckECL(e){return this._connection.send("WUSyntaxCheckECL",e,"json",!1,void 0,"WUSyntaxCheckResponse")}WUUpdate(e){return this._connection.send("WUUpdate",e,"json",!1,void 0,"WUUpdateResponse")}WUUpdateQueryEntry(e){return this._connection.send("WUUpdateQueryEntry",e,"json",!1,void 0,"WUUpdateQueryEntryResponse")}WUWaitCompiled(e){return this._connection.send("WUWaitCompiled",e,"json",!1,void 0,"WUWaitResponse")}WUWaitComplete(e){return this._connection.send("WUWaitComplete",e,"json",!1,void 0,"WUWaitResponse")}};var ds=(f=>(f[f.Unknown=0]="Unknown",f[f.Compiled=1]="Compiled",f[f.Running=2]="Running",f[f.Completed=3]="Completed",f[f.Failed=4]="Failed",f[f.Archived=5]="Archived",f[f.Aborting=6]="Aborting",f[f.Aborted=7]="Aborted",f[f.Blocked=8]="Blocked",f[f.Submitted=9]="Submitted",f[f.Scheduled=10]="Scheduled",f[f.Compiling=11]="Compiling",f[f.Wait=12]="Wait",f[f.UploadingFiled=13]="UploadingFiled",f[f.DebugPaused=14]="DebugPaused",f[f.DebugRunning=15]="DebugRunning",f[f.Paused=16]="Paused",f[f.LAST=17]="LAST",f[f.NotFound=999]="NotFound",f))(ds||{}),fe;(e=>{let t;(d=>(d[d.Unknown=0]="Unknown",d[d.Compile=1]="Compile",d[d.Check=2]="Check",d[d.Run=3]="Run",d[d.ExecuteExisting=4]="ExecuteExisting",d[d.Pause=5]="Pause",d[d.PauseNow=6]="PauseNow",d[d.Resume=7]="Resume",d[d.Debug=8]="Debug",d[d.__size=9]="__size"))(t=e.Action||={})})(fe||={});function Fr(t){return typeof t.Name=="string"}function Rp(t){return t.TotalClusterTime!==void 0}function Cp(t){return t.StateEx!==void 0}var N=class extends Xe{constructor(e){super(e)}opts(){return this._connection.opts()}connection(){return this._connection.clone()}Ping(){return this._connection.send("Ping",{},"json",!1,void 0,"WsWorkunitsPingResponse").then(e=>({result:!0})).catch(e=>({result:!1,error:e}))}WUQuery(e={},s){return this._connection.send("WUQuery",e,"json",!1,s).then(r=>ot({Workunits:{ECLWorkunit:[]}},r))}WUInfo(e){let s={Wuid:"",TruncateEclTo64k:!0,IncludeExceptions:!1,IncludeGraphs:!1,IncludeSourceFiles:!1,IncludeResults:!1,IncludeResultsViewNames:!1,IncludeVariables:!1,IncludeTimers:!1,IncludeDebugValues:!1,IncludeApplicationValues:!1,IncludeWorkflows:!1,IncludeXmlSchemas:!1,IncludeResourceURLs:!1,IncludeECL:!1,IncludeHelpers:!1,IncludeAllowedClusters:!1,IncludeTotalClusterTime:!1,IncludeServiceNames:!1,SuppressResultSchemas:!0,...e};return super.WUInfo(s)}WUCreate(){return super.WUCreate({})}WUUpdate(e){return this._connection.send("WUUpdate",e,"json",!0)}WUResubmit(e){return this._connection.toESPStringArray(e,"Wuids"),super.WUResubmit(e)}WUAction(e){return e.ActionType=e.WUActionType,super.WUAction(e)}WUResult(e,s){return this._connection.send("WUResult",e,"json",!1,s)}WUFileEx(e){return this._connection.send("WUFile",e,"text")}_WUDetailsMetaPromise;WUDetailsMeta(e){return this._WUDetailsMetaPromise||(this._WUDetailsMetaPromise=super.WUDetailsMeta(e)),this._WUDetailsMetaPromise}WUCDebugEx(e){return this._connection.send("WUCDebug",e,void 0,void 0,void 0,"WUDebug").then(s=>{let n=rr(s.Result).children();return n.length?n[0]:null})}},Pt=class extends Xe{WUPublishWorkunitEx(e){return this._connection.send("WUPublishWorkunit",e)}};function Er(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function he(t,e){if((s=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var s,r=t.slice(0,s);return[r.length>1?r[0]+r.slice(2):r,+t.slice(s+1)]}function Tr(t){return t=he(Math.abs(t)),t?t[1]:NaN}function Ir(t,e){return function(s,r){for(var n=s.length,i=[],o=0,a=t[0],c=0;n>0&&a>0&&(c+a+1>r&&(a=Math.max(1,r-c)),i.push(s.substring(n-=a,n+a)),!((c+=a+1)>r));)a=t[o=(o+1)%t.length];return i.reverse().join(e)}}function kr(t){return function(e){return e.replace(/[0-9]/g,function(s){return t[+s]})}}var bi=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ke(t){if(!(e=bi.exec(t)))throw new Error("invalid format: "+t);var e;return new fs({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Ke.prototype=fs.prototype;function fs(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}fs.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function _r(t){e:for(var e=t.length,s=1,r=-1,n;s<e;++s)switch(t[s]){case".":r=n=s;break;case"0":r===0&&(r=s),n=s;break;default:if(!+t[s])break e;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(n+1):t}var hs;function vr(t,e){var s=he(t,e);if(!s)return t+"";var r=s[0],n=s[1],i=n-(hs=Math.max(-8,Math.min(8,Math.floor(n/3)))*3)+1,o=r.length;return i===o?r:i>o?r+new Array(i-o+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+he(t,Math.max(0,e+i-1))[0]}function ms(t,e){var s=he(t,e);if(!s)return t+"";var r=s[0],n=s[1];return n<0?"0."+new Array(-n).join("0")+r:r.length>n+1?r.slice(0,n+1)+"."+r.slice(n+1):r+new Array(n-r.length+2).join("0")}var xs={"%":function(t,e){return(t*100).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:Er,e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return ms(t*100,e)},r:ms,s:vr,X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function Ss(t){return t}var Nr=Array.prototype.map,Mr=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function Lr(t){var e=t.grouping===void 0||t.thousands===void 0?Ss:Ir(Nr.call(t.grouping,Number),t.thousands+""),s=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",n=t.decimal===void 0?".":t.decimal+"",i=t.numerals===void 0?Ss:kr(Nr.call(t.numerals,String)),o=t.percent===void 0?"%":t.percent+"",a=t.minus===void 0?"-":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function p(l){l=Ke(l);var d=l.fill,U=l.align,I=l.sign,q=l.symbol,y=l.zero,x=l.width,ae=l.comma,f=l.precision,R=l.trim,m=l.type;m==="n"?(ae=!0,m="g"):xs[m]||(f===void 0&&(f=12),R=!0,m="g"),(y||d==="0"&&U==="=")&&(y=!0,d="0",U="=");var M=q==="$"?s:q==="#"&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",B=q==="$"?r:/[%p]/.test(m)?o:"",ue=xs[m],_=/[defgprs%]/.test(m);f=f===void 0?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f));function rt(D){var J=M,F=B,Z,nt,be;if(m==="c")F=ue(D)+F,D="";else{D=+D;var Ue=D<0||1/D<0;if(D=isNaN(D)?c:ue(Math.abs(D),f),R&&(D=_r(D)),Ue&&+D==0&&I!=="+"&&(Ue=!1),J=(Ue?I==="("?I:a:I==="-"||I==="("?"":I)+J,F=(m==="s"?Mr[8+hs/3]:"")+F+(Ue&&I==="("?")":""),_){for(Z=-1,nt=D.length;++Z<nt;)if(be=D.charCodeAt(Z),48>be||be>57){F=(be===46?n+D.slice(Z+1):D.slice(Z))+F,D=D.slice(0,Z);break}}}ae&&!y&&(D=e(D,1/0));var Pe=J.length+D.length+F.length,j=Pe<x?new Array(x-Pe+1).join(d):"";switch(ae&&y&&(D=e(j+D,j.length?x-F.length:1/0),j=""),U){case"<":D=J+D+F+j;break;case"=":D=J+j+D+F;break;case"^":D=j.slice(0,Pe=j.length>>1)+J+D+F+j.slice(Pe);break;default:D=j+J+D+F;break}return i(D)}return rt.toString=function(){return l+""},rt}function u(l,d){var U=p((l=Ke(l),l.type="f",l)),I=Math.max(-8,Math.min(8,Math.floor(Tr(d)/3)))*3,q=Math.pow(10,-I),y=Mr[8+I/3];return function(x){return U(q*x)+y}}return{format:p,formatPrefix:u}}var Ft,Ie,Ar;ys({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function ys(t){return Ft=Lr(t),Ie=Ft.format,Ar=Ft.formatPrefix,Ft}var Ws=new Date,Ds=new Date;function A(t,e,s,r){function n(i){return t(i=arguments.length===0?new Date:new Date(+i)),i}return n.floor=function(i){return t(i=new Date(+i)),i},n.ceil=function(i){return t(i=new Date(i-1)),e(i,1),t(i),i},n.round=function(i){var o=n(i),a=n.ceil(i);return i-o<a-i?o:a},n.offset=function(i,o){return e(i=new Date(+i),o==null?1:Math.floor(o)),i},n.range=function(i,o,a){var c=[],p;if(i=n.ceil(i),a=a==null?1:Math.floor(a),!(i<o)||!(a>0))return c;do c.push(p=new Date(+i)),e(i,a),t(i);while(p<i&&i<o);return c},n.filter=function(i){return A(function(o){if(o>=o)for(;t(o),!i(o);)o.setTime(o-1)},function(o,a){if(o>=o)if(a<0)for(;++a<=0;)for(;e(o,-1),!i(o););else for(;--a>=0;)for(;e(o,1),!i(o););})},s&&(n.count=function(i,o){return Ws.setTime(+i),Ds.setTime(+o),t(Ws),t(Ds),Math.floor(s(Ws,Ds))},n.every=function(i){return i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?n.filter(r?function(o){return r(o)%i===0}:function(o){return n.count(0,o)%i===0}):n}),n}var Et=6e4;var Tt=864e5,It=6048e5;var wr=A(function(t){t.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+e)},function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Et)/Tt},function(t){return t.getDate()-1}),kt=wr,Ui=wr.range;function me(t){return A(function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},function(e,s){e.setDate(e.getDate()+s*7)},function(e,s){return(s-e-(s.getTimezoneOffset()-e.getTimezoneOffset())*Et)/It})}var He=me(0),ke=me(1),Gr=me(2),Qr=me(3),se=me(4),Vr=me(5),Or=me(6),qr=He.range,Pi=ke.range,Fi=Gr.range,Ei=Qr.range,Ti=se.range,Ii=Vr.range,ki=Or.range;var Rs=A(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t,e){return e.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});Rs.every=function(t){return!isFinite(t=Math.floor(t))||!(t>0)?null:A(function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,s){e.setFullYear(e.getFullYear()+s*t)})};var xe=Rs,_i=Rs.range;var Br=A(function(t){t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+e)},function(t,e){return(e-t)/Tt},function(t){return t.getUTCDate()-1}),_t=Br,vi=Br.range;function Se(t){return A(function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},function(e,s){e.setUTCDate(e.getUTCDate()+s*7)},function(e,s){return(s-e)/It})}var Je=Se(0),_e=Se(1),jr=Se(2),Xr=Se(3),re=Se(4),Kr=Se(5),Hr=Se(6),Jr=Je.range,Ni=_e.range,Mi=jr.range,Li=Xr.range,Ai=re.range,wi=Kr.range,Gi=Hr.range;var Cs=A(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)},function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});Cs.every=function(t){return!isFinite(t=Math.floor(t))||!(t>0)?null:A(function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,s){e.setUTCFullYear(e.getUTCFullYear()+s*t)})};var ye=Cs,Qi=Cs.range;function bs(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Us(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function $e(t,e,s){return{y:t,m:e,d:s,H:0,M:0,S:0,L:0}}function Ps(t){var e=t.dateTime,s=t.date,r=t.time,n=t.periods,i=t.days,o=t.shortDays,a=t.months,c=t.shortMonths,p=ze(n),u=Ze(n),l=ze(i),d=Ze(i),U=ze(o),I=Ze(o),q=ze(a),y=Ze(a),x=ze(c),ae=Ze(c),f={a:Ue,A:Pe,b:j,B:Tn,c:null,d:tn,e:tn,f:co,g:Wo,G:Ro,H:oo,I:ao,j:uo,L:an,m:lo,M:po,p:In,q:kn,Q:nn,s:on,S:go,u:fo,U:ho,V:mo,w:xo,W:So,x:null,X:null,y:yo,Y:Do,Z:Co,"%":rn},R={a:_n,A:vn,b:Nn,B:Mn,c:null,d:sn,e:sn,f:Fo,g:Ao,G:Go,H:bo,I:Uo,j:Po,L:cn,m:Eo,M:To,p:Ln,q:An,Q:nn,s:on,S:Io,u:ko,U:_o,V:vo,w:No,W:Mo,x:null,X:null,y:Lo,Y:wo,Z:Qo,"%":rn},m={a:rt,A:D,b:J,B:F,c:Z,d:Yr,e:Yr,f:so,g:Zr,G:zr,H:en,I:en,j:Zi,L:to,m:zi,M:Yi,p:_,q:$i,Q:no,s:io,S:eo,u:ji,U:Xi,V:Ki,w:Bi,W:Hi,x:nt,X:be,y:Zr,Y:zr,Z:Ji,"%":ro};f.x=M(s,f),f.X=M(r,f),f.c=M(e,f),R.x=M(s,R),R.X=M(r,R),R.c=M(e,R);function M(h,W){return function(C){var g=[],G=-1,E=0,Q=h.length,V,ce,Xs;for(C instanceof Date||(C=new Date(+C));++G<Q;)h.charCodeAt(G)===37&&(g.push(h.slice(E,G)),(ce=$r[V=h.charAt(++G)])!=null?V=h.charAt(++G):ce=V==="e"?" ":"0",(Xs=W[V])&&(V=Xs(C,ce)),g.push(V),E=G+1);return g.push(h.slice(E,G)),g.join("")}}function B(h,W){return function(C){var g=$e(1900,void 0,1),G=ue(g,h,C+="",0),E,Q;if(G!=C.length)return null;if("Q"in g)return new Date(g.Q);if("s"in g)return new Date(g.s*1e3+("L"in g?g.L:0));if(W&&!("Z"in g)&&(g.Z=0),"p"in g&&(g.H=g.H%12+g.p*12),g.m===void 0&&(g.m="q"in g?g.q:0),"V"in g){if(g.V<1||g.V>53)return null;"w"in g||(g.w=1),"Z"in g?(E=Us($e(g.y,0,1)),Q=E.getUTCDay(),E=Q>4||Q===0?_e.ceil(E):_e(E),E=_t.offset(E,(g.V-1)*7),g.y=E.getUTCFullYear(),g.m=E.getUTCMonth(),g.d=E.getUTCDate()+(g.w+6)%7):(E=bs($e(g.y,0,1)),Q=E.getDay(),E=Q>4||Q===0?ke.ceil(E):ke(E),E=kt.offset(E,(g.V-1)*7),g.y=E.getFullYear(),g.m=E.getMonth(),g.d=E.getDate()+(g.w+6)%7)}else("W"in g||"U"in g)&&("w"in g||(g.w="u"in g?g.u%7:"W"in g?1:0),Q="Z"in g?Us($e(g.y,0,1)).getUTCDay():bs($e(g.y,0,1)).getDay(),g.m=0,g.d="W"in g?(g.w+6)%7+g.W*7-(Q+5)%7:g.w+g.U*7-(Q+6)%7);return"Z"in g?(g.H+=g.Z/100|0,g.M+=g.Z%100,Us(g)):bs(g)}}function ue(h,W,C,g){for(var G=0,E=W.length,Q=C.length,V,ce;G<E;){if(g>=Q)return-1;if(V=W.charCodeAt(G++),V===37){if(V=W.charAt(G++),ce=m[V in $r?W.charAt(G++):V],!ce||(g=ce(h,C,g))<0)return-1}else if(V!=C.charCodeAt(g++))return-1}return g}function _(h,W,C){var g=p.exec(W.slice(C));return g?(h.p=u[g[0].toLowerCase()],C+g[0].length):-1}function rt(h,W,C){var g=U.exec(W.slice(C));return g?(h.w=I[g[0].toLowerCase()],C+g[0].length):-1}function D(h,W,C){var g=l.exec(W.slice(C));return g?(h.w=d[g[0].toLowerCase()],C+g[0].length):-1}function J(h,W,C){var g=x.exec(W.slice(C));return g?(h.m=ae[g[0].toLowerCase()],C+g[0].length):-1}function F(h,W,C){var g=q.exec(W.slice(C));return g?(h.m=y[g[0].toLowerCase()],C+g[0].length):-1}function Z(h,W,C){return ue(h,e,W,C)}function nt(h,W,C){return ue(h,s,W,C)}function be(h,W,C){return ue(h,r,W,C)}function Ue(h){return o[h.getDay()]}function Pe(h){return i[h.getDay()]}function j(h){return c[h.getMonth()]}function Tn(h){return a[h.getMonth()]}function In(h){return n[+(h.getHours()>=12)]}function kn(h){return 1+~~(h.getMonth()/3)}function _n(h){return o[h.getUTCDay()]}function vn(h){return i[h.getUTCDay()]}function Nn(h){return c[h.getUTCMonth()]}function Mn(h){return a[h.getUTCMonth()]}function Ln(h){return n[+(h.getUTCHours()>=12)]}function An(h){return 1+~~(h.getUTCMonth()/3)}return{format:function(h){var W=M(h+="",f);return W.toString=function(){return h},W},parse:function(h){var W=B(h+="",!1);return W.toString=function(){return h},W},utcFormat:function(h){var W=M(h+="",R);return W.toString=function(){return h},W},utcParse:function(h){var W=B(h+="",!0);return W.toString=function(){return h},W}}}var $r={"-":"",_:" ",0:"0"},v=/^\s*\d+/,Vi=/^%/,Oi=/[\\^$*+?|[\]().{}]/g;function b(t,e,s){var r=t<0?"-":"",n=(r?-t:t)+"",i=n.length;return r+(i<s?new Array(s-i+1).join(e)+n:n)}function qi(t){return t.replace(Oi,"\\$&")}function ze(t){return new RegExp("^(?:"+t.map(qi).join("|")+")","i")}function Ze(t){for(var e={},s=-1,r=t.length;++s<r;)e[t[s].toLowerCase()]=s;return e}function Bi(t,e,s){var r=v.exec(e.slice(s,s+1));return r?(t.w=+r[0],s+r[0].length):-1}function ji(t,e,s){var r=v.exec(e.slice(s,s+1));return r?(t.u=+r[0],s+r[0].length):-1}function Xi(t,e,s){var r=v.exec(e.slice(s,s+2));return r?(t.U=+r[0],s+r[0].length):-1}function Ki(t,e,s){var r=v.exec(e.slice(s,s+2));return r?(t.V=+r[0],s+r[0].length):-1}function Hi(t,e,s){var r=v.exec(e.slice(s,s+2));return r?(t.W=+r[0],s+r[0].length):-1}function zr(t,e,s){var r=v.exec(e.slice(s,s+4));return r?(t.y=+r[0],s+r[0].length):-1}function Zr(t,e,s){var r=v.exec(e.slice(s,s+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),s+r[0].length):-1}function Ji(t,e,s){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(s,s+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),s+r[0].length):-1}function $i(t,e,s){var r=v.exec(e.slice(s,s+1));return r?(t.q=r[0]*3-3,s+r[0].length):-1}function zi(t,e,s){var r=v.exec(e.slice(s,s+2));return r?(t.m=r[0]-1,s+r[0].length):-1}function Yr(t,e,s){var r=v.exec(e.slice(s,s+2));return r?(t.d=+r[0],s+r[0].length):-1}function Zi(t,e,s){var r=v.exec(e.slice(s,s+3));return r?(t.m=0,t.d=+r[0],s+r[0].length):-1}function en(t,e,s){var r=v.exec(e.slice(s,s+2));return r?(t.H=+r[0],s+r[0].length):-1}function Yi(t,e,s){var r=v.exec(e.slice(s,s+2));return r?(t.M=+r[0],s+r[0].length):-1}function eo(t,e,s){var r=v.exec(e.slice(s,s+2));return r?(t.S=+r[0],s+r[0].length):-1}function to(t,e,s){var r=v.exec(e.slice(s,s+3));return r?(t.L=+r[0],s+r[0].length):-1}function so(t,e,s){var r=v.exec(e.slice(s,s+6));return r?(t.L=Math.floor(r[0]/1e3),s+r[0].length):-1}function ro(t,e,s){var r=Vi.exec(e.slice(s,s+1));return r?s+r[0].length:-1}function no(t,e,s){var r=v.exec(e.slice(s));return r?(t.Q=+r[0],s+r[0].length):-1}function io(t,e,s){var r=v.exec(e.slice(s));return r?(t.s=+r[0],s+r[0].length):-1}function tn(t,e){return b(t.getDate(),e,2)}function oo(t,e){return b(t.getHours(),e,2)}function ao(t,e){return b(t.getHours()%12||12,e,2)}function uo(t,e){return b(1+kt.count(xe(t),t),e,3)}function an(t,e){return b(t.getMilliseconds(),e,3)}function co(t,e){return an(t,e)+"000"}function lo(t,e){return b(t.getMonth()+1,e,2)}function po(t,e){return b(t.getMinutes(),e,2)}function go(t,e){return b(t.getSeconds(),e,2)}function fo(t){var e=t.getDay();return e===0?7:e}function ho(t,e){return b(He.count(xe(t)-1,t),e,2)}function un(t){var e=t.getDay();return e>=4||e===0?se(t):se.ceil(t)}function mo(t,e){return t=un(t),b(se.count(xe(t),t)+(xe(t).getDay()===4),e,2)}function xo(t){return t.getDay()}function So(t,e){return b(ke.count(xe(t)-1,t),e,2)}function yo(t,e){return b(t.getFullYear()%100,e,2)}function Wo(t,e){return t=un(t),b(t.getFullYear()%100,e,2)}function Do(t,e){return b(t.getFullYear()%1e4,e,4)}function Ro(t,e){var s=t.getDay();return t=s>=4||s===0?se(t):se.ceil(t),b(t.getFullYear()%1e4,e,4)}function Co(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+b(e/60|0,"0",2)+b(e%60,"0",2)}function sn(t,e){return b(t.getUTCDate(),e,2)}function bo(t,e){return b(t.getUTCHours(),e,2)}function Uo(t,e){return b(t.getUTCHours()%12||12,e,2)}function Po(t,e){return b(1+_t.count(ye(t),t),e,3)}function cn(t,e){return b(t.getUTCMilliseconds(),e,3)}function Fo(t,e){return cn(t,e)+"000"}function Eo(t,e){return b(t.getUTCMonth()+1,e,2)}function To(t,e){return b(t.getUTCMinutes(),e,2)}function Io(t,e){return b(t.getUTCSeconds(),e,2)}function ko(t){var e=t.getUTCDay();return e===0?7:e}function _o(t,e){return b(Je.count(ye(t)-1,t),e,2)}function ln(t){var e=t.getUTCDay();return e>=4||e===0?re(t):re.ceil(t)}function vo(t,e){return t=ln(t),b(re.count(ye(t),t)+(ye(t).getUTCDay()===4),e,2)}function No(t){return t.getUTCDay()}function Mo(t,e){return b(_e.count(ye(t)-1,t),e,2)}function Lo(t,e){return b(t.getUTCFullYear()%100,e,2)}function Ao(t,e){return t=ln(t),b(t.getUTCFullYear()%100,e,2)}function wo(t,e){return b(t.getUTCFullYear()%1e4,e,4)}function Go(t,e){var s=t.getUTCDay();return t=s>=4||s===0?re(t):re.ceil(t),b(t.getUTCFullYear()%1e4,e,4)}function Qo(){return"+0000"}function rn(){return"%"}function nn(t){return+t}function on(t){return Math.floor(+t/1e3)}var ve,pn,gn,vt,Nt;Fs({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Fs(t){return ve=Ps(t),pn=ve.format,gn=ve.parse,vt=ve.utcFormat,Nt=ve.utcParse,ve}var Mt=class extends P{wu;get properties(){return this.get()}get Name(){return this.get("Name")}get Label(){return this.get("Label")}get Type(){return this.get("Type")}get Complete(){return this.get("Complete")}get WhenStarted(){return this.get("WhenStarted")}get WhenFinished(){return this.get("WhenFinished")}get Time(){return this.get("Time")}get Running(){return this.get("Running")}get RunningId(){return this.get("RunningId")}get Failed(){return this.get("Failed")}constructor(e,s,r){super(),this.wu=e;let n=0;for(let i of r)if(i.GraphName===s.Name&&!i.HasSubGraphId){n=Math.round(i.Seconds*1e3)/1e3;break}this.set({Time:n,...s})}fetchScopeGraph(e){return e?this.wu.fetchGraphDetails([e],["subgraph"]).then(s=>wt(s)):this.wu.fetchGraphDetails([this.Name],["graph"]).then(s=>wt(s))}},Lt=class extends T{constructor(){super(e=>T.hash([e.Name]))}};function yn(t,e,s){s=s||[],s.push(t),e(t.name,t.$,t.children(),s),t.children().forEach(r=>{yn(r,e,s)}),s.pop()}function Es(t){let e={};return t.forEach(s=>{s.name==="att"&&(e[s.$.name]=s.$.value)}),e}var Ts=class extends os{},dn=class extends Fe{},fn=class extends Ee{},hn=class extends Le{};function Wn(t,e){let s={},r={},n={},i=new Ts(a=>a._.id),o=[i.root];return yn(e,(a,c,p,u)=>{let l=o[o.length-1];switch(a){case"graph":break;case"node":if(p.length&&p[0].children().length&&p[0].children()[0].name==="graph"){let I=l.createSubgraph(Es(p));o.push(I),s[c.id]=I}let d=l.createVertex(Es(p));r[c.id]=d;break;case"edge":let U=l.createEdge(r[c.source],r[c.target],Es(p));n[c.id]=U;break;default:}}),i}var At=class extends os{},mn=class extends Fe{},xn=class extends Ee{},Sn=class extends Le{};function wt(t){let e={},s={},r={},n;for(let i of t)switch(i.ScopeType){case"graph":n=new At(u=>u._.Id,i),e[i.ScopeName]=n.root;break;case"subgraph":n||(n=new At(u=>u._.Id,i),e[i.ScopeName]=n.root);let o=i.parentScope().split(":"),a=e[i.parentScope()];for(;o.length&&!a;)a=e[o.join(":")],o.pop();if(!a)console.warn(`Missing SG:Parent (${i.Id}): ${i.parentScope()}`);else{let u=a;e[i.ScopeName]=u.createSubgraph(i)}break;case"activity":let c=e[i.parentScope()];c?r[i.ScopeName]=c.createVertex(i):console.warn(`Missing A:Parent (${i.Id}): ${i.parentScope()}`);break;case"edge":s[i.ScopeName]=i;break;case"function":let p=r[i.parentScope()];p?p._.children().push(i):console.warn(`Missing F:Parent (${i.Id}): ${i.parentScope()}`);break}for(let i in s){let o=s[i],a=e[o.parentScope()];if(!a)console.warn(`Missing E:Parent (${o.Id}): ${o.parentScope()}`);else{let c=a;try{let p=n.vertex(o.attr("IdSource").RawValue),u=n.vertex(o.attr("IdTarget").RawValue);c.createEdge(p,u,o)}catch{console.warn(`Invalid Edge: ${i}`)}}}return n}var Gt=class extends P{wu;get properties(){return this.get()}get URL(){return this.get("URL")}get DisplayName(){return this.get("DisplayName")}get DisplayPath(){return this.get("DisplayPath")}constructor(e,s){super(),this.wu=e;let r=s.split("\\").join("/"),n=r.split("/"),i="res/"+this.wu.Wuid+"/",o="",a="";r.indexOf(i)===0&&(o=r.substr(i.length),a=n[n.length-1]),this.set({URL:s,DisplayName:a,DisplayPath:o})}};var Qt=class{e;constructor(e){this.e=e}fix(){delete this.e}},Vt=class extends Qt{name;type;isSet=!1;attrs={};_children=[];constructor(e){super(e)}append(e){this._children.push(e),this.type||(this.type="hpcc:childDataset")}fix(){this.name=this.e.$.name,this.type=this.e.$.type;for(let s=this._children.length-1;s>=0;--s){let r=this._children[s];r.name==="Row"&&r.type===void 0&&(this._children.push(...r._children),this._children.splice(s,1))}let e=this.setOfType();e&&(this.type=e,this.isSet=!0,this._children=[])}children(){return this._children}isAll(e){return e.name==="All"&&e.type===void 0}setOfType(){let e=this.children();if(this.type===void 0&&e.length===2){if(this.isAll(e[0]))return e[1].type;if(this.isAll(e[1]))return e[0].type}}charWidth(){let e=-1;switch(this.type){case"xs:boolean":e=5;break;case"xs:integer":e=8;break;case"xs:nonNegativeInteger":e=8;break;case"xs:double":e=8;break;case"xs:string":e=32;break;default:let s="0123456789",r=this.type.lastIndexOf("_"),n=r>0?r:this.type.length,i=n-1;for(;i>=0&&s.indexOf(this.type.charAt(i))!==-1;--i);i+1<n&&(e=parseInt(this.type.substring(i+1,n),10)),this.type.indexOf("data")===0&&(e*=2);break}return e<this.name.length&&(e=this.name.length),e}},Ot=class extends Qt{name;type;maxLength;_restricition;_maxLength;constructor(e){super(e)}append(e){switch(e.name){case"xs:restriction":this._restricition=e;break;case"xs:maxLength":this._maxLength=e;break;default:}}fix(){this.name=this.e.$.name,this.type=this._restricition.$.base,this.maxLength=this._maxLength?+this._maxLength.$.value:void 0,delete this._restricition,delete this._maxLength,super.fix()}},qt=class{root;simpleTypes={};fields(){return this.root.children()}},Bt=class extends cs{schema=new qt;simpleType;simpleTypes={};xsdStack=new Ae;startXMLNode(e){switch(super.startXMLNode(e),e.name){case"xs:element":let s=new Vt(e);this.schema.root?this.xsdStack.depth()&&this.xsdStack.top().append(s):this.schema.root=s,this.xsdStack.push(s);break;case"xs:simpleType":this.simpleType=new Ot(e);break;default:break}}endXMLNode(e){switch(e.name){case"xs:element":this.xsdStack.pop().fix();break;case"xs:simpleType":this.simpleType.fix(),this.simpleTypes[this.simpleType.name]=this.simpleType,delete this.simpleType;break;case"xs:appinfo":let r=this.xsdStack.top();for(let n in e.$)r.attrs[n]=e.$[n];break;default:this.simpleType&&this.simpleType.append(e)}super.endXMLNode(e)}};function ks(t){let e=new Bt;return e.parse(t),e.schema}var Is=class extends Bt{_rootName;schema=new qt;simpleTypes={};xsdStack=new Ae;constructor(e){super(),this._rootName=e}startXMLNode(e){switch(super.startXMLNode(e),e.name){case"xsd:element":let s=new Vt(e);!this.schema.root&&this._rootName===e.$.name&&(this.schema.root=s),this.xsdStack.depth()&&this.xsdStack.top().append(s),this.xsdStack.push(s);break;case"xsd:simpleType":this.simpleType=new Ot(e);break;default:break}}endXMLNode(e){switch(e.name){case"xsd:element":this.xsdStack.pop().fix();break;case"xsd:simpleType":break;default:break}super.endXMLNode(e)}};function Gg(t,e){let s=new Is(e);return s.parse(t),s.schema}var _s=class extends T{constructor(){super(e=>`${e.BaseUrl}-${e.Wuid}-${e.ResultName}`)}},jt=new _s,Xt=class t extends P{connection;get BaseUrl(){return this.connection.baseUrl}xsdSchema;get properties(){return this.get()}get Wuid(){return this.get("Wuid")}get ResultName(){return this.get("ResultName")}get ResultSequence(){return this.get("ResultSequence")}get LogicalFileName(){return this.get("LogicalFileName")}get Name(){return this.get("Name")}get Sequence(){return this.get("Sequence")}get Value(){return this.get("Value")}get Link(){return this.get("Link")}get FileName(){return this.get("FileName")}get IsSupplied(){return this.get("IsSupplied")}get ShowFileContent(){return this.get("ShowFileContent")}get Total(){return this.get("Total")}get ECLSchemas(){return this.get("ECLSchemas")}get NodeGroup(){return this.get("NodeGroup")}get ResultViews(){return this.get("ResultViews")}get XmlSchema(){return this.get("XmlSchema")}static attach(e,s,r,n){let i;return Array.isArray(n)?(i=jt.get({BaseUrl:e.baseUrl,Wuid:s,ResultName:r.Name},()=>new t(e,s,r,n)),i.set(r)):typeof n>"u"&&(typeof r=="number"?i=jt.get({BaseUrl:e.baseUrl,Wuid:s,ResultName:"Sequence_"+r},()=>new t(e,s,r)):typeof r=="string"&&(i=jt.get({BaseUrl:e.baseUrl,Wuid:s,ResultName:r},()=>new t(e,s,r)))),i}static attachLogicalFile(e,s,r){return jt.get({BaseUrl:e.baseUrl,Wuid:s,ResultName:r},()=>new t(e,s,r,!0))}constructor(e,s,r,n){super(),e instanceof N?this.connection=e:this.connection=new N(e),typeof n=="boolean"&&n===!0?this.set({NodeGroup:s,LogicalFileName:r}):Fr(r)&&Array.isArray(n)?this.set({...r,Wuid:s,ResultName:r.Name,ResultViews:n}):typeof n>"u"?typeof r=="number"?this.set({Wuid:s,ResultSequence:r}):typeof r=="string"?this.set({Wuid:s,ResultName:r}):console.warn("Unknown Result.attach (1)"):console.warn("Unknown Result.attach (2)")}isComplete(){return this.Total!==-1}_fetchXMLSchemaPromise;fetchXMLSchema(e=!1){return(!this._fetchXMLSchemaPromise||e)&&(this._fetchXMLSchemaPromise=this.WUResult().then(s=>s.Result?.XmlSchema?.xml?(this.xsdSchema=ks(s.Result.XmlSchema.xml),this.xsdSchema):null)),this._fetchXMLSchemaPromise}async refresh(){return await this.fetchRows(0,1,!0),this}fetchRows(e=0,s=-1,r=!1,n={},i){return this.WUResult(e,s,!r,n,i).then(o=>{let a=o.Result;return delete o.Result,this.set({...o}),$("XmlSchema.xml",a)&&(this.xsdSchema=ks(a.XmlSchema.xml)),$("Row",a)?a.Row:this.ResultName&&$(this.ResultName,a)?a[this.ResultName].Row:[]})}rootField(){return this.xsdSchema?this.xsdSchema.root:null}fields(){return this.xsdSchema?this.xsdSchema.root.children():[]}WUResult(e=0,s=1,r=!1,n={},i){let o={NamedValue:{itemcount:0}};for(let c in n)o.NamedValue[o.NamedValue.itemcount++]={Name:c,Value:n[c]};let a={FilterBy:o};return this.Wuid&&this.ResultName!==void 0?(a.Wuid=this.Wuid,a.ResultName=this.ResultName):this.Wuid&&this.ResultSequence!==void 0?(a.Wuid=this.Wuid,a.Sequence=this.ResultSequence):this.LogicalFileName&&this.NodeGroup?(a.LogicalName=this.LogicalFileName,a.Cluster=this.NodeGroup):this.LogicalFileName&&(a.LogicalName=this.LogicalFileName),a.Start=e,a.Count=s,a.SuppressXmlSchema=r,this.connection.WUResult(a,i).then(c=>c)}},Kt=class extends T{constructor(){super(e=>T.hash([e.Sequence,e.Name,e.Value,e.FileName]))}};var We=class extends P{scope;get properties(){return this.get()}get Name(){return this.get("Name")}get RawValue(){return this.get("RawValue")}get Formatted(){return this.get("Formatted")}get FormattedEnd(){return this.get("FormattedEnd")}get Measure(){return this.get("Measure")}get Creator(){return this.get("Creator")}get CreatorType(){return this.get("CreatorType")}constructor(e,s){super(),this.scope=e,this.set(s)}},vs=class extends P{_attributeMap={};_children=[];get properties(){return this.get()}get ScopeName(){return this.get("ScopeName")}get Id(){return this.get("Id")}get ScopeType(){return this.get("ScopeType")}get Properties(){return this.get("Properties",{Property:[]})}get Notes(){return this.get("Notes",{Note:[]})}get SinkActivity(){return this.get("SinkActivity")}get CAttributes(){let e=[],s={start:null,end:null};return this.Properties.Property.forEach(r=>{r.Measure==="ts"&&r.Name.indexOf("Started")>=0?s.start=r:this.ScopeName&&r.Measure==="ts"&&r.Name.indexOf("Finished")>=0?s.end=r:e.push(new We(this,r))}),s.start&&s.end?(s.start.FormattedEnd=s.end.Formatted,e.push(new We(this,s.start))):s.start?e.push(new We(this,s.start)):s.end&&e.push(new We(this,s.end)),e}constructor(e){super(),this.update(e)}update(e){this.set(e),this.CAttributes.forEach(s=>{this._attributeMap[s.Name]=s}),this.Properties.Property=[];for(let s in this._attributeMap)this._attributeMap.hasOwnProperty(s)&&this.Properties.Property.push(this._attributeMap[s].properties)}parentScope(){let e=this.ScopeName.split(":");return e.pop(),e.join(":")}children(e){return arguments.length?(this._children=e,this):this._children}walk(e){if(e.start(this))return!0;for(let s of this.children())if(s.walk(e))return!0;return e.end(this)}formattedAttrs(){let e={};for(let s in this._attributeMap)e[s]=this._attributeMap[s].Formatted||this._attributeMap[s].RawValue;return e}rawAttrs(){let e={};for(let s in this._attributeMap)e[s]=this._attributeMap[s].RawValue;return e}hasAttr(e){return this._attributeMap[e]!==void 0}attr(e){return this._attributeMap[e]||new We(this,{Creator:"",CreatorType:"",Formatted:"",Measure:"",Name:"",RawValue:""})}attrMeasure(e){return this._attributeMap[e].Measure}calcTooltip(e){let s="",r=[];s=this.Id,r.push(`<tr><td class="key">ID:</td><td class="value">${this.Id}</td></tr>`),e&&r.push(`<tr><td class="key">Parent ID:</td><td class="value">${e.Id}</td></tr>`),r.push(`<tr><td class="key">Scope:</td><td class="value">${this.ScopeName}</td></tr>`);let n=this.formattedAttrs();for(let i in n)i==="Label"?s=n[i]:r.push(`<tr><td class="key">${i}</td><td class="value">${n[i]}</td></tr>`);return`<div class="eclwatch_WUGraph_Tooltip" style="max-width:480px">
2
- <h4 align="center">${s}</h4>
3
- <table>
4
- ${r.join("")}
5
- </table>
6
- </div>`}},Ye=class extends vs{wu;constructor(e,s){super(s),this.wu=e}};var Ht=class extends P{connection;get properties(){return this.get()}get Wuid(){return this.get("Wuid")}get FileCluster(){return this.get("FileCluster")}get Name(){return this.get("Name")}get IsSuperFile(){return this.get("IsSuperFile")}get Subs(){return this.get("Subs")}get Count(){return this.get("Count")}get ECLSourceFiles(){return this.get("ECLSourceFiles")}constructor(e,s,r){super(),e instanceof N?this.connection=e:this.connection=new N(e),this.set({Wuid:s,...r})}};var Jt=class extends P{connection;get properties(){return this.get()}get Wuid(){return this.get("Wuid")}get Name(){return this.get("Name")}get Value(){return this.get("Value")}get Seconds(){return this.get("Seconds")}get GraphName(){return this.get("GraphName")}get SubGraphId(){return this.get("SubGraphId")}get HasSubGraphId(){return this.get("HasSubGraphId")}get count(){return this.get("count")}get Timestamp(){return this.get("Timestamp")}get When(){return this.get("When")}constructor(e,s,r){super(),e instanceof N?this.connection=e:this.connection=new N(e);let n=er(r.Value);this.set({Wuid:s,Seconds:Math.round(n*1e3)/1e3,HasSubGraphId:r.SubGraphId!==void 0,...r})}};var Vo=vt("%Y-%m-%dT%H:%M:%S.%LZ"),Oo=Nt("%Y-%m-%dT%H:%M:%S.%LZ"),qo=Ie(",");function Bo(t){return t&&!isNaN(+t)?qo(+t):t}function Dn(t,e,s){t[e]===void 0||t[e][s]===void 0||e==="__proto__"||e==="constructor"||e==="prototype"||delete t[e][s]}var et="DefinitionList",jo=/([a-zA-Z]:)?(.*[\\\/])(.*)(\((\d+),(\d+)\))/,Xo=["Avg","Min","Max","Delta","StdDev"],Ko=["SkewMin","SkewMax","NodeMin","NodeMax"],Ho=/[A-Z][a-z]*/g;function Jo(t){for(let s of Ko){let r=t.indexOf(s);if(r===0){let n="",i=t.slice(r+s.length);return{measure:n,ext:s,label:i}}}let e=t.match(Ho);if(e?.length){let s=e.shift(),r=e.join("");for(let n of Xo){let i=r.indexOf(n);if(i===0)return r=r.slice(i+n.length),{measure:s,ext:n,label:r}}return{measure:s,ext:"",label:r}}return{measure:"",ext:"",label:t}}var Rn={};function $o(t){let e=Rn[t];return e||(e=Jo(t),Rn[t]=e),e}function H(t,e){return t.__formattedProps?.[e]??t[e]}function $t(t){if(t===void 0)return;let e=parseFloat(t);return isNaN(e)?void 0:e}function zo(t,e,s){let r=$o(e);if(!s[r.measure]){s[r.label]=!0;let n=$t(t[`${r.measure}Avg${r.label}`]),i=$t(t[`${r.measure}Min${r.label}`]),o=$t(t[`${r.measure}Max${r.label}`]),a=$t(t[`${r.measure}StdDev${r.label}`]),c=Math.max((n-i)/a,(o-n)/a);return{Key:`${r.measure}${r.label}`,Value:H(t,`${r.measure}${r.label}`),Avg:H(t,`${r.measure}Avg${r.label}`),Min:H(t,`${r.measure}Min${r.label}`),Max:H(t,`${r.measure}Max${r.label}`),Delta:H(t,`${r.measure}Delta${r.label}`),StdDev:H(t,`${r.measure}StdDev${r.label}`),StdDevs:isNaN(c)?void 0:c,SkewMin:H(t,`SkewMin${r.label}`),SkewMax:H(t,`SkewMax${r.label}`),NodeMin:H(t,`NodeMin${r.label}`),NodeMax:H(t,`NodeMax${r.label}`)}}return null}var zt=O("workunit.ts"),Ns=class extends T{constructor(){super(e=>`${e.BaseUrl}-${e.Wuid}`)}},Zt=new Ns,Ne=class t extends P{connection;topologyConnection;get BaseUrl(){return this.connection.baseUrl}_debugMode=!1;_debugAllGraph;_submitAction;get properties(){return this.get()}get Wuid(){return this.get("Wuid")}get Owner(){return this.get("Owner","")}get Cluster(){return this.get("Cluster","")}get Jobname(){return this.get("Jobname","")}get Description(){return this.get("Description","")}get ActionEx(){return this.get("ActionEx","")}get StateID(){return this.get("StateID",0)}get State(){return this.get("State")||ds[this.StateID]}get Protected(){return this.get("Protected",!1)}get Exceptions(){return this.get("Exceptions",{ECLException:[]})}get ResultViews(){return this.get("ResultViews",{View:[]})}_resultCache=new Kt;get ResultCount(){return this.get("ResultCount",0)}get Results(){return this.get("Results",{ECLResult:[]})}get CResults(){return this.Results.ECLResult.map(e=>this._resultCache.get(e,()=>Xt.attach(this.connection,this.Wuid,e,this.ResultViews.View)))}get SequenceResults(){let e={};return this.CResults.forEach(s=>{e[s.Sequence]=s}),e}get Timers(){return this.get("Timers",{ECLTimer:[]})}get CTimers(){return this.Timers.ECLTimer.map(e=>new Jt(this.connection,this.Wuid,e))}_graphCache=new Lt;get GraphCount(){return this.get("GraphCount",0)}get Graphs(){return this.get("Graphs",{ECLGraph:[]})}get CGraphs(){return this.Graphs.ECLGraph.map(e=>this._graphCache.get(e,()=>new Mt(this,e,this.CTimers)))}get ThorLogList(){return this.get("ThorLogList")}get ResourceURLCount(){return this.get("ResourceURLCount",0)}get ResourceURLs(){return this.get("ResourceURLs",{URL:[]})}get CResourceURLs(){return this.ResourceURLs.URL.map(e=>new Gt(this,e))}get TotalClusterTime(){return this.get("TotalClusterTime","")}get DateTimeScheduled(){return this.get("DateTimeScheduled")}get IsPausing(){return this.get("IsPausing")}get ThorLCR(){return this.get("ThorLCR")}get ApplicationValues(){return this.get("ApplicationValues",{ApplicationValue:[]})}get HasArchiveQuery(){return this.get("HasArchiveQuery")}get StateEx(){return this.get("StateEx")}get PriorityClass(){return this.get("PriorityClass")}get PriorityLevel(){return this.get("PriorityLevel")}get Snapshot(){return this.get("Snapshot")}get ResultLimit(){return this.get("ResultLimit")}get EventSchedule(){return this.get("EventSchedule")}get Query(){return this.get("Query")}get HelpersCount(){return this.get("HelpersCount",0)}get Helpers(){return this.get("Helpers",{ECLHelpFile:[]})}get DebugValues(){return this.get("DebugValues")}get AllowedClusters(){return this.get("AllowedClusters")}get ErrorCount(){return this.get("ErrorCount",0)}get WarningCount(){return this.get("WarningCount",0)}get InfoCount(){return this.get("InfoCount",0)}get AlertCount(){return this.get("AlertCount",0)}get SourceFileCount(){return this.get("SourceFileCount",0)}get SourceFiles(){return this.get("SourceFiles",{ECLSourceFile:[]})}get CSourceFiles(){return this.SourceFiles.ECLSourceFile.map(e=>new Ht(this.connection,this.Wuid,e))}get VariableCount(){return this.get("VariableCount",0)}get Variables(){return this.get("Variables",{ECLResult:[]})}get TimerCount(){return this.get("TimerCount",0)}get HasDebugValue(){return this.get("HasDebugValue")}get ApplicationValueCount(){return this.get("ApplicationValueCount",0)}get XmlParams(){return this.get("XmlParams")}get AccessFlag(){return this.get("AccessFlag")}get ClusterFlag(){return this.get("ClusterFlag")}get ResultViewCount(){return this.get("ResultViewCount",0)}get DebugValueCount(){return this.get("DebugValueCount",0)}get WorkflowCount(){return this.get("WorkflowCount",0)}get Archived(){return this.get("Archived")}get RoxieCluster(){return this.get("RoxieCluster")}get DebugState(){return this.get("DebugState",{})}get Queue(){return this.get("Queue")}get Active(){return this.get("Active")}get Action(){return this.get("Action")}get Scope(){return this.get("Scope")}get AbortBy(){return this.get("AbortBy")}get AbortTime(){return this.get("AbortTime")}get Workflows(){return this.get("Workflows")}get TimingData(){return this.get("TimingData")}get HelpersDesc(){return this.get("HelpersDesc")}get GraphsDesc(){return this.get("GraphsDesc")}get SourceFilesDesc(){return this.get("SourceFilesDesc")}get ResultsDesc(){return this.get("ResultsDesc")}get VariablesDesc(){return this.get("VariablesDesc")}get TimersDesc(){return this.get("TimersDesc")}get DebugValuesDesc(){return this.get("DebugValuesDesc")}get ApplicationValuesDesc(){return this.get("ApplicationValuesDesc")}get WorkflowsDesc(){return this.get("WorkflowsDesc")}get ServiceNames(){return this.get("ServiceNames")}get CompileCost(){return this.get("CompileCost")}get ExecuteCost(){return this.get("ExecuteCost")}get FileAccessCost(){return this.get("FileAccessCost")}get NoAccess(){return this.get("NoAccess")}get ECLWUProcessList(){return this.get("ECLWUProcessList")}static create(e){let s=new t(e);return s.connection.WUCreate().then(r=>(Zt.set(s),s.set(r.Workunit),s))}static attach(e,s,r){let n=Zt.get({BaseUrl:e.baseUrl,Wuid:s},()=>new t(e,s));return r&&n.set(r),n}static existsLocal(e,s){return Zt.has({BaseUrl:e,Wuid:s})}static submit(e,s,r,n=!1){return t.create(e).then(i=>i.update({QueryText:r})).then(i=>n?i.submit(s,fe.Action.Compile):i.submit(s))}static compile(e,s,r){return t.submit(e,s,r,!0)}static query(e,s){return new N(e).WUQuery(s).then(n=>n.Workunits.ECLWorkunit.map(function(i){return t.attach(e,i.Wuid,i)}))}constructor(e,s){super(),this.connection=new N(e),this.topologyConnection=new L(e),this.clearState(s)}clearState(e){this.clear({Wuid:e,StateID:0})}update(e){return this.connection.WUUpdate({...e,Wuid:this.Wuid,StateOrig:this.StateID,JobnameOrig:this.Jobname,DescriptionOrig:this.Description,ProtectedOrig:this.Protected,ClusterOrig:this.Cluster}).then(s=>(this.set(s.Workunit),this))}submit(e,s=fe.Action.Run,r){let n;return e!==void 0?n=Promise.resolve(e):n=this.topologyConnection.DefaultTpLogicalClusterQuery().then(i=>i.Name),this._debugMode=!1,s===fe.Action.Debug&&(s=fe.Action.Run,this._debugMode=!0),n.then(i=>this.connection.WUUpdate({Wuid:this.Wuid,Action:s,ResultLimit:r,DebugValues:{DebugValue:[{Name:"Debug",Value:this._debugMode?"1":""}]}}).then(o=>(this.set(o.Workunit),this._submitAction=s,this.connection.WUSubmit({Wuid:this.Wuid,Cluster:i})))).then(()=>this)}isComplete(){switch(this.StateID){case 1:return this.ActionEx==="compile"||this._submitAction===fe.Action.Compile;case 3:case 4:case 7:case 999:return!0;default:}return!1}isFailed(){switch(this.StateID){case 7:case 4:return!0;default:}return!1}isDeleted(){switch(this.StateID){case 999:return!0;default:}return!1}isDebugging(){switch(this.StateID){case 14:case 15:return!0;default:}return this._debugMode}isRunning(){switch(this.StateID){case 1:case 2:case 6:case 8:case 14:case 15:return!0;default:}return!1}setToFailed(){return this.WUAction(w.ECLWUActions.SetToFailed)}pause(){return this.WUAction(w.ECLWUActions.Pause)}pauseNow(){return this.WUAction(w.ECLWUActions.PauseNow)}resume(){return this.WUAction(w.ECLWUActions.Resume)}abort(){return this.WUAction(w.ECLWUActions.Abort)}protect(){return this.WUAction(w.ECLWUActions.Protect)}unprotect(){return this.WUAction(w.ECLWUActions.Unprotect)}delete(){return this.WUAction(w.ECLWUActions.Delete)}restore(){return this.WUAction(w.ECLWUActions.Restore)}deschedule(){return this.WUAction(w.ECLWUActions.Deschedule)}reschedule(){return this.WUAction(w.ECLWUActions.Reschedule)}resubmit(){return this.WUResubmit({CloneWorkunit:!1,ResetWorkflow:!1}).then(()=>(this.clearState(this.Wuid),this.refresh().then(()=>(this._monitor(),this))))}clone(){return this.WUResubmit({CloneWorkunit:!0,ResetWorkflow:!1}).then(e=>t.attach(this.connection.opts(),e.WUs.WU[0].WUID).refresh())}async refreshState(){return await this.WUQuery(),this.StateID===1&&!this.ActionEx&&!this._submitAction&&await this.refreshInfo(),this}async refreshInfo(e){return await this.WUInfo(e),this}async refreshDebug(){return await this.debugStatus(),this}async refresh(e=!1,s){return e?await Promise.all([this.refreshInfo(s),this.refreshDebug()]):await this.refreshState(),this}eclExceptions(){return this.Exceptions.ECLException}fetchArchive(){return this.connection.WUFileEx({Wuid:this.Wuid,Type:"ArchiveQuery"})}fetchECLExceptions(){return this.WUInfo({IncludeExceptions:!0}).then(()=>this.eclExceptions())}fetchResults(){return this.WUInfo({IncludeResults:!0}).then(()=>this.CResults)}fetchGraphs(){return this.WUInfo({IncludeGraphs:!0}).then(()=>this.CGraphs)}fetchQuery(){return this.WUInfo({IncludeECL:!0,TruncateEclTo64k:!1}).then(()=>this.Query)}fetchHelpers(){return this.WUInfo({IncludeHelpers:!0}).then(()=>this.Helpers?.ECLHelpFile||[])}fetchAllowedClusters(){return this.WUInfo({IncludeAllowedClusters:!0}).then(()=>this.AllowedClusters?.AllowedCluster||[])}fetchTotalClusterTime(){return this.WUInfo({IncludeTotalClusterTime:!0}).then(()=>this.TotalClusterTime)}fetchServiceNames(){return this.WUInfo({IncludeServiceNames:!0}).then(()=>this.ServiceNames?.Item)}fetchDetailsMeta(e={}){return this.WUDetailsMeta(e)}fetchDetailsRaw(e={}){return this.WUDetails(e).then(s=>s.Scopes.Scope)}normalizeDetails(e,s){let r={id:{Measure:"label"},name:{Measure:"label"},type:{Measure:"label"}},n=[];for(let i of s){let o={},a={};if(i&&i.Id&&i.Properties&&i.Properties.Property)for(let u in i.Properties.Property){let l=i.Properties.Property[u];switch(l.Measure==="ns"&&(l.Measure="s"),r[l.Name]={...l},Dn(r,l.Name,"RawValue"),Dn(r,l.Name,"Formatted"),l.Measure){case"bool":o[l.Name]=!!+l.RawValue;break;case"sz":o[l.Name]=+l.RawValue;break;case"s":o[l.Name]=+l.RawValue/1e9;break;case"ns":o[l.Name]=+l.RawValue;break;case"ts":o[l.Name]=new Date(+l.RawValue/1e3).toISOString();break;case"cnt":o[l.Name]=+l.RawValue;break;case"cost":o[l.Name]=+l.RawValue/1e6;break;case"cpu":case"skw":case"node":case"ppm":case"ip":case"cy":case"en":case"txt":case"id":case"fname":default:o[l.Name]=l.RawValue}a[l.Name]=Bo(l.Formatted??o[l.Name])}let c={id:i.Id,name:i.ScopeName,type:i.ScopeType,Kind:i.Kind,Label:i.Label,__formattedProps:a,__groupedProps:{},__groupedRawProps:{},__StdDevs:0,__StdDevsSource:"",...o};if(c[et])try{let u=JSON.parse(c[et].split("\\").join("\\\\"));c[et]=[],u.forEach((l,d)=>{let U=l.match(jo);if(U){let I=(U[1]??"")+U[2]+U[3],q=parseInt(U[5]),y=parseInt(U[6]);c[et].push({filePath:I,line:q,col:y})}})}catch{zt.error(`Unexpected "DefinitionList": ${c[et]}`)}let p={};for(let u in c)if(u.indexOf("__")!==0){let l=zo(c,u,p);l&&(c.__groupedProps[l.Key]=l,!isNaN(l.StdDevs)&&c.__StdDevs<l.StdDevs&&(c.__StdDevs=l.StdDevs,c.__StdDevsSource=l.Key))}n.push(c)}return{meta:e,columns:r,data:n}}fetchDetailsNormalized(e={}){return Promise.all([this.fetchDetailsMeta(),this.fetchDetailsRaw(e)]).then(s=>this.normalizeDetails(s[0],s[1]))}fetchInfo(e={}){return this.WUInfo(e)}fetchDetails(e={}){return this.WUDetails(e).then(s=>s.Scopes.Scope.map(r=>new Ye(this,r)))}fetchDetailsHierarchy(e={}){return this.WUDetails(e).then(s=>{let r=[],n={};s.Scopes.Scope.forEach(i=>{if(n[i.ScopeName])return n[i.ScopeName].update(i),null;{let o=new Ye(this,i);return n[o.ScopeName]=o,o}});for(let i in n)if(n.hasOwnProperty(i)){let o=n[i],a=o.parentScope();a&&n[a]?n[a].children().push(o):r.push(o)}return r})}fetchGraphDetails(e=[],s){return this.fetchDetails({ScopeFilter:{MaxDepth:999999,Ids:e,ScopeTypes:s},NestedFilter:{Depth:999999,ScopeTypes:["graph","subgraph","activity","edge","function"]},PropertiesToReturn:{AllStatistics:!0,AllAttributes:!0,AllHints:!0,AllProperties:!0,AllScopes:!0},ScopeOptions:{IncludeId:!0,IncludeScope:!0,IncludeScopeType:!0},PropertyOptions:{IncludeName:!0,IncludeRawValue:!0,IncludeFormatted:!0,IncludeMeasure:!0,IncludeCreator:!1,IncludeCreatorType:!1}})}fetchScopeGraphs(e=[]){return this.fetchGraphDetails(e,["graph"]).then(s=>wt(s))}fetchTimeElapsed(){return this.fetchDetails({ScopeFilter:{PropertyFilters:{PropertyFilter:[{Name:"TimeElapsed"}]}}}).then(e=>{let s={};e.forEach(n=>{s[n.ScopeName]=s[n.ScopeName]||{scope:n.ScopeName,start:null,elapsed:null,finish:null},n.CAttributes.forEach(i=>{i.Name==="TimeElapsed"?s[n.ScopeName].elapsed=+i.RawValue:i.Measure==="ts"&&i.Name.indexOf("Started")>=0&&(s[n.ScopeName].start=i.Formatted)})});let r=[];for(let n in s){let i=s[n];if(i.start&&i.elapsed){let o=Oo(i.start);o.setMilliseconds(o.getMilliseconds()+i.elapsed/1e6),i.finish=Vo(o),r.push(i)}}return r.sort((n,i)=>n.start<i.start?-1:n.start>i.start?1:0),r})}_monitor(){if(this.isComplete()){this._monitorTickCount=0;return}super._monitor()}_monitorTimeoutDuration(){let e=super._monitorTimeoutDuration();return this._monitorTickCount<=1?1e3:this._monitorTickCount<=3?3e3:this._monitorTickCount<=5?5e3:this._monitorTickCount<=7?1e4:e}on(e,s,r){if(this.isCallback(s))switch(e){case"completed":super.on("propChanged","StateID",n=>{this.isComplete()&&s([n])});break;case"changed":super.on(e,s);break;default:}else switch(e){case"changed":super.on(e,s,r);break;default:}return this._monitor(),this}watchUntilComplete(e){return new Promise((s,r)=>{let n=this.watch(i=>{e&&e(i),this.isComplete()&&(n.release(),s(this))})})}watchUntilRunning(e){return new Promise((s,r)=>{let n=this.watch(i=>{e&&e(i),(this.isComplete()||this.isRunning())&&(n.release(),s(this))})})}WUQuery(e={}){return this.connection.WUQuery({...e,Wuid:this.Wuid}).then(s=>(this.set(s.Workunits.ECLWorkunit[0]),s)).catch(s=>{if(!s.Exception.some(n=>n.Code===20081?(this.clearState(this.Wuid),this.set("StateID",999),!0):!1))throw zt.warning("Unexpected exception: "),s;return{}})}WUCreate(){return this.connection.WUCreate().then(e=>(this.set(e.Workunit),Zt.set(this),e))}WUInfo(e={}){let s=e.IncludeResults||e.IncludeResultsViewNames;return this.connection.WUInfo({...e,Wuid:this.Wuid,IncludeResults:s,IncludeResultsViewNames:s,SuppressResultSchemas:!1}).then(r=>(this.set(r.Workunit),s&&this.set({ResultViews:r.ResultViews}),r)).catch(r=>{if(!r.Exception.some(i=>i.Code===20080?(this.clearState(this.Wuid),this.set("StateID",999),!0):!1))throw zt.warning("Unexpected exception: "),r;return{}})}WUResubmit(e){return this.connection.WUResubmit(at({},e,{Wuids:{Item:[this.Wuid]}}))}WUDetailsMeta(e){return this.connection.WUDetailsMeta(e)}WUDetails(e){return this.connection.WUDetails(at({ScopeFilter:{MaxDepth:9999},ScopeOptions:{IncludeMatchedScopesInResults:!0,IncludeScope:!0,IncludeId:!1,IncludeScopeType:!1},PropertyOptions:{IncludeName:!0,IncludeRawValue:!1,IncludeFormatted:!0,IncludeMeasure:!0,IncludeCreator:!1,IncludeCreatorType:!1}},e,{WUID:this.Wuid})).then(s=>at({Scopes:{Scope:[]}},s))}WUAction(e){return this.connection.WUAction({Wuids:{Item:[this.Wuid]},WUActionType:e}).then(s=>this.refresh().then(()=>(this._monitor(),s)))}publish(e){return this.connection.WUPublishWorkunit({Wuid:this.Wuid,Cluster:this.Cluster,JobName:e||this.Jobname,AllowForeignFiles:!0,Activate:w.WUQueryActivationMode.ActivateQuery,Wait:5e3})}publishEx(e){let s=new Pt({baseUrl:""}),r={Wuid:this.Wuid,Cluster:this.Cluster,JobName:this.Jobname,AllowForeignFiles:!0,Activate:1,Wait:5e3,...e};return s.WUPublishWorkunitEx(r)}WUCDebug(e,s={}){let r="";for(let n in s)s.hasOwnProperty(n)&&(r+=` ${n}='${s[n]}'`);return this.connection.WUCDebugEx({Wuid:this.Wuid,Command:`<debug:${e} uid='${this.Wuid}'${r}/>`}).then(n=>n)}debug(e,s){return this.isDebugging()?this.WUCDebug(e,s).then(r=>{let n=r.children(e);return n.length?n[0]:new we(e)}).catch(r=>(zt.error(r),Promise.resolve(new we(e)))):Promise.resolve(new we(e))}debugStatus(){return this.isDebugging()?this.debug("status").then(e=>{let s={...this.DebugState,...e.$};return this.set({DebugState:s}),e}):Promise.resolve({DebugState:{state:"unknown"}})}debugContinue(e=""){return this.debug("continue",{mode:e})}debugStep(e){return this.debug("step",{mode:e})}debugPause(){return this.debug("interrupt")}debugQuit(){return this.debug("quit")}debugDeleteAllBreakpoints(){return this.debug("delete",{idx:0})}debugBreakpointResponseParser(e){return e.children().map(s=>{if(s.name==="break")return s.$})}debugBreakpointAdd(e,s,r){return this.debug("breakpoint",{id:e,mode:s,action:r}).then(n=>this.debugBreakpointResponseParser(n))}debugBreakpointList(){return this.debug("list").then(e=>this.debugBreakpointResponseParser(e))}debugGraph(){return this._debugAllGraph&&this.DebugState._prevGraphSequenceNum===this.DebugState.graphSequenceNum?Promise.resolve(this._debugAllGraph):this.debug("graph",{name:"all"}).then(e=>(this.DebugState._prevGraphSequenceNum=this.DebugState.graphSequenceNum,this._debugAllGraph=Wn(this.Wuid,e),this._debugAllGraph))}debugBreakpointValid(e){return this.debugGraph().then(s=>ea(s,e))}debugPrint(e,s=0,r=10){return this.debug("print",{edgeID:e,startRow:s,numRows:r}).then(n=>n.children().map(i=>{let o={};return i.children().forEach(a=>{o[a.name]=a.content}),o}))}},Ms="definition";function Zo(t){return t._[Ms]!==void 0}function Yo(t){let e=/([a-z]:\\(?:[-\w\.\d]+\\)*(?:[-\w\.\d]+)?|(?:\/[\w\.\-]+)+)\((\d*),(\d*)\)/.exec(t._[Ms]);if(e){let[,s,r,n]=e;return s.replace(/\/\.\//g,"/"),{id:t._.id,file:s,line:+r,column:+n}}throw new Error(`Bad definition: ${t._[Ms]}`)}function ea(t,e){let s=[];for(let r of t.vertices)if(Zo(r)){let n=Yo(r);(n&&!e||e===n.file)&&s.push(n)}return s.sort((r,n)=>r.line-n.line)}var Yt,Cn=class t extends P{connection;get properties(){return this.get()}get Exceptions(){return this.get("Exceptions")}get Build(){return this.get("Build")}get ThorClusterList(){return this.get("ThorClusterList")}get RoxieClusterList(){return this.get("RoxieClusterList")}get HThorClusterList(){return this.get("HThorClusterList")}get DFUJobs(){return this.get("DFUJobs")}get Running(){return this.get("Running",{ActiveWorkunit:[]})}get BannerContent(){return this.get("BannerContent")}get BannerColor(){return this.get("BannerColor")}get BannerSize(){return this.get("BannerSize")}get BannerScroll(){return this.get("BannerScroll")}get ChatURL(){return this.get("ChatURL")}get ShowBanner(){return this.get("ShowBanner")}get ShowChatURL(){return this.get("ShowChatURL")}get SortBy(){return this.get("SortBy")}get Descending(){return this.get("Descending")}get SuperUser(){return this.get("SuperUser")}get AccessRight(){return this.get("AccessRight")}get ServerJobQueues(){return this.get("ServerJobQueues")}get ActivityTime(){return this.get("ActivityTime")}get DaliDetached(){return this.get("DaliDetached")}static attach(e,s){return Yt||(Yt=new t(e)),s&&Yt.set({...s}),Yt}constructor(e){super(),e instanceof Be?this.connection=e:this.connection=new Be(e),this.clear({})}runningWorkunits(e=""){return this.Running.ActiveWorkunit.filter(s=>e===""||s.ClusterName===e).map(s=>Ne.attach(this.connection.connectionOptions(),s.Wuid,s))}setBanner(e){return this.connection.SetBanner({...e}).then(s=>(this.set(s),this))}lazyRefresh=Zs(async()=>{let e=await this.connection.Activity({});return this.set(e),this});async refresh(){return this.lazyRefresh()}};var ta=O("logicalFile.ts"),Ls=class extends T{constructor(){super(e=>`${e.BaseUrl}-${e.Cluster}-${e.Name}`)}},sa=new Ls,bn=class t extends P{connection;get BaseUrl(){return this.connection.baseUrl}get Cluster(){return this.get("Cluster")}get Name(){return this.get("Name")}get Filename(){return this.get("Filename")}get Prefix(){return this.get("Prefix")}get NodeGroup(){return this.get("NodeGroup")}get NumParts(){return this.get("NumParts")}get Description(){return this.get("Description")}get Dir(){return this.get("Dir")}get PathMask(){return this.get("PathMask")}get Filesize(){return this.get("Filesize")}get FileSizeInt64(){return this.get("FileSizeInt64")}get RecordSize(){return this.get("RecordSize")}get RecordCount(){return this.get("RecordCount")}get RecordSizeInt64(){return this.get("RecordSizeInt64")}get RecordCountInt64(){return this.get("RecordCountInt64")}get Wuid(){return this.get("Wuid")}get Owner(){return this.get("Owner")}get JobName(){return this.get("JobName")}get Persistent(){return this.get("Persistent")}get Format(){return this.get("Format")}get MaxRecordSize(){return this.get("MaxRecordSize")}get CsvSeparate(){return this.get("CsvSeparate")}get CsvQuote(){return this.get("CsvQuote")}get CsvTerminate(){return this.get("CsvTerminate")}get CsvEscape(){return this.get("CsvEscape")}get Modified(){return this.get("Modified")}get Ecl(){return this.get("Ecl")}get Stat(){return this.get("Stat")}get DFUFilePartsOnClusters(){return this.get("DFUFilePartsOnClusters")}get isSuperfile(){return this.get("isSuperfile")}get ShowFileContent(){return this.get("ShowFileContent")}get subfiles(){return this.get("subfiles")}get Superfiles(){return this.get("Superfiles")}get ProtectList(){return this.get("ProtectList")}get FromRoxieCluster(){return this.get("FromRoxieCluster")}get Graphs(){return this.get("Graphs")}get UserPermission(){return this.get("UserPermission")}get ContentType(){return this.get("ContentType")}get CompressedFileSize(){return this.get("CompressedFileSize")}get PercentCompressed(){return this.get("PercentCompressed")}get IsCompressed(){return this.get("IsCompressed")}get BrowseData(){return this.get("BrowseData")}get jsonInfo(){return this.get("jsonInfo")}get binInfo(){return this.get("binInfo")}get PackageID(){return this.get("PackageID")}get Partition(){return this.get("Partition")}get Blooms(){return this.get("Blooms")}get ExpireDays(){return this.get("ExpireDays")}get KeyType(){return this.get("KeyType")}get IsRestricted(){return this.get("IsRestricted")}get AtRestCost(){return this.get("AtRestCost")}get AccessCost(){return this.get("AccessCost")}get StateID(){return this.get("StateID")}get ExpirationDate(){return this.get("ExpirationDate")}get ExtendedIndexInfo(){return this.get("ExtendedIndexInfo")}get properties(){return this.get()}static attach(e,s,r){return sa.get({BaseUrl:e.baseUrl,Cluster:s,Name:r},()=>new t(e,s,r))}constructor(e,s,r){super(),e instanceof Ve?this.connection=e:this.connection=new Ve(e),this.clear({Cluster:s,Name:r})}filePartsOnCluster(){return[...this.DFUFilePartsOnClusters?.DFUFilePartsOnCluster||[]]}fileParts(){let e=[];for(let s of this.DFUFilePartsOnClusters?.DFUFilePartsOnCluster||[])for(let r of s?.DFUFileParts?.DFUPart||[]){let n={...s,...r};delete n.DFUFileParts,e.push(n)}return e}update(e){return this.connection.DFUInfo({...e,Cluster:this.Cluster,Name:this.Name}).then(s=>(this.set({Cluster:this.Cluster,...s.FileDetail}),s))}fetchInfo(){return this.connection.DFUInfo({Cluster:this.Cluster,Name:this.Name}).then(e=>(this.set({Cluster:this.Cluster,...e.FileDetail}),e.FileDetail)).catch(e=>{if(!e.Exception.some(r=>r.Code===20038?(this.set("Name",this.Name+" (Deleted)"),this.set("StateID",999),!0):!1))throw ta.warning("Unexpected exception: "),e;return{}})}fetchDefFile(e){return this.connection.DFUFile({Name:this.Name,Format:e})}fetchListHistory(){return this.connection.ListHistory({Name:this.Name}).then(e=>e?.History?.Origin||[])}eraseHistory(){return this.connection.EraseHistory({Name:this.Name}).then(e=>e?.History?.Origin||[])}};var As=class extends T{constructor(){super(e=>e.Address)}},ra=new As,es=class t extends P{connection;get Address(){return this.get("Address")}get ConfigAddress(){return this.get("ConfigAddress")}get Name(){return this.get("Name")}get ProcessType(){return this.get("ProcessType")}get DisplayType(){return this.get("DisplayType")}get Description(){return this.get("Description")}get AgentVersion(){return this.get("AgentVersion")}get Contact(){return this.get("Contact")}get Location(){return this.get("Location")}get UpTime(){return this.get("UpTime")}get ComponentName(){return this.get("ComponentName")}get ComponentPath(){return this.get("ComponentPath")}get RoxieState(){return this.get("RoxieState")}get RoxieStateDetails(){return this.get("RoxieStateDetails")}get OS(){return this.get("OS")}get ProcessNumber(){return this.get("ProcessNumber")}get Channels(){return this.get("Channels")}get Processors(){return this.get("Processors")}get Storage(){return this.get("Storage")}get Running(){return this.get("Running")}get PhysicalMemory(){return this.get("PhysicalMemory")}get VirtualMemory(){return this.get("VirtualMemory")}get ComponentInfo(){return this.get("ComponentInfo")}get Exception(){return this.get("Exception")}static attach(e,s,r){let n=ra.get({Address:s},()=>new t(e));return r&&n.set(r),n}constructor(e){super(),e instanceof te?this.connection=e:this.connection=new te(e)}};var Gs=class extends T{constructor(){super(e=>`${e.BaseUrl}-${e.Name}`)}},na=new Gs,Me=class t extends P{connection;machineConnection;get BaseUrl(){return this.connection.baseUrl}get Name(){return this.get("Name")}get Prefix(){return this.get("Prefix")}get Type(){return this.get("Type")}get IsDefault(){return this.get("IsDefault")}get TpClusters(){return this.get("TpClusters")}get TpEclCCServers(){return this.get("TpEclCCServers")}get TpEclServers(){return this.get("TpEclServers")}get TpEclAgents(){return this.get("TpEclAgents")}get TpEclSchedulers(){return this.get("TpEclSchedulers")}get MachineInfoEx(){return this.get("MachineInfoEx",[])}get CMachineInfoEx(){return this.MachineInfoEx.map(e=>es.attach(this.machineConnection,e.Address,e))}static attach(e,s,r){let n=na.get({BaseUrl:e.baseUrl,Name:s},()=>new t(e,s));return r&&n.set({...r}),n}constructor(e,s){super(),e instanceof L?(this.connection=e,this.machineConnection=new te(e.connectionOptions())):(this.connection=new L(e),this.machineConnection=new te(e)),this.clear({Name:s})}fetchMachines(e={}){return this.machineConnection.GetTargetClusterInfo({TargetClusters:{Item:[`${this.Type}:${this.Name}`]},...e}).then(s=>{let r=[];for(let n of s.TargetClusterInfoList.TargetClusterInfo)for(let i of n.Processes.MachineInfoEx)r.push(i);return this.set("MachineInfoEx",r),this.CMachineInfoEx})}machineStats(){let e=0,s=0,r=0;for(let n of this.CMachineInfoEx)for(let i of n.Storage.StorageInfo){s+=i.Available,r+=i.Total;let o=1-i.Available/i.Total;o>e&&(e=o)}return{maxDisk:e,meanDisk:1-(r?s/r:1)}}fetchUsage(){return this.machineConnection.GetTargetClusterUsageEx([this.Name])}};function Xd(t){let e;return t instanceof L?e=t:e=new L(t),e.TpListTargetClusters({}).then(s=>s.TargetClusters.TpClusterNameType.map(r=>Me.attach(t,r.Name,r)))}var ws={};function Kd(t){if(!ws[t.baseUrl]){let e;t instanceof L?e=t:e=new L(t),ws[t.baseUrl]=e.TpListTargetClusters({}).then(s=>{let r,n,i;s.TargetClusters.TpClusterNameType.forEach(a=>{r||(r=a),!n&&a.IsDefault===!0&&(n=a),!i&&a.Type==="hthor"&&(i=a)});let o=n||i||r;return Me.attach(t,o.Name,o)})}return ws[t.baseUrl]}var Qs=class extends T{constructor(){super(e=>e.BaseUrl)}},ia=new Qs,ts=class t extends P{connection;get BaseUrl(){return this.connection.baseUrl}get properties(){return this.get()}get TargetClusters(){return this.get("TargetClusters")}get CTargetClusters(){return this.TargetClusters.map(e=>Me.attach(this.connection,e.Name,e))}get LogicalClusters(){return this.get("LogicalClusters")}get Services(){return this.get("Services")}static attach(e){return ia.get({BaseUrl:e.baseUrl},()=>new t(e))}constructor(e){super(),e instanceof L?this.connection=e:this.connection=new L(e)}GetESPServiceBaseURL(e=""){return this.connection.TpServiceQuery({}).then(s=>{let r=this.connection.protocol(),n=this.connection.ip(),i=r==="https:"?"18002":"8002";if($("ServiceList.TpEspServers.TpEspServer",s)){for(let o of s.ServiceList.TpEspServers.TpEspServer)if($("TpBindings.TpBinding",o))for(let a of o.TpBindings.TpBinding)a.Service===e&&a.Protocol+":"===r&&(i=a.Port)}return`${r}//${n}:${i}/`})}fetchTargetClusters(){return this.connection.TpTargetClusterQuery({Type:"ROOT"}).then(e=>(this.set({TargetClusters:e.TpTargetClusters?.TpTargetCluster??[]}),this.CTargetClusters))}fetchLogicalClusters(e={}){return this.connection.TpLogicalClusterQuery(e).then(s=>(this.set({LogicalClusters:s.TpLogicalClusters.TpLogicalCluster}),this.LogicalClusters))}fetchServices(e={}){return this.connection.TpServiceQuery(e).then(s=>(this.set({Services:s.ServiceList}),this.Services))}_prevRefresh;refresh(e=!1){return(!this._prevRefresh||e)&&(this._prevRefresh=Promise.all([this.fetchTargetClusters(),this.fetchLogicalClusters(),this.fetchServices()]).then(()=>this)),this._prevRefresh}on(e,s,r){if(this.isCallback(s))switch(e){case"changed":super.on(e,s);break;default:}else switch(e){case"changed":super.on(e,s,r);break;default:}return this._monitor(),this}};function ne(t,e,s){e==="__proto__"||e==="constructor"||e==="prototype"||(t[e]=s)}function tt(t){return t=""+t,t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\n/g,"&#10;").replace(/\r/g,"&#13;")}function oa(t){if(t){if(!isNaN(+t))return parseFloat(t)}else return 0;let s=/(?:(?:(\d+).days.)?(?:(\d+)h)?(?:(\d+)m)?(?:(\d+\.\d+|\d+)s))|(?:(\d+\.\d+|\d+)ms|(\d+\.\d+|\d+)us|(\d+\.\d+|\d+)ns)/.exec(t);if(!s)return 0;let r=+s[1]||0,n=+s[2]||0,i=+s[3]||0,o=+s[4]||0,a=+s[5]||0,c=+s[6]||0,p=+s[7]||0;return r*24*60*60+n*60*60+i*60+o+a/1e3+c/1e6+p/1e9}function ie(t,e){let s=t.indexOf(e);return s!==-1?parseFloat(t.substring(0,s)):-1}function aa(t){if(t){if(!isNaN(+t))return parseFloat(t)}else return 0;let e=ie(t,"Kb");return e>=0?e*1024:(e=ie(t,"Mb"),e>=0?e*Math.pow(1024,2):(e=ie(t,"Gb"),e>=0?e*Math.pow(1024,3):(e=ie(t,"Tb"),e>=0?e*Math.pow(1024,4):(e=ie(t,"Pb"),e>=0?e*Math.pow(1024,5):(e=ie(t,"Eb"),e>=0?e*Math.pow(1024,6):(e=ie(t,"Zb"),e>=0?e*Math.pow(1024,7):(e=ie(t,"b"),e>=0?e:0)))))))}function ua(t){return t?parseFloat(t):0}var Vs=class{graph;m_xgmml;m_visibleSubgraphs;m_visibleVertices;m_semiVisibleVertices;m_visibleEdges;noSpills;constructor(e){this.graph=e,this.m_xgmml="",this.m_visibleSubgraphs={},this.m_visibleVertices={},this.m_semiVisibleVertices={},this.m_visibleEdges={}}calcVisibility(e,s,r,n){this.noSpills=n,e.forEach(i=>{this.graph.isVertex(i)?(this.calcInVertexVisibility(i,r),this.calcOutVertexVisibility(i,r)):this.graph.isEdge(i)?(this.calcInVertexVisibility(i.getSource(),r-1),this.calcOutVertexVisibility(i.getTarget(),r-1)):this.graph.isSubgraph(i)&&(this.m_visibleSubgraphs[i.__hpcc_id]=i,this.calcSubgraphVisibility(i,s-1))}),this.calcVisibility2()}calcInVertexVisibility(e,s){this.noSpills&&e.isSpill()&&s++,this.m_visibleVertices[e.__hpcc_id]=e,s>0&&e.getInEdges().forEach(r=>{this.calcInVertexVisibility(r.getSource(),s-1)})}calcOutVertexVisibility(e,s){this.noSpills&&e.isSpill()&&s++,this.m_visibleVertices[e.__hpcc_id]=e,s>0&&e.getOutEdges().forEach(r=>{this.calcOutVertexVisibility(r.getTarget(),s-1)})}calcSubgraphVisibility(e,s){if(s<0)return;s>0&&e.__hpcc_subgraphs.forEach((n,i)=>{this.calcSubgraphVisibility(n,s-1)}),e.__hpcc_subgraphs.forEach((n,i)=>{this.m_visibleSubgraphs[n.__hpcc_id]=n}),e.__hpcc_vertices.forEach((n,i)=>{this.m_visibleVertices[n.__hpcc_id]=n});let r={};this.graph.edges.forEach((n,i)=>{n.getSource().__hpcc_parent!==n.getTarget().__hpcc_parent&&e===this.getCommonAncestor(n)&&(r[n.getSource().__hpcc_parent.__hpcc_id+"::"+n.getTarget().__hpcc_parent.__hpcc_id]||(r[n.getSource().__hpcc_parent.__hpcc_id+"::"+n.getTarget().__hpcc_parent.__hpcc_id]=!0,this.m_visibleEdges[n.__hpcc_id]=n))})}buildVertexString(e,s){let r="",n="",i=e.getProperties();for(let o in i)s&&o.indexOf("_kind")>=0?n+='<att name="_kind" value="point"/>':o==="id"||o==="label"?r+=" "+o+'="'+tt(i[o])+'"':n+='<att name="'+o+'" value="'+tt(i[o])+'"/>';return"<node"+r+">"+n+"</node>"}buildEdgeString(e){let s="",r="",n=e.getProperties();for(let i in n)i.toLowerCase()==="id"||i.toLowerCase()==="label"||i.toLowerCase()==="source"||i.toLowerCase()==="target"?s+=" "+i+'="'+tt(n[i])+'"':r+='<att name="'+i+'" value="'+tt(n[i])+'"/>';return"<edge"+s+">"+r+"</edge>"}getAncestors(e,s){let r=e.__hpcc_parent;for(;r;)s.push(r),r=r.__hpcc_parent}getCommonAncestorV(e,s){let r=[],n=[];this.getAncestors(e,r),this.getAncestors(s,n);let i=r.length-1,o=n.length-1,a=null;for(;i>=0&&o>=0&&r[i]===n[o];)a=r[i],--i,--o;return a}getCommonAncestor(e){return this.getCommonAncestorV(e.getSource(),e.getTarget())}calcAncestorVisibility(e){let s=[];this.getAncestors(e,s),s.forEach((r,n)=>{this.m_visibleSubgraphs[r.__hpcc_id]=r})}calcVisibility2(){for(let e in this.m_visibleVertices){let s=this.m_visibleVertices[e];s.getInEdges().forEach((r,n)=>{this.m_visibleEdges[r.__hpcc_id]=r}),s.getOutEdges().forEach((r,n)=>{this.m_visibleEdges[r.__hpcc_id]=r}),this.calcAncestorVisibility(s)}this.calcSemiVisibleVertices()}addSemiVisibleEdge(e){e&&!this.m_visibleEdges[e.__hpcc_id]&&(this.m_visibleEdges[e.__hpcc_id]=e)}addSemiVisibleVertex(e){this.m_visibleVertices[e.__hpcc_id]||(this.m_semiVisibleVertices[e.__hpcc_id]=e,this.calcAncestorVisibility(e))}calcSemiVisibleVertices(){for(let e in this.m_visibleEdges){let s=this.m_visibleEdges[e],r=s.getSource();for(this.addSemiVisibleVertex(r);this.noSpills&&r.isSpill();){let i=r.getInEdges();if(i.length)this.addSemiVisibleEdge(i[0]),r=i[0].getSource(),this.addSemiVisibleVertex(r);else break}let n=s.getTarget();for(this.addSemiVisibleVertex(n);this.noSpills&&n.isSpill();){let i=n.getOutEdges();if(i.length)this.addSemiVisibleEdge(i[0]),n=i[0].getTarget(),this.addSemiVisibleVertex(n);else break}}}writeXgmml(){this.subgraphVisited(this.graph.subgraphs[0],!0),this.graph.edges.forEach((e,s)=>{this.edgeVisited(e)})}subgraphVisited(e,s=!1){if(this.m_visibleSubgraphs[e.__hpcc_id]){let r="";this.m_xgmml+=s?"":'<node id="'+e.__hpcc_id+'"><att><graph>';let n=this.m_xgmml.length;if(e.walkSubgraphs(this),e.walkVertices(this),n===this.m_xgmml.length){let o=e.__hpcc_vertices[0];o&&(this.m_xgmml+=this.buildVertexString(o,!0))}let i=e.getProperties();for(let o in i)r+='<att name="'+o+'" value="'+tt(i[o])+'"/>';this.m_xgmml+=s?"":"</graph></att>"+r+"</node>"}return!1}vertexVisited(e){this.m_visibleVertices[e.__hpcc_id]?this.m_xgmml+=this.buildVertexString(e,!1):this.m_semiVisibleVertices[e.__hpcc_id]&&(this.m_xgmml+=this.buildVertexString(e,!0))}edgeVisited(e){this.m_visibleEdges[e.__hpcc_id]&&(this.m_xgmml+=this.buildEdgeString(e))}},st=class{__hpcc_graph;__hpcc_parent;__widget;__hpcc_id;_globalID;constructor(e,s){this.__hpcc_graph=e,this.__hpcc_id=s,this._globalID=s}getProperties(){let e={};for(let s in this)s.indexOf("__")!==0&&this.hasOwnProperty(s)&&(e[s]=this[s]);return e}},oe=class extends st{_globalType;__hpcc_subgraphs;__hpcc_vertices;__hpcc_edges;id;constructor(e,s){super(e,s),this._globalType=s==="0"?"Graph":"Cluster",this.__hpcc_subgraphs=[],this.__hpcc_vertices=[],this.__hpcc_edges=[],this.id=s}addSubgraph(e){e.__hpcc_parent=this,this.__hpcc_subgraphs.some(s=>e===s)||this.__hpcc_subgraphs.push(e)}addVertex(e){e.__hpcc_parent=this,this.__hpcc_vertices.some(s=>e===s)||this.__hpcc_vertices.push(e)}removeVertex(e){this.__hpcc_vertices=this.__hpcc_vertices.filter(s=>e!==s)}addEdge(e){e.__hpcc_parent=this,this.__hpcc_edges.some(s=>e===s)||this.__hpcc_edges.push(e)}removeEdge(e){this.__hpcc_edges=this.__hpcc_edges.filter(s=>e!==s)}remove(){this.__hpcc_subgraphs.forEach(e=>e.__hpcc_parent=this.__hpcc_parent),this.__hpcc_vertices.forEach(e=>e.__hpcc_parent=this.__hpcc_parent),this.__hpcc_edges.forEach(e=>e.__hpcc_parent=this.__hpcc_parent),delete this.__hpcc_parent,this.__hpcc_graph.removeItem(this)}walkSubgraphs(e){this.__hpcc_subgraphs.forEach((s,r)=>{e.subgraphVisited(s)&&s.walkSubgraphs(e)})}walkVertices(e){this.__hpcc_vertices.forEach((s,r)=>{e.vertexVisited(s)})}},De=class extends st{_globalType="Vertex";_isSpill;constructor(e,s){super(e,s)}isSpill(){return this._isSpill}remove(){let e=this.getInVertices();e.length<=1&&console.warn(this.__hpcc_id+": remove only supports single or zero inputs activities..."),this.getInEdges().forEach(s=>{s.remove()}),this.getOutEdges().forEach(s=>{s.setSource(e[0])}),this.__hpcc_parent?.removeVertex(this),this.__hpcc_graph.removeItem(this)}getInVertices(){return this.getInEdges().map(e=>e.getSource())}getInEdges(){return this.__hpcc_graph.edges.filter(e=>e.getTarget()===this)}getOutVertices(){return this.getOutEdges().map(e=>e.getTarget())}getOutEdges(){return this.__hpcc_graph.edges.filter(e=>e.getSource()===this)}},Re=class extends st{_globalType="Edge";_sourceActivity;source;_targetActivity;target;constructor(e,s){super(e,s),this._globalType="Edge"}remove(){this.__hpcc_graph.subgraphs.forEach(e=>{e.removeEdge(this)}),this.__hpcc_graph.removeItem(this)}getSource(){return this.__hpcc_graph.idx[this._sourceActivity||this.source]}setSource(e){this._sourceActivity?this._sourceActivity=e.__hpcc_id:this.source&&(this.source=e.__hpcc_id),this.__widget&&this.__widget.setSource(this.getSource().__widget)}getTarget(){return this.__hpcc_graph.idx[this._targetActivity||this.target]}},ss=class t{idx={};subgraphs=[];vertices=[];edges=[];xgmml="";constructor(){this.clear()}clear(){this.xgmml="",this.idx={},this.subgraphs=[],this.vertices=[],this.edges=[]}load(e){this.clear(),this.merge(e)}merge(e){this.xgmml=e;let r=new DOMParser().parseFromString(e,"text/xml");this.walkDocument(r.documentElement,"0")}isSubgraph(e){return e instanceof oe}isVertex(e){return e instanceof De}isEdge(e){return e instanceof Re}getGlobalType(e){return e instanceof De?3:e instanceof Re?4:e instanceof oe?2:e instanceof t?1:0}getGlobalTypeString(e){return e instanceof De?"Vertex":e instanceof Re?"Edge":e instanceof oe?"Cluster":e instanceof t?"Graph":"Unknown"}getItem(e,s){if(!this.idx[s])switch(e.tagName){case"graph":let n=new oe(this,s);this.subgraphs.push(n),this.idx[s]=n;break;case"node":let i=new De(this,s);this.vertices.push(i),this.idx[s]=i;break;case"edge":let o=new Re(this,s);this.edges.push(o),this.idx[s]=o;break;default:console.warn("Graph.getItem - Unknown Node Type!");break}let r=this.idx[s];return Array.from(e.attributes).forEach(n=>{ne(r,n.name,n.value)}),r}removeItem(e){delete this.idx[e.__hpcc_id],e instanceof oe?this.subgraphs=this.subgraphs.filter(s=>e!==s):e instanceof De?this.vertices=this.vertices.filter(s=>e!==s):e instanceof Re&&(this.edges=this.edges.filter(s=>e!==s))}getChildByTagName(e,s){let r=null;return Array.from(e.childNodes).some(n=>{if(n.tagName===s)return r=n,!0}),r}walkDocument(e,s){let r=this.getItem(e,s);return e.childNodes.forEach(n=>{switch(n.nodeType){case 1:switch(n.tagName){case"graph":break;case"node":let i=!1,o=this.getChildByTagName(n,"att");if(o){let l=this.getChildByTagName(o,"graph");if(l){i=!0;let d=this.walkDocument(l,n.getAttribute("id"));r.addSubgraph(d)}}if(!i){let l=this.walkDocument(n,n.getAttribute("id"));r.addVertex(l)}break;case"att":let a=n.getAttribute("name"),c="_"+a,p=n.getAttribute("value");a.indexOf("Time")===0?(ne(r,c,p),ne(r,a,""+oa(p))):a.indexOf("Size")===0?(ne(r,c,p),ne(r,a,""+aa(p))):a.indexOf("Skew")===0?(ne(r,c,p),ne(r,a,""+ua(p))):ne(r,a,p);break;case"edge":let u=this.walkDocument(n,n.getAttribute("id"));if(u.NumRowsProcessed!==void 0?u._eclwatchCount=u.NumRowsProcessed.replace(/\B(?=(\d{3})+(?!\d))/g,","):u.Count!==void 0?u._eclwatchCount=u.Count.replace(/\B(?=(\d{3})+(?!\d))/g,","):u.count!==void 0&&(u._eclwatchCount=u.count.replace(/\B(?=(\d{3})+(?!\d))/g,",")),u.inputProgress&&(u._eclwatchInputProgress="["+u.inputProgress.replace(/\B(?=(\d{3})+(?!\d))/g,",")+"]"),u.SkewMaxRowsProcessed&&u.SkewMinRowsProcessed&&(u._eclwatchSkew="+"+u.SkewMaxRowsProcessed+", "+u.SkewMinRowsProcessed),!u._dependsOn){if(!u._childGraph){if(u._sourceActivity||u._targetActivity){u._isSpill=!0;let l=u.getSource();l._isSpill=!0;let d=u.getTarget();d._isSpill=!0}}}r.addEdge(u);break;default:break}break;case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:break;default:break}}),r}removeSubgraphs(){[...this.subgraphs].forEach(s=>{s.__hpcc_parent instanceof oe&&s.remove()})}removeSpillVertices(){[...this.vertices].forEach(s=>{s.isSpill()&&s.remove()})}getLocalisedXGMML(e,s,r,n){let i=new Vs(this);return i.calcVisibility(e,s,r,n),i.writeXgmml(),"<graph>"+i.m_xgmml+"</graph>"}};var Os=O("@hpcc-js/comms/ecl/query.ts"),ca=Ie("~s");function la(t){return!isNaN(parseFloat(t))&&!isNaN(t-0)}var qs=class extends T{constructor(){super(e=>T.hash([e.QueryId,e.QuerySet]))}},pa=new qs,Un=class t extends P{wsWorkunitsService;get BaseUrl(){return this.wsWorkunitsService.baseUrl}topology;_requestSchema;_responseSchema;get properties(){return this.get()}get Exceptions(){return this.get("Exceptions")}get QueryId(){return this.get("QueryId")}get QuerySet(){return this.get("QuerySet")}get QueryName(){return this.get("QueryName")}get Wuid(){return this.get("Wuid")}get Dll(){return this.get("Dll")}get Suspended(){return this.get("Suspended")}get Activated(){return this.get("Activated")}get SuspendedBy(){return this.get("SuspendedBy")}get Clusters(){return this.get("Clusters")}get PublishedBy(){return this.get("PublishedBy")}get Comment(){return this.get("Comment")}get LogicalFiles(){return this.get("LogicalFiles")}get SuperFiles(){return this.get("SuperFiles")}get IsLibrary(){return this.get("IsLibrary")}get Priority(){return this.get("Priority")}get WUSnapShot(){return this.get("WUSnapShot")}get CompileTime(){return this.get("CompileTime")}get LibrariesUsed(){return this.get("LibrariesUsed")}get CountGraphs(){return this.get("CountGraphs")}get ResourceURLCount(){return this.get("ResourceURLCount")}get WsEclAddresses(){return this.get("WsEclAddresses")}get WUGraphs(){return this.get("WUGraphs")}get WUTimers(){return this.get("WUTimers")}get PriorityID(){return this.get("PriorityID")}constructor(e,s,r,n){super(),e instanceof N?this.wsWorkunitsService=e:this.wsWorkunitsService=new N(e),this.topology=ts.attach(this.wsWorkunitsService.opts()),this.set({QuerySet:s,QueryId:r,...n})}static attach(e,s,r){return pa.get({BaseUrl:e.baseUrl,QuerySet:s,QueryId:r},()=>new t(e,s,r))}_eclService;async wsEclService(){return this._eclService||(this._eclService=this.topology.fetchServices({}).then(e=>{for(let s of e?.TpEspServers?.TpEspServer??[])for(let r of s?.TpBindings?.TpBinding??[])if(r?.Service==="ws_ecl"){let n=`${r.Protocol}://${globalThis.location.hostname}:${r.Port}`;return new xt({baseUrl:n})}})),this._eclService}async fetchDetails(){let e=await this.wsWorkunitsService.WUQueryDetails({QuerySet:this.QuerySet,QueryId:this.QueryId,IncludeStateOnClusters:!0,IncludeSuperFiles:!0,IncludeWsEclAddresses:!0,CheckAllNodes:!1});this.set({...e})}async fetchRequestSchema(){let e=await this.wsEclService();try{this._requestSchema=await e?.requestJson(this.QuerySet,this.QueryId)??[]}catch(s){Os.debug(s.message??s),this._requestSchema=[]}}async fetchResponseSchema(){let e=await this.wsEclService();try{this._responseSchema=await e?.responseJson(this.QuerySet,this.QueryId)??{}}catch(s){Os.debug(s.message??s),this._responseSchema={}}}async fetchSchema(){await Promise.all([this.fetchRequestSchema(),this.fetchResponseSchema()])}fetchSummaryStats(){return this.wsWorkunitsService.WUQueryGetSummaryStats({Target:this.QuerySet,QueryId:this.QueryId})}fetchGraph(e="",s=""){return this.wsWorkunitsService.WUQueryGetGraph({Target:this.QuerySet,QueryId:this.QueryId,GraphName:e,SubGraphId:s}).then(r=>{let n=new ss,i=!0;for(let o of r?.Graphs?.ECLGraphEx||[])i?(n.load(o.Graph),i=!1):n.merge(o.Graph);return n})}fetchDetailsNormalized(e={}){let s=Ne.attach(this.wsWorkunitsService,this.Wuid);return s?Promise.all([this.fetchGraph(),s.fetchDetailsMeta(),s.fetchDetailsRaw(e)]).then(r=>{let n=r[0],i=r[1],a=r[2].map(c=>{if(c.Id[0]==="a"||c.Id[0]==="e"){let p=n.idx[c.Id.substring(1)];for(let u in p)if(u.charAt(0)!=="_"&&u.charAt(0)===u.charAt(0).toUpperCase()&&(typeof p[u]=="string"||typeof p[u]=="number"||typeof p[u]=="boolean")&&!c.Properties.Property.some(l=>l.Name===u)){let d=la(p[u])?parseFloat(p[u]):p[u],U=p[u];u.indexOf("Time")>=0&&(d=d/1e9,U=ca(d)+"s"),c.Properties.Property.push({Name:u,RawValue:d,Formatted:U})}}return c});return s.normalizeDetails(i,a)}):Promise.resolve({meta:void 0,columns:void 0,data:void 0})}async submit(e){let s=await this.wsEclService();try{return s?.submit(this.QuerySet,this.QueryId,e).then(r=>{for(let n in r)r[n]=r[n].Row;return r})??[]}catch(r){return Os.debug(r.message??r),[]}}async refresh(){return await Promise.all([this.fetchDetails(),this.fetchSchema()]),this}requestFields(){return this._requestSchema?this._requestSchema:[]}responseFields(){return this._responseSchema?this._responseSchema:{}}resultNames(){let e=[];for(let s in this.responseFields())e.push(s);return e}resultFields(e){return this._responseSchema[e]?this._responseSchema[e]:[]}};var Bs=class extends T{constructor(){super(e=>`${e.BaseUrl}-${e.Name}:${e.UserSpecific}-${e.Namespace}`)}},ga=new Bs,Ce=class extends as{constructor(s,r,n){super();this.key=s;this.value=r;this.oldValue=n}get canConflate(){return!0}conflate(s){return this.key===s.key?(this.value=s.value,!0):!1}void(){return this.value===this.oldValue}},Pn=class t{connection;get BaseUrl(){return this.connection.baseUrl}Name;UserSpecific;Namespace;_dispatch=new us;static attach(e,s="HPCCApps",r,n=!0){return ga.get({BaseUrl:e.baseUrl,Name:s,UserSpecific:n,Namespace:r},()=>new t(e,s,r,n))}constructor(e,s,r,n){e instanceof je?this.connection=e:this.connection=new je(e),this.Name=s,this.UserSpecific=n,this.Namespace=r}_knownValues={};create(){this.connection.CreateStore({Name:this.Name,UserSpecific:this.UserSpecific,Type:"",Description:""})}set(e,s,r=!0){return this.connection.Set({StoreName:this.Name,UserSpecific:this.UserSpecific,Namespace:this.Namespace,Key:e,Value:s}).then(n=>{let i=this._knownValues[e];this._knownValues[e]=s,r&&this._dispatch.post(new Ce(e,s,i))}).catch(n=>{console.error(`Store.set("${e}", "${s}") failed:`,n)})}get(e,s=!0){return this.connection.Fetch({StoreName:this.Name,UserSpecific:this.UserSpecific,Namespace:this.Namespace,Key:e}).then(r=>{let n=this._knownValues[e];return this._knownValues[e]=r.Value,s&&this._dispatch.post(new Ce(e,r.Value,n)),r.Value}).catch(r=>{console.error(`Store.get(${e}) failed:`,r)})}getAll(e=!0){return this.connection.FetchAll({StoreName:this.Name,UserSpecific:this.UserSpecific,Namespace:this.Namespace}).then(s=>{let r={},n=this._knownValues;if(this._knownValues={},s.Pairs.Pair.forEach(i=>{let o=this._knownValues[i.Key];this._knownValues[i.Key]=i.Value,delete n[i.Key],r[i.Key]=i.Value,e&&this._dispatch.post(new Ce(i.Key,i.Value,o))}),e)for(let i in n)this._dispatch.post(new Ce(i,void 0,n[i]));return r}).catch(s=>(console.error("Store.getAll failed:",s),{}))}delete(e,s=!0){return this.connection.Delete({StoreName:this.Name,UserSpecific:this.UserSpecific,Namespace:this.Namespace,Key:e}).then(r=>{let n=this._knownValues[e];delete this._knownValues[e],s&&this._dispatch.post(new Ce(e,void 0,n))}).catch(r=>{console.error(`Store.delete(${e}) failed:`,r)})}monitor(e){return this._dispatch.attach(e)}};var da=O("@hpcc-js/comms/dfuWorkunit.ts");var js=class extends T{constructor(){super(e=>`${e.BaseUrl}-${e.ID}`)}},Fn=new js,En=class t extends P{connection;topologyConnection;get BaseUrl(){return this.connection.baseUrl}get properties(){return this.get()}get ID(){return this.get("ID")}get DFUServerName(){return this.get("DFUServerName")}get ClusterName(){return this.get("ClusterName")}get JobName(){return this.get("JobName")}get Queue(){return this.get("Queue")}get User(){return this.get("User")}get isProtected(){return this.get("isProtected")}get Command(){return this.get("Command")}get CommandMessage(){return this.get("CommandMessage")}get PercentDone(){return this.get("PercentDone")}get SecsLeft(){return this.get("SecsLeft")}get ProgressMessage(){return this.get("ProgressMessage")}get SummaryMessage(){return this.get("SummaryMessage")}get State(){return this.get("State",0)}get SourceLogicalName(){return this.get("SourceLogicalName")}get SourceIP(){return this.get("SourceIP")}get SourceFilePath(){return this.get("SourceFilePath")}get SourceDali(){return this.get("SourceDali")}get SourceRecordSize(){return this.get("SourceRecordSize")}get SourceFormat(){return this.get("SourceFormat")}get RowTag(){return this.get("RowTag")}get SourceNumParts(){return this.get("SourceNumParts")}get SourceDirectory(){return this.get("SourceDirectory")}get DestLogicalName(){return this.get("DestLogicalName")}get DestGroupName(){return this.get("DestGroupName")}get DestDirectory(){return this.get("DestDirectory")}get DestIP(){return this.get("DestIP")}get DestFilePath(){return this.get("DestFilePath")}get DestFormat(){return this.get("DestFormat")}get DestNumParts(){return this.get("DestNumParts")}get DestRecordSize(){return this.get("DestRecordSize")}get Replicate(){return this.get("Replicate")}get Overwrite(){return this.get("Overwrite")}get Compress(){return this.get("Compress")}get SourceCsvSeparate(){return this.get("SourceCsvSeparate")}get SourceCsvQuote(){return this.get("SourceCsvQuote")}get SourceCsvTerminate(){return this.get("SourceCsvTerminate")}get SourceCsvEscape(){return this.get("SourceCsvEscape")}get TimeStarted(){return this.get("TimeStarted")}get TimeStopped(){return this.get("TimeStopped")}get StateMessage(){return this.get("StateMessage")}get MonitorEventName(){return this.get("MonitorEventName")}get MonitorSub(){return this.get("MonitorSub")}get MonitorShotLimit(){return this.get("MonitorShotLimit")}get SourceDiffKeyName(){return this.get("SourceDiffKeyName")}get DestDiffKeyName(){return this.get("DestDiffKeyName")}get Archived(){return this.get("Archived")}get encrypt(){return this.get("encrypt")}get decrypt(){return this.get("decrypt")}get failIfNoSourceFile(){return this.get("failIfNoSourceFile")}get recordStructurePresent(){return this.get("recordStructurePresent")}get quotedTerminator(){return this.get("quotedTerminator")}get preserveCompression(){return this.get("preserveCompression")}get expireDays(){return this.get("expireDays")}get PreserveFileParts(){return this.get("PreserveFileParts")}get FileAccessCost(){return this.get("FileAccessCost")}get KbPerSecAve(){return this.get("KbPerSecAve")}get KbPerSec(){return this.get("KbPerSec")}static create(e,s){let r=new t(e);return r.connection.CreateDFUWorkunit({DFUServerQueue:s}).then(n=>(Fn.set(r),r.set(n.result),r))}static attach(e,s,r){let n=Fn.get({BaseUrl:e.baseUrl,ID:s},()=>new t(e,s));return r&&n.set(r),n}static sprayFixed(e,s){let r=new ge(e);return r.SprayFixedEx({...s}).then(n=>{let i=n.wuid;return r.GetDFUWorkunit({wuid:i}).then(o=>t.attach(e,i,o.result))})}static sprayVariable(e,s){let r=new ge(e);return r.SprayVariableEx({...s}).then(n=>{let i=n.wuid;return r.GetDFUWorkunit({wuid:i}).then(o=>t.attach(e,i,o.result))})}static despray(e,s){let r=new ge(e);return r.DesprayEx({...s}).then(n=>{let i=n.wuid;return r.GetDFUWorkunit({wuid:i}).then(o=>t.attach(e,i,o.result))})}update(e){return this.connection.UpdateDFUWorkunitEx({wu:{JobName:e?.wu?.JobName??this.JobName,isProtected:e?.wu?.isProtected??this.isProtected,ID:this.ID,State:this.State},ClusterOrig:this.ClusterName,JobNameOrig:this.JobName,isProtectedOrig:this.isProtected,StateOrig:this.State})}isComplete(){switch(this.State){case 6:case 5:case 4:case 999:return!0;default:}return!1}isFailed(){return!!(this.isComplete()&&this.State!==6)}isDeleted(){switch(this.State){case 999:return!0;default:}return!1}isRunning(){return!this.isComplete()}abort(){return this.connection.AbortDFUWorkunit({wuid:this.ID})}delete(){return this.DFUWUAction(Qe.DFUWUActions.Delete).then(e=>this.refresh().then(()=>(this._monitor(),e)))}async refresh(e=!1){return await this.GetDFUWorkunit(),this}fetchXML(e){return this.DFUWUFile()}_monitor(){if(this.isComplete()){this._monitorTickCount=0;return}super._monitor()}_monitorTimeoutDuration(){let e=super._monitorTimeoutDuration();return this._monitorTickCount<=1?3e3:this._monitorTickCount<=5?6e3:this._monitorTickCount<=7?12e3:e}DFUWUFile(e={}){return this.connection.DFUWUFileEx({...e,Wuid:this.ID}).then(s=>s).catch(s=>"")}DFUWUAction(e){return this.connection.DFUWorkunitsAction({wuids:{Item:[this.ID]},Type:e}).then(s=>e===Qe.DFUWUActions.Delete?s:this.refresh().then(()=>(this._monitor(),s)))}on(e,s,r){if(this.isCallback(s))switch(e){case"finished":super.on("propChanged","State",n=>{this.isComplete()&&s([n])});break;case"changed":super.on(e,s);break;default:}else switch(e){case"changed":super.on(e,s,r);break;default:}return this._monitor(),this}watchUntilComplete(e){return new Promise((s,r)=>{let n=this.watch(i=>{e&&e(i),this.isComplete()&&(n.release(),s(this))})})}watchUntilRunning(e){return new Promise((s,r)=>{let n=this.watch(i=>{e&&e(i),(this.isComplete()||this.isRunning())&&(n.release(),s(this))})})}constructor(e,s){super(),this.connection=new ge(e),this.topologyConnection=new L(e),this.clearState(s)}clearState(e){this.clear({ID:e,State:0})}GetDFUWorkunit(e={}){return this.connection.GetDFUWorkunit({...e,wuid:this.ID}).then(s=>(this.set(s.result),s)).catch(s=>{if(!s.Exception.some(n=>n.Code===20080||n.Code===20081?(this.clearState(this.ID),this.set("State",999),!0):!1))throw da.warning("Unexpected exception: "),s;return{}})}};export{ar as AccessService,ur as AccountService,Cn as Activity,We as Attribute,ma as BUILD_VERSION,vs as BaseScope,cr as CloudService,lr as CodesignService,ls as Connection,Cu as DFUArrayActions,Uu as DFUChangeProtection,Pu as DFUChangeRestriction,bu as DFUDefFileFormat,Ve as DFUService,En as DFUWorkunit,js as DFUWorkunitCache,gr as DFUXRefService,pr as DaliService,Mt as ECLGraph,Ge as ESPConnection,Y as ESPExceptions,xt as EclService,fr as ElkService,Qe as FileSpray,ge as FileSprayService,oi as FileSprayStates,_s as GlobalResultCache,Lt as GraphCache,ui as LogType,mr as LogaccessService,bn as LogicalFile,Ls as LogicalFileCache,es as Machine,As as MachineCache,te as MachineService,fa as PKG_NAME,ha as PKG_VERSION,Wr as PackageProcessService,Xo as PropertyType,Un as Query,ss as QueryGraph,Ko as RelatedProperty,Gt as Resource,Dr as ResourcesService,Xt as Result,Kt as ResultCache,Be as SMCService,Cr as SashaService,Ye as Scope,Sn as ScopeEdge,At as ScopeGraph,mn as ScopeSubgraph,xn as ScopeVertex,S as Service,Ht as SourceFile,Pn as Store,Bs as StoreCache,je as StoreService,ci as TargetAudience,Me as TargetCluster,Gs as TargetClusterCache,Jt as Timer,ts as Topology,Qs as TopologyCache,L as TopologyService,Ce as ValueChangedMessage,ds as WUStateID,fe as WUUpdate,Ne as Workunit,Ns as WorkunitCache,N as WorkunitsService,Pt as WorkunitsServiceEx,or as WsAccess,Te as WsDfu,k as WsLogaccess,br as WsSMC,Rr as WsSasha,Ur as WsTopology,w as WsWorkunits,hn as XGMMLEdge,Ts as XGMMLGraph,dn as XGMMLSubgraph,fn as XGMMLVertex,Qt as XSDNode,qt as XSDSchema,Ot as XSDSimpleType,Vt as XSDXMLNode,lt as createConnection,wt as createGraph,Wn as createXGMMLGraph,Kd as defaultTargetCluster,Zn as deserializeResponse,si as get,Ga as hookSend,wa as instanceOfIConnection,Aa as instanceOfIOptions,ni as isArray,Fr as isECLResult,Ka as isExceptions,Cp as isWUInfoWorkunit,Rp as isWUQueryECLWorkunit,Yn as jsonp,ks as parseXSD,Gg as parseXSD2,ti as post,ri as send,pe as serializeRequest,Qa as setTransportFactory,$o as splitMetric,Xd as targetClusters};
7
- //# sourceMappingURL=index.js.map