@hpcc-js/comms 3.15.2 → 3.15.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +43 -43
- package/README.md +50 -50
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/index.umd.cjs +1 -1
- package/dist/browser/index.umd.cjs.map +1 -1
- package/dist/node/index.cjs +10 -10
- package/dist/node/index.cjs.map +3 -3
- package/dist/node/index.js +10 -10
- package/dist/node/index.js.map +3 -3
- package/package.json +7 -7
- package/src/__package__.ts +3 -3
- package/src/clienttools/eclMeta.ts +506 -506
- package/src/clienttools/eclcc.ts +628 -628
- package/src/connection.ts +288 -288
- package/src/ecl/activity.ts +82 -82
- package/src/ecl/dfuWorkunit.ts +363 -363
- package/src/ecl/graph.ts +196 -196
- package/src/ecl/logicalFile.ts +196 -196
- package/src/ecl/machine.ts +63 -63
- package/src/ecl/query.ts +265 -265
- package/src/ecl/queryGraph.ts +813 -813
- package/src/ecl/resource.ts +39 -39
- package/src/ecl/result.ts +245 -245
- package/src/ecl/scope.ts +188 -188
- package/src/ecl/sourceFile.ts +34 -34
- package/src/ecl/store.ts +154 -154
- package/src/ecl/targetCluster.ts +149 -149
- package/src/ecl/timer.ts +42 -42
- package/src/ecl/topology.ts +131 -131
- package/src/ecl/workunit.ts +1340 -1340
- package/src/ecl/xsdParser.ts +267 -267
- package/src/espConnection.ts +164 -164
- package/src/index.browser.ts +1 -1
- package/src/index.common.ts +40 -40
- package/src/index.node.ts +48 -48
- package/src/pem/trustwave.ts +909 -909
- package/src/services/fileSpray.ts +73 -73
- package/src/services/wsAccess.ts +8 -8
- package/src/services/wsAccount.ts +27 -27
- package/src/services/wsCloud.ts +73 -73
- package/src/services/wsCodesign.ts +18 -18
- package/src/services/wsDFU.ts +34 -34
- package/src/services/wsDFUXRef.ts +121 -121
- package/src/services/wsDali.ts +8 -8
- package/src/services/wsEcl.ts +123 -123
- package/src/services/wsElk.ts +8 -8
- package/src/services/wsLogaccess.ts +270 -267
- package/src/services/wsMachine.ts +89 -89
- package/src/services/wsPackageProcess.ts +8 -8
- package/src/services/wsResources.ts +8 -8
- package/src/services/wsSMC.ts +80 -80
- package/src/services/wsSasha.ts +7 -7
- package/src/services/wsStore.ts +32 -32
- package/src/services/wsTopology.ts +45 -45
- package/src/services/wsWorkunits.ts +151 -151
- package/src/services/wsdl/FileSpray/v1.23/FileSpray.ts +1008 -1008
- package/src/services/wsdl/FileSpray/v1.25/FileSpray.ts +1040 -1040
- package/src/services/wsdl/FileSpray/v1.26/FileSpray.ts +929 -929
- package/src/services/wsdl/FileSpray/v1.27/FileSpray.ts +930 -930
- package/src/services/wsdl/WsCloud/v1/WsCloud.ts +38 -38
- package/src/services/wsdl/WsCloud/v1.02/WsCloud.ts +77 -77
- package/src/services/wsdl/WsDFUXRef/v1.02/WsDFUXRef.ts +224 -224
- package/src/services/wsdl/WsDFUXRef/v1.04/WsDFUXRef.ts +227 -227
- package/src/services/wsdl/WsDali/v1.04/WsDali.ts +216 -216
- package/src/services/wsdl/WsDfu/v1.62/WsDfu.ts +1455 -1455
- package/src/services/wsdl/WsDfu/v1.63/WsDfu.ts +1465 -1465
- package/src/services/wsdl/WsDfu/v1.65/WsDfu.ts +1244 -1244
- package/src/services/wsdl/WsDfu/v1.66/WsDfu.ts +1267 -1267
- package/src/services/wsdl/WsDfu/v1.67/WsDfu.ts +1268 -1268
- package/src/services/wsdl/WsFileIO/v1.01/WsFileIO.ts +104 -104
- package/src/services/wsdl/WsPackageProcess/v1.04/WsPackageProcess.ts +519 -519
- package/src/services/wsdl/WsPackageProcess/v1.07/WsPackageProcess.ts +500 -500
- package/src/services/wsdl/WsResources/v1.01/WsResources.ts +119 -119
- package/src/services/wsdl/WsSMC/v1.24/WsSMC.ts +665 -665
- package/src/services/wsdl/WsSMC/v1.27/WsSMC.ts +591 -591
- package/src/services/wsdl/WsSMC/v1.28/WsSMC.ts +645 -645
- package/src/services/wsdl/WsSMC/v1.29/WsSMC.ts +660 -660
- package/src/services/wsdl/WsTopology/v1.31/WsTopology.ts +856 -856
- package/src/services/wsdl/WsTopology/v1.32/WsTopology.ts +786 -786
- package/src/services/wsdl/WsTopology/v1.33/WsTopology.ts +835 -835
- package/src/services/wsdl/WsWorkunits/v1.88/WsWorkunits.ts +2944 -2944
- package/src/services/wsdl/WsWorkunits/v1.94/WsWorkunits.ts +3072 -3072
- package/src/services/wsdl/WsWorkunits/v1.95/WsWorkunits.ts +3073 -3073
- package/src/services/wsdl/WsWorkunits/v1.97/WsWorkunits.ts +3134 -3134
- package/src/services/wsdl/WsWorkunits/v1.98/WsWorkunits.ts +3182 -3182
- package/src/services/wsdl/WsWorkunits/v1.99/WsWorkunits.ts +3162 -3162
- package/src/services/wsdl/WsWorkunits/v2/WsWorkunits.ts +3153 -3153
- package/src/services/wsdl/WsWorkunits/v2.02/WsWorkunits.ts +3162 -3162
- package/src/services/wsdl/WsWorkunits/v2.03/WsWorkunits.ts +3164 -3164
- package/src/services/wsdl/WsWorkunits/v2.04/WsWorkunits.ts +3171 -3171
- package/src/services/wsdl/ws_access/v1.16/ws_access.ts +1086 -1086
- package/src/services/wsdl/ws_access/v1.17/ws_access.ts +1023 -1023
- package/src/services/wsdl/ws_account/v1.05/ws_account.ts +111 -111
- package/src/services/wsdl/ws_account/v1.06/ws_account.ts +109 -109
- package/src/services/wsdl/ws_account/v1.07/ws_account.ts +114 -114
- package/src/services/wsdl/ws_codesign/v1.1/ws_codesign.ts +95 -95
- package/src/services/wsdl/ws_elk/v1/ws_elk.ts +47 -47
- package/src/services/wsdl/ws_logaccess/v1/ws_logaccess.ts +83 -83
- package/src/services/wsdl/ws_logaccess/v1.02/ws_logaccess.ts +161 -161
- package/src/services/wsdl/ws_logaccess/v1.03/ws_logaccess.ts +190 -190
- package/src/services/wsdl/ws_logaccess/v1.04/ws_logaccess.ts +215 -215
- package/src/services/wsdl/ws_logaccess/v1.05/ws_logaccess.ts +219 -219
- package/src/services/wsdl/ws_logaccess/v1.08/ws_logaccess.ts +267 -267
- package/src/services/wsdl/ws_machine/v1.17/ws_machine.ts +567 -567
- package/src/services/wsdl/ws_machine/v1.18/ws_machine.ts +497 -497
- package/src/services/wsdl/ws_machine/v1.19/ws_machine.ts +497 -497
- package/src/services/wsdl/wsstore/v1.02/wsstore.ts +239 -239
- package/types/services/wsLogaccess.d.ts +1 -0
package/dist/browser/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e=Object.defineProperty,t=(t,n)=>e(t,"name",{value:n,configurable:!0});import{scopedLogger as n,join as s,root as r,promiseTimeout as i,utf8ToBase64 as o,exists as c,deepMixin as a,xml2json as u,StateObject as h,Cache as l,Edge as d,Graph as p,Subgraph as g,Vertex as m,SAXStackParser as S,Stack as f,espTime2Seconds as _,deepMixinT as U,XMLNode as y,debounce as v,Dispatch as C,Message as R}from"@hpcc-js/util";const D="@hpcc-js/comms",b="3.15.2",F="3.21.3",W=n("comms/connection.ts");function T(e){return"baseUrl"in e}t(T,"instanceOfIOptions");const A={type:"post",baseUrl:"",userID:"",password:"",rejectUnauthorized:!0,timeoutSecs:60};function w(e){return"function"==typeof e.opts&&"function"==typeof e.send&&"function"==typeof e.clone}function P(e,t){return void 0===t||!0===t?encodeURIComponent(e):""+e}function x(e,t=!0,n=""){if(n&&(n+="."),"object"!=typeof e)return P(e,t);const s=[];for(const r in e)if(e.hasOwnProperty(r))if(e[r]instanceof Array){let i=!1;e[r].forEach((e,o)=>{"object"==typeof e?(i=!0,s.push(x(e,t,n+P(`${r}.${o}`,t)))):s.push(n+P(`${r}_i${o}`,t)+"="+x(e,t))}),i&&s.push(n+P(`${r}.itemcount`,t)+"="+e[r].length)}else"object"==typeof e[r]?e[r]&&e[r].Item instanceof Array?(s.push(x(e[r].Item,t,n+P(r,t))),s.push(n+P(`${r}.itemcount`,t)+"="+e[r].Item.length)):s.push(x(e[r],t,n+P(r,t))):void 0!==e[r]?s.push(n+P(r,t)+"="+P(e[r],t)):s.push(n+P(r,t));return s.join("&")}function L(e){return JSON.parse(e)}function E(e,n,r={},i="json",o){return o&&console.warn("Header attributes ignored for JSONP connections"),new Promise((o,c)=>{let a=1e3*e.timeoutSecs;const u="jsonp_callback_"+Math.round(999999*Math.random());window[u]=function(e){a=0,p(),o("json"===i&&"string"==typeof e?L(e):e)};const h=document.createElement("script");let l=s(e.baseUrl,n);l+=l.indexOf("?")>=0?"&":"?",h.src=l+"jsonp="+u+"&"+x(r,e.encodeRequest),document.body.appendChild(h);const d=setInterval(function(){a<=0?clearInterval(d):(a-=5e3,a<=0?(clearInterval(d),W.error("Request timeout: "+h.src),p(),c(Error("Request timeout: "+h.src))):W.debug("Request pending ("+a/1e3+" sec): "+h.src))},5e3);function p(){delete window[u],document.body.removeChild(h)}t(p,"doCallback")})}function M(e){return e.userID?{Authorization:`Basic ${o(`${e.userID}:${e.password}`)}`}:{}}t(w,"instanceOfIConnection"),t(P,"encode"),t(x,"serializeRequest"),t(L,"deserializeResponse"),t(E,"jsonp"),t(M,"authHeader");const N={};function I(e,n,o,c,a){function u(e){if(e.ok)return"json"===a?e.json():e.text();throw new Error(e.statusText)}c={...M(e),...c},o={credentials:N[e.baseUrl]?"omit":"include",...o,headers:c},0===e.baseUrl.indexOf("https:")&&(!1===e.rejectUnauthorized&&r.__hpcc_rejectUnauthorizedAgent?o.dispatcher=r.__hpcc_rejectUnauthorizedAgent:r.__hpcc_trustwaveAgent&&(o.agent=r.__hpcc_trustwaveAgent)),t(u,"handleResponse");const h=r.__hpcc_undiciFetch??fetch;return i(1e3*e.timeoutSecs,h(s(e.baseUrl,n),o).then(u).catch(t=>(o.credentials=N[e.baseUrl]?"include":"omit",h(s(e.baseUrl,n),o).then(u).then(t=>(N[e.baseUrl]=!N[e.baseUrl],t)))))}function j(e,t,n,s="json",r){let i;return n.upload_&&(delete n.upload_,t+="?upload_"),n.abortSignal_&&(i=n.abortSignal_,delete n.abortSignal_),I(e,t,{method:"post",body:x(n,e.encodeRequest),signal:i},{"Content-Type":"application/x-www-form-urlencoded",...r},s)}function k(e,t,n,s="json",r){let i;return n.abortSignal_&&(i=n.abortSignal_,delete n.abortSignal_),I(e,`${t}?${x(n,e.encodeRequest)}`,{method:"get",signal:i},{...r},s)}function G(e,t,n,s="json",r){let i;switch(e.type){case"jsonp":i=E(e,t,n,s,r);break;case"get":i=k(e,t,n,s,r);break;default:i=j(e,t,n,s,r)}return i}t(I,"doFetch"),t(j,"post"),t(k,"get"),t(G,"send");let V=G;function Q(e){const t=V;return e&&(V=e),t}t(Q,"hookSend");const B=class _Connection{_opts;get baseUrl(){return this._opts.baseUrl}constructor(e){this.opts(e)}opts(e){return 0===arguments.length?this._opts:(this._opts={...A,...e},this)}send(e,t,n="json",s){return this._opts.hookSend?this._opts.hookSend(this._opts,e,t,n,V,s):V(this._opts,e,t,n,s)}clone(){return new _Connection(this.opts())}};t(B,"Connection");let O=B,X=/* @__PURE__ */t(function(e){return new O(e)},"createConnection");function H(e){const t=X;return X=e,t}function $(e){return"[object Array]"===Object.prototype.toString.call(e)}t(H,"setTransportFactory"),t($,"isArray");const J=class _ESPExceptions extends Error{isESPExceptions=!0;action;request;Source;Exception;constructor(e,t,n){super("ESPException: "+n.Source),this.action=e,this.request=t,this.Source=n.Source,this.Exception=n.Exception,n.Exception.length?this.message=`${n.Exception[0].Code}: ${n.Exception[0].Message}`:this.message=""}};t(J,"ESPExceptions");let q=J;function Y(e){return e instanceof q||e.isESPExceptions&&Array.isArray(e.Exception)}function z(e){return void 0!==e.send}t(Y,"isExceptions"),t(z,"isConnection");const Z=class _ESPConnection{_connection;get baseUrl(){return this._connection.opts().baseUrl}_service;_version;constructor(e,t,n){this._connection=z(e)?e:X(e),this._service=t,this._version=n}service(e){return void 0===e?this._service:(this._service=e,this)}version(e){return void 0===e?this._version:(this._version=e,this)}toESPStringArray(e,t){if($(e[t])){for(let n=0;n<e[t].length;++n)e[t+"_i"+n]=e[t][n];delete e[t]}return e}opts(e){return void 0===e?this._connection.opts():(this._connection.opts(e),this)}send(e,t={},n="json",r=!1,i,o){const c={...t,ver_:this._version};let a;r&&(c.upload_=!0),i&&(c.abortSignal_=i);let u="json";switch(n){case"text":a=s(this._service,e),u="text";break;case"xsd":a=s(this._service,e+".xsd"),u="text";break;case"json2":a=s(this._service,e+"/json"),n="json";const t=e.split("/");e=t.pop();break;default:a=s(this._service,e+".json")}return this._connection.send(a,c,u).then(t=>{if("json"===n){let n;if(t&&t.Exceptions)throw new q(e,c,t.Exceptions);if(t&&(n=t[o||e+"Response"]),!n)throw new q(e,c,{Source:"ESPConnection.send",Exception:[{Code:0,Message:"Missing Response"}]});return n}return t})}clone(){return new _ESPConnection(this._connection.clone(),this._service,this._version)}};t(Z,"ESPConnection");let K=Z;const ee=class _Service{_connection;get baseUrl(){return this._connection.opts().baseUrl}constructor(e,t,n){this._connection=new K(e,t,n)}opts(){return this._connection.opts()}connection(){return this._connection.clone()}};t(ee,"Service");let te=ee;var ne,se,re;se=ne||(ne={}),(re=se.DFUWUActions||(se.DFUWUActions={})).Delete="Delete",re.Protect="Protect",re.Unprotect="Unprotect",re.Restore="Restore",re.SetToFailed="SetToFailed",re.Archive="Archive";const ie=class _FileSprayServiceBase extends te{constructor(e){super(e,"FileSpray","1.27")}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")}};t(ie,"FileSprayServiceBase");let oe=ie;var ce=/* @__PURE__ */(e=>(e[e.unknown=0]="unknown",e[e.scheduled=1]="scheduled",e[e.queued=2]="queued",e[e.started=3]="started",e[e.aborted=4]="aborted",e[e.failed=5]="failed",e[e.finished=6]="finished",e[e.monitoring=7]="monitoring",e[e.aborting=8]="aborting",e[e.notfound=999]="notfound",e))(ce||{}),ae=/* @__PURE__ */(e=>(e.Copy="copy",e.Remove="remove",e.Move="move",e.Rename="rename",e.Replicate="replicate",e.Import="import",e.Export="export",e.Monitor="monitor",e.Copymerge="copymerge",e.Supercopy="supercopy",e.Publish="publish",e))(ae||{});const ue=class _FileSprayService extends oe{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")}};t(ue,"FileSprayService");let he=ue;var le,de,pe,ge,me,Se,fe;de=le||(le={}),(pe=de.ViewMemberType||(de.ViewMemberType={})).User="User",pe.Group="Group",(ge=de.UserSortBy||(de.UserSortBy={})).username="username",ge.fullname="fullname",ge.passwordexpiration="passwordexpiration",ge.employeeID="employeeID",ge.employeeNumber="employeeNumber",(me=de.GroupSortBy||(de.GroupSortBy={})).Name="Name",me.ManagedBy="ManagedBy",(Se=de.AccountTypeReq||(de.AccountTypeReq={})).Any="Any",Se.User="User",Se.Group="Group",(fe=de.ResourcePermissionSortBy||(de.ResourcePermissionSortBy={})).Name="Name",fe.Type="Type",(de.ResourceSortBy||(de.ResourceSortBy={})).Name="Name";const _e=class _AccessServiceBase extends te{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")}};t(_e,"AccessServiceBase");let Ue=_e;const ye=class _AccessService extends Ue{};t(ye,"AccessService");let ve=ye;const Ce=class _AccountServiceBase extends te{constructor(e){super(e,"ws_account","1.07")}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")}};t(Ce,"AccountServiceBase");let Re=Ce;const De=class _AccountService extends Re{VerifyUser(e){return this._connection.send("VerifyUser",e).catch(e=>{if(e.isESPExceptions&&e.Exception.some(e=>20043===e.Code))return{retcode:20043,Exceptions:{Source:"wsAccount",Exception:e.Exception}};throw e})}};t(De,"AccountService");let be=De;const Fe=class _CloudServiceBase extends te{constructor(e){super(e,"WsCloud","1.02")}GetPODs(e){return this._connection.send("GetPODs",e,"json",!1,void 0,"GetPODsResponse")}GetServices(e){return this._connection.send("GetServices",e,"json",!1,void 0,"GetServicesResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"WsCloudPingResponse")}};t(Fe,"CloudServiceBase");let We=Fe;const Te=n("@hpcc-js/comms/services/wsCloud.ts");function Ae(e){return void 0!==e?.Pods}function we(e){return e.spec?.containers?.reduce((e,t)=>(t.ports?.forEach(t=>{e.push({ContainerPort:t.containerPort,Name:t.name,Protocol:t.protocol})}),e),[])??[]}function Pe(e){return e.filter(e=>{const t=e?.metadata?.labels??{};return t.hasOwnProperty("app.kubernetes.io/part-of")&&"HPCC-Platform"===t["app.kubernetes.io/part-of"]}).map(e=>{const t=new Date(e.metadata?.creationTimestamp);return{Name:e.metadata.name,Status:e.status?.phase,CreationTimestamp:t.toISOString(),ContainerName:e.status?.containerStatuses?.reduce((e,t)=>(t.name&&e.push(t.name),e),[]).join(", ")??"",ContainerCount:e.spec?.containers?.length??0,ContainerReadyCount:e.status?.containerStatuses?.reduce((e,t)=>e+(t.ready?1:0),0),ContainerRestartCount:e.status?.containerStatuses?.reduce((e,t)=>e+t.restartCount,0),Ports:{Port:we(e)}}})}t(Ae,"isGetPODsResponse_v1_02"),t(we,"mapPorts"),t(Pe,"mapPods");const xe=class _CloudService extends We{getPODs(){return super.GetPODs({}).then(e=>{if(Ae(e))return e.Pods?.Pod??[];try{const t="string"==typeof e.Result?JSON.parse(e.Result):e.Result;return Pe(t?.items??[])}catch(t){return Te.error(`Error parsing V1Pods json '${t instanceof Error?t.message:String(t)}'`),[]}})}};t(xe,"CloudService");let Le=xe;var Ee,Me;((Me=Ee||(Ee={})).SigningMethodType||(Me.SigningMethodType={})).gpg="gpg";const Ne=class _CodesignServiceBase extends te{constructor(e){super(e,"ws_codesign","1.1")}ListUserIDs(e){return this._connection.send("ListUserIDs",e,"json",!1,void 0,"ListUserIDsResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"ws_codesignPingResponse")}Sign(e){return this._connection.send("Sign",e,"json",!1,void 0,"SignResponse")}Verify(e){return this._connection.send("Verify",e,"json",!1,void 0,"VerifyResponse")}};t(Ne,"CodesignServiceBase");let Ie=Ne;const je=class _CodesignService extends Ie{ListUserIDsEx(e){return super.ListUserIDs(e).then(e=>e.UserIDs.Item).catch(e=>[])}Sign(e){return super.Sign({SigningMethod:Ee.SigningMethodType.gpg,...e})}};t(je,"CodesignService");let ke=je;const Ge=class _DaliServiceBase extends te{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")}};t(Ge,"DaliServiceBase");let Ve=Ge;const Qe=class _DaliService extends Ve{};t(Qe,"DaliService");let Be=Qe;var Oe,Xe,He,$e,Je,qe,Ye,ze,Ze;Xe=Oe||(Oe={}),(He=Xe.DFUArrayActions||(Xe.DFUArrayActions={})).Delete="Delete",He.AddToSuperfile="Add To Superfile",He.ChangeProtection="Change Protection",He.ChangeRestriction="Change Restriction",($e=Xe.DFUChangeProtection||(Xe.DFUChangeProtection={}))[$e.NoChange=0]="NoChange",$e[$e.Protect=1]="Protect",$e[$e.Unprotect=2]="Unprotect",$e[$e.UnprotectAll=3]="UnprotectAll",(Je=Xe.DFUChangeRestriction||(Xe.DFUChangeRestriction={}))[Je.NoChange=0]="NoChange",Je[Je.Restrict=1]="Restrict",Je[Je.Unrestricted=2]="Unrestricted",(qe=Xe.DFUDefFileFormat||(Xe.DFUDefFileFormat={})).xml="xml",qe.def="def",(Ye=Xe.FileAccessRole||(Xe.FileAccessRole={})).Token="Token",Ye.Engine="Engine",Ye.External="External",(ze=Xe.SecAccessType||(Xe.SecAccessType={})).None="None",ze.Access="Access",ze.Read="Read",ze.Write="Write",ze.Full="Full",(Ze=Xe.DFUFileType||(Xe.DFUFileType={})).Flat="Flat",Ze.Index="Index",Ze.Xml="Xml",Ze.Csv="Csv",Ze.Json="Json",Ze.IndexLocal="IndexLocal",Ze.IndexPartitioned="IndexPartitioned",Ze.Unset="Unset";const Ke=class _DfuServiceBase extends te{constructor(e){super(e,"WsDfu","1.67")}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")}DFUGetMetaInquiry(e){return this._connection.send("DFUGetMetaInquiry",e,"json",!1,void 0,"DFUMetaInquiryResponse")}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")}};t(Ke,"DfuServiceBase");let et=Ke;const tt=Oe.DFUArrayActions,nt=Oe.DFUDefFileFormat,st=Oe.DFUChangeProtection,rt=Oe.DFUChangeRestriction,it=class _DFUService extends et{DFUFile(e){return this._connection.send("DFUDefFile",e,"text")}async recursiveFetchLogicalFiles(e){const t=[],n=[];return await Promise.all(e.map(e=>this.DFUInfo({Cluster:e.NodeGroup,Name:e.Name,IncludeJsonTypeInfo:!1,IncludeBinTypeInfo:!1,ForceIndexInfo:!1}).then(e=>{for(const n of e?.FileDetail?.Superfiles?.DFULogicalFile??[])t.push(n);for(const t of e?.FileDetail?.subfiles?.Item??[])n.push(t)}))),n.concat(t.length?await this.recursiveFetchLogicalFiles(t):[])}};t(it,"DFUService");let ot=it;const ct=class _DFUXRefServiceBase extends te{constructor(e){super(e,"WsDFUXRef","1.04")}DFUXRefArrayAction(e){return this._connection.send("DFUXRefArrayAction",e,"json",!1,void 0,"DFUXRefArrayActionResponse")}DFUXRefBuild(e){return this._connection.send("DFUXRefBuild",e,"json",!1,void 0,"DFUXRefBuildResponse")}DFUXRefBuildCancel(e){return this._connection.send("DFUXRefBuildCancel",e,"json",!1,void 0,"DFUXRefBuildCancelResponse")}DFUXRefCleanDirectories(e){return this._connection.send("DFUXRefCleanDirectories",e,"json",!1,void 0,"DFUXRefCleanDirectoriesResponse")}DFUXRefDirectories(e){return this._connection.send("DFUXRefDirectories",e,"json",!1,void 0,"DFUXRefDirectoriesQueryResponse")}DFUXRefFoundFiles(e){return this._connection.send("DFUXRefFoundFiles",e,"json",!1,void 0,"DFUXRefFoundFilesQueryResponse")}DFUXRefList(e){return this._connection.send("DFUXRefList",e,"json",!1,void 0,"DFUXRefListResponse")}DFUXRefLostFiles(e){return this._connection.send("DFUXRefLostFiles",e,"json",!1,void 0,"DFUXRefLostFilesQueryResponse")}DFUXRefMessages(e){return this._connection.send("DFUXRefMessages",e,"json",!1,void 0,"DFUXRefMessagesQueryResponse")}DFUXRefOrphanFiles(e){return this._connection.send("DFUXRefOrphanFiles",e,"json",!1,void 0,"DFUXRefOrphanFilesQueryResponse")}DFUXRefUnusedFiles(e){return this._connection.send("DFUXRefUnusedFiles",e,"json",!1,void 0,"DFUXRefUnusedFilesResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"WsDFUXRefPingResponse")}};t(ct,"DFUXRefServiceBase");let at=ct;const ut=class _DFUXRefService extends at{DFUXRefDirectoriesEx(e){return this._connection.send("DFUXRefDirectories",e,"json",!1,void 0,"DFUXRefDirectoriesQueryResponse")}DFUXRefListEx(e){return this._connection.send("DFUXRefList",e,"json",!1,void 0,"DFUXRefListResponse")}};t(ut,"DFUXRefService");let ht=ut;function lt(e,t){const n=typeof t;switch(n){case"boolean":case"number":case"string":return{id:e,type:n};case"object":if(t.Row instanceof Array&&(t=t.Row),t instanceof Array)return{id:e,type:"dataset",children:dt(t[0])};if(t instanceof Object){if(t.Item&&t.Item instanceof Array&&1===t.Item.length){const n=typeof t.Item[0];if("string"===n||"number"===n)return{id:e,type:"set",fieldType:n};throw new Error("Unknown field type")}return{id:e,type:"object",fields:pt(t)}}default:throw new Error("Unknown field type")}}function dt(e){e.Row&&e.Row instanceof Array&&(e=e.Row[0]);const t=[];for(const n in e)t.push(lt(n,e[n]));return t}function pt(e){const t={};for(const n in e)t[n]=lt(n,e[n]);return t}t(lt,"jsonToIField"),t(dt,"jsonToIFieldArr"),t(pt,"jsonToIFieldObj");const gt=class _EclService extends te{constructor(e){super(e,"WsEcl","0")}opts(){return this._connection.opts()}requestJson(e,t){return this._connection.send(`example/request/query/${e}/${t}/json`,{},"text").then(e=>{const t=JSON.parse(e);for(const n in t)return t[n];return{}}).then(dt)}responseJson(e,t){return this._connection.send(`example/response/query/${e}/${t}/json`,{},"text").then(e=>{const t=JSON.parse(e);for(const n in t)return t[n].Results;return{}}).then(e=>{const t={};for(const n in e)t[n]=dt(e[n]);return t})}submit(e,t,n){const s=`submit/query/${e}/${t}`;return this._connection.send(s,n,"json2").then(e=>{if(e.Results&&e.Results.Exception)throw new q(s,n,{Source:"wsEcl.submit",Exception:e.Results.Exception});return e.Results})}};t(gt,"EclService");let mt=gt;const St=class _ElkServiceBase extends te{constructor(e){super(e,"ws_elk","1")}GetConfigDetails(e){return this._connection.send("GetConfigDetails",e,"json",!1,void 0,"GetConfigDetailsResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"ws_elkPingResponse")}};t(St,"ElkServiceBase");let ft=St;const _t=class _ElkService extends ft{};t(_t,"ElkService");let Ut=_t;var yt,vt,Ct,Rt,Dt,bt,Ft,Wt,Tt,At;vt=yt||(yt={}),(Ct=vt.LogColumnType||(vt.LogColumnType={})).global="global",Ct.workunits="workunits",Ct.components="components",Ct.audience="audience",Ct.class="class",Ct.instance="instance",Ct.node="node",Ct.message="message",Ct.logid="logid",Ct.processid="processid",Ct.threadid="threadid",Ct.timestamp="timestamp",Ct.pod="pod",Ct.traceid="traceid",Ct.spanid="spanid",(Rt=vt.LogColumnValueType||(vt.LogColumnValueType={})).string="string",Rt.numeric="numeric",Rt.datetime="datetime",Rt.enum="enum",Rt.epoch="epoch",(Dt=vt.LogAccessType||(vt.LogAccessType={}))[Dt.All=0]="All",Dt[Dt.ByJobID=1]="ByJobID",Dt[Dt.ByComponent=2]="ByComponent",Dt[Dt.ByLogType=3]="ByLogType",Dt[Dt.ByTargetAudience=4]="ByTargetAudience",Dt[Dt.BySourceInstance=5]="BySourceInstance",Dt[Dt.BySourceNode=6]="BySourceNode",Dt[Dt.ByFieldName=7]="ByFieldName",Dt[Dt.ByPod=8]="ByPod",Dt[Dt.ByTraceID=9]="ByTraceID",Dt[Dt.BySpanID=10]="BySpanID",(bt=vt.LogAccessStatusCode||(vt.LogAccessStatusCode={}))[bt.Success=0]="Success",bt[bt.Warning=1]="Warning",bt[bt.Fail=2]="Fail",(Ft=vt.LogAccessFilterOperator||(vt.LogAccessFilterOperator={}))[Ft.NONE=0]="NONE",Ft[Ft.AND=1]="AND",Ft[Ft.OR=2]="OR",(Wt=vt.LogSelectColumnMode||(vt.LogSelectColumnMode={}))[Wt.MIN=0]="MIN",Wt[Wt.DEFAULT=1]="DEFAULT",Wt[Wt.ALL=2]="ALL",Wt[Wt.CUSTOM=3]="CUSTOM",(Tt=vt.SortColumType||(vt.SortColumType={}))[Tt.ByDate=0]="ByDate",Tt[Tt.ByJobID=1]="ByJobID",Tt[Tt.ByComponent=2]="ByComponent",Tt[Tt.ByLogType=3]="ByLogType",Tt[Tt.ByTargetAudience=4]="ByTargetAudience",Tt[Tt.BySourceInstance=5]="BySourceInstance",Tt[Tt.BySourceNode=6]="BySourceNode",Tt[Tt.ByFieldName=7]="ByFieldName",Tt[Tt.ByPod=8]="ByPod",Tt[Tt.ByTraceID=9]="ByTraceID",Tt[Tt.BySpanID=10]="BySpanID",(At=vt.SortDirection||(vt.SortDirection={}))[At.ASC=0]="ASC",At[At.DSC=1]="DSC";const wt=class _LogaccessServiceBase extends te{constructor(e){super(e,"ws_logaccess","1.08")}GetHealthReport(e){return this._connection.send("GetHealthReport",e,"json",!1,void 0,"GetHealthReportResponse")}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")}};t(wt,"LogaccessServiceBase");let Pt=wt;const xt=n("@hpcc-js/comms/services/wsLogaccess.ts");var Lt=/* @__PURE__ */(e=>(e.Disaster="DIS",e.Error="ERR",e.Warning="WRN",e.Information="INF",e.Progress="PRO",e.Metric="MET",e))(Lt||{}),Et=/* @__PURE__ */(e=>(e.Operator="OPR",e.User="USR",e.Programmer="PRO",e.Audit="ADT",e))(Et||{});const Mt=class _LogaccessService extends Pt{_logAccessInfo;GetLogAccessInfo(e={}){return this._logAccessInfo||(this._logAccessInfo=super.GetLogAccessInfo(e)),this._logAccessInfo}GetLogs(e){return super.GetLogs(e)}async GetLogsEx(e){const n=await this.GetLogAccessInfo(),s={};n.Columns.Column.forEach(e=>s[e.LogType]=e.Name);const r=/* @__PURE__ */t(e=>{const t={};for(const n in s)t[n]=e?.fields?Object.assign({},...e.fields)[s[n]]??"":"";return t},"convertLogLine"),i={Filter:{leftBinaryFilter:{BinaryLogFilter:[{leftFilter:{LogCategory:yt.LogAccessType.All}}]}},Range:{StartDate:/* @__PURE__ */new Date(0).toISOString()},LogLineStartFrom:e.LogLineStartFrom??0,LogLineLimit:e.LogLineLimit??100,SelectColumnMode:yt.LogSelectColumnMode.DEFAULT,Format:"JSON",SortBy:{SortCondition:[{BySortType:yt.SortColumType.ByDate,ColumnName:"",Direction:0}]}},o=[],c=Object.values(yt.LogColumnType);for(const t in e){if(null==e[t]||""===e[t]||Array.isArray(e[t])&&0===e[t].length)continue;let n,r;if(t in s&&(n=c.includes(t)?t:s[t]),n){switch(n){case yt.LogColumnType.workunits:case"hpcc.log.jobid":r=yt.LogAccessType.ByJobID;break;case yt.LogColumnType.audience:case"hpcc.log.audience":r=yt.LogAccessType.ByTargetAudience;break;case yt.LogColumnType.class:case"hpcc.log.class":r=yt.LogAccessType.ByLogType;break;case yt.LogColumnType.components:case"kubernetes.container.name":r=yt.LogAccessType.ByComponent;break;default:r=yt.LogAccessType.ByFieldName,n=s[t]}if(Array.isArray(e[t]))e[t].forEach(e=>{r===yt.LogAccessType.ByComponent&&(e+="*"),o.push({LogCategory:r,SearchField:n,SearchByValue:e})});else{let s=e[t];r===yt.LogAccessType.ByComponent&&(s+="*"),o.push({LogCategory:r,SearchField:n,SearchByValue:s})}}}if(o.length>2){let e=i.Filter.leftBinaryFilter.BinaryLogFilter[0];o.forEach((t,n)=>{let s=yt.LogAccessFilterOperator.AND;n>0?(o[n-1].SearchField===t.SearchField&&(s=yt.LogAccessFilterOperator.OR),n===o.length-1?(e.Operator=s,e.rightFilter=t):(e.Operator=s,e.rightBinaryFilter={BinaryLogFilter:[{leftFilter:t}]},e=e.rightBinaryFilter.BinaryLogFilter[0])):e.leftFilter=t})}else delete i.Filter.leftBinaryFilter,i.Filter.leftFilter={LogCategory:yt.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=yt.LogAccessFilterOperator.AND,o[0].SearchField===o[1].SearchField&&(i.Filter.Operator=yt.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(e=>{try{const t=JSON.parse(e.LogLines);let s=[];switch(n.RemoteLogManagerType){case"azureloganalyticscurl":case"elasticstack":case"grafanacurl":s=t.lines?.map(r)??[];break;default:xt.warning(`Unknown RemoteLogManagerType: ${n.RemoteLogManagerType}`),s=[]}return{lines:s,total:e.TotalLogLinesAvailable??1e4}}catch(t){xt.error(t.message??t)}return{lines:[],total:0}})}};t(Mt,"LogaccessService");let Nt=Mt;function It(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function jt(e){return 1===e.length&&(e=kt(e)),{left:/* @__PURE__ */t(function(t,n,s,r){for(null==s&&(s=0),null==r&&(r=t.length);s<r;){var i=s+r>>>1;e(t[i],n)<0?s=i+1:r=i}return s},"left"),right:/* @__PURE__ */t(function(t,n,s,r){for(null==s&&(s=0),null==r&&(r=t.length);s<r;){var i=s+r>>>1;e(t[i],n)>0?r=i:s=i+1}return s},"right")}}function kt(e){return function(t,n){return It(e(t),n)}}function Gt(e){return null===e?NaN:+e}function Vt(e,t){var n,s,r=e.length,i=-1;if(null==t){for(;++i<r;)if(null!=(n=e[i])&&n>=n)for(s=n;++i<r;)null!=(n=e[i])&&n>s&&(s=n)}else for(;++i<r;)if(null!=(n=t(e[i],i,e))&&n>=n)for(s=n;++i<r;)null!=(n=t(e[i],i,e))&&n>s&&(s=n);return s}function Qt(e,t){var n,s=e.length,r=s,i=-1,o=0;if(null==t)for(;++i<s;)isNaN(n=Gt(e[i]))?--r:o+=n;else for(;++i<s;)isNaN(n=Gt(t(e[i],i,e)))?--r:o+=n;if(r)return o/r}var Bt,Ot,Xt,Ht;t(It,"ascending"),t(jt,"bisector"),t(kt,"ascendingComparator"),jt(It),t(Gt,"number"),t(Vt,"d3Max"),t(Qt,"d3Mean"),Ot=Bt||(Bt={}),(Xt=Ot.ThresholdType||(Ot.ThresholdType={}))[Xt.THRESHOLD_PERCENTAGE=0]="THRESHOLD_PERCENTAGE",Xt[Xt.THRESHOLD_MB=1]="THRESHOLD_MB",(Ht=Ot.TpMachineType||(Ot.TpMachineType={})).ALLNODES="ALLNODES",Ht.THORMACHINES="THORMACHINES",Ht.HOLEMACHINES="HOLEMACHINES",Ht.ROXIEMACHINES="ROXIEMACHINES",Ht.MACHINES="MACHINES",Ht.AVAILABLEMACHINES="AVAILABLEMACHINES",Ht.DROPZONE="DROPZONE",Ht.STANDBYNNODE="STANDBYNNODE",Ht.THORSPARENODES="THORSPARENODES",Ht.HOLESTANDBYNODES="HOLESTANDBYNODES";const $t=class _MachineServiceBase extends te{constructor(e){super(e,"ws_machine","1.19")}GetComponentStatus(e){return this._connection.send("GetComponentStatus",e,"json",!1,void 0,"GetComponentStatusResponse")}GetComponentUsage(e){return this._connection.send("GetComponentUsage",e,"json",!1,void 0,"GetComponentUsageResponse")}GetMachineInfo(e){return this._connection.send("GetMachineInfo",e,"json",!1,void 0,"GetMachineInfoResponse")}GetMachineInfoEx(e){return this._connection.send("GetMachineInfoEx",e,"json",!1,void 0,"GetMachineInfoResponseEx")}GetMetrics(e){return this._connection.send("GetMetrics",e,"json",!1,void 0,"MetricsResponse")}GetNodeGroupUsage(e){return this._connection.send("GetNodeGroupUsage",e,"json",!1,void 0,"GetNodeGroupUsageResponse")}GetTargetClusterInfo(e){return this._connection.send("GetTargetClusterInfo",e,"json",!1,void 0,"GetTargetClusterInfoResponse")}GetTargetClusterUsage(e){return this._connection.send("GetTargetClusterUsage",e,"json",!1,void 0,"GetTargetClusterUsageResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"ws_machinePingResponse")}UpdateComponentStatus(e){return this._connection.send("UpdateComponentStatus",e,"json",!1,void 0,"UpdateComponentStatusResponse")}};t($t,"MachineServiceBase");let Jt=$t;const qt=class _MachineService extends Jt{GetTargetClusterUsageEx(e,t=!1){return this._connection.send("GetTargetClusterUsage",{TargetClusters:e?{Item:e}:{},BypassCachedResult:t}).then(e=>c("TargetClusterUsages.TargetClusterUsage",e)?e.TargetClusterUsages.TargetClusterUsage:[]).then(e=>e.filter(e=>!!e.ComponentUsages).map(e=>{const t=e.ComponentUsages.ComponentUsage.map(e=>{const t=(e.MachineUsages&&e.MachineUsages.MachineUsage?e.MachineUsages.MachineUsage:[]).map(e=>{const t=e.DiskUsages&&e.DiskUsages.DiskUsage?e.DiskUsages.DiskUsage.map(e=>({...e,InUse:1024*e.InUse,Total:1024*(e.InUse+e.Available),PercentUsed:100-e.PercentAvailable})):[];return{Name:e.Name,NetAddress:e.NetAddress,Description:e.Description,DiskUsages:t,mean:Qt(t.filter(e=>!isNaN(e.PercentUsed)),e=>e.PercentUsed),max:Vt(t.filter(e=>!isNaN(e.PercentUsed)),e=>e.PercentUsed)}});return{Type:e.Type,Name:e.Name,Description:e.Description,MachineUsages:t,MachineUsagesDescription:t.reduce((e,t)=>e+(t.Description||""),""),mean:Qt(t.filter(e=>!isNaN(e.mean)),e=>e.mean),max:Vt(t.filter(e=>!isNaN(e.max)),e=>e.max)}});return{Name:e.Name,Description:e.Description,ComponentUsages:t,ComponentUsagesDescription:t.reduce((e,t)=>e+(t.MachineUsagesDescription||""),""),mean:Qt(t.filter(e=>!isNaN(e.mean)),e=>e.mean),max:Vt(t.filter(e=>!isNaN(e.max)),e=>e.max)}}))}};t(qt,"MachineService");let Yt=qt;const zt=class _PackageProcessServiceBase extends te{constructor(e){super(e,"WsPackageProcess","1.07")}ActivatePackage(e){return this._connection.send("ActivatePackage",e,"json",!1,void 0,"ActivatePackageResponse")}AddPackage(e){return this._connection.send("AddPackage",e,"json",!1,void 0,"AddPackageResponse")}AddPartToPackageMap(e){return this._connection.send("AddPartToPackageMap",e,"json",!1,void 0,"AddPartToPackageMapResponse")}CopyPackageMap(e){return this._connection.send("CopyPackageMap",e,"json",!1,void 0,"CopyPackageMapResponse")}DeActivatePackage(e){return this._connection.send("DeActivatePackage",e,"json",!1,void 0,"DeActivatePackageResponse")}DeletePackage(e){return this._connection.send("DeletePackage",e,"json",!1,void 0,"DeletePackageResponse")}Echo(e){return this._connection.send("Echo",e,"json",!1,void 0,"EchoResponse")}GetPackage(e){return this._connection.send("GetPackage",e,"json",!1,void 0,"GetPackageResponse")}GetPackageMapById(e){return this._connection.send("GetPackageMapById",e,"json",!1,void 0,"GetPackageMapByIdResponse")}GetPackageMapSelectOptions(e){return this._connection.send("GetPackageMapSelectOptions",e,"json",!1,void 0,"GetPackageMapSelectOptionsResponse")}GetPartFromPackageMap(e){return this._connection.send("GetPartFromPackageMap",e,"json",!1,void 0,"GetPartFromPackageMapResponse")}GetQueryFileMapping(e){return this._connection.send("GetQueryFileMapping",e,"json",!1,void 0,"GetQueryFileMappingResponse")}ListPackage(e){return this._connection.send("ListPackage",e,"json",!1,void 0,"ListPackageResponse")}ListPackages(e){return this._connection.send("ListPackages",e,"json",!1,void 0,"ListPackagesResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"WsPackageProcessPingResponse")}RemovePartFromPackageMap(e){return this._connection.send("RemovePartFromPackageMap",e,"json",!1,void 0,"RemovePartFromPackageMapResponse")}ValidatePackage(e){return this._connection.send("ValidatePackage",e,"json",!1,void 0,"ValidatePackageResponse")}};t(zt,"PackageProcessServiceBase");let Zt=zt;const Kt=class _PackageProcessService extends Zt{};t(Kt,"PackageProcessService");let en=Kt;const tn=class _ResourcesServiceBase extends te{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)}};t(tn,"ResourcesServiceBase");let nn=tn;const sn=class _ResourcesService extends nn{};t(sn,"ResourcesService");let rn=sn;var on,cn,an;cn=on||(on={}),(an=cn.WUTypes||(cn.WUTypes={})).ECL="ECL",an.DFU="DFU";const un=class _SashaServiceBase extends te{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")}};t(un,"SashaServiceBase");let hn=un;const ln=class _SashaService extends hn{};t(ln,"SashaService");let dn=ln;var pn=/* @__PURE__ */new Date,gn=/* @__PURE__ */new Date;function mn(e,n,s,r){function i(t){return e(t=0===arguments.length?/* @__PURE__ */new Date:/* @__PURE__ */new Date(+t)),t}return t(i,"interval"),i.floor=function(t){return e(t=/* @__PURE__ */new Date(+t)),t},i.ceil=function(t){return e(t=new Date(t-1)),n(t,1),e(t),t},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,t){return n(e=/* @__PURE__ */new Date(+e),null==t?1:Math.floor(t)),e},i.range=function(t,s,r){var o,c=[];if(t=i.ceil(t),r=null==r?1:Math.floor(r),!(t<s&&r>0))return c;do{c.push(o=/* @__PURE__ */new Date(+t)),n(t,r),e(t)}while(o<t&&t<s);return c},i.filter=function(t){return mn(function(n){if(n>=n)for(;e(n),!t(n);)n.setTime(n-1)},function(e,s){if(e>=e)if(s<0)for(;++s<=0;)for(;n(e,-1),!t(e););else for(;--s>=0;)for(;n(e,1),!t(e););})},s&&(i.count=function(t,n){return pn.setTime(+t),gn.setTime(+n),e(pn),e(gn),Math.floor(s(pn,gn))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e===0}:function(t){return i.count(0,t)%e===0}):i:null}),i}t(mn,"newInterval");var Sn=864e5,fn=6048e5,_n=mn(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/Sn},function(e){return e.getDate()-1});function Un(e){return mn(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+7*t)},function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/fn})}_n.range,t(Un,"weekday");var yn=Un(0),vn=Un(1),Cn=Un(2),Rn=Un(3),Dn=Un(4),bn=Un(5),Fn=Un(6);yn.range,vn.range,Cn.range,Rn.range,Dn.range,bn.range,Fn.range;var Wn=mn(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});Wn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?mn(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)}):null},Wn.range;var Tn=mn(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/Sn},function(e){return e.getUTCDate()-1});function An(e){return mn(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+7*t)},function(e,t){return(t-e)/fn})}Tn.range,t(An,"utcWeekday");var wn=An(0),Pn=An(1),xn=An(2),Ln=An(3),En=An(4),Mn=An(5),Nn=An(6);wn.range,Pn.range,xn.range,Ln.range,En.range,Mn.range,Nn.range;var In=mn(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});function jn(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function kn(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Gn(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function Vn(e){var n=e.dateTime,s=e.date,r=e.time,i=e.periods,o=e.days,c=e.shortDays,a=e.months,u=e.shortMonths,h=ns(i),l=ss(i),d=ns(o),p=ss(o),g=ns(c),m=ss(c),S=ns(a),f=ss(a),_=ns(u),U=ss(u),y={a:E,A:M,b:N,B:I,c:null,d:Ds,e:Ds,f:As,g:Gs,G:Qs,H:bs,I:Fs,j:Ws,L:Ts,m:ws,M:Ps,p:j,q:k,Q:lr,s:dr,S:xs,u:Ls,U:Es,V:Ns,w:Is,W:js,x:null,X:null,y:ks,Y:Vs,Z:Bs,"%":hr},v={a:G,A:V,b:Q,B:B,c:null,d:Os,e:Os,f:qs,g:or,G:ar,H:Xs,I:Hs,j:$s,L:Js,m:Ys,M:zs,p:O,q:X,Q:lr,s:dr,S:Zs,u:Ks,U:er,V:nr,w:sr,W:rr,x:null,X:null,y:ir,Y:cr,Z:ur,"%":hr},C={a:W,A:T,b:A,B:w,c:P,d:gs,e:gs,f:ys,g:hs,G:us,H:Ss,I:Ss,j:ms,L:Us,m:ps,M:fs,p:F,q:ds,Q:Cs,s:Rs,S:_s,u:is,U:os,V:cs,w:rs,W:as,x:x,X:L,y:hs,Y:us,Z:ls,"%":vs};function R(e,t){return function(n){var s,r,i,o=[],c=-1,a=0,u=e.length;for(n instanceof Date||(n=/* @__PURE__ */new Date(+n));++c<u;)37===e.charCodeAt(c)&&(o.push(e.slice(a,c)),null!=(r=Yn[s=e.charAt(++c)])?s=e.charAt(++c):r="e"===s?" ":"0",(i=t[s])&&(s=i(n,r)),o.push(s),a=c+1);return o.push(e.slice(a,c)),o.join("")}}function D(e,t){return function(n){var s,r,i=Gn(1900,void 0,1);if(b(i,e,n+="",0)!=n.length)return null;if("Q"in i)return new Date(i.Q);if("s"in i)return new Date(1e3*i.s+("L"in i?i.L:0));if(t&&!("Z"in i)&&(i.Z=0),"p"in i&&(i.H=i.H%12+12*i.p),void 0===i.m&&(i.m="q"in i?i.q:0),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(r=(s=kn(Gn(i.y,0,1))).getUTCDay(),s=r>4||0===r?Pn.ceil(s):Pn(s),s=Tn.offset(s,7*(i.V-1)),i.y=s.getUTCFullYear(),i.m=s.getUTCMonth(),i.d=s.getUTCDate()+(i.w+6)%7):(r=(s=jn(Gn(i.y,0,1))).getDay(),s=r>4||0===r?vn.ceil(s):vn(s),s=_n.offset(s,7*(i.V-1)),i.y=s.getFullYear(),i.m=s.getMonth(),i.d=s.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),r="Z"in i?kn(Gn(i.y,0,1)).getUTCDay():jn(Gn(i.y,0,1)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(r+5)%7:i.w+7*i.U-(r+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,kn(i)):jn(i)}}function b(e,t,n,s){for(var r,i,o=0,c=t.length,a=n.length;o<c;){if(s>=a)return-1;if(37===(r=t.charCodeAt(o++))){if(r=t.charAt(o++),!(i=C[r in Yn?t.charAt(o++):r])||(s=i(e,n,s))<0)return-1}else if(r!=n.charCodeAt(s++))return-1}return s}function F(e,t,n){var s=h.exec(t.slice(n));return s?(e.p=l[s[0].toLowerCase()],n+s[0].length):-1}function W(e,t,n){var s=g.exec(t.slice(n));return s?(e.w=m[s[0].toLowerCase()],n+s[0].length):-1}function T(e,t,n){var s=d.exec(t.slice(n));return s?(e.w=p[s[0].toLowerCase()],n+s[0].length):-1}function A(e,t,n){var s=_.exec(t.slice(n));return s?(e.m=U[s[0].toLowerCase()],n+s[0].length):-1}function w(e,t,n){var s=S.exec(t.slice(n));return s?(e.m=f[s[0].toLowerCase()],n+s[0].length):-1}function P(e,t,s){return b(e,n,t,s)}function x(e,t,n){return b(e,s,t,n)}function L(e,t,n){return b(e,r,t,n)}function E(e){return c[e.getDay()]}function M(e){return o[e.getDay()]}function N(e){return u[e.getMonth()]}function I(e){return a[e.getMonth()]}function j(e){return i[+(e.getHours()>=12)]}function k(e){return 1+~~(e.getMonth()/3)}function G(e){return c[e.getUTCDay()]}function V(e){return o[e.getUTCDay()]}function Q(e){return u[e.getUTCMonth()]}function B(e){return a[e.getUTCMonth()]}function O(e){return i[+(e.getUTCHours()>=12)]}function X(e){return 1+~~(e.getUTCMonth()/3)}return y.x=R(s,y),y.X=R(r,y),y.c=R(n,y),v.x=R(s,v),v.X=R(r,v),v.c=R(n,v),t(R,"newFormat"),t(D,"newParse"),t(b,"parseSpecifier"),t(F,"parsePeriod"),t(W,"parseShortWeekday"),t(T,"parseWeekday"),t(A,"parseShortMonth"),t(w,"parseMonth"),t(P,"parseLocaleDateTime"),t(x,"parseLocaleDate"),t(L,"parseLocaleTime"),t(E,"formatShortWeekday"),t(M,"formatWeekday"),t(N,"formatShortMonth"),t(I,"formatMonth"),t(j,"formatPeriod"),t(k,"formatQuarter"),t(G,"formatUTCShortWeekday"),t(V,"formatUTCWeekday"),t(Q,"formatUTCShortMonth"),t(B,"formatUTCMonth"),t(O,"formatUTCPeriod"),t(X,"formatUTCQuarter"),{format:/* @__PURE__ */t(function(e){var t=R(e+="",y);return t.toString=function(){return e},t},"format"),parse:/* @__PURE__ */t(function(e){var t=D(e+="",!1);return t.toString=function(){return e},t},"parse"),utcFormat:/* @__PURE__ */t(function(e){var t=R(e+="",v);return t.toString=function(){return e},t},"utcFormat"),utcParse:/* @__PURE__ */t(function(e){var t=D(e+="",!0);return t.toString=function(){return e},t},"utcParse")}}In.every=function(e){return isFinite(e=Math.floor(e))&&e>0?mn(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null},In.range,t(jn,"localDate"),t(kn,"utcDate"),t(Gn,"newDate"),t(Vn,"formatLocale$1");var Qn,Bn,On,Xn,Hn,$n,Jn,qn,Yn={"-":"",_:" ",0:"0"},zn=/^\s*\d+/,Zn=/^%/,Kn=/[\\^$*+?|[\]().{}]/g;function es(e,t,n){var s=e<0?"-":"",r=(s?-e:e)+"",i=r.length;return s+(i<n?new Array(n-i+1).join(t)+r:r)}function ts(e){return e.replace(Kn,"\\$&")}function ns(e){return new RegExp("^(?:"+e.map(ts).join("|")+")","i")}function ss(e){for(var t={},n=-1,s=e.length;++n<s;)t[e[n].toLowerCase()]=n;return t}function rs(e,t,n){var s=zn.exec(t.slice(n,n+1));return s?(e.w=+s[0],n+s[0].length):-1}function is(e,t,n){var s=zn.exec(t.slice(n,n+1));return s?(e.u=+s[0],n+s[0].length):-1}function os(e,t,n){var s=zn.exec(t.slice(n,n+2));return s?(e.U=+s[0],n+s[0].length):-1}function cs(e,t,n){var s=zn.exec(t.slice(n,n+2));return s?(e.V=+s[0],n+s[0].length):-1}function as(e,t,n){var s=zn.exec(t.slice(n,n+2));return s?(e.W=+s[0],n+s[0].length):-1}function us(e,t,n){var s=zn.exec(t.slice(n,n+4));return s?(e.y=+s[0],n+s[0].length):-1}function hs(e,t,n){var s=zn.exec(t.slice(n,n+2));return s?(e.y=+s[0]+(+s[0]>68?1900:2e3),n+s[0].length):-1}function ls(e,t,n){var s=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return s?(e.Z=s[1]?0:-(s[2]+(s[3]||"00")),n+s[0].length):-1}function ds(e,t,n){var s=zn.exec(t.slice(n,n+1));return s?(e.q=3*s[0]-3,n+s[0].length):-1}function ps(e,t,n){var s=zn.exec(t.slice(n,n+2));return s?(e.m=s[0]-1,n+s[0].length):-1}function gs(e,t,n){var s=zn.exec(t.slice(n,n+2));return s?(e.d=+s[0],n+s[0].length):-1}function ms(e,t,n){var s=zn.exec(t.slice(n,n+3));return s?(e.m=0,e.d=+s[0],n+s[0].length):-1}function Ss(e,t,n){var s=zn.exec(t.slice(n,n+2));return s?(e.H=+s[0],n+s[0].length):-1}function fs(e,t,n){var s=zn.exec(t.slice(n,n+2));return s?(e.M=+s[0],n+s[0].length):-1}function _s(e,t,n){var s=zn.exec(t.slice(n,n+2));return s?(e.S=+s[0],n+s[0].length):-1}function Us(e,t,n){var s=zn.exec(t.slice(n,n+3));return s?(e.L=+s[0],n+s[0].length):-1}function ys(e,t,n){var s=zn.exec(t.slice(n,n+6));return s?(e.L=Math.floor(s[0]/1e3),n+s[0].length):-1}function vs(e,t,n){var s=Zn.exec(t.slice(n,n+1));return s?n+s[0].length:-1}function Cs(e,t,n){var s=zn.exec(t.slice(n));return s?(e.Q=+s[0],n+s[0].length):-1}function Rs(e,t,n){var s=zn.exec(t.slice(n));return s?(e.s=+s[0],n+s[0].length):-1}function Ds(e,t){return es(e.getDate(),t,2)}function bs(e,t){return es(e.getHours(),t,2)}function Fs(e,t){return es(e.getHours()%12||12,t,2)}function Ws(e,t){return es(1+_n.count(Wn(e),e),t,3)}function Ts(e,t){return es(e.getMilliseconds(),t,3)}function As(e,t){return Ts(e,t)+"000"}function ws(e,t){return es(e.getMonth()+1,t,2)}function Ps(e,t){return es(e.getMinutes(),t,2)}function xs(e,t){return es(e.getSeconds(),t,2)}function Ls(e){var t=e.getDay();return 0===t?7:t}function Es(e,t){return es(yn.count(Wn(e)-1,e),t,2)}function Ms(e){var t=e.getDay();return t>=4||0===t?Dn(e):Dn.ceil(e)}function Ns(e,t){return e=Ms(e),es(Dn.count(Wn(e),e)+(4===Wn(e).getDay()),t,2)}function Is(e){return e.getDay()}function js(e,t){return es(vn.count(Wn(e)-1,e),t,2)}function ks(e,t){return es(e.getFullYear()%100,t,2)}function Gs(e,t){return es((e=Ms(e)).getFullYear()%100,t,2)}function Vs(e,t){return es(e.getFullYear()%1e4,t,4)}function Qs(e,t){var n=e.getDay();return es((e=n>=4||0===n?Dn(e):Dn.ceil(e)).getFullYear()%1e4,t,4)}function Bs(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+es(t/60|0,"0",2)+es(t%60,"0",2)}function Os(e,t){return es(e.getUTCDate(),t,2)}function Xs(e,t){return es(e.getUTCHours(),t,2)}function Hs(e,t){return es(e.getUTCHours()%12||12,t,2)}function $s(e,t){return es(1+Tn.count(In(e),e),t,3)}function Js(e,t){return es(e.getUTCMilliseconds(),t,3)}function qs(e,t){return Js(e,t)+"000"}function Ys(e,t){return es(e.getUTCMonth()+1,t,2)}function zs(e,t){return es(e.getUTCMinutes(),t,2)}function Zs(e,t){return es(e.getUTCSeconds(),t,2)}function Ks(e){var t=e.getUTCDay();return 0===t?7:t}function er(e,t){return es(wn.count(In(e)-1,e),t,2)}function tr(e){var t=e.getUTCDay();return t>=4||0===t?En(e):En.ceil(e)}function nr(e,t){return e=tr(e),es(En.count(In(e),e)+(4===In(e).getUTCDay()),t,2)}function sr(e){return e.getUTCDay()}function rr(e,t){return es(Pn.count(In(e)-1,e),t,2)}function ir(e,t){return es(e.getUTCFullYear()%100,t,2)}function or(e,t){return es((e=tr(e)).getUTCFullYear()%100,t,2)}function cr(e,t){return es(e.getUTCFullYear()%1e4,t,4)}function ar(e,t){var n=e.getUTCDay();return es((e=n>=4||0===n?En(e):En.ceil(e)).getUTCFullYear()%1e4,t,4)}function ur(){return"+0000"}function hr(){return"%"}function lr(e){return+e}function dr(e){return Math.floor(+e/1e3)}function pr(e){return(Qn=Vn(e)).format,Bn=Qn.parse,On=Qn.utcFormat,Xn=Qn.utcParse,Qn}t(es,"pad"),t(ts,"requote"),t(ns,"formatRe"),t(ss,"formatLookup"),t(rs,"parseWeekdayNumberSunday"),t(is,"parseWeekdayNumberMonday"),t(os,"parseWeekNumberSunday"),t(cs,"parseWeekNumberISO"),t(as,"parseWeekNumberMonday"),t(us,"parseFullYear"),t(hs,"parseYear"),t(ls,"parseZone"),t(ds,"parseQuarter"),t(ps,"parseMonthNumber"),t(gs,"parseDayOfMonth"),t(ms,"parseDayOfYear"),t(Ss,"parseHour24"),t(fs,"parseMinutes"),t(_s,"parseSeconds"),t(Us,"parseMilliseconds"),t(ys,"parseMicroseconds"),t(vs,"parseLiteralPercent"),t(Cs,"parseUnixTimestamp"),t(Rs,"parseUnixTimestampSeconds"),t(Ds,"formatDayOfMonth"),t(bs,"formatHour24"),t(Fs,"formatHour12"),t(Ws,"formatDayOfYear"),t(Ts,"formatMilliseconds"),t(As,"formatMicroseconds"),t(ws,"formatMonthNumber"),t(Ps,"formatMinutes"),t(xs,"formatSeconds"),t(Ls,"formatWeekdayNumberMonday"),t(Es,"formatWeekNumberSunday"),t(Ms,"dISO"),t(Ns,"formatWeekNumberISO"),t(Is,"formatWeekdayNumberSunday"),t(js,"formatWeekNumberMonday"),t(ks,"formatYear"),t(Gs,"formatYearISO"),t(Vs,"formatFullYear"),t(Qs,"formatFullYearISO"),t(Bs,"formatZone"),t(Os,"formatUTCDayOfMonth"),t(Xs,"formatUTCHour24"),t(Hs,"formatUTCHour12"),t($s,"formatUTCDayOfYear"),t(Js,"formatUTCMilliseconds"),t(qs,"formatUTCMicroseconds"),t(Ys,"formatUTCMonthNumber"),t(zs,"formatUTCMinutes"),t(Zs,"formatUTCSeconds"),t(Ks,"formatUTCWeekdayNumberMonday"),t(er,"formatUTCWeekNumberSunday"),t(tr,"UTCdISO"),t(nr,"formatUTCWeekNumberISO"),t(sr,"formatUTCWeekdayNumberSunday"),t(rr,"formatUTCWeekNumberMonday"),t(ir,"formatUTCYear"),t(or,"formatUTCYearISO"),t(cr,"formatUTCFullYear"),t(ar,"formatUTCFullYearISO"),t(ur,"formatUTCZone"),t(hr,"formatLiteralPercent"),t(lr,"formatUnixTimestamp"),t(dr,"formatUnixTimestampSeconds"),pr({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"]}),t(pr,"defaultLocale$1"),$n=Hn||(Hn={}),(Jn=$n.LockModes||($n.LockModes={})).ALL="ALL",Jn.READ="READ",Jn.WRITE="WRITE",Jn.HOLD="HOLD",Jn.SUB="SUB",(qn=$n.RoxieControlCmdType||($n.RoxieControlCmdType={})).Attach="Attach",qn.Detach="Detach",qn.State="State",qn.Reload="Reload",qn.ReloadRetry="ReloadRetry",qn.MemLock="MemLock",qn.MemUnlock="MemUnlock",qn.GetMemLocked="GetMemLocked";const gr=class _SMCServiceBase extends te{constructor(e){super(e,"WsSMC","1.29")}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")}GetGlobalMetrics(e){return this._connection.send("GetGlobalMetrics",e,"json",!1,void 0,"GetGlobalMetricsResponse")}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")}RecordGlobalMetrics(e){return this._connection.send("RecordGlobalMetrics",e,"json",!1,void 0,"RecordGlobalMetricsResponse")}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")}};t(gr,"SMCServiceBase");let mr=gr;const Sr=Bn("%Y%m%d%H");function fr(e){return"number"==typeof e||"string"==typeof e&&""!==e.trim()&&!isNaN(+e)}t(fr,"isNumeric");const _r=class _SMCService extends mr{connectionOptions(){return this._connection.opts()}Activity(e){return super.Activity(e).then(e=>({Running:{ActiveWorkunit:[]},...e}))}parseGlobalMetric(e,t){return e.startsWith("Cost")?+t/1e6:e.startsWith("Date")?Sr(t):e.startsWith("Num")?+t:e.startsWith("Time")?+t/1e9:e.startsWith("When")?new Date(+t/1e3).toISOString():fr(t)?+t:t}GetNormalisedGlobalMetrics(e){return super.GetGlobalMetrics(e).then(e=>{const t=[];for(const n of e?.GlobalMetrics?.GlobalMetric||[]){const e={Category:n.Category,Start:this.parseGlobalMetric("Date",n.DateTimeRange?.Start),End:this.parseGlobalMetric("Date",n.DateTimeRange?.End),dimensions:{},stats:{}};for(const t of n.Dimensions?.Dimension||[])e.dimensions[t.Name]=t.Value;for(const t of n.Stats?.Stat||[])e.stats[t.Name]=this.parseGlobalMetric(t.Name,t.Value);t.push(e)}return t})}};t(_r,"SMCService");let Ur=_r;const yr=class _storeServiceBase extends te{constructor(e){super(e,"wsstore","1.02")}CreateStore(e){return this._connection.send("CreateStore",e,"json",!1,void 0,"CreateStoreResponse")}Delete(e){return this._connection.send("Delete",e,"json",!1,void 0,"DeleteResponse")}DeleteNamespace(e){return this._connection.send("DeleteNamespace",e,"json",!1,void 0,"DeleteNamespaceResponse")}Fetch(e){return this._connection.send("Fetch",e,"json",!1,void 0,"FetchResponse")}FetchAll(e){return this._connection.send("FetchAll",e,"json",!1,void 0,"FetchAllResponse")}FetchKeyMetadata(e){return this._connection.send("FetchKeyMetadata",e,"json",!1,void 0,"FetchKeyMDResponse")}ListKeys(e){return this._connection.send("ListKeys",e,"json",!1,void 0,"ListKeysResponse")}ListNamespaces(e){return this._connection.send("ListNamespaces",e,"json",!1,void 0,"ListNamespacesResponse")}ListStores(e){return this._connection.send("ListStores",e,"json",!1,void 0,"ListStoresResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"wsstorePingResponse")}Set(e){return this._connection.send("Set",e,"json",!1,void 0,"SetResponse")}};t(yr,"storeServiceBase");let vr=yr;const Cr=class _StoreService extends vr{Delete(e){return super.Delete(e).catch(e=>{if(e.isESPExceptions&&e.Exception.some(e=>-1===e.Code))return{Exceptions:void 0,Success:!0};throw e})}Fetch(e){return super.Fetch(e).catch(e=>{if(e.isESPExceptions&&e.Exception.some(e=>-1===e.Code))return{Exceptions:void 0,Value:void 0};throw e})}};t(Cr,"StoreService");let Rr=Cr;var Dr,br,Fr,Wr;br=Dr||(Dr={}),(Fr=br.TpConfigResponseFormat||(br.TpConfigResponseFormat={})).XML="XML",Fr.YAML="YAML",(Wr=br.RoxieQueueFilter||(br.RoxieQueueFilter={})).All="All",Wr.QueriesOnly="QueriesOnly",Wr.WorkunitsOnly="WorkunitsOnly",(e=>{e.ALLNODES="ALLNODES",e.THORMACHINES="THORMACHINES",e.HOLEMACHINES="HOLEMACHINES",e.ROXIEMACHINES="ROXIEMACHINES",e.MACHINES="MACHINES",e.AVAILABLEMACHINES="AVAILABLEMACHINES",e.DROPZONE="DROPZONE",e.STANDBYNNODE="STANDBYNNODE",e.THORSPARENODES="THORSPARENODES",e.HOLESTANDBYNODES="HOLESTANDBYNODES"})(br.TpMachineType||(br.TpMachineType={}));const Tr=class _TopologyServiceBase extends te{constructor(e){super(e,"WsTopology","1.33")}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")}TpComponentConfiguration(e){return this._connection.send("TpComponentConfiguration",e,"json",!1,void 0,"TpComponentConfigurationResponse")}TpConfiguredComponents(e){return this._connection.send("TpConfiguredComponents",e,"json",!1,void 0,"TpConfiguredComponentsResponse")}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")}};t(Tr,"TopologyServiceBase");let Ar=Tr;const wr=class _TopologyService extends Ar{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(e=>{if(e.default)return e.default;let t,n;return e.TpLogicalClusters.TpLogicalCluster.some((e,s)=>(0===s&&(n=e),"hthor"===e.Type&&(t=e,!0))),t||n})}};t(wr,"TopologyService");let Pr=wr;var xr,Lr,Er,Mr,Nr,Ir,jr,kr,Gr,Vr,Qr,Br,Or,Xr,Hr;Lr=xr||(xr={}),(Er=Lr.ECLWUActions||(Lr.ECLWUActions={})).Abort="Abort",Er.Delete="Delete",Er.Deschedule="Deschedule",Er.Reschedule="Reschedule",Er.Pause="Pause",Er.PauseNow="PauseNow",Er.Protect="Protect",Er.Unprotect="Unprotect",Er.Restore="Restore",Er.Resume="Resume",Er.SetToFailed="SetToFailed",Er.Archive="Archive",(e=>{e[e.MIN=0]="MIN",e[e.DEFAULT=1]="DEFAULT",e[e.ALL=2]="ALL",e[e.CUSTOM=3]="CUSTOM"})(Lr.LogSelectColumnMode||(Lr.LogSelectColumnMode={})),(e=>{e[e.ASC=0]="ASC",e[e.DSC=1]="DSC"})(Lr.SortDirection||(Lr.SortDirection={})),(Mr=Lr.LogEventClass||(Lr.LogEventClass={})).ALL="ALL",Mr.DIS="DIS",Mr.ERR="ERR",Mr.WRN="WRN",Mr.INF="INF",Mr.PRO="PRO",Mr.MET="MET",Mr.EVT="EVT",(Nr=Lr.WUDetailsAttrValueType||(Lr.WUDetailsAttrValueType={})).Single="Single",Nr.List="List",Nr.Multi="Multi",(Ir=Lr.EclDefinitionActions||(Lr.EclDefinitionActions={})).SyntaxCheck="SyntaxCheck",Ir.Deploy="Deploy",Ir.Publish="Publish",(jr=Lr.ErrorMessageFormat||(Lr.ErrorMessageFormat={})).xml="xml",jr.json="json",jr.text="text",(kr=Lr.LogAccessLogFormat||(Lr.LogAccessLogFormat={}))[kr.XML=0]="XML",kr[kr.JSON=1]="JSON",kr[kr.CSV=2]="CSV",(Gr=Lr.WUExceptionSeverity||(Lr.WUExceptionSeverity={})).info="info",Gr.warning="warning",Gr.error="error",Gr.alert="alert",(Vr=Lr.WUQueryFilterSuspendedType||(Lr.WUQueryFilterSuspendedType={})).Allqueries="All queries",Vr.Notsuspended="Not suspended",Vr.Suspended="Suspended",Vr.Suspendedbyuser="Suspended by user",Vr.Suspendedbyfirstnode="Suspended by first node",Vr.Suspendedbyanynode="Suspended by any node",(Qr=Lr.WUQuerySetFilterType||(Lr.WUQuerySetFilterType={})).All="All",Qr.Id="Id",Qr.Name="Name",Qr.Alias="Alias",Qr.Status="Status",(Br=Lr.WUProtectFilter||(Lr.WUProtectFilter={})).All="All",Br.Protected="Protected",Br.NotProtected="NotProtected",(Lr.QuerySetAliasActionTypes||(Lr.QuerySetAliasActionTypes={})).Deactivate="Deactivate",(Or=Lr.QuerysetImportActivation||(Lr.QuerysetImportActivation={})).None="None",Or.ActivateImportedActive="ActivateImportedActive",(Xr=Lr.QuerySetQueryActionTypes||(Lr.QuerySetQueryActionTypes={})).Suspend="Suspend",Xr.Unsuspend="Unsuspend",Xr.ToggleSuspend="ToggleSuspend",Xr.Activate="Activate",Xr.Delete="Delete",Xr.DeleteQueriesAndWUs="DeleteQueriesAndWUs",Xr.RemoveAllAliases="RemoveAllAliases",Xr.ResetQueryStats="ResetQueryStats",(Hr=Lr.WUQueryActivationMode||(Lr.WUQueryActivationMode={}))[Hr.DoNotActivateQuery=0]="DoNotActivateQuery",Hr[Hr.ActivateQuery=1]="ActivateQuery",Hr[Hr.ActivateQuerySuspendPrevious=2]="ActivateQuerySuspendPrevious",Hr[Hr.ActivateQueryDeletePrevious=3]="ActivateQueryDeletePrevious";const $r=class _WorkunitsServiceBase extends te{constructor(e){super(e,"WsWorkunits","2.04")}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")}};t($r,"WorkunitsServiceBase");let Jr=$r;var qr,Yr,zr,Zr=/* @__PURE__ */(e=>(e[e.Unknown=0]="Unknown",e[e.Compiled=1]="Compiled",e[e.Running=2]="Running",e[e.Completed=3]="Completed",e[e.Failed=4]="Failed",e[e.Archived=5]="Archived",e[e.Aborting=6]="Aborting",e[e.Aborted=7]="Aborted",e[e.Blocked=8]="Blocked",e[e.Submitted=9]="Submitted",e[e.Scheduled=10]="Scheduled",e[e.Compiling=11]="Compiling",e[e.Wait=12]="Wait",e[e.UploadingFiled=13]="UploadingFiled",e[e.DebugPaused=14]="DebugPaused",e[e.DebugRunning=15]="DebugRunning",e[e.Paused=16]="Paused",e[e.LAST=17]="LAST",e[e.NotFound=999]="NotFound",e))(Zr||{});function Kr(e){return"string"==typeof e.Name}function ei(e){return void 0!==e.TotalClusterTime}function ti(e){return void 0!==e.StateEx}Yr=qr||(qr={}),(zr=Yr.Action||(Yr.Action={}))[zr.Unknown=0]="Unknown",zr[zr.Compile=1]="Compile",zr[zr.Check=2]="Check",zr[zr.Run=3]="Run",zr[zr.ExecuteExisting=4]="ExecuteExisting",zr[zr.Pause=5]="Pause",zr[zr.PauseNow=6]="PauseNow",zr[zr.Resume=7]="Resume",zr[zr.Debug=8]="Debug",zr[zr.__size=9]="__size",t(Kr,"isECLResult"),t(ei,"isWUQueryECLWorkunit"),t(ti,"isWUInfoWorkunit");const ni=class _WorkunitsService extends Jr{constructor(e){super(e)}Ping(){return this._connection.send("Ping",{},"json",!1,void 0,"WsWorkunitsPingResponse").then(()=>({result:!0}))}WUQuery(e={},t){return this._connection.send("WUQuery",e,"json",!1,t).then(e=>a({Workunits:{ECLWorkunit:[]}},e))}WUInfo(e){const t={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(t)}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,t){return this._connection.send("WUResult",e,"json",!1,t)}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(e=>{const t=u(e.Result).children();return t.length?t[0]:null})}};t(ni,"WorkunitsService");let si=ni;const ri=class _WorkunitsServiceEx extends Jr{WUPublishWorkunitEx(e){return this._connection.send("WUPublishWorkunit",e)}};t(ri,"WorkunitsServiceEx");let ii=ri;function oi(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function ci(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,s=e.slice(0,n);return[s.length>1?s[0]+s.slice(2):s,+e.slice(n+1)]}function ai(e){return(e=ci(Math.abs(e)))?e[1]:NaN}function ui(e,t){return function(n,s){for(var r=n.length,i=[],o=0,c=e[0],a=0;r>0&&c>0&&(a+c+1>s&&(c=Math.max(1,s-a)),i.push(n.substring(r-=c,r+c)),!((a+=c+1)>s));)c=e[o=(o+1)%e.length];return i.reverse().join(t)}}function hi(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}t(oi,"formatDecimal"),t(ci,"formatDecimalParts"),t(ai,"exponent"),t(ui,"formatGroup"),t(hi,"formatNumerals");var li,di=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function pi(e){if(!(t=di.exec(e)))throw new Error("invalid format: "+e);var t;return new gi({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function gi(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function mi(e){e:for(var t,n=e.length,s=1,r=-1;s<n;++s)switch(e[s]){case".":r=t=s;break;case"0":0===r&&(r=s),t=s;break;default:if(!+e[s])break e;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(t+1):e}function Si(e,t){var n=ci(e,t);if(!n)return e+"";var s=n[0],r=n[1],i=r-(li=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,o=s.length;return i===o?s:i>o?s+new Array(i-o+1).join("0"):i>0?s.slice(0,i)+"."+s.slice(i):"0."+new Array(1-i).join("0")+ci(e,Math.max(0,t+i-1))[0]}function fi(e,t){var n=ci(e,t);if(!n)return e+"";var s=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+s:s.length>r+1?s.slice(0,r+1)+"."+s.slice(r+1):s+new Array(r-s.length+2).join("0")}t(pi,"formatSpecifier"),pi.prototype=gi.prototype,t(gi,"FormatSpecifier"),gi.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type},t(mi,"formatTrim"),t(Si,"formatPrefixAuto"),t(fi,"formatRounded");const _i={"%":/* @__PURE__ */t(function(e,t){return(100*e).toFixed(t)},"%"),b:/* @__PURE__ */t(function(e){return Math.round(e).toString(2)},"b"),c:/* @__PURE__ */t(function(e){return e+""},"c"),d:oi,e:/* @__PURE__ */t(function(e,t){return e.toExponential(t)},"e"),f:/* @__PURE__ */t(function(e,t){return e.toFixed(t)},"f"),g:/* @__PURE__ */t(function(e,t){return e.toPrecision(t)},"g"),o:/* @__PURE__ */t(function(e){return Math.round(e).toString(8)},"o"),p:/* @__PURE__ */t(function(e,t){return fi(100*e,t)},"p"),r:fi,s:Si,X:/* @__PURE__ */t(function(e){return Math.round(e).toString(16).toUpperCase()},"X"),x:/* @__PURE__ */t(function(e){return Math.round(e).toString(16)},"x")};function Ui(e){return e}t(Ui,"identity");var yi,vi,Ci=Array.prototype.map,Ri=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Di(e){var n=void 0===e.grouping||void 0===e.thousands?Ui:ui(Ci.call(e.grouping,Number),e.thousands+""),s=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",i=e.decimal+"",o=void 0===e.numerals?Ui:hi(Ci.call(e.numerals,String)),c=void 0===e.percent?"%":e.percent+"",a=e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function h(e){var h=(e=pi(e)).fill,l=e.align,d=e.sign,p=e.symbol,g=e.zero,m=e.width,S=e.comma,f=e.precision,_=e.trim,U=e.type;"n"===U?(S=!0,U="g"):_i[U]||(void 0===f&&(f=12),_=!0,U="g"),(g||"0"===h&&"="===l)&&(g=!0,h="0",l="=");var y="$"===p?s:"#"===p&&/[boxX]/.test(U)?"0"+U.toLowerCase():"",v="$"===p?r:/[%p]/.test(U)?c:"",C=_i[U],R=/[defgprs%]/.test(U);function D(e){var t,s,r,c=y,p=v;if("c"===U)p=C(e)+p,e="";else{var D=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:C(Math.abs(e),f),_&&(e=mi(e)),D&&0===+e&&"+"!==d&&(D=!1),c=(D?"("===d?d:a:"-"===d||"("===d?"":d)+c,p=("s"===U?Ri[8+li/3]:"")+p+(D&&"("===d?")":""),R)for(t=-1,s=e.length;++t<s;)if(48>(r=e.charCodeAt(t))||r>57){p=(46===r?i+e.slice(t+1):e.slice(t))+p,e=e.slice(0,t);break}}S&&!g&&(e=n(e,1/0));var b=c.length+e.length+p.length,F=b<m?new Array(m-b+1).join(h):"";switch(S&&g&&(e=n(F+e,F.length?m-p.length:1/0),F=""),l){case"<":e=c+e+p+F;break;case"=":e=c+F+e+p;break;case"^":e=F.slice(0,b=F.length>>1)+c+e+p+F.slice(b);break;default:e=F+c+e+p}return o(e)}return f=void 0===f?6:/[gprs]/.test(U)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),t(D,"format"),D.toString=function(){return e+""},D}function l(e,t){var n=h(((e=pi(e)).type="f",e)),s=3*Math.max(-8,Math.min(8,Math.floor(ai(t)/3))),r=Math.pow(10,-s),i=Ri[8+s/3];return function(e){return n(r*e)+i}}return t(h,"newFormat"),t(l,"formatPrefix"),{format:h,formatPrefix:l}}function bi(e){return yi=Di(e),vi=yi.format,yi.formatPrefix,yi}t(Di,"formatLocale"),bi({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),t(bi,"defaultLocale");const Fi=class _ECLGraph extends h{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,t,n){super(),this.wu=e;let s=0;for(const r of n)if(r.GraphName===t.Name&&!r.HasSubGraphId){s=Math.round(1e3*r.Seconds)/1e3;break}this.set({Time:s,...t})}fetchScopeGraph(e){return e?this.wu.fetchGraphDetails([e],["subgraph"]).then(e=>qi(e)):this.wu.fetchGraphDetails([this.Name],["graph"]).then(e=>qi(e))}};t(Fi,"ECLGraph");let Wi=Fi;const Ti=class _GraphCache extends l{constructor(){super(e=>l.hash([e.Name]))}};t(Ti,"GraphCache");let Ai=Ti;function wi(e,t,n){(n=n||[]).push(e),t(e.name,e.$,e.children(),n),e.children().forEach(e=>{wi(e,t,n)}),n.pop()}function Pi(e){const t={};return e.forEach(e=>{"att"===e.name&&(t[e.$.name]=e.$.value)}),t}t(wi,"walkXmlJson"),t(Pi,"flattenAtt");const xi=class _XGMMLGraph extends p{};t(xi,"XGMMLGraph");let Li=xi;const Ei=class _XGMMLSubgraph extends g{};t(Ei,"XGMMLSubgraph");let Mi=Ei;const Ni=class _XGMMLVertex extends m{};t(Ni,"XGMMLVertex");let Ii=Ni;const ji=class _XGMMLEdge extends d{};t(ji,"XGMMLEdge");let ki=ji;function Gi(e,t){const n={},s={},r={},i=new Li(e=>e._.id),o=[i.root];return wi(t,(e,t,i,c)=>{const a=o[o.length-1];switch(e){case"graph":break;case"node":if(i.length&&i[0].children().length&&"graph"===i[0].children()[0].name){const e=a.createSubgraph(Pi(i));o.push(e),n[t.id]=e}const e=a.createVertex(Pi(i));s[t.id]=e;break;case"edge":const c=a.createEdge(s[t.source],s[t.target],Pi(i));r[t.id]=c}}),i}t(Gi,"createXGMMLGraph");const Vi=class _ScopeGraph extends p{};t(Vi,"ScopeGraph");let Qi=Vi;const Bi=class _ScopeSubgraph extends g{};t(Bi,"ScopeSubgraph");let Oi=Bi;const Xi=class _ScopeVertex extends m{};t(Xi,"ScopeVertex");let Hi=Xi;const $i=class _ScopeEdge extends d{};t($i,"ScopeEdge");let Ji=$i;function qi(e){const t={},n={},s={};let r;for(const o of e)switch(o.ScopeType){case"graph":r=new Qi(e=>e._.Id,o),t[o.ScopeName]=r.root;break;case"subgraph":r||(r=new Qi(e=>e._.Id,o),t[o.ScopeName]=r.root);const e=o.parentScope().split(":");let i=t[o.parentScope()];for(;e.length&&!i;)i=t[e.join(":")],e.pop();if(i){const e=i;t[o.ScopeName]=e.createSubgraph(o)}else console.warn(`Missing SG:Parent (${o.Id}): ${o.parentScope()}`);break;case"activity":const c=t[o.parentScope()];c?s[o.ScopeName]=c.createVertex(o):console.warn(`Missing A:Parent (${o.Id}): ${o.parentScope()}`);break;case"edge":n[o.ScopeName]=o;break;case"function":const a=s[o.parentScope()];a?a._.children().push(o):console.warn(`Missing F:Parent (${o.Id}): ${o.parentScope()}`)}for(const o in n){const e=n[o],s=t[e.parentScope()];if(s){const t=s;try{const n=r.vertex(e.attr("IdSource").RawValue),s=r.vertex(e.attr("IdTarget").RawValue);t.createEdge(n,s,e)}catch(i){console.warn(`Invalid Edge: ${o}`)}}else console.warn(`Missing E:Parent (${e.Id}): ${e.parentScope()}`)}return r}t(qi,"createGraph");const Yi=class _Resource extends h{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,t){super(),this.wu=e;const n=t.split("\\").join("/"),s=n.split("/"),r="res/"+this.wu.Wuid+"/";let i="",o="";0===n.indexOf(r)&&(i=n.substr(r.length),o=s[s.length-1]),this.set({URL:t,DisplayName:o,DisplayPath:i})}};t(Yi,"Resource");let zi=Yi;const Zi=class _XSDNode{e;constructor(e){this.e=e}fix(){delete this.e}};t(Zi,"XSDNode");let Ki=Zi;const eo=class _XSDXMLNode extends Ki{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 t=this._children.length-1;t>=0;--t){const e=this._children[t];"Row"===e.name&&void 0===e.type&&(this._children.push(...e._children),this._children.splice(t,1))}const e=this.setOfType();e&&(this.type=e,this.isSet=!0,this._children=[])}children(){return this._children}isAll(e){return"All"===e.name&&void 0===e.type}setOfType(){const e=this.children();if(void 0===this.type&&2===e.length){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":case"xs:nonNegativeInteger":case"xs:double":e=8;break;case"xs:string":e=32;break;default:const t="0123456789",n=this.type.lastIndexOf("_"),s=n>0?n:this.type.length;let r=s-1;for(;r>=0&&-1!==t.indexOf(this.type.charAt(r));--r);r+1<s&&(e=parseInt(this.type.substring(r+1,s),10)),0===this.type.indexOf("data")&&(e*=2)}return e<this.name.length&&(e=this.name.length),e}};t(eo,"XSDXMLNode");let to=eo;const no=class _XSDSimpleType extends Ki{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}}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()}};t(no,"XSDSimpleType");let so=no;const ro=class _XSDSchema{root;simpleTypes={};fields(){return this.root.children()}};t(ro,"XSDSchema");let io=ro;const oo=class _XSDParser extends S{schema=new io;simpleType;simpleTypes={};xsdStack=new f;startXMLNode(e){switch(super.startXMLNode(e),e.name){case"xs:element":const t=new to(e);this.schema.root?this.xsdStack.depth()&&this.xsdStack.top().append(t):this.schema.root=t,this.xsdStack.push(t);break;case"xs:simpleType":this.simpleType=new so(e)}}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":const t=this.xsdStack.top();for(const n in e.$)t.attrs[n]=e.$[n];break;default:this.simpleType&&this.simpleType.append(e)}super.endXMLNode(e)}};t(oo,"XSDParser");let co=oo;function ao(e){const t=new co;return t.parse(e),t.schema}t(ao,"parseXSD");const uo=class _XSDParser2 extends co{_rootName;schema=new io;simpleTypes={};xsdStack=new f;constructor(e){super(),this._rootName=e}startXMLNode(e){switch(super.startXMLNode(e),e.name){case"xsd:element":const t=new to(e);this.schema.root||this._rootName!==e.$.name||(this.schema.root=t),this.xsdStack.depth()&&this.xsdStack.top().append(t),this.xsdStack.push(t);break;case"xsd:simpleType":this.simpleType=new so(e)}}endXMLNode(e){if("xsd:element"===e.name){this.xsdStack.pop().fix()}super.endXMLNode(e)}};t(uo,"XSDParser2");let ho=uo;function lo(e,t){const n=new ho(t);return n.parse(e),n.schema}t(lo,"parseXSD2");const po=class _GlobalResultCache extends l{constructor(){super(e=>`${e.BaseUrl}-${e.Wuid}-${e.ResultName}`)}};t(po,"GlobalResultCache");let go=po;const mo=new go,So=class _Result extends h{connection;_bypassCache=!1;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,t,n,s){let r;return Array.isArray(s)?(r=mo.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:n.Name},()=>new _Result(e,t,n,s)),r.set(n)):void 0===s&&("number"==typeof n?r=mo.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:"Sequence_"+n},()=>new _Result(e,t,n)):"string"==typeof n&&(r=mo.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:n},()=>new _Result(e,t,n)))),r}static attachLogicalFile(e,t,n){return mo.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:n},()=>new _Result(e,t,n,!0))}constructor(e,t,n,s){super(),this.connection=e instanceof si?e:new si(e),"boolean"==typeof s&&!0===s?this.set({NodeGroup:t,LogicalFileName:n}):Kr(n)&&Array.isArray(s)?this.set({...n,Wuid:t,ResultName:n.Name,ResultViews:s}):void 0===s?"number"==typeof n?this.set({Wuid:t,ResultSequence:n}):"string"==typeof n?this.set({Wuid:t,ResultName:n}):console.warn("Unknown Result.attach (1)"):console.warn("Unknown Result.attach (2)")}isComplete(){return-1!==this.Total}bypassCache(e){return void 0===e?this._bypassCache:(this._bypassCache=e,this)}_fetchXMLSchemaPromise;fetchXMLSchema(e=!1){return this._fetchXMLSchemaPromise&&!e||(this._fetchXMLSchemaPromise=this.WUResult().then(e=>e.Result?.XmlSchema?.xml?(this.xsdSchema=ao(e.Result.XmlSchema.xml),this.xsdSchema):null)),this._fetchXMLSchemaPromise}async refresh(){return await this.fetchRows(0,1,!0),this}fetchRows(e=0,t=-1,n=!1,s={},r,i){const o=i??this._bypassCache;return this.WUResult(e,t,!n,s,r,o).then(e=>{const t=e.Result;return delete e.Result,this.set({...e}),c("XmlSchema.xml",t)&&(this.xsdSchema=ao(t.XmlSchema.xml)),c("Row",t)?t.Row:this.ResultName&&c(this.ResultName,t)?t[this.ResultName].Row:[]})}rootField(){return this.xsdSchema?this.xsdSchema.root:null}fields(){return this.xsdSchema?this.xsdSchema.root.children():[]}WUResult(e=0,t=1,n=!1,s={},r,i=!1){const o={NamedValue:{itemcount:0}};for(const a in s)o.NamedValue[o.NamedValue.itemcount++]={Name:a,Value:s[a]};const c={FilterBy:o};return this.Wuid&&void 0!==this.ResultName?(c.Wuid=this.Wuid,c.ResultName=this.ResultName):this.Wuid&&void 0!==this.ResultSequence?(c.Wuid=this.Wuid,c.Sequence=this.ResultSequence):this.LogicalFileName&&this.NodeGroup?(c.LogicalName=this.LogicalFileName,c.Cluster=this.NodeGroup):this.LogicalFileName&&(c.LogicalName=this.LogicalFileName),c.Start=e,c.Count=t,c.SuppressXmlSchema=n,c.BypassCachedResult=i,this.connection.WUResult(c,r).then(e=>e)}};t(So,"Result");let fo=So;const _o=class _ResultCache extends l{constructor(){super(e=>l.hash([e.Sequence,e.Name,e.Value,e.FileName]))}};t(_o,"ResultCache");let Uo=_o;const yo=class _Attribute extends h{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,t){super(),this.scope=e,this.set(t)}};t(yo,"Attribute");let vo=yo;const Co=class _BaseScope extends h{_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(){const e=[],t={start:null,end:null};return this.Properties.Property.forEach(n=>{"ts"===n.Measure&&n.Name.indexOf("Started")>=0?t.start=n:this.ScopeName&&"ts"===n.Measure&&n.Name.indexOf("Finished")>=0?t.end=n:e.push(new vo(this,n))}),t.start&&t.end?(t.start.FormattedEnd=t.end.Formatted,e.push(new vo(this,t.start))):t.start?e.push(new vo(this,t.start)):t.end&&e.push(new vo(this,t.end)),e}constructor(e){super(),this.update(e)}update(e){this.set(e),this.CAttributes.forEach(e=>{this._attributeMap[e.Name]=e}),this.Properties.Property=[];for(const t in this._attributeMap)this._attributeMap.hasOwnProperty(t)&&this.Properties.Property.push(this._attributeMap[t].properties)}parentScope(){const 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(const t of this.children())if(t.walk(e))return!0;return e.end(this)}formattedAttrs(){const e={};for(const t in this._attributeMap)e[t]=this._attributeMap[t].Formatted||this._attributeMap[t].RawValue;return e}rawAttrs(){const e={};for(const t in this._attributeMap)e[t]=this._attributeMap[t].RawValue;return e}hasAttr(e){return void 0!==this._attributeMap[e]}attr(e){return this._attributeMap[e]||new vo(this,{Creator:"",CreatorType:"",Formatted:"",Measure:"",Name:"",RawValue:""})}attrMeasure(e){return this._attributeMap[e].Measure}calcTooltip(e){let t="";const n=[];t=this.Id,n.push(`<tr><td class="key">ID:</td><td class="value">${this.Id}</td></tr>`),e&&n.push(`<tr><td class="key">Parent ID:</td><td class="value">${e.Id}</td></tr>`),n.push(`<tr><td class="key">Scope:</td><td class="value">${this.ScopeName}</td></tr>`);const s=this.formattedAttrs();for(const r in s)"Label"===r?t=s[r]:n.push(`<tr><td class="key">${r}</td><td class="value">${s[r]}</td></tr>`);return`<div class="eclwatch_WUGraph_Tooltip" style="max-width:480px">\n <h4 align="center">${t}</h4>\n <table>\n ${n.join("")}\n </table>\n </div>`}};t(Co,"BaseScope");let Ro=Co;const Do=class _Scope extends Ro{wu;constructor(e,t){super(t),this.wu=e}};t(Do,"Scope");let bo=Do;const Fo=class _SourceFile extends h{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,t,n){super(),this.connection=e instanceof si?e:new si(e),this.set({Wuid:t,...n})}};t(Fo,"SourceFile");let Wo=Fo;const To=class _Timer extends h{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,t,n){super(),this.connection=e instanceof si?e:new si(e);const s=_(n.Value);this.set({Wuid:t,Seconds:Math.round(1e3*s)/1e3,HasSubGraphId:void 0!==n.SubGraphId,...n})}};t(To,"Timer");let Ao=To;const wo=On("%Y-%m-%dT%H:%M:%S.%LZ"),Po=Xn("%Y-%m-%dT%H:%M:%S.%LZ"),xo=vi(",");function Lo(e){return e&&!isNaN(+e)?xo(+e):e}t(Lo,"formatNum");const Eo="DefinitionList",Mo=/([a-zA-Z]:)?(.*[\\\/])(.*)(\((\d+),(\d+)\))/,No=["Avg","Min","Max","Delta","StdDev"],Io=["SkewMin","SkewMax","NodeMin","NodeMax"],jo=/[A-Z][a-z]*/g;function ko(e){for(const n of Io){const t=e.indexOf(n);if(0===t){return{measure:"",ext:n,label:e.slice(t+n.length)}}}const t=e.match(jo);if(t?.length){const e=t.shift();let n=t.join("");for(const t of No){const s=n.indexOf(t);if(0===s)return n=n.slice(s+t.length),{measure:e,ext:t,label:n}}return{measure:e,ext:"",label:n}}return{measure:"",ext:"",label:e}}t(ko,"_splitMetric");const Go={};function Vo(e){let t=Go[e];return t||(t=ko(e),Go[e]=t),t}function Qo(e,t){return e.__formattedProps?.[t]??e[t]}function Bo(e){if(void 0===e)return;const t=parseFloat(e);return isNaN(t)?void 0:t}function Oo(e,t,n){const s=Vo(t);if(!n[s.measure]){n[s.label]=!0;const t=Bo(e[`${s.measure}Avg${s.label}`]),r=Bo(e[`${s.measure}Min${s.label}`]),i=Bo(e[`${s.measure}Max${s.label}`]),o=Bo(e[`${s.measure}StdDev${s.label}`]),c=Math.max((t-r)/o,(i-t)/o);return{Key:`${s.measure}${s.label}`,Value:Qo(e,`${s.measure}${s.label}`),Avg:Qo(e,`${s.measure}Avg${s.label}`),Min:Qo(e,`${s.measure}Min${s.label}`),Max:Qo(e,`${s.measure}Max${s.label}`),Delta:Qo(e,`${s.measure}Delta${s.label}`),StdDev:Qo(e,`${s.measure}StdDev${s.label}`),StdDevs:isNaN(c)?void 0:c,SkewMin:Qo(e,`SkewMin${s.label}`),SkewMax:Qo(e,`SkewMax${s.label}`),NodeMin:Qo(e,`NodeMin${s.label}`),NodeMax:Qo(e,`NodeMax${s.label}`)}}return null}t(Vo,"splitMetric"),t(Qo,"formatValue"),t(Bo,"safeParseFloat"),t(Oo,"formatValues");const Xo=n("workunit.ts"),Ho=class _WorkunitCache extends l{constructor(){super(e=>`${e.BaseUrl}-${e.Wuid}`)}};t(Ho,"WorkunitCache");let $o=Ho;const Jo=new $o,qo=class _Workunit extends h{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",Zr.Unknown)}get State(){return this.get("State")||Zr[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 Uo;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,()=>fo.attach(this.connection,this.Wuid,e,this.ResultViews.View)))}get SequenceResults(){const e={};return this.CResults.forEach(t=>{e[t.Sequence]=t}),e}get Timers(){return this.get("Timers",{ECLTimer:[]})}get CTimers(){return this.Timers.ECLTimer.map(e=>new Ao(this.connection,this.Wuid,e))}_graphCache=new Ai;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 Wi(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 zi(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 Wo(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")}get CostSavingPotential(){return this.get("CostSavingPotential")}static create(e){const t=new _Workunit(e);return t.connection.WUCreate().then(e=>(Jo.set(t),t.set(e.Workunit),t))}static attach(e,t,n){const s=Jo.get({BaseUrl:e.baseUrl,Wuid:t},()=>new _Workunit(e,t));return n&&s.set(n),s}static existsLocal(e,t){return Jo.has({BaseUrl:e,Wuid:t})}static submit(e,t,n,s=!1){return _Workunit.create(e).then(e=>e.update({QueryText:n})).then(e=>s?e.submit(t,qr.Action.Compile):e.submit(t))}static compile(e,t,n){return _Workunit.submit(e,t,n,!0)}static query(e,t){return new si(e).WUQuery(t).then(t=>t.Workunits.ECLWorkunit.map(function(t){return _Workunit.attach(e,t.Wuid,t)}))}constructor(e,t){super(),this.connection=new si(e),this.topologyConnection=new Pr(e),this.clearState(t)}clearState(e){this.clear({Wuid:e,StateID:Zr.Unknown})}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(e=>(this.set(e.Workunit),this))}submit(e,t=qr.Action.Run,n){let s;return s=void 0!==e?Promise.resolve(e):this.topologyConnection.DefaultTpLogicalClusterQuery().then(e=>e.Name),this._debugMode=!1,t===qr.Action.Debug&&(t=qr.Action.Run,this._debugMode=!0),s.then(e=>this.connection.WUUpdate({Wuid:this.Wuid,Action:t,ResultLimit:n,DebugValues:{DebugValue:[{Name:"Debug",Value:this._debugMode?"1":""}]}}).then(n=>(this.set(n.Workunit),this._submitAction=t,this.connection.WUSubmit({Wuid:this.Wuid,Cluster:e})))).then(()=>this)}isComplete(){switch(this.StateID){case Zr.Compiled:return"compile"===this.ActionEx||this._submitAction===qr.Action.Compile;case Zr.Completed:case Zr.Failed:case Zr.Aborted:case Zr.NotFound:return!0}return!1}isFailed(){switch(this.StateID){case Zr.Aborted:case Zr.Failed:return!0}return!1}isDeleted(){return this.StateID===Zr.NotFound}isDebugging(){switch(this.StateID){case Zr.DebugPaused:case Zr.DebugRunning:return!0}return this._debugMode}isRunning(){switch(this.StateID){case Zr.Compiled:case Zr.Running:case Zr.Aborting:case Zr.Blocked:case Zr.DebugPaused:case Zr.DebugRunning:return!0}return!1}setToFailed(){return this.WUAction(xr.ECLWUActions.SetToFailed)}pause(){return this.WUAction(xr.ECLWUActions.Pause)}pauseNow(){return this.WUAction(xr.ECLWUActions.PauseNow)}resume(){return this.WUAction(xr.ECLWUActions.Resume)}abort(){return this.WUAction(xr.ECLWUActions.Abort)}protect(){return this.WUAction(xr.ECLWUActions.Protect)}unprotect(){return this.WUAction(xr.ECLWUActions.Unprotect)}delete(){return this.WUAction(xr.ECLWUActions.Delete)}restore(){return this.WUAction(xr.ECLWUActions.Restore)}deschedule(){return this.WUAction(xr.ECLWUActions.Deschedule)}reschedule(){return this.WUAction(xr.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=>_Workunit.attach(this.connection.opts(),e.WUs.WU[0].WUID).refresh())}async refreshState(){return await this.WUQuery(),this.StateID!==Zr.Compiled||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,t){return e?await Promise.all([this.refreshInfo(t),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(e=>e.Scopes.Scope)}normalizeDetails(e,t){const n={id:{Measure:"label"},name:{Measure:"label"},type:{Measure:"label"}},s=/* @__PURE__ */new Map;for(const o of e.Activities?.Activity??[])s.set(o.Kind,o.Name);const r=new Array(t.length);for(let o=0;o<t.length;o++){const e=t[o],c={},a={};if(e.Id&&e.Properties?.Property)for(const t of e.Properties.Property){const e=t.Measure,r=t.Name,i=t.RawValue;if("ns"===e&&(t.Measure="s"),"Kind"===r){const e=parseInt(i,10);t.Formatted=s.get(e)??i}switch(n[r]={Name:t.Name,Measure:t.Measure,Creator:t.Creator,CreatorType:t.CreatorType},t.Measure){case"bool":c[r]=!!+i;break;case"sz":case"ns":case"cnt":case"node":case"skw":c[r]=+i;break;case"s":c[r]=+i/1e9;break;case"ts":c[r]=new Date(+i/1e3).toISOString();break;case"cost":c[r]=+i/1e6;break;default:c[r]=i}a[r]=Lo(t.Formatted??c[r])}const u={id:e.Id,name:e.ScopeName,type:e.ScopeType,Kind:e.Kind,Label:e.Label,__formattedProps:a,__groupedProps:{},__groupedRawProps:{},__StdDevs:0,__StdDevsSource:"",...c},h=u[Eo];if(h)try{const e=JSON.parse(h.split("\\").join("\\\\")),t=[];for(let n=0;n<e.length;n++){const s=e[n].match(Mo);s&&t.push({filePath:(s[1]??"")+s[2]+s[3],line:parseInt(s[5],10),col:parseInt(s[6],10)})}u[Eo]=t}catch(i){Xo.error(`Unexpected "DefinitionList": ${h}`)}const l={};let d=0,p="";for(const t in u)if(!t.startsWith("__")){const e=Oo(u,t,l);e&&(u.__groupedProps[e.Key]=e,!isNaN(e.StdDevs)&&e.StdDevs>d&&(d=e.StdDevs,p=e.Key))}u.__StdDevs=d,u.__StdDevsSource=p,r[o]=u}return{meta:e,columns:n,data:r}}fetchDetailsNormalized(e={}){return Promise.all([this.fetchDetailsMeta(),this.fetchDetailsRaw(e)]).then(e=>this.normalizeDetails(e[0],e[1]))}fetchInfo(e={}){return this.WUInfo(e)}fetchDetails(e={}){return this.WUDetails(e).then(e=>e.Scopes.Scope.map(e=>new bo(this,e)))}fetchDetailsHierarchy(e={}){return this.WUDetails(e).then(e=>{const t=[],n={};e.Scopes.Scope.forEach(e=>{if(n[e.ScopeName])return n[e.ScopeName].update(e),null;{const t=new bo(this,e);return n[t.ScopeName]=t,t}});for(const s in n)if(n.hasOwnProperty(s)){const e=n[s],r=e.parentScope();r&&n[r]?n[r].children().push(e):t.push(e)}return t})}fetchGraphDetails(e=[],t){return this.fetchDetails({ScopeFilter:{MaxDepth:999999,Ids:e,ScopeTypes:t},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(e=>qi(e))}fetchTimeElapsed(){return this.fetchDetails({ScopeFilter:{PropertyFilters:{PropertyFilter:[{Name:"TimeElapsed"}]}}}).then(e=>{const t={};e.forEach(e=>{t[e.ScopeName]=t[e.ScopeName]||{scope:e.ScopeName,start:null,elapsed:null,finish:null},e.CAttributes.forEach(n=>{"TimeElapsed"===n.Name?t[e.ScopeName].elapsed=+n.RawValue:"ts"===n.Measure&&n.Name.indexOf("Started")>=0&&(t[e.ScopeName].start=n.Formatted)})});const n=[];for(const s in t){const e=t[s];if(e.start&&e.elapsed){const t=Po(e.start);t.setMilliseconds(t.getMilliseconds()+e.elapsed/1e6),e.finish=wo(t),n.push(e)}}return n.sort((e,t)=>e.start<t.start?-1:e.start>t.start?1:0),n})}_monitor(){this.isComplete()?this._monitorTickCount=0:super._monitor()}_monitorTimeoutDuration(){const e=super._monitorTimeoutDuration();return this._monitorTickCount<=1?1e3:this._monitorTickCount<=3?3e3:this._monitorTickCount<=5?5e3:this._monitorTickCount<=7?1e4:e}on(e,t,n){if(this.isCallback(t))switch(e){case"completed":super.on("propChanged","StateID",e=>{this.isComplete()&&t([e])});break;case"changed":super.on(e,t)}else if("changed"===e)super.on(e,t,n);return this._monitor(),this}watchUntilComplete(e){return new Promise((t,n)=>{const s=this.watch(n=>{e&&e(n),this.isComplete()&&(s.release(),t(this))})})}watchUntilRunning(e){return new Promise((t,n)=>{const s=this.watch(n=>{e&&e(n),(this.isComplete()||this.isRunning())&&(s.release(),t(this))})})}WUQuery(e={}){return this.connection.WUQuery({...e,Wuid:this.Wuid}).then(e=>(0===e.Workunits.ECLWorkunit.length?(this.clearState(this.Wuid),this.set("StateID",Zr.NotFound)):this.set(e.Workunits.ECLWorkunit[0]),e)).catch(e=>{if(!e.Exception.some(e=>20081===e.Code&&(this.clearState(this.Wuid),this.set("StateID",Zr.NotFound),!0)))throw Xo.warning(`Unexpected ESP exception: ${e.message}`),e;return{}})}WUCreate(){return this.connection.WUCreate().then(e=>(this.set(e.Workunit),Jo.set(this),e))}WUInfo(e={}){const t=e.IncludeResults||e.IncludeResultsViewNames;return this.connection.WUInfo({...e,Wuid:this.Wuid,IncludeResults:t,IncludeResultsViewNames:t,SuppressResultSchemas:!1}).then(e=>(this.set(e.Workunit),t&&this.set({ResultViews:e.ResultViews}),e)).catch(e=>{if(!e.Exception.some(e=>20080===e.Code&&(this.clearState(this.Wuid),this.set("StateID",Zr.NotFound),!0)))throw Xo.warning(`Unexpected ESP exception: ${e.message}`),e;return{}})}WUResubmit(e){return this.connection.WUResubmit(U({},e,{Wuids:{Item:[this.Wuid]}}))}WUDetailsMeta(e){return this.connection.WUDetailsMeta(e)}WUDetails(e){return this.connection.WUDetails(U({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(e=>U({Scopes:{Scope:[]}},e))}WUAction(e){return this.connection.WUAction({Wuids:{Item:[this.Wuid]},WUActionType:e}).then(e=>this.refresh().then(()=>(this._monitor(),e)))}publish(e){return this.connection.WUPublishWorkunit({Wuid:this.Wuid,Cluster:this.Cluster,JobName:e||this.Jobname,AllowForeignFiles:!0,Activate:xr.WUQueryActivationMode.ActivateQuery,Wait:5e3})}publishEx(e){const t=new ii({baseUrl:""}),n={Wuid:this.Wuid,Cluster:this.Cluster,JobName:this.Jobname,AllowForeignFiles:!0,Activate:1,Wait:5e3,...e};return t.WUPublishWorkunitEx(n)}WUCDebug(e,t={}){let n="";for(const s in t)t.hasOwnProperty(s)&&(n+=` ${s}='${t[s]}'`);return this.connection.WUCDebugEx({Wuid:this.Wuid,Command:`<debug:${e} uid='${this.Wuid}'${n}/>`}).then(e=>e)}debug(e,t){return this.isDebugging()?this.WUCDebug(e,t).then(t=>{const n=t.children(e);return n.length?n[0]:new y(e)}).catch(t=>(Xo.error(t),Promise.resolve(new y(e)))):Promise.resolve(new y(e))}debugStatus(){return this.isDebugging()?this.debug("status").then(e=>{const t={...this.DebugState,...e.$};return this.set({DebugState:t}),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(e=>{if("break"===e.name)return e.$})}debugBreakpointAdd(e,t,n){return this.debug("breakpoint",{id:e,mode:t,action:n}).then(e=>this.debugBreakpointResponseParser(e))}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=Gi(this.Wuid,e),this._debugAllGraph))}debugBreakpointValid(e){return this.debugGraph().then(t=>ec(t,e))}debugPrint(e,t=0,n=10){return this.debug("print",{edgeID:e,startRow:t,numRows:n}).then(e=>e.children().map(e=>{const t={};return e.children().forEach(e=>{t[e.name]=e.content}),t}))}};t(qo,"Workunit");let Yo=qo;const zo="definition";function Zo(e){return void 0!==e._[zo]}function Ko(e){const t=/([a-z]:\\(?:[-\w\.\d]+\\)*(?:[-\w\.\d]+)?|(?:\/[\w\.\-]+)+)\((\d*),(\d*)\)/.exec(e._[zo]);if(t){const[,n,s,r]=t;return n.replace(/\/\.\//g,"/"),{id:e._.id,file:n,line:+s,column:+r}}throw new Error(`Bad definition: ${e._[zo]}`)}function ec(e,t){const n=[];for(const s of e.vertices)if(Zo(s)){const e=Ko(s);(e&&!t||t===e.file)&&n.push(e)}return n.sort((e,t)=>e.line-t.line)}let tc;t(Zo,"hasECLDefinition"),t(Ko,"getECLDefinition"),t(ec,"breakpointLocations");const nc=class _Activity extends h{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,t){return tc||(tc=new _Activity(e)),t&&tc.set(t),tc}constructor(e){super(),this.connection=e instanceof Ur?e:new Ur(e),this.clear({})}runningWorkunits(e=""){return this.Running.ActiveWorkunit.filter(t=>""===e||t.ClusterName===e).map(e=>Yo.attach(this.connection.connectionOptions(),e.Wuid,e))}setBanner(e){return this.connection.SetBanner({...e}).then(e=>(this.set(e),this))}lazyRefresh=v(async()=>{const e=await this.connection.Activity({});return this.set(e),this});async refresh(){return this.lazyRefresh()}};t(nc,"Activity");let sc=nc;const rc=n("logicalFile.ts"),ic=class _LogicalFileCache extends l{constructor(){super(e=>`${e.BaseUrl}-${e.Cluster}-${e.Name}`)}};t(ic,"LogicalFileCache");let oc=ic;const cc=new oc,ac=class _LogicalFile extends h{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 CompressionType(){return this.get("CompressionType")}get properties(){return this.get()}static attach(e,t,n,s){const r=cc.get({BaseUrl:e.baseUrl,Cluster:t,Name:n},()=>new _LogicalFile(e,t,n));return s&&r.set(s),r}constructor(e,t,n){super(),this.connection=e instanceof ot?e:new ot(e),this.clear({Cluster:t,Name:n})}filePartsOnCluster(){return[...this.DFUFilePartsOnClusters?.DFUFilePartsOnCluster||[]]}fileParts(){const e=[];for(const t of this.DFUFilePartsOnClusters?.DFUFilePartsOnCluster||[])for(const n of t?.DFUFileParts?.DFUPart||[]){const s={...t,...n};delete s.DFUFileParts,e.push(s)}return e}update(e){return this.connection.DFUInfo({...e,Cluster:this.Cluster,Name:this.Name}).then(e=>(this.set({Cluster:this.Cluster,...e.FileDetail}),e))}fetchInfo(){return this.connection.DFUInfo({Cluster:this.Cluster,Name:this.Name}).then(e=>(this.set({Cluster:this.Cluster,...e.FileDetail,ProtectList:e?.FileDetail?.ProtectList??{DFUFileProtect:[]}}),e.FileDetail)).catch(e=>{if(!e.Exception.some(e=>20038===e.Code&&(this.set("Name",this.Name+" (Deleted)"),this.set("StateID",999),!0)))throw rc.warning(`Unexpected ESP exception: ${e.message}`),e;return{}})}fetchDefFile(e){return this.connection.DFUFile({Name:this.Name,Format:e})}fetchAllLogicalFiles(){return this.connection.recursiveFetchLogicalFiles([this])}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||[])}};t(ac,"LogicalFile");let uc=ac;const hc=class _MachineCache extends l{constructor(){super(e=>e.Address)}};t(hc,"MachineCache");let lc=hc;const dc=new lc,pc=class _Machine extends h{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,t,n){const s=dc.get({Address:t},()=>new _Machine(e));return n&&s.set(n),s}constructor(e){super(),this.connection=e instanceof Yt?e:new Yt(e)}};t(pc,"Machine");let gc=pc;const mc=class _TargetClusterCache extends l{constructor(){super(e=>`${e.BaseUrl}-${e.Name}`)}};t(mc,"TargetClusterCache");let Sc=mc;const fc=new Sc,_c=class _TargetCluster extends h{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=>gc.attach(this.machineConnection,e.Address,e))}static attach(e,t,n){const s=fc.get({BaseUrl:e.baseUrl,Name:t},()=>new _TargetCluster(e,t));return n&&s.set(n),s}constructor(e,t){super(),e instanceof Pr?(this.connection=e,this.machineConnection=new Yt(e.connectionOptions())):(this.connection=new Pr(e),this.machineConnection=new Yt(e)),this.clear({Name:t})}fetchMachines(e={}){return this.machineConnection.GetTargetClusterInfo({TargetClusters:{Item:[`${this.Type}:${this.Name}`]},...e}).then(e=>{const t=[];for(const n of e.TargetClusterInfoList.TargetClusterInfo)for(const e of n.Processes.MachineInfoEx)t.push(e);return this.set("MachineInfoEx",t),this.CMachineInfoEx})}machineStats(){let e=0,t=0,n=0;for(const s of this.CMachineInfoEx)for(const r of s.Storage.StorageInfo){t+=r.Available,n+=r.Total;const s=1-r.Available/r.Total;s>e&&(e=s)}return{maxDisk:e,meanDisk:1-(n?t/n:1)}}fetchUsage(){return this.machineConnection.GetTargetClusterUsageEx([this.Name])}};t(_c,"TargetCluster");let Uc=_c;function yc(e){let t;return t=e instanceof Pr?e:new Pr(e),t.TpListTargetClusters({}).then(t=>t.TargetClusters.TpClusterNameType.map(t=>Uc.attach(e,t.Name,t)))}t(yc,"targetClusters");const vc={};function Cc(e){if(!vc[e.baseUrl]){let t;t=e instanceof Pr?e:new Pr(e),vc[e.baseUrl]=t.TpListTargetClusters({}).then(t=>{let n,s,r;t.TargetClusters.TpClusterNameType.forEach(e=>{n||(n=e),s||!0!==e.IsDefault||(s=e),r||"hthor"!==e.Type||(r=e)});const i=s||r||n;return Uc.attach(e,i.Name,i)})}return vc[e.baseUrl]}t(Cc,"defaultTargetCluster");const Rc=class _TopologyCache extends l{constructor(){super(e=>e.BaseUrl)}};t(Rc,"TopologyCache");let Dc=Rc;const bc=new Dc,Fc=class _Topology extends h{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=>Uc.attach(this.connection,e.Name,e))}get LogicalClusters(){return this.get("LogicalClusters")}get Services(){return this.get("Services")}static attach(e,t){const n=bc.get({BaseUrl:e.baseUrl},()=>new _Topology(e));return t&&n.set(t),n}constructor(e){super(),this.connection=e instanceof Pr?e:new Pr(e)}GetESPServiceBaseURL(e=""){return this.connection.TpServiceQuery({}).then(t=>{const n=this.connection.protocol(),s=this.connection.ip();let r="https:"===n?"18002":"8002";if(c("ServiceList.TpEspServers.TpEspServer",t))for(const i of t.ServiceList.TpEspServers.TpEspServer)if(c("TpBindings.TpBinding",i))for(const t of i.TpBindings.TpBinding)t.Service===e&&t.Protocol+":"===n&&(r=t.Port);return`${n}//${s}:${r}/`})}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(e=>(this.set({LogicalClusters:e.TpLogicalClusters.TpLogicalCluster}),this.LogicalClusters))}fetchServices(e={}){return this.connection.TpServiceQuery(e).then(e=>(this.set({Services:e.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,t,n){if(this.isCallback(t)){if("changed"===e)super.on(e,t)}else if("changed"===e)super.on(e,t,n);return this._monitor(),this}};t(Fc,"Topology");let Wc=Fc;function Tc(e,t,n){"__proto__"!==t&&"constructor"!==t&&"prototype"!==t&&(e[t]=n)}function Ac(e){return(e=""+e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(/\n/g," ").replace(/\r/g," ")}function wc(e){if(!e)return 0;if(!isNaN(+e))return parseFloat(e);const t=/(?:(?:(\d+).days.)?(?:(\d+)h)?(?:(\d+)m)?(?:(\d+\.\d+|\d+)s))|(?:(\d+\.\d+|\d+)ms|(\d+\.\d+|\d+)us|(\d+\.\d+|\d+)ns)/.exec(e);if(!t)return 0;return 24*(+t[1]||0)*60*60+60*(+t[2]||0)*60+60*(+t[3]||0)+(+t[4]||0)+(+t[5]||0)/1e3+(+t[6]||0)/1e6+(+t[7]||0)/1e9}function Pc(e,t){const n=e.indexOf(t);return-1!==n?parseFloat(e.substring(0,n)):-1}function xc(e){if(!e)return 0;if(!isNaN(+e))return parseFloat(e);let t=Pc(e,"Kb");return t>=0?1024*t:(t=Pc(e,"Mb"),t>=0?t*Math.pow(1024,2):(t=Pc(e,"Gb"),t>=0?t*Math.pow(1024,3):(t=Pc(e,"Tb"),t>=0?t*Math.pow(1024,4):(t=Pc(e,"Pb"),t>=0?t*Math.pow(1024,5):(t=Pc(e,"Eb"),t>=0?t*Math.pow(1024,6):(t=Pc(e,"Zb"),t>=0?t*Math.pow(1024,7):(t=Pc(e,"b"),t>=0?t:0)))))))}function Lc(e){return e?parseFloat(e):0}t(Tc,"safeAssign"),t(Ac,"xmlEncode"),t(wc,"espTime2Seconds"),t(Pc,"unitTest"),t(xc,"espSize2Bytes"),t(Lc,"espSkew2Number");const Ec=class _LocalisedXGMMLWriter{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,t,n,s){this.noSpills=s,e.forEach(e=>{this.graph.isVertex(e)?(this.calcInVertexVisibility(e,n),this.calcOutVertexVisibility(e,n)):this.graph.isEdge(e)?(this.calcInVertexVisibility(e.getSource(),n-1),this.calcOutVertexVisibility(e.getTarget(),n-1)):this.graph.isSubgraph(e)&&(this.m_visibleSubgraphs[e.__hpcc_id]=e,this.calcSubgraphVisibility(e,t-1))}),this.calcVisibility2()}calcInVertexVisibility(e,t){this.noSpills&&e.isSpill()&&t++,this.m_visibleVertices[e.__hpcc_id]=e,t>0&&e.getInEdges().forEach(e=>{this.calcInVertexVisibility(e.getSource(),t-1)})}calcOutVertexVisibility(e,t){this.noSpills&&e.isSpill()&&t++,this.m_visibleVertices[e.__hpcc_id]=e,t>0&&e.getOutEdges().forEach(e=>{this.calcOutVertexVisibility(e.getTarget(),t-1)})}calcSubgraphVisibility(e,t){if(t<0)return;t>0&&e.__hpcc_subgraphs.forEach((e,n)=>{this.calcSubgraphVisibility(e,t-1)}),e.__hpcc_subgraphs.forEach((e,t)=>{this.m_visibleSubgraphs[e.__hpcc_id]=e}),e.__hpcc_vertices.forEach((e,t)=>{this.m_visibleVertices[e.__hpcc_id]=e});const n={};this.graph.edges.forEach((t,s)=>{t.getSource().__hpcc_parent!==t.getTarget().__hpcc_parent&&e===this.getCommonAncestor(t)&&(n[t.getSource().__hpcc_parent.__hpcc_id+"::"+t.getTarget().__hpcc_parent.__hpcc_id]||(n[t.getSource().__hpcc_parent.__hpcc_id+"::"+t.getTarget().__hpcc_parent.__hpcc_id]=!0,this.m_visibleEdges[t.__hpcc_id]=t))})}buildVertexString(e,t){let n="",s="";const r=e.getProperties();for(const i in r)t&&i.indexOf("_kind")>=0?s+='<att name="_kind" value="point"/>':"id"===i||"label"===i?n+=" "+i+'="'+Ac(r[i])+'"':s+='<att name="'+i+'" value="'+Ac(r[i])+'"/>';return"<node"+n+">"+s+"</node>"}buildEdgeString(e){let t="",n="";const s=e.getProperties();for(const r in s)"id"===r.toLowerCase()||"label"===r.toLowerCase()||"source"===r.toLowerCase()||"target"===r.toLowerCase()?t+=" "+r+'="'+Ac(s[r])+'"':n+='<att name="'+r+'" value="'+Ac(s[r])+'"/>';return"<edge"+t+">"+n+"</edge>"}getAncestors(e,t){let n=e.__hpcc_parent;for(;n;)t.push(n),n=n.__hpcc_parent}getCommonAncestorV(e,t){const n=[],s=[];this.getAncestors(e,n),this.getAncestors(t,s);let r=n.length-1,i=s.length-1,o=null;for(;r>=0&&i>=0&&n[r]===s[i];)o=n[r],--r,--i;return o}getCommonAncestor(e){return this.getCommonAncestorV(e.getSource(),e.getTarget())}calcAncestorVisibility(e){const t=[];this.getAncestors(e,t),t.forEach((e,t)=>{this.m_visibleSubgraphs[e.__hpcc_id]=e})}calcVisibility2(){for(const e in this.m_visibleVertices){const t=this.m_visibleVertices[e];t.getInEdges().forEach((e,t)=>{this.m_visibleEdges[e.__hpcc_id]=e}),t.getOutEdges().forEach((e,t)=>{this.m_visibleEdges[e.__hpcc_id]=e}),this.calcAncestorVisibility(t)}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(const e in this.m_visibleEdges){const t=this.m_visibleEdges[e];let n=t.getSource();for(this.addSemiVisibleVertex(n);this.noSpills&&n.isSpill();){const e=n.getInEdges();if(!e.length)break;this.addSemiVisibleEdge(e[0]),n=e[0].getSource(),this.addSemiVisibleVertex(n)}let s=t.getTarget();for(this.addSemiVisibleVertex(s);this.noSpills&&s.isSpill();){const e=s.getOutEdges();if(!e.length)break;this.addSemiVisibleEdge(e[0]),s=e[0].getTarget(),this.addSemiVisibleVertex(s)}}}writeXgmml(){this.subgraphVisited(this.graph.subgraphs[0],!0),this.graph.edges.forEach((e,t)=>{this.edgeVisited(e)})}subgraphVisited(e,t=!1){if(this.m_visibleSubgraphs[e.__hpcc_id]){let n="";this.m_xgmml+=t?"":'<node id="'+e.__hpcc_id+'"><att><graph>';const s=this.m_xgmml.length;if(e.walkSubgraphs(this),e.walkVertices(this),s===this.m_xgmml.length){const t=e.__hpcc_vertices[0];t&&(this.m_xgmml+=this.buildVertexString(t,!0))}const r=e.getProperties();for(const e in r)n+='<att name="'+e+'" value="'+Ac(r[e])+'"/>';this.m_xgmml+=t?"":"</graph></att>"+n+"</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))}};t(Ec,"LocalisedXGMMLWriter");let Mc=Ec;const Nc=class _GraphItem{__hpcc_graph;__hpcc_parent;__widget;__hpcc_id;_globalID;constructor(e,t){this.__hpcc_graph=e,this.__hpcc_id=t,this._globalID=t}getProperties(){const e={};for(const t in this)0!==t.indexOf("__")&&this.hasOwnProperty(t)&&(e[t]=this[t]);return e}};t(Nc,"GraphItem");let Ic=Nc;const jc=class _Subgraph extends Ic{_globalType;__hpcc_subgraphs;__hpcc_vertices;__hpcc_edges;id;constructor(e,t){super(e,t),this._globalType="0"===t?"Graph":"Cluster",this.__hpcc_subgraphs=[],this.__hpcc_vertices=[],this.__hpcc_edges=[],this.id=t}addSubgraph(e){e.__hpcc_parent=this,this.__hpcc_subgraphs.some(t=>e===t)||this.__hpcc_subgraphs.push(e)}addVertex(e){e.__hpcc_parent=this,this.__hpcc_vertices.some(t=>e===t)||this.__hpcc_vertices.push(e)}removeVertex(e){this.__hpcc_vertices=this.__hpcc_vertices.filter(t=>e!==t)}addEdge(e){e.__hpcc_parent=this,this.__hpcc_edges.some(t=>e===t)||this.__hpcc_edges.push(e)}removeEdge(e){this.__hpcc_edges=this.__hpcc_edges.filter(t=>e!==t)}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((t,n)=>{e.subgraphVisited(t)&&t.walkSubgraphs(e)})}walkVertices(e){this.__hpcc_vertices.forEach((t,n)=>{e.vertexVisited(t)})}};t(jc,"Subgraph");let kc=jc;const Gc=class _Vertex extends Ic{_globalType="Vertex";_isSpill;constructor(e,t){super(e,t)}isSpill(){return this._isSpill}remove(){const e=this.getInVertices();e.length<=1&&console.warn(this.__hpcc_id+": remove only supports single or zero inputs activities..."),this.getInEdges().forEach(e=>{e.remove()}),this.getOutEdges().forEach(t=>{t.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)}};t(Gc,"Vertex");let Vc=Gc;const Qc=class _Edge extends Ic{_globalType="Edge";_sourceActivity;source;_targetActivity;target;constructor(e,t){super(e,t),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]}};t(Qc,"Edge");let Bc=Qc;const Oc=class _QueryGraph{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;const t=(new DOMParser).parseFromString(e,"text/xml");this.walkDocument(t.documentElement,"0")}isSubgraph(e){return e instanceof kc}isVertex(e){return e instanceof Vc}isEdge(e){return e instanceof Bc}getGlobalType(e){return e instanceof Vc?3:e instanceof Bc?4:e instanceof kc?2:e instanceof _QueryGraph?1:0}getGlobalTypeString(e){return e instanceof Vc?"Vertex":e instanceof Bc?"Edge":e instanceof kc?"Cluster":e instanceof _QueryGraph?"Graph":"Unknown"}getItem(e,t){if(!this.idx[t])switch(e.tagName){case"graph":const e=new kc(this,t);this.subgraphs.push(e),this.idx[t]=e;break;case"node":const n=new Vc(this,t);this.vertices.push(n),this.idx[t]=n;break;case"edge":const s=new Bc(this,t);this.edges.push(s),this.idx[t]=s;break;default:console.warn("Graph.getItem - Unknown Node Type!")}const n=this.idx[t];return Array.from(e.attributes).forEach(e=>{Tc(n,e.name,e.value)}),n}removeItem(e){delete this.idx[e.__hpcc_id],e instanceof kc?this.subgraphs=this.subgraphs.filter(t=>e!==t):e instanceof Vc?this.vertices=this.vertices.filter(t=>e!==t):e instanceof Bc&&(this.edges=this.edges.filter(t=>e!==t))}getChildByTagName(e,t){let n=null;return Array.from(e.childNodes).some(e=>{if(e.tagName===t)return n=e,!0}),n}walkDocument(e,t){const n=this.getItem(e,t);return e.childNodes.forEach(e=>{if(1===e.nodeType)switch(e.tagName){case"graph":break;case"node":let t=!1;const s=this.getChildByTagName(e,"att");if(s){const r=this.getChildByTagName(s,"graph");if(r){t=!0;const s=this.walkDocument(r,e.getAttribute("id"));n.addSubgraph(s)}}if(!t){const t=this.walkDocument(e,e.getAttribute("id"));n.addVertex(t)}break;case"att":const r=e.getAttribute("name"),i="_"+r,o=e.getAttribute("value");0===r.indexOf("Time")?(Tc(n,i,o),Tc(n,r,""+wc(o))):0===r.indexOf("Size")?(Tc(n,i,o),Tc(n,r,""+xc(o))):0===r.indexOf("Skew")?(Tc(n,i,o),Tc(n,r,""+Lc(o))):Tc(n,r,o);break;case"edge":const c=this.walkDocument(e,e.getAttribute("id"));if(void 0!==c.NumRowsProcessed?c._eclwatchCount=c.NumRowsProcessed.replace(/\B(?=(\d{3})+(?!\d))/g,","):void 0!==c.Count?c._eclwatchCount=c.Count.replace(/\B(?=(\d{3})+(?!\d))/g,","):void 0!==c.count&&(c._eclwatchCount=c.count.replace(/\B(?=(\d{3})+(?!\d))/g,",")),c.inputProgress&&(c._eclwatchInputProgress="["+c.inputProgress.replace(/\B(?=(\d{3})+(?!\d))/g,",")+"]"),c.SkewMaxRowsProcessed&&c.SkewMinRowsProcessed&&(c._eclwatchSkew="+"+c.SkewMaxRowsProcessed+", "+c.SkewMinRowsProcessed),c._dependsOn);else if(c._childGraph);else if(c._sourceActivity||c._targetActivity){c._isSpill=!0;const e=c.getSource();e&&(e._isSpill=!0);const t=c.getTarget();t&&(t._isSpill=!0)}n.addEdge(c)}}),n}removeSubgraphs(){[...this.subgraphs].forEach(e=>{e.__hpcc_parent instanceof kc&&e.remove()})}removeSpillVertices(){[...this.vertices].forEach(e=>{e.isSpill()&&e.remove()})}getLocalisedXGMML(e,t,n,s){const r=new Mc(this);return r.calcVisibility(e,t,n,s),r.writeXgmml(),"<graph>"+r.m_xgmml+"</graph>"}};t(Oc,"QueryGraph");let Xc=Oc;const Hc=n("@hpcc-js/comms/ecl/query.ts"),$c=vi("~s");function Jc(e){return!isNaN(parseFloat(e))&&!isNaN(e-0)}t(Jc,"isNumber");const qc=class _QueryCache extends l{constructor(){super(e=>l.hash([e.QueryId,e.QuerySet]))}};t(qc,"QueryCache");const Yc=new qc,zc=class _Query extends h{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,t,n,s){super(),this.wsWorkunitsService=e instanceof si?e:new si(e),this.topology=Wc.attach(this.wsWorkunitsService.opts()),this.set({QuerySet:t,QueryId:n,...s})}static attach(e,t,n,s){const r=Yc.get({BaseUrl:e.baseUrl,QuerySet:t,QueryId:n},()=>new _Query(e,t,n));return s&&r.set(s),r}_eclService;async wsEclService(){return this._eclService||(this._eclService=this.topology.fetchServices({}).then(e=>{for(const t of e?.TpEspServers?.TpEspServer??[])for(const e of t?.TpBindings?.TpBinding??[])if("ws_ecl"===e?.Service){const t=`${e.Protocol}://${globalThis.location.hostname}:${e.Port}`;return new mt({baseUrl:t})}})),this._eclService}async fetchDetails(){const e=await this.wsWorkunitsService.WUQueryDetails({QuerySet:this.QuerySet,QueryId:this.QueryId,IncludeStateOnClusters:!0,IncludeSuperFiles:!0,IncludeWsEclAddresses:!0,CheckAllNodes:!1});this.set({...e})}async fetchRequestSchema(){const e=await this.wsEclService();try{this._requestSchema=await(e?.requestJson(this.QuerySet,this.QueryId))??[]}catch(t){Hc.debug(t.message??t),this._requestSchema=[]}}async fetchResponseSchema(){const e=await this.wsEclService();try{this._responseSchema=await(e?.responseJson(this.QuerySet,this.QueryId))??{}}catch(t){Hc.debug(t.message??t),this._responseSchema={}}}async fetchSchema(){await Promise.all([this.fetchRequestSchema(),this.fetchResponseSchema()])}fetchSummaryStats(){return this.wsWorkunitsService.WUQueryGetSummaryStats({Target:this.QuerySet,QueryId:this.QueryId})}fetchGraph(e="",t=""){return this.wsWorkunitsService.WUQueryGetGraph({Target:this.QuerySet,QueryId:this.QueryId,GraphName:e,SubGraphId:t}).then(e=>{const t=new Xc;let n=!0;for(const s of e?.Graphs?.ECLGraphEx||[])n?(t.load(s.Graph),n=!1):t.merge(s.Graph);return t})}fetchDetailsNormalized(e={}){const t=Yo.attach(this.wsWorkunitsService,this.Wuid);return t?Promise.all([this.fetchGraph(),t.fetchDetailsMeta(),t.fetchDetailsRaw(e)]).then(e=>{const n=e[0],s=e[1],r=e[2].map(e=>{const t=e.Id[0];if("a"===t||"e"===t){const t=n.idx[e.Id.substring(1)];if(!t)return Hc.debug(`Missing graph data for metric ID: ${e.Id}`),e;const s=new Set(e.Properties.Property.map(e=>e.Name)),r=[];for(const e in t){const n=e.charAt(0);if("_"!==n&&n===n.toUpperCase()&&!s.has(e)){const n=t[e],s=typeof n;if("string"===s||"number"===s||"boolean"===s){let t=Jc(n)?parseFloat(n):n,s=n;e.indexOf("Time")>=0&&(t/=1e9,s=$c(t)+"s"),r.push({Name:e,RawValue:t,Formatted:s})}}}r.length>0&&e.Properties.Property.push(...r)}return e});return t.normalizeDetails(s,r)}):Promise.resolve({meta:void 0,columns:void 0,data:void 0})}async submit(e){const t=await this.wsEclService();try{return t?.submit(this.QuerySet,this.QueryId,e).then(e=>{for(const t in e)e[t]=e[t].Row;return e})??[]}catch(n){return Hc.debug(n.message??n),[]}}async refresh(){return await Promise.all([this.fetchDetails(),this.fetchSchema()]),this}requestFields(){return this._requestSchema?this._requestSchema:[]}responseFields(){return this._responseSchema?this._responseSchema:{}}resultNames(){const e=[];for(const t in this.responseFields())e.push(t);return e}resultFields(e){return this._responseSchema[e]?this._responseSchema[e]:[]}};t(zc,"Query");let Zc=zc;const Kc=class _StoreCache extends l{constructor(){super(e=>`${e.BaseUrl}-${e.Name}:${e.UserSpecific}-${e.Namespace}`)}};t(Kc,"StoreCache");let ea=Kc;const ta=new ea,na=class _ValueChangedMessage extends R{constructor(e,t,n){super(),this.key=e,this.value=t,this.oldValue=n}get canConflate(){return!0}conflate(e){return this.key===e.key&&(this.value=e.value,!0)}void(){return this.value===this.oldValue}};t(na,"ValueChangedMessage");let sa=na;const ra=class _Store{connection;get BaseUrl(){return this.connection.baseUrl}Name;UserSpecific;Namespace;_dispatch=new C;static attach(e,t="HPCCApps",n,s=!0){return ta.get({BaseUrl:e.baseUrl,Name:t,UserSpecific:s,Namespace:n},()=>new _Store(e,t,n,s))}constructor(e,t,n,s){this.connection=e instanceof Rr?e:new Rr(e),this.Name=t,this.UserSpecific=s,this.Namespace=n}_knownValues={};create(){this.connection.CreateStore({Name:this.Name,Type:"",Description:""})}set(e,t,n=!0){return this.connection.Set({StoreName:this.Name,UserSpecific:this.UserSpecific,Namespace:this.Namespace,Key:e,Value:t}).then(s=>{const r=this._knownValues[e];this._knownValues[e]=t,n&&this._dispatch.post(new sa(e,t,r))}).catch(n=>{console.error(`Store.set("${e}", "${t}") failed:`,n)})}get(e,t=!0){return this.connection.Fetch({StoreName:this.Name,UserSpecific:this.UserSpecific,Namespace:this.Namespace,Key:e}).then(n=>{const s=this._knownValues[e];return this._knownValues[e]=n.Value,t&&this._dispatch.post(new sa(e,n.Value,s)),n.Value}).catch(t=>{console.error(`Store.get(${e}) failed:`,t)})}getAll(e=!0){return this.connection.FetchAll({StoreName:this.Name,UserSpecific:this.UserSpecific,Namespace:this.Namespace}).then(t=>{const n={},s=this._knownValues;if(this._knownValues={},t.Pairs.Pair.forEach(t=>{const r=this._knownValues[t.Key];this._knownValues[t.Key]=t.Value,delete s[t.Key],n[t.Key]=t.Value,e&&this._dispatch.post(new sa(t.Key,t.Value,r))}),e)for(const e in s)this._dispatch.post(new sa(e,void 0,s[e]));return n}).catch(e=>(console.error("Store.getAll failed:",e),{}))}delete(e,t=!0){return this.connection.Delete({StoreName:this.Name,UserSpecific:this.UserSpecific,Namespace:this.Namespace,Key:e}).then(n=>{const s=this._knownValues[e];delete this._knownValues[e],t&&this._dispatch.post(new sa(e,void 0,s))}).catch(t=>{console.error(`Store.delete(${e}) failed:`,t)})}monitor(e){return this._dispatch.attach(e)}};t(ra,"Store");let ia=ra;const oa=n("@hpcc-js/comms/dfuWorkunit.ts"),ca=class _DFUWorkunitCache extends l{constructor(){super(e=>`${e.BaseUrl}-${e.ID}`)}};t(ca,"DFUWorkunitCache");let aa=ca;const ua=new aa,ha=class _DFUWorkunit extends h{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,t){const n=new _DFUWorkunit(e);return n.connection.CreateDFUWorkunit({DFUServerQueue:t}).then(e=>(ua.set(n),n.set(e.result),n))}static attach(e,t,n){const s=ua.get({BaseUrl:e.baseUrl,ID:t},()=>new _DFUWorkunit(e,t));return n&&s.set(n),s}static sprayFixed(e,t){const n=new he(e);return n.SprayFixedEx({...t}).then(t=>{const s=t.wuid;return n.GetDFUWorkunit({wuid:s}).then(t=>_DFUWorkunit.attach(e,s,t.result))})}static sprayVariable(e,t){const n=new he(e);return n.SprayVariableEx({...t}).then(t=>{const s=t.wuid;return n.GetDFUWorkunit({wuid:s}).then(t=>_DFUWorkunit.attach(e,s,t.result))})}static despray(e,t){const n=new he(e);return n.DesprayEx({...t}).then(t=>{const s=t.wuid;return n.GetDFUWorkunit({wuid:s}).then(t=>_DFUWorkunit.attach(e,s,t.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}return!1}isFailed(){return!(!this.isComplete()||6===this.State)}isDeleted(){return 999===this.State}isRunning(){return!this.isComplete()}abort(){return this.connection.AbortDFUWorkunit({wuid:this.ID})}delete(){return this.DFUWUAction(ne.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(){this.isComplete()?this._monitorTickCount=0:super._monitor()}_monitorTimeoutDuration(){const 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(e=>e).catch(e=>"")}DFUWUAction(e){return this.connection.DFUWorkunitsAction({wuids:{Item:[this.ID]},Type:e}).then(t=>e===ne.DFUWUActions.Delete?t:this.refresh().then(()=>(this._monitor(),t)))}on(e,t,n){if(this.isCallback(t))switch(e){case"finished":super.on("propChanged","State",e=>{this.isComplete()&&t([e])});break;case"changed":super.on(e,t)}else if("changed"===e)super.on(e,t,n);return this._monitor(),this}watchUntilComplete(e){return new Promise((t,n)=>{const s=this.watch(n=>{e&&e(n),this.isComplete()&&(s.release(),t(this))})})}watchUntilRunning(e){return new Promise((t,n)=>{const s=this.watch(n=>{e&&e(n),(this.isComplete()||this.isRunning())&&(s.release(),t(this))})})}constructor(e,t){super(),this.connection=new he(e),this.topologyConnection=new Pr(e),this.clearState(t)}clearState(e){this.clear({ID:e,State:0})}GetDFUWorkunit(e={}){return this.connection.GetDFUWorkunit({...e,wuid:this.ID}).then(e=>(this.set(e.result),e)).catch(e=>{if(!e.Exception.some(e=>(20080===e.Code||20081===e.Code)&&(this.clearState(this.ID),this.set("State",999),!0)))throw oa.warning(`Unexpected ESP exception: ${e.message}`),e;return{}})}};t(ha,"DFUWorkunit");let la=ha;export{ve as AccessService,be as AccountService,sc as Activity,vo as Attribute,F as BUILD_VERSION,Ro as BaseScope,Le as CloudService,ke as CodesignService,O as Connection,tt as DFUArrayActions,st as DFUChangeProtection,rt as DFUChangeRestriction,nt as DFUDefFileFormat,ot as DFUService,ae as DFUWUTypes,la as DFUWorkunit,aa as DFUWorkunitCache,ht as DFUXRefService,Be as DaliService,Wi as ECLGraph,K as ESPConnection,q as ESPExceptions,mt as EclService,Ut as ElkService,ne as FileSpray,he as FileSprayService,ce as FileSprayStates,go as GlobalResultCache,Ai as GraphCache,Lt as LogType,Nt as LogaccessService,uc as LogicalFile,oc as LogicalFileCache,gc as Machine,lc as MachineCache,Yt as MachineService,D as PKG_NAME,b as PKG_VERSION,en as PackageProcessService,No as PropertyType,Zc as Query,Xc as QueryGraph,Io as RelatedProperty,zi as Resource,rn as ResourcesService,fo as Result,Uo as ResultCache,Ur as SMCService,dn as SashaService,bo as Scope,Ji as ScopeEdge,Qi as ScopeGraph,Oi as ScopeSubgraph,Hi as ScopeVertex,te as Service,Wo as SourceFile,ia as Store,ea as StoreCache,Rr as StoreService,Et as TargetAudience,Uc as TargetCluster,Sc as TargetClusterCache,Ao as Timer,Wc as Topology,Dc as TopologyCache,Pr as TopologyService,sa as ValueChangedMessage,Zr as WUStateID,qr as WUUpdate,Yo as Workunit,$o as WorkunitCache,si as WorkunitsService,ii as WorkunitsServiceEx,le as WsAccess,Ee as WsCodesign,Oe as WsDfu,yt as WsLogaccess,Hn as WsSMC,on as WsSasha,Dr as WsTopology,xr as WsWorkunits,ki as XGMMLEdge,Li as XGMMLGraph,Mi as XGMMLSubgraph,Ii as XGMMLVertex,Ki as XSDNode,io as XSDSchema,so as XSDSimpleType,to as XSDXMLNode,X as createConnection,qi as createGraph,Gi as createXGMMLGraph,Cc as defaultTargetCluster,L as deserializeResponse,k as get,Q as hookSend,w as instanceOfIConnection,T as instanceOfIOptions,$ as isArray,Kr as isECLResult,Y as isExceptions,ti as isWUInfoWorkunit,ei as isWUQueryECLWorkunit,E as jsonp,ao as parseXSD,lo as parseXSD2,j as post,G as send,x as serializeRequest,H as setTransportFactory,Vo as splitMetric,yc as targetClusters};
|
|
1
|
+
var e=Object.defineProperty,t=(t,n)=>e(t,"name",{value:n,configurable:!0});import{scopedLogger as n,join as s,root as r,promiseTimeout as i,utf8ToBase64 as o,exists as c,deepMixin as a,xml2json as u,StateObject as h,Cache as l,Edge as d,Graph as p,Subgraph as g,Vertex as m,SAXStackParser as S,Stack as f,espTime2Seconds as _,deepMixinT as U,XMLNode as y,debounce as v,Dispatch as C,Message as R}from"@hpcc-js/util";const D="@hpcc-js/comms",b="3.15.3",F="3.21.4",W=n("comms/connection.ts");function T(e){return"baseUrl"in e}t(T,"instanceOfIOptions");const A={type:"post",baseUrl:"",userID:"",password:"",rejectUnauthorized:!0,timeoutSecs:60};function w(e){return"function"==typeof e.opts&&"function"==typeof e.send&&"function"==typeof e.clone}function P(e,t){return void 0===t||!0===t?encodeURIComponent(e):""+e}function x(e,t=!0,n=""){if(n&&(n+="."),"object"!=typeof e)return P(e,t);const s=[];for(const r in e)if(e.hasOwnProperty(r))if(e[r]instanceof Array){let i=!1;e[r].forEach((e,o)=>{"object"==typeof e?(i=!0,s.push(x(e,t,n+P(`${r}.${o}`,t)))):s.push(n+P(`${r}_i${o}`,t)+"="+x(e,t))}),i&&s.push(n+P(`${r}.itemcount`,t)+"="+e[r].length)}else"object"==typeof e[r]?e[r]&&e[r].Item instanceof Array?(s.push(x(e[r].Item,t,n+P(r,t))),s.push(n+P(`${r}.itemcount`,t)+"="+e[r].Item.length)):s.push(x(e[r],t,n+P(r,t))):void 0!==e[r]?s.push(n+P(r,t)+"="+P(e[r],t)):s.push(n+P(r,t));return s.join("&")}function L(e){return JSON.parse(e)}function E(e,n,r={},i="json",o){return o&&console.warn("Header attributes ignored for JSONP connections"),new Promise((o,c)=>{let a=1e3*e.timeoutSecs;const u="jsonp_callback_"+Math.round(999999*Math.random());window[u]=function(e){a=0,p(),o("json"===i&&"string"==typeof e?L(e):e)};const h=document.createElement("script");let l=s(e.baseUrl,n);l+=l.indexOf("?")>=0?"&":"?",h.src=l+"jsonp="+u+"&"+x(r,e.encodeRequest),document.body.appendChild(h);const d=setInterval(function(){a<=0?clearInterval(d):(a-=5e3,a<=0?(clearInterval(d),W.error("Request timeout: "+h.src),p(),c(Error("Request timeout: "+h.src))):W.debug("Request pending ("+a/1e3+" sec): "+h.src))},5e3);function p(){delete window[u],document.body.removeChild(h)}t(p,"doCallback")})}function M(e){return e.userID?{Authorization:`Basic ${o(`${e.userID}:${e.password}`)}`}:{}}t(w,"instanceOfIConnection"),t(P,"encode"),t(x,"serializeRequest"),t(L,"deserializeResponse"),t(E,"jsonp"),t(M,"authHeader");const N={};function I(e,n,o,c,a){function u(e){if(e.ok)return"json"===a?e.json():e.text();throw new Error(e.statusText)}c={...M(e),...c},o={credentials:N[e.baseUrl]?"omit":"include",...o,headers:c},0===e.baseUrl.indexOf("https:")&&(!1===e.rejectUnauthorized&&r.__hpcc_rejectUnauthorizedAgent?o.dispatcher=r.__hpcc_rejectUnauthorizedAgent:r.__hpcc_trustwaveAgent&&(o.agent=r.__hpcc_trustwaveAgent)),t(u,"handleResponse");const h=r.__hpcc_undiciFetch??fetch;return i(1e3*e.timeoutSecs,h(s(e.baseUrl,n),o).then(u).catch(t=>(o.credentials=N[e.baseUrl]?"include":"omit",h(s(e.baseUrl,n),o).then(u).then(t=>(N[e.baseUrl]=!N[e.baseUrl],t)))))}function j(e,t,n,s="json",r){let i;return n.upload_&&(delete n.upload_,t+="?upload_"),n.abortSignal_&&(i=n.abortSignal_,delete n.abortSignal_),I(e,t,{method:"post",body:x(n,e.encodeRequest),signal:i},{"Content-Type":"application/x-www-form-urlencoded",...r},s)}function k(e,t,n,s="json",r){let i;return n.abortSignal_&&(i=n.abortSignal_,delete n.abortSignal_),I(e,`${t}?${x(n,e.encodeRequest)}`,{method:"get",signal:i},{...r},s)}function G(e,t,n,s="json",r){let i;switch(e.type){case"jsonp":i=E(e,t,n,s,r);break;case"get":i=k(e,t,n,s,r);break;default:i=j(e,t,n,s,r)}return i}t(I,"doFetch"),t(j,"post"),t(k,"get"),t(G,"send");let V=G;function Q(e){const t=V;return e&&(V=e),t}t(Q,"hookSend");const B=class _Connection{_opts;get baseUrl(){return this._opts.baseUrl}constructor(e){this.opts(e)}opts(e){return 0===arguments.length?this._opts:(this._opts={...A,...e},this)}send(e,t,n="json",s){return this._opts.hookSend?this._opts.hookSend(this._opts,e,t,n,V,s):V(this._opts,e,t,n,s)}clone(){return new _Connection(this.opts())}};t(B,"Connection");let O=B,X=/* @__PURE__ */t(function(e){return new O(e)},"createConnection");function H(e){const t=X;return X=e,t}function $(e){return"[object Array]"===Object.prototype.toString.call(e)}t(H,"setTransportFactory"),t($,"isArray");const J=class _ESPExceptions extends Error{isESPExceptions=!0;action;request;Source;Exception;constructor(e,t,n){super("ESPException: "+n.Source),this.action=e,this.request=t,this.Source=n.Source,this.Exception=n.Exception,n.Exception.length?this.message=`${n.Exception[0].Code}: ${n.Exception[0].Message}`:this.message=""}};t(J,"ESPExceptions");let q=J;function Y(e){return e instanceof q||e.isESPExceptions&&Array.isArray(e.Exception)}function z(e){return void 0!==e.send}t(Y,"isExceptions"),t(z,"isConnection");const Z=class _ESPConnection{_connection;get baseUrl(){return this._connection.opts().baseUrl}_service;_version;constructor(e,t,n){this._connection=z(e)?e:X(e),this._service=t,this._version=n}service(e){return void 0===e?this._service:(this._service=e,this)}version(e){return void 0===e?this._version:(this._version=e,this)}toESPStringArray(e,t){if($(e[t])){for(let n=0;n<e[t].length;++n)e[t+"_i"+n]=e[t][n];delete e[t]}return e}opts(e){return void 0===e?this._connection.opts():(this._connection.opts(e),this)}send(e,t={},n="json",r=!1,i,o){const c={...t,ver_:this._version};let a;r&&(c.upload_=!0),i&&(c.abortSignal_=i);let u="json";switch(n){case"text":a=s(this._service,e),u="text";break;case"xsd":a=s(this._service,e+".xsd"),u="text";break;case"json2":a=s(this._service,e+"/json"),n="json";const t=e.split("/");e=t.pop();break;default:a=s(this._service,e+".json")}return this._connection.send(a,c,u).then(t=>{if("json"===n){let n;if(t&&t.Exceptions)throw new q(e,c,t.Exceptions);if(t&&(n=t[o||e+"Response"]),!n)throw new q(e,c,{Source:"ESPConnection.send",Exception:[{Code:0,Message:"Missing Response"}]});return n}return t})}clone(){return new _ESPConnection(this._connection.clone(),this._service,this._version)}};t(Z,"ESPConnection");let K=Z;const ee=class _Service{_connection;get baseUrl(){return this._connection.opts().baseUrl}constructor(e,t,n){this._connection=new K(e,t,n)}opts(){return this._connection.opts()}connection(){return this._connection.clone()}};t(ee,"Service");let te=ee;var ne,se,re;se=ne||(ne={}),(re=se.DFUWUActions||(se.DFUWUActions={})).Delete="Delete",re.Protect="Protect",re.Unprotect="Unprotect",re.Restore="Restore",re.SetToFailed="SetToFailed",re.Archive="Archive";const ie=class _FileSprayServiceBase extends te{constructor(e){super(e,"FileSpray","1.27")}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")}};t(ie,"FileSprayServiceBase");let oe=ie;var ce=/* @__PURE__ */(e=>(e[e.unknown=0]="unknown",e[e.scheduled=1]="scheduled",e[e.queued=2]="queued",e[e.started=3]="started",e[e.aborted=4]="aborted",e[e.failed=5]="failed",e[e.finished=6]="finished",e[e.monitoring=7]="monitoring",e[e.aborting=8]="aborting",e[e.notfound=999]="notfound",e))(ce||{}),ae=/* @__PURE__ */(e=>(e.Copy="copy",e.Remove="remove",e.Move="move",e.Rename="rename",e.Replicate="replicate",e.Import="import",e.Export="export",e.Monitor="monitor",e.Copymerge="copymerge",e.Supercopy="supercopy",e.Publish="publish",e))(ae||{});const ue=class _FileSprayService extends oe{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")}};t(ue,"FileSprayService");let he=ue;var le,de,pe,ge,me,Se,fe;de=le||(le={}),(pe=de.ViewMemberType||(de.ViewMemberType={})).User="User",pe.Group="Group",(ge=de.UserSortBy||(de.UserSortBy={})).username="username",ge.fullname="fullname",ge.passwordexpiration="passwordexpiration",ge.employeeID="employeeID",ge.employeeNumber="employeeNumber",(me=de.GroupSortBy||(de.GroupSortBy={})).Name="Name",me.ManagedBy="ManagedBy",(Se=de.AccountTypeReq||(de.AccountTypeReq={})).Any="Any",Se.User="User",Se.Group="Group",(fe=de.ResourcePermissionSortBy||(de.ResourcePermissionSortBy={})).Name="Name",fe.Type="Type",(de.ResourceSortBy||(de.ResourceSortBy={})).Name="Name";const _e=class _AccessServiceBase extends te{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")}};t(_e,"AccessServiceBase");let Ue=_e;const ye=class _AccessService extends Ue{};t(ye,"AccessService");let ve=ye;const Ce=class _AccountServiceBase extends te{constructor(e){super(e,"ws_account","1.07")}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")}};t(Ce,"AccountServiceBase");let Re=Ce;const De=class _AccountService extends Re{VerifyUser(e){return this._connection.send("VerifyUser",e).catch(e=>{if(e.isESPExceptions&&e.Exception.some(e=>20043===e.Code))return{retcode:20043,Exceptions:{Source:"wsAccount",Exception:e.Exception}};throw e})}};t(De,"AccountService");let be=De;const Fe=class _CloudServiceBase extends te{constructor(e){super(e,"WsCloud","1.02")}GetPODs(e){return this._connection.send("GetPODs",e,"json",!1,void 0,"GetPODsResponse")}GetServices(e){return this._connection.send("GetServices",e,"json",!1,void 0,"GetServicesResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"WsCloudPingResponse")}};t(Fe,"CloudServiceBase");let We=Fe;const Te=n("@hpcc-js/comms/services/wsCloud.ts");function Ae(e){return void 0!==e?.Pods}function we(e){return e.spec?.containers?.reduce((e,t)=>(t.ports?.forEach(t=>{e.push({ContainerPort:t.containerPort,Name:t.name,Protocol:t.protocol})}),e),[])??[]}function Pe(e){return e.filter(e=>{const t=e?.metadata?.labels??{};return t.hasOwnProperty("app.kubernetes.io/part-of")&&"HPCC-Platform"===t["app.kubernetes.io/part-of"]}).map(e=>{const t=new Date(e.metadata?.creationTimestamp);return{Name:e.metadata.name,Status:e.status?.phase,CreationTimestamp:t.toISOString(),ContainerName:e.status?.containerStatuses?.reduce((e,t)=>(t.name&&e.push(t.name),e),[]).join(", ")??"",ContainerCount:e.spec?.containers?.length??0,ContainerReadyCount:e.status?.containerStatuses?.reduce((e,t)=>e+(t.ready?1:0),0),ContainerRestartCount:e.status?.containerStatuses?.reduce((e,t)=>e+t.restartCount,0),Ports:{Port:we(e)}}})}t(Ae,"isGetPODsResponse_v1_02"),t(we,"mapPorts"),t(Pe,"mapPods");const xe=class _CloudService extends We{getPODs(){return super.GetPODs({}).then(e=>{if(Ae(e))return e.Pods?.Pod??[];try{const t="string"==typeof e.Result?JSON.parse(e.Result):e.Result;return Pe(t?.items??[])}catch(t){return Te.error(`Error parsing V1Pods json '${t instanceof Error?t.message:String(t)}'`),[]}})}};t(xe,"CloudService");let Le=xe;var Ee,Me;((Me=Ee||(Ee={})).SigningMethodType||(Me.SigningMethodType={})).gpg="gpg";const Ne=class _CodesignServiceBase extends te{constructor(e){super(e,"ws_codesign","1.1")}ListUserIDs(e){return this._connection.send("ListUserIDs",e,"json",!1,void 0,"ListUserIDsResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"ws_codesignPingResponse")}Sign(e){return this._connection.send("Sign",e,"json",!1,void 0,"SignResponse")}Verify(e){return this._connection.send("Verify",e,"json",!1,void 0,"VerifyResponse")}};t(Ne,"CodesignServiceBase");let Ie=Ne;const je=class _CodesignService extends Ie{ListUserIDsEx(e){return super.ListUserIDs(e).then(e=>e.UserIDs.Item).catch(e=>[])}Sign(e){return super.Sign({SigningMethod:Ee.SigningMethodType.gpg,...e})}};t(je,"CodesignService");let ke=je;const Ge=class _DaliServiceBase extends te{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")}};t(Ge,"DaliServiceBase");let Ve=Ge;const Qe=class _DaliService extends Ve{};t(Qe,"DaliService");let Be=Qe;var Oe,Xe,He,$e,Je,qe,Ye,ze,Ze;Xe=Oe||(Oe={}),(He=Xe.DFUArrayActions||(Xe.DFUArrayActions={})).Delete="Delete",He.AddToSuperfile="Add To Superfile",He.ChangeProtection="Change Protection",He.ChangeRestriction="Change Restriction",($e=Xe.DFUChangeProtection||(Xe.DFUChangeProtection={}))[$e.NoChange=0]="NoChange",$e[$e.Protect=1]="Protect",$e[$e.Unprotect=2]="Unprotect",$e[$e.UnprotectAll=3]="UnprotectAll",(Je=Xe.DFUChangeRestriction||(Xe.DFUChangeRestriction={}))[Je.NoChange=0]="NoChange",Je[Je.Restrict=1]="Restrict",Je[Je.Unrestricted=2]="Unrestricted",(qe=Xe.DFUDefFileFormat||(Xe.DFUDefFileFormat={})).xml="xml",qe.def="def",(Ye=Xe.FileAccessRole||(Xe.FileAccessRole={})).Token="Token",Ye.Engine="Engine",Ye.External="External",(ze=Xe.SecAccessType||(Xe.SecAccessType={})).None="None",ze.Access="Access",ze.Read="Read",ze.Write="Write",ze.Full="Full",(Ze=Xe.DFUFileType||(Xe.DFUFileType={})).Flat="Flat",Ze.Index="Index",Ze.Xml="Xml",Ze.Csv="Csv",Ze.Json="Json",Ze.IndexLocal="IndexLocal",Ze.IndexPartitioned="IndexPartitioned",Ze.Unset="Unset";const Ke=class _DfuServiceBase extends te{constructor(e){super(e,"WsDfu","1.67")}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")}DFUGetMetaInquiry(e){return this._connection.send("DFUGetMetaInquiry",e,"json",!1,void 0,"DFUMetaInquiryResponse")}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")}};t(Ke,"DfuServiceBase");let et=Ke;const tt=Oe.DFUArrayActions,nt=Oe.DFUDefFileFormat,st=Oe.DFUChangeProtection,rt=Oe.DFUChangeRestriction,it=class _DFUService extends et{DFUFile(e){return this._connection.send("DFUDefFile",e,"text")}async recursiveFetchLogicalFiles(e){const t=[],n=[];return await Promise.all(e.map(e=>this.DFUInfo({Cluster:e.NodeGroup,Name:e.Name,IncludeJsonTypeInfo:!1,IncludeBinTypeInfo:!1,ForceIndexInfo:!1}).then(e=>{for(const n of e?.FileDetail?.Superfiles?.DFULogicalFile??[])t.push(n);for(const t of e?.FileDetail?.subfiles?.Item??[])n.push(t)}))),n.concat(t.length?await this.recursiveFetchLogicalFiles(t):[])}};t(it,"DFUService");let ot=it;const ct=class _DFUXRefServiceBase extends te{constructor(e){super(e,"WsDFUXRef","1.04")}DFUXRefArrayAction(e){return this._connection.send("DFUXRefArrayAction",e,"json",!1,void 0,"DFUXRefArrayActionResponse")}DFUXRefBuild(e){return this._connection.send("DFUXRefBuild",e,"json",!1,void 0,"DFUXRefBuildResponse")}DFUXRefBuildCancel(e){return this._connection.send("DFUXRefBuildCancel",e,"json",!1,void 0,"DFUXRefBuildCancelResponse")}DFUXRefCleanDirectories(e){return this._connection.send("DFUXRefCleanDirectories",e,"json",!1,void 0,"DFUXRefCleanDirectoriesResponse")}DFUXRefDirectories(e){return this._connection.send("DFUXRefDirectories",e,"json",!1,void 0,"DFUXRefDirectoriesQueryResponse")}DFUXRefFoundFiles(e){return this._connection.send("DFUXRefFoundFiles",e,"json",!1,void 0,"DFUXRefFoundFilesQueryResponse")}DFUXRefList(e){return this._connection.send("DFUXRefList",e,"json",!1,void 0,"DFUXRefListResponse")}DFUXRefLostFiles(e){return this._connection.send("DFUXRefLostFiles",e,"json",!1,void 0,"DFUXRefLostFilesQueryResponse")}DFUXRefMessages(e){return this._connection.send("DFUXRefMessages",e,"json",!1,void 0,"DFUXRefMessagesQueryResponse")}DFUXRefOrphanFiles(e){return this._connection.send("DFUXRefOrphanFiles",e,"json",!1,void 0,"DFUXRefOrphanFilesQueryResponse")}DFUXRefUnusedFiles(e){return this._connection.send("DFUXRefUnusedFiles",e,"json",!1,void 0,"DFUXRefUnusedFilesResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"WsDFUXRefPingResponse")}};t(ct,"DFUXRefServiceBase");let at=ct;const ut=class _DFUXRefService extends at{DFUXRefDirectoriesEx(e){return this._connection.send("DFUXRefDirectories",e,"json",!1,void 0,"DFUXRefDirectoriesQueryResponse")}DFUXRefListEx(e){return this._connection.send("DFUXRefList",e,"json",!1,void 0,"DFUXRefListResponse")}};t(ut,"DFUXRefService");let ht=ut;function lt(e,t){const n=typeof t;switch(n){case"boolean":case"number":case"string":return{id:e,type:n};case"object":if(t.Row instanceof Array&&(t=t.Row),t instanceof Array)return{id:e,type:"dataset",children:dt(t[0])};if(t instanceof Object){if(t.Item&&t.Item instanceof Array&&1===t.Item.length){const n=typeof t.Item[0];if("string"===n||"number"===n)return{id:e,type:"set",fieldType:n};throw new Error("Unknown field type")}return{id:e,type:"object",fields:pt(t)}}default:throw new Error("Unknown field type")}}function dt(e){e.Row&&e.Row instanceof Array&&(e=e.Row[0]);const t=[];for(const n in e)t.push(lt(n,e[n]));return t}function pt(e){const t={};for(const n in e)t[n]=lt(n,e[n]);return t}t(lt,"jsonToIField"),t(dt,"jsonToIFieldArr"),t(pt,"jsonToIFieldObj");const gt=class _EclService extends te{constructor(e){super(e,"WsEcl","0")}opts(){return this._connection.opts()}requestJson(e,t){return this._connection.send(`example/request/query/${e}/${t}/json`,{},"text").then(e=>{const t=JSON.parse(e);for(const n in t)return t[n];return{}}).then(dt)}responseJson(e,t){return this._connection.send(`example/response/query/${e}/${t}/json`,{},"text").then(e=>{const t=JSON.parse(e);for(const n in t)return t[n].Results;return{}}).then(e=>{const t={};for(const n in e)t[n]=dt(e[n]);return t})}submit(e,t,n){const s=`submit/query/${e}/${t}`;return this._connection.send(s,n,"json2").then(e=>{if(e.Results&&e.Results.Exception)throw new q(s,n,{Source:"wsEcl.submit",Exception:e.Results.Exception});return e.Results})}};t(gt,"EclService");let mt=gt;const St=class _ElkServiceBase extends te{constructor(e){super(e,"ws_elk","1")}GetConfigDetails(e){return this._connection.send("GetConfigDetails",e,"json",!1,void 0,"GetConfigDetailsResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"ws_elkPingResponse")}};t(St,"ElkServiceBase");let ft=St;const _t=class _ElkService extends ft{};t(_t,"ElkService");let Ut=_t;var yt,vt,Ct,Rt,Dt,bt,Ft,Wt,Tt,At;vt=yt||(yt={}),(Ct=vt.LogColumnType||(vt.LogColumnType={})).global="global",Ct.workunits="workunits",Ct.components="components",Ct.audience="audience",Ct.class="class",Ct.instance="instance",Ct.node="node",Ct.message="message",Ct.logid="logid",Ct.processid="processid",Ct.threadid="threadid",Ct.timestamp="timestamp",Ct.pod="pod",Ct.traceid="traceid",Ct.spanid="spanid",(Rt=vt.LogColumnValueType||(vt.LogColumnValueType={})).string="string",Rt.numeric="numeric",Rt.datetime="datetime",Rt.enum="enum",Rt.epoch="epoch",(Dt=vt.LogAccessType||(vt.LogAccessType={}))[Dt.All=0]="All",Dt[Dt.ByJobID=1]="ByJobID",Dt[Dt.ByComponent=2]="ByComponent",Dt[Dt.ByLogType=3]="ByLogType",Dt[Dt.ByTargetAudience=4]="ByTargetAudience",Dt[Dt.BySourceInstance=5]="BySourceInstance",Dt[Dt.BySourceNode=6]="BySourceNode",Dt[Dt.ByFieldName=7]="ByFieldName",Dt[Dt.ByPod=8]="ByPod",Dt[Dt.ByTraceID=9]="ByTraceID",Dt[Dt.BySpanID=10]="BySpanID",(bt=vt.LogAccessStatusCode||(vt.LogAccessStatusCode={}))[bt.Success=0]="Success",bt[bt.Warning=1]="Warning",bt[bt.Fail=2]="Fail",(Ft=vt.LogAccessFilterOperator||(vt.LogAccessFilterOperator={}))[Ft.NONE=0]="NONE",Ft[Ft.AND=1]="AND",Ft[Ft.OR=2]="OR",(Wt=vt.LogSelectColumnMode||(vt.LogSelectColumnMode={}))[Wt.MIN=0]="MIN",Wt[Wt.DEFAULT=1]="DEFAULT",Wt[Wt.ALL=2]="ALL",Wt[Wt.CUSTOM=3]="CUSTOM",(Tt=vt.SortColumType||(vt.SortColumType={}))[Tt.ByDate=0]="ByDate",Tt[Tt.ByJobID=1]="ByJobID",Tt[Tt.ByComponent=2]="ByComponent",Tt[Tt.ByLogType=3]="ByLogType",Tt[Tt.ByTargetAudience=4]="ByTargetAudience",Tt[Tt.BySourceInstance=5]="BySourceInstance",Tt[Tt.BySourceNode=6]="BySourceNode",Tt[Tt.ByFieldName=7]="ByFieldName",Tt[Tt.ByPod=8]="ByPod",Tt[Tt.ByTraceID=9]="ByTraceID",Tt[Tt.BySpanID=10]="BySpanID",(At=vt.SortDirection||(vt.SortDirection={}))[At.ASC=0]="ASC",At[At.DSC=1]="DSC";const wt=class _LogaccessServiceBase extends te{constructor(e){super(e,"ws_logaccess","1.08")}GetHealthReport(e){return this._connection.send("GetHealthReport",e,"json",!1,void 0,"GetHealthReportResponse")}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")}};t(wt,"LogaccessServiceBase");let Pt=wt;const xt=n("@hpcc-js/comms/services/wsLogaccess.ts");var Lt=/* @__PURE__ */(e=>(e.Disaster="DIS",e.Error="ERR",e.Warning="WRN",e.Information="INF",e.Progress="PRO",e.Metric="MET",e))(Lt||{}),Et=/* @__PURE__ */(e=>(e.Operator="OPR",e.User="USR",e.Programmer="PRO",e.Audit="ADT",e))(Et||{});const Mt=/* @__PURE__ */new Set(["azureloganalyticscurl","elasticstack","grafanacurl"]),Nt=new Set(Object.values(yt.LogColumnType));function It(e){switch(e){case yt.LogColumnType.workunits:case"hpcc.log.jobid":return yt.LogAccessType.ByJobID;case yt.LogColumnType.audience:case"hpcc.log.audience":return yt.LogAccessType.ByTargetAudience;case yt.LogColumnType.class:case"hpcc.log.class":return yt.LogAccessType.ByLogType;case yt.LogColumnType.components:case"kubernetes.container.name":return yt.LogAccessType.ByComponent;default:return yt.LogAccessType.ByFieldName}}t(It,"getLogCategory");const jt=["audience","class","workunits","message","processid","logid","threadid","timestamp","components","instance"];function kt(e,t){const n=[];for(const s of jt){const r=e[s];if(null==r||""===r||Array.isArray(r)&&0===r.length)continue;if(!(s in t))continue;let i=Nt.has(s)?s:t[s];const o=It(i);o===yt.LogAccessType.ByFieldName&&(i=t[s]);const c=o===yt.LogAccessType.ByComponent,a=Array.isArray(r)?r:[r];for(const e of a)n.push({LogCategory:o,SearchField:i,SearchByValue:c?e+"*":e})}return n}function Gt(e){const t={leftFilter:e[0]};let n=t;for(let s=1;s<e.length;s++)n.Operator=yt.LogAccessFilterOperator.OR,s===e.length-1?n.rightFilter=e[s]:(n.rightBinaryFilter={BinaryLogFilter:[{leftFilter:e[s]}]},n=n.rightBinaryFilter.BinaryLogFilter[0]);return t}function Vt(e){const[t,...n]=e,s={};if(1===t.length?s.leftFilter=t[0]:s.leftBinaryFilter={BinaryLogFilter:[Gt(t)]},0===n.length)return s;if(s.Operator=yt.LogAccessFilterOperator.AND,1===n.length){const[e]=n;1===e.length?s.rightFilter=e[0]:s.rightBinaryFilter={BinaryLogFilter:[Gt(e)]}}else s.rightBinaryFilter={BinaryLogFilter:[Vt(n)]};return s}function Qt(e){const t=/* @__PURE__ */new Map;for(const o of e){const e=t.get(o.SearchField);e?e.push(o):t.set(o.SearchField,[o])}const n=[...t.values()];if(0===n.length)return{leftFilter:{LogCategory:yt.LogAccessType.All}};const[s,...r]=n,i={};if(1===s.length?i.leftFilter=s[0]:i.leftBinaryFilter={BinaryLogFilter:[Gt(s)]},0===r.length)return i;if(i.Operator=yt.LogAccessFilterOperator.AND,1===r.length){const[e]=r;1===e.length?i.rightFilter=e[0]:i.rightBinaryFilter={BinaryLogFilter:[Gt(e)]}}else i.rightBinaryFilter={BinaryLogFilter:[Vt(r)]};return i}t(kt,"buildFilters"),t(Gt,"buildOrGroup"),t(Vt,"buildAndChain"),t(Qt,"buildFilterTree");const Bt=class _LogaccessService extends Pt{_logAccessInfo;GetLogAccessInfo(e={}){return this._logAccessInfo||(this._logAccessInfo=super.GetLogAccessInfo(e)),this._logAccessInfo}GetLogs(e){return super.GetLogs(e)}convertLogLine(e,t){const n={},s=t?.fields?Object.assign({},...t.fields):null;for(const r in e)n[r]=s?s[e[r]]??"":"";return n}async GetLogsEx(e){const t=await this.GetLogAccessInfo(),n={};t.Columns.Column.forEach(e=>n[e.LogType]=e.Name);const s=kt(e,n),r={StartDate:e.StartDate instanceof Date?e.StartDate.toISOString():/* @__PURE__ */new Date(0).toISOString()};e.EndDate instanceof Date&&(r.EndDate=e.EndDate.toISOString());const i={Filter:Qt(s),Range:r,LogLineStartFrom:e.LogLineStartFrom??0,LogLineLimit:e.LogLineLimit??100,SelectColumnMode:yt.LogSelectColumnMode.DEFAULT,Format:"JSON",SortBy:{SortCondition:[{BySortType:yt.SortColumType.ByDate,ColumnName:"",Direction:0}]}};return this.GetLogs(i).then(e=>{try{const s=JSON.parse(e.LogLines);return{lines:Mt.has(t.RemoteLogManagerType)?s.lines?.map(e=>this.convertLogLine(n,e))??[]:(xt.warning(`Unknown RemoteLogManagerType: ${t.RemoteLogManagerType}`),[]),total:e.TotalLogLinesAvailable??1e4}}catch(s){xt.error(s.message??s)}return{lines:[],total:0}})}};t(Bt,"LogaccessService");let Ot=Bt;function Xt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Ht(e){return 1===e.length&&(e=$t(e)),{left:/* @__PURE__ */t(function(t,n,s,r){for(null==s&&(s=0),null==r&&(r=t.length);s<r;){var i=s+r>>>1;e(t[i],n)<0?s=i+1:r=i}return s},"left"),right:/* @__PURE__ */t(function(t,n,s,r){for(null==s&&(s=0),null==r&&(r=t.length);s<r;){var i=s+r>>>1;e(t[i],n)>0?r=i:s=i+1}return s},"right")}}function $t(e){return function(t,n){return Xt(e(t),n)}}function Jt(e){return null===e?NaN:+e}function qt(e,t){var n,s,r=e.length,i=-1;if(null==t){for(;++i<r;)if(null!=(n=e[i])&&n>=n)for(s=n;++i<r;)null!=(n=e[i])&&n>s&&(s=n)}else for(;++i<r;)if(null!=(n=t(e[i],i,e))&&n>=n)for(s=n;++i<r;)null!=(n=t(e[i],i,e))&&n>s&&(s=n);return s}function Yt(e,t){var n,s=e.length,r=s,i=-1,o=0;if(null==t)for(;++i<s;)isNaN(n=Jt(e[i]))?--r:o+=n;else for(;++i<s;)isNaN(n=Jt(t(e[i],i,e)))?--r:o+=n;if(r)return o/r}var zt,Zt,Kt,en;t(Xt,"ascending"),t(Ht,"bisector"),t($t,"ascendingComparator"),Ht(Xt),t(Jt,"number"),t(qt,"d3Max"),t(Yt,"d3Mean"),Zt=zt||(zt={}),(Kt=Zt.ThresholdType||(Zt.ThresholdType={}))[Kt.THRESHOLD_PERCENTAGE=0]="THRESHOLD_PERCENTAGE",Kt[Kt.THRESHOLD_MB=1]="THRESHOLD_MB",(en=Zt.TpMachineType||(Zt.TpMachineType={})).ALLNODES="ALLNODES",en.THORMACHINES="THORMACHINES",en.HOLEMACHINES="HOLEMACHINES",en.ROXIEMACHINES="ROXIEMACHINES",en.MACHINES="MACHINES",en.AVAILABLEMACHINES="AVAILABLEMACHINES",en.DROPZONE="DROPZONE",en.STANDBYNNODE="STANDBYNNODE",en.THORSPARENODES="THORSPARENODES",en.HOLESTANDBYNODES="HOLESTANDBYNODES";const tn=class _MachineServiceBase extends te{constructor(e){super(e,"ws_machine","1.19")}GetComponentStatus(e){return this._connection.send("GetComponentStatus",e,"json",!1,void 0,"GetComponentStatusResponse")}GetComponentUsage(e){return this._connection.send("GetComponentUsage",e,"json",!1,void 0,"GetComponentUsageResponse")}GetMachineInfo(e){return this._connection.send("GetMachineInfo",e,"json",!1,void 0,"GetMachineInfoResponse")}GetMachineInfoEx(e){return this._connection.send("GetMachineInfoEx",e,"json",!1,void 0,"GetMachineInfoResponseEx")}GetMetrics(e){return this._connection.send("GetMetrics",e,"json",!1,void 0,"MetricsResponse")}GetNodeGroupUsage(e){return this._connection.send("GetNodeGroupUsage",e,"json",!1,void 0,"GetNodeGroupUsageResponse")}GetTargetClusterInfo(e){return this._connection.send("GetTargetClusterInfo",e,"json",!1,void 0,"GetTargetClusterInfoResponse")}GetTargetClusterUsage(e){return this._connection.send("GetTargetClusterUsage",e,"json",!1,void 0,"GetTargetClusterUsageResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"ws_machinePingResponse")}UpdateComponentStatus(e){return this._connection.send("UpdateComponentStatus",e,"json",!1,void 0,"UpdateComponentStatusResponse")}};t(tn,"MachineServiceBase");let nn=tn;const sn=class _MachineService extends nn{GetTargetClusterUsageEx(e,t=!1){return this._connection.send("GetTargetClusterUsage",{TargetClusters:e?{Item:e}:{},BypassCachedResult:t}).then(e=>c("TargetClusterUsages.TargetClusterUsage",e)?e.TargetClusterUsages.TargetClusterUsage:[]).then(e=>e.filter(e=>!!e.ComponentUsages).map(e=>{const t=e.ComponentUsages.ComponentUsage.map(e=>{const t=(e.MachineUsages&&e.MachineUsages.MachineUsage?e.MachineUsages.MachineUsage:[]).map(e=>{const t=e.DiskUsages&&e.DiskUsages.DiskUsage?e.DiskUsages.DiskUsage.map(e=>({...e,InUse:1024*e.InUse,Total:1024*(e.InUse+e.Available),PercentUsed:100-e.PercentAvailable})):[];return{Name:e.Name,NetAddress:e.NetAddress,Description:e.Description,DiskUsages:t,mean:Yt(t.filter(e=>!isNaN(e.PercentUsed)),e=>e.PercentUsed),max:qt(t.filter(e=>!isNaN(e.PercentUsed)),e=>e.PercentUsed)}});return{Type:e.Type,Name:e.Name,Description:e.Description,MachineUsages:t,MachineUsagesDescription:t.reduce((e,t)=>e+(t.Description||""),""),mean:Yt(t.filter(e=>!isNaN(e.mean)),e=>e.mean),max:qt(t.filter(e=>!isNaN(e.max)),e=>e.max)}});return{Name:e.Name,Description:e.Description,ComponentUsages:t,ComponentUsagesDescription:t.reduce((e,t)=>e+(t.MachineUsagesDescription||""),""),mean:Yt(t.filter(e=>!isNaN(e.mean)),e=>e.mean),max:qt(t.filter(e=>!isNaN(e.max)),e=>e.max)}}))}};t(sn,"MachineService");let rn=sn;const on=class _PackageProcessServiceBase extends te{constructor(e){super(e,"WsPackageProcess","1.07")}ActivatePackage(e){return this._connection.send("ActivatePackage",e,"json",!1,void 0,"ActivatePackageResponse")}AddPackage(e){return this._connection.send("AddPackage",e,"json",!1,void 0,"AddPackageResponse")}AddPartToPackageMap(e){return this._connection.send("AddPartToPackageMap",e,"json",!1,void 0,"AddPartToPackageMapResponse")}CopyPackageMap(e){return this._connection.send("CopyPackageMap",e,"json",!1,void 0,"CopyPackageMapResponse")}DeActivatePackage(e){return this._connection.send("DeActivatePackage",e,"json",!1,void 0,"DeActivatePackageResponse")}DeletePackage(e){return this._connection.send("DeletePackage",e,"json",!1,void 0,"DeletePackageResponse")}Echo(e){return this._connection.send("Echo",e,"json",!1,void 0,"EchoResponse")}GetPackage(e){return this._connection.send("GetPackage",e,"json",!1,void 0,"GetPackageResponse")}GetPackageMapById(e){return this._connection.send("GetPackageMapById",e,"json",!1,void 0,"GetPackageMapByIdResponse")}GetPackageMapSelectOptions(e){return this._connection.send("GetPackageMapSelectOptions",e,"json",!1,void 0,"GetPackageMapSelectOptionsResponse")}GetPartFromPackageMap(e){return this._connection.send("GetPartFromPackageMap",e,"json",!1,void 0,"GetPartFromPackageMapResponse")}GetQueryFileMapping(e){return this._connection.send("GetQueryFileMapping",e,"json",!1,void 0,"GetQueryFileMappingResponse")}ListPackage(e){return this._connection.send("ListPackage",e,"json",!1,void 0,"ListPackageResponse")}ListPackages(e){return this._connection.send("ListPackages",e,"json",!1,void 0,"ListPackagesResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"WsPackageProcessPingResponse")}RemovePartFromPackageMap(e){return this._connection.send("RemovePartFromPackageMap",e,"json",!1,void 0,"RemovePartFromPackageMapResponse")}ValidatePackage(e){return this._connection.send("ValidatePackage",e,"json",!1,void 0,"ValidatePackageResponse")}};t(on,"PackageProcessServiceBase");let cn=on;const an=class _PackageProcessService extends cn{};t(an,"PackageProcessService");let un=an;const hn=class _ResourcesServiceBase extends te{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)}};t(hn,"ResourcesServiceBase");let ln=hn;const dn=class _ResourcesService extends ln{};t(dn,"ResourcesService");let pn=dn;var gn,mn,Sn;mn=gn||(gn={}),(Sn=mn.WUTypes||(mn.WUTypes={})).ECL="ECL",Sn.DFU="DFU";const fn=class _SashaServiceBase extends te{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")}};t(fn,"SashaServiceBase");let _n=fn;const Un=class _SashaService extends _n{};t(Un,"SashaService");let yn=Un;var vn=/* @__PURE__ */new Date,Cn=/* @__PURE__ */new Date;function Rn(e,n,s,r){function i(t){return e(t=0===arguments.length?/* @__PURE__ */new Date:/* @__PURE__ */new Date(+t)),t}return t(i,"interval"),i.floor=function(t){return e(t=/* @__PURE__ */new Date(+t)),t},i.ceil=function(t){return e(t=new Date(t-1)),n(t,1),e(t),t},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,t){return n(e=/* @__PURE__ */new Date(+e),null==t?1:Math.floor(t)),e},i.range=function(t,s,r){var o,c=[];if(t=i.ceil(t),r=null==r?1:Math.floor(r),!(t<s&&r>0))return c;do{c.push(o=/* @__PURE__ */new Date(+t)),n(t,r),e(t)}while(o<t&&t<s);return c},i.filter=function(t){return Rn(function(n){if(n>=n)for(;e(n),!t(n);)n.setTime(n-1)},function(e,s){if(e>=e)if(s<0)for(;++s<=0;)for(;n(e,-1),!t(e););else for(;--s>=0;)for(;n(e,1),!t(e););})},s&&(i.count=function(t,n){return vn.setTime(+t),Cn.setTime(+n),e(vn),e(Cn),Math.floor(s(vn,Cn))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e===0}:function(t){return i.count(0,t)%e===0}):i:null}),i}t(Rn,"newInterval");var Dn=864e5,bn=6048e5,Fn=Rn(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/Dn},function(e){return e.getDate()-1});function Wn(e){return Rn(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+7*t)},function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/bn})}Fn.range,t(Wn,"weekday");var Tn=Wn(0),An=Wn(1),wn=Wn(2),Pn=Wn(3),xn=Wn(4),Ln=Wn(5),En=Wn(6);Tn.range,An.range,wn.range,Pn.range,xn.range,Ln.range,En.range;var Mn=Rn(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});Mn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Rn(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)}):null},Mn.range;var Nn=Rn(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/Dn},function(e){return e.getUTCDate()-1});function In(e){return Rn(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+7*t)},function(e,t){return(t-e)/bn})}Nn.range,t(In,"utcWeekday");var jn=In(0),kn=In(1),Gn=In(2),Vn=In(3),Qn=In(4),Bn=In(5),On=In(6);jn.range,kn.range,Gn.range,Vn.range,Qn.range,Bn.range,On.range;var Xn=Rn(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});function Hn(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function $n(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Jn(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function qn(e){var n=e.dateTime,s=e.date,r=e.time,i=e.periods,o=e.days,c=e.shortDays,a=e.months,u=e.shortMonths,h=hs(i),l=ls(i),d=hs(o),p=ls(o),g=hs(c),m=ls(c),S=hs(a),f=ls(a),_=hs(u),U=ls(u),y={a:E,A:M,b:N,B:I,c:null,d:xs,e:xs,f:Is,g:Js,G:Ys,H:Ls,I:Es,j:Ms,L:Ns,m:js,M:ks,p:j,q:k,Q:Ur,s:yr,S:Gs,u:Vs,U:Qs,V:Os,w:Xs,W:Hs,x:null,X:null,y:$s,Y:qs,Z:zs,"%":_r},v={a:G,A:V,b:Q,B:B,c:null,d:Zs,e:Zs,f:sr,g:gr,G:Sr,H:Ks,I:er,j:tr,L:nr,m:rr,M:ir,p:O,q:X,Q:Ur,s:yr,S:or,u:cr,U:ar,V:hr,w:lr,W:dr,x:null,X:null,y:pr,Y:mr,Z:fr,"%":_r},C={a:W,A:T,b:A,B:w,c:P,d:Cs,e:Cs,f:Ts,g:_s,G:fs,H:Ds,I:Ds,j:Rs,L:Ws,m:vs,M:bs,p:F,q:ys,Q:ws,s:Ps,S:Fs,u:ps,U:gs,V:ms,w:ds,W:Ss,x:x,X:L,y:_s,Y:fs,Z:Us,"%":As};function R(e,t){return function(n){var s,r,i,o=[],c=-1,a=0,u=e.length;for(n instanceof Date||(n=/* @__PURE__ */new Date(+n));++c<u;)37===e.charCodeAt(c)&&(o.push(e.slice(a,c)),null!=(r=rs[s=e.charAt(++c)])?s=e.charAt(++c):r="e"===s?" ":"0",(i=t[s])&&(s=i(n,r)),o.push(s),a=c+1);return o.push(e.slice(a,c)),o.join("")}}function D(e,t){return function(n){var s,r,i=Jn(1900,void 0,1);if(b(i,e,n+="",0)!=n.length)return null;if("Q"in i)return new Date(i.Q);if("s"in i)return new Date(1e3*i.s+("L"in i?i.L:0));if(t&&!("Z"in i)&&(i.Z=0),"p"in i&&(i.H=i.H%12+12*i.p),void 0===i.m&&(i.m="q"in i?i.q:0),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(r=(s=$n(Jn(i.y,0,1))).getUTCDay(),s=r>4||0===r?kn.ceil(s):kn(s),s=Nn.offset(s,7*(i.V-1)),i.y=s.getUTCFullYear(),i.m=s.getUTCMonth(),i.d=s.getUTCDate()+(i.w+6)%7):(r=(s=Hn(Jn(i.y,0,1))).getDay(),s=r>4||0===r?An.ceil(s):An(s),s=Fn.offset(s,7*(i.V-1)),i.y=s.getFullYear(),i.m=s.getMonth(),i.d=s.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),r="Z"in i?$n(Jn(i.y,0,1)).getUTCDay():Hn(Jn(i.y,0,1)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(r+5)%7:i.w+7*i.U-(r+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,$n(i)):Hn(i)}}function b(e,t,n,s){for(var r,i,o=0,c=t.length,a=n.length;o<c;){if(s>=a)return-1;if(37===(r=t.charCodeAt(o++))){if(r=t.charAt(o++),!(i=C[r in rs?t.charAt(o++):r])||(s=i(e,n,s))<0)return-1}else if(r!=n.charCodeAt(s++))return-1}return s}function F(e,t,n){var s=h.exec(t.slice(n));return s?(e.p=l[s[0].toLowerCase()],n+s[0].length):-1}function W(e,t,n){var s=g.exec(t.slice(n));return s?(e.w=m[s[0].toLowerCase()],n+s[0].length):-1}function T(e,t,n){var s=d.exec(t.slice(n));return s?(e.w=p[s[0].toLowerCase()],n+s[0].length):-1}function A(e,t,n){var s=_.exec(t.slice(n));return s?(e.m=U[s[0].toLowerCase()],n+s[0].length):-1}function w(e,t,n){var s=S.exec(t.slice(n));return s?(e.m=f[s[0].toLowerCase()],n+s[0].length):-1}function P(e,t,s){return b(e,n,t,s)}function x(e,t,n){return b(e,s,t,n)}function L(e,t,n){return b(e,r,t,n)}function E(e){return c[e.getDay()]}function M(e){return o[e.getDay()]}function N(e){return u[e.getMonth()]}function I(e){return a[e.getMonth()]}function j(e){return i[+(e.getHours()>=12)]}function k(e){return 1+~~(e.getMonth()/3)}function G(e){return c[e.getUTCDay()]}function V(e){return o[e.getUTCDay()]}function Q(e){return u[e.getUTCMonth()]}function B(e){return a[e.getUTCMonth()]}function O(e){return i[+(e.getUTCHours()>=12)]}function X(e){return 1+~~(e.getUTCMonth()/3)}return y.x=R(s,y),y.X=R(r,y),y.c=R(n,y),v.x=R(s,v),v.X=R(r,v),v.c=R(n,v),t(R,"newFormat"),t(D,"newParse"),t(b,"parseSpecifier"),t(F,"parsePeriod"),t(W,"parseShortWeekday"),t(T,"parseWeekday"),t(A,"parseShortMonth"),t(w,"parseMonth"),t(P,"parseLocaleDateTime"),t(x,"parseLocaleDate"),t(L,"parseLocaleTime"),t(E,"formatShortWeekday"),t(M,"formatWeekday"),t(N,"formatShortMonth"),t(I,"formatMonth"),t(j,"formatPeriod"),t(k,"formatQuarter"),t(G,"formatUTCShortWeekday"),t(V,"formatUTCWeekday"),t(Q,"formatUTCShortMonth"),t(B,"formatUTCMonth"),t(O,"formatUTCPeriod"),t(X,"formatUTCQuarter"),{format:/* @__PURE__ */t(function(e){var t=R(e+="",y);return t.toString=function(){return e},t},"format"),parse:/* @__PURE__ */t(function(e){var t=D(e+="",!1);return t.toString=function(){return e},t},"parse"),utcFormat:/* @__PURE__ */t(function(e){var t=R(e+="",v);return t.toString=function(){return e},t},"utcFormat"),utcParse:/* @__PURE__ */t(function(e){var t=D(e+="",!0);return t.toString=function(){return e},t},"utcParse")}}Xn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Rn(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null},Xn.range,t(Hn,"localDate"),t($n,"utcDate"),t(Jn,"newDate"),t(qn,"formatLocale$1");var Yn,zn,Zn,Kn,es,ts,ns,ss,rs={"-":"",_:" ",0:"0"},is=/^\s*\d+/,os=/^%/,cs=/[\\^$*+?|[\]().{}]/g;function as(e,t,n){var s=e<0?"-":"",r=(s?-e:e)+"",i=r.length;return s+(i<n?new Array(n-i+1).join(t)+r:r)}function us(e){return e.replace(cs,"\\$&")}function hs(e){return new RegExp("^(?:"+e.map(us).join("|")+")","i")}function ls(e){for(var t={},n=-1,s=e.length;++n<s;)t[e[n].toLowerCase()]=n;return t}function ds(e,t,n){var s=is.exec(t.slice(n,n+1));return s?(e.w=+s[0],n+s[0].length):-1}function ps(e,t,n){var s=is.exec(t.slice(n,n+1));return s?(e.u=+s[0],n+s[0].length):-1}function gs(e,t,n){var s=is.exec(t.slice(n,n+2));return s?(e.U=+s[0],n+s[0].length):-1}function ms(e,t,n){var s=is.exec(t.slice(n,n+2));return s?(e.V=+s[0],n+s[0].length):-1}function Ss(e,t,n){var s=is.exec(t.slice(n,n+2));return s?(e.W=+s[0],n+s[0].length):-1}function fs(e,t,n){var s=is.exec(t.slice(n,n+4));return s?(e.y=+s[0],n+s[0].length):-1}function _s(e,t,n){var s=is.exec(t.slice(n,n+2));return s?(e.y=+s[0]+(+s[0]>68?1900:2e3),n+s[0].length):-1}function Us(e,t,n){var s=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return s?(e.Z=s[1]?0:-(s[2]+(s[3]||"00")),n+s[0].length):-1}function ys(e,t,n){var s=is.exec(t.slice(n,n+1));return s?(e.q=3*s[0]-3,n+s[0].length):-1}function vs(e,t,n){var s=is.exec(t.slice(n,n+2));return s?(e.m=s[0]-1,n+s[0].length):-1}function Cs(e,t,n){var s=is.exec(t.slice(n,n+2));return s?(e.d=+s[0],n+s[0].length):-1}function Rs(e,t,n){var s=is.exec(t.slice(n,n+3));return s?(e.m=0,e.d=+s[0],n+s[0].length):-1}function Ds(e,t,n){var s=is.exec(t.slice(n,n+2));return s?(e.H=+s[0],n+s[0].length):-1}function bs(e,t,n){var s=is.exec(t.slice(n,n+2));return s?(e.M=+s[0],n+s[0].length):-1}function Fs(e,t,n){var s=is.exec(t.slice(n,n+2));return s?(e.S=+s[0],n+s[0].length):-1}function Ws(e,t,n){var s=is.exec(t.slice(n,n+3));return s?(e.L=+s[0],n+s[0].length):-1}function Ts(e,t,n){var s=is.exec(t.slice(n,n+6));return s?(e.L=Math.floor(s[0]/1e3),n+s[0].length):-1}function As(e,t,n){var s=os.exec(t.slice(n,n+1));return s?n+s[0].length:-1}function ws(e,t,n){var s=is.exec(t.slice(n));return s?(e.Q=+s[0],n+s[0].length):-1}function Ps(e,t,n){var s=is.exec(t.slice(n));return s?(e.s=+s[0],n+s[0].length):-1}function xs(e,t){return as(e.getDate(),t,2)}function Ls(e,t){return as(e.getHours(),t,2)}function Es(e,t){return as(e.getHours()%12||12,t,2)}function Ms(e,t){return as(1+Fn.count(Mn(e),e),t,3)}function Ns(e,t){return as(e.getMilliseconds(),t,3)}function Is(e,t){return Ns(e,t)+"000"}function js(e,t){return as(e.getMonth()+1,t,2)}function ks(e,t){return as(e.getMinutes(),t,2)}function Gs(e,t){return as(e.getSeconds(),t,2)}function Vs(e){var t=e.getDay();return 0===t?7:t}function Qs(e,t){return as(Tn.count(Mn(e)-1,e),t,2)}function Bs(e){var t=e.getDay();return t>=4||0===t?xn(e):xn.ceil(e)}function Os(e,t){return e=Bs(e),as(xn.count(Mn(e),e)+(4===Mn(e).getDay()),t,2)}function Xs(e){return e.getDay()}function Hs(e,t){return as(An.count(Mn(e)-1,e),t,2)}function $s(e,t){return as(e.getFullYear()%100,t,2)}function Js(e,t){return as((e=Bs(e)).getFullYear()%100,t,2)}function qs(e,t){return as(e.getFullYear()%1e4,t,4)}function Ys(e,t){var n=e.getDay();return as((e=n>=4||0===n?xn(e):xn.ceil(e)).getFullYear()%1e4,t,4)}function zs(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+as(t/60|0,"0",2)+as(t%60,"0",2)}function Zs(e,t){return as(e.getUTCDate(),t,2)}function Ks(e,t){return as(e.getUTCHours(),t,2)}function er(e,t){return as(e.getUTCHours()%12||12,t,2)}function tr(e,t){return as(1+Nn.count(Xn(e),e),t,3)}function nr(e,t){return as(e.getUTCMilliseconds(),t,3)}function sr(e,t){return nr(e,t)+"000"}function rr(e,t){return as(e.getUTCMonth()+1,t,2)}function ir(e,t){return as(e.getUTCMinutes(),t,2)}function or(e,t){return as(e.getUTCSeconds(),t,2)}function cr(e){var t=e.getUTCDay();return 0===t?7:t}function ar(e,t){return as(jn.count(Xn(e)-1,e),t,2)}function ur(e){var t=e.getUTCDay();return t>=4||0===t?Qn(e):Qn.ceil(e)}function hr(e,t){return e=ur(e),as(Qn.count(Xn(e),e)+(4===Xn(e).getUTCDay()),t,2)}function lr(e){return e.getUTCDay()}function dr(e,t){return as(kn.count(Xn(e)-1,e),t,2)}function pr(e,t){return as(e.getUTCFullYear()%100,t,2)}function gr(e,t){return as((e=ur(e)).getUTCFullYear()%100,t,2)}function mr(e,t){return as(e.getUTCFullYear()%1e4,t,4)}function Sr(e,t){var n=e.getUTCDay();return as((e=n>=4||0===n?Qn(e):Qn.ceil(e)).getUTCFullYear()%1e4,t,4)}function fr(){return"+0000"}function _r(){return"%"}function Ur(e){return+e}function yr(e){return Math.floor(+e/1e3)}function vr(e){return(Yn=qn(e)).format,zn=Yn.parse,Zn=Yn.utcFormat,Kn=Yn.utcParse,Yn}t(as,"pad"),t(us,"requote"),t(hs,"formatRe"),t(ls,"formatLookup"),t(ds,"parseWeekdayNumberSunday"),t(ps,"parseWeekdayNumberMonday"),t(gs,"parseWeekNumberSunday"),t(ms,"parseWeekNumberISO"),t(Ss,"parseWeekNumberMonday"),t(fs,"parseFullYear"),t(_s,"parseYear"),t(Us,"parseZone"),t(ys,"parseQuarter"),t(vs,"parseMonthNumber"),t(Cs,"parseDayOfMonth"),t(Rs,"parseDayOfYear"),t(Ds,"parseHour24"),t(bs,"parseMinutes"),t(Fs,"parseSeconds"),t(Ws,"parseMilliseconds"),t(Ts,"parseMicroseconds"),t(As,"parseLiteralPercent"),t(ws,"parseUnixTimestamp"),t(Ps,"parseUnixTimestampSeconds"),t(xs,"formatDayOfMonth"),t(Ls,"formatHour24"),t(Es,"formatHour12"),t(Ms,"formatDayOfYear"),t(Ns,"formatMilliseconds"),t(Is,"formatMicroseconds"),t(js,"formatMonthNumber"),t(ks,"formatMinutes"),t(Gs,"formatSeconds"),t(Vs,"formatWeekdayNumberMonday"),t(Qs,"formatWeekNumberSunday"),t(Bs,"dISO"),t(Os,"formatWeekNumberISO"),t(Xs,"formatWeekdayNumberSunday"),t(Hs,"formatWeekNumberMonday"),t($s,"formatYear"),t(Js,"formatYearISO"),t(qs,"formatFullYear"),t(Ys,"formatFullYearISO"),t(zs,"formatZone"),t(Zs,"formatUTCDayOfMonth"),t(Ks,"formatUTCHour24"),t(er,"formatUTCHour12"),t(tr,"formatUTCDayOfYear"),t(nr,"formatUTCMilliseconds"),t(sr,"formatUTCMicroseconds"),t(rr,"formatUTCMonthNumber"),t(ir,"formatUTCMinutes"),t(or,"formatUTCSeconds"),t(cr,"formatUTCWeekdayNumberMonday"),t(ar,"formatUTCWeekNumberSunday"),t(ur,"UTCdISO"),t(hr,"formatUTCWeekNumberISO"),t(lr,"formatUTCWeekdayNumberSunday"),t(dr,"formatUTCWeekNumberMonday"),t(pr,"formatUTCYear"),t(gr,"formatUTCYearISO"),t(mr,"formatUTCFullYear"),t(Sr,"formatUTCFullYearISO"),t(fr,"formatUTCZone"),t(_r,"formatLiteralPercent"),t(Ur,"formatUnixTimestamp"),t(yr,"formatUnixTimestampSeconds"),vr({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"]}),t(vr,"defaultLocale$1"),ts=es||(es={}),(ns=ts.LockModes||(ts.LockModes={})).ALL="ALL",ns.READ="READ",ns.WRITE="WRITE",ns.HOLD="HOLD",ns.SUB="SUB",(ss=ts.RoxieControlCmdType||(ts.RoxieControlCmdType={})).Attach="Attach",ss.Detach="Detach",ss.State="State",ss.Reload="Reload",ss.ReloadRetry="ReloadRetry",ss.MemLock="MemLock",ss.MemUnlock="MemUnlock",ss.GetMemLocked="GetMemLocked";const Cr=class _SMCServiceBase extends te{constructor(e){super(e,"WsSMC","1.29")}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")}GetGlobalMetrics(e){return this._connection.send("GetGlobalMetrics",e,"json",!1,void 0,"GetGlobalMetricsResponse")}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")}RecordGlobalMetrics(e){return this._connection.send("RecordGlobalMetrics",e,"json",!1,void 0,"RecordGlobalMetricsResponse")}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")}};t(Cr,"SMCServiceBase");let Rr=Cr;const Dr=zn("%Y%m%d%H");function br(e){return"number"==typeof e||"string"==typeof e&&""!==e.trim()&&!isNaN(+e)}t(br,"isNumeric");const Fr=class _SMCService extends Rr{connectionOptions(){return this._connection.opts()}Activity(e){return super.Activity(e).then(e=>({Running:{ActiveWorkunit:[]},...e}))}parseGlobalMetric(e,t){return e.startsWith("Cost")?+t/1e6:e.startsWith("Date")?Dr(t):e.startsWith("Num")?+t:e.startsWith("Time")?+t/1e9:e.startsWith("When")?new Date(+t/1e3).toISOString():br(t)?+t:t}GetNormalisedGlobalMetrics(e){return super.GetGlobalMetrics(e).then(e=>{const t=[];for(const n of e?.GlobalMetrics?.GlobalMetric||[]){const e={Category:n.Category,Start:this.parseGlobalMetric("Date",n.DateTimeRange?.Start),End:this.parseGlobalMetric("Date",n.DateTimeRange?.End),dimensions:{},stats:{}};for(const t of n.Dimensions?.Dimension||[])e.dimensions[t.Name]=t.Value;for(const t of n.Stats?.Stat||[])e.stats[t.Name]=this.parseGlobalMetric(t.Name,t.Value);t.push(e)}return t})}};t(Fr,"SMCService");let Wr=Fr;const Tr=class _storeServiceBase extends te{constructor(e){super(e,"wsstore","1.02")}CreateStore(e){return this._connection.send("CreateStore",e,"json",!1,void 0,"CreateStoreResponse")}Delete(e){return this._connection.send("Delete",e,"json",!1,void 0,"DeleteResponse")}DeleteNamespace(e){return this._connection.send("DeleteNamespace",e,"json",!1,void 0,"DeleteNamespaceResponse")}Fetch(e){return this._connection.send("Fetch",e,"json",!1,void 0,"FetchResponse")}FetchAll(e){return this._connection.send("FetchAll",e,"json",!1,void 0,"FetchAllResponse")}FetchKeyMetadata(e){return this._connection.send("FetchKeyMetadata",e,"json",!1,void 0,"FetchKeyMDResponse")}ListKeys(e){return this._connection.send("ListKeys",e,"json",!1,void 0,"ListKeysResponse")}ListNamespaces(e){return this._connection.send("ListNamespaces",e,"json",!1,void 0,"ListNamespacesResponse")}ListStores(e){return this._connection.send("ListStores",e,"json",!1,void 0,"ListStoresResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"wsstorePingResponse")}Set(e){return this._connection.send("Set",e,"json",!1,void 0,"SetResponse")}};t(Tr,"storeServiceBase");let Ar=Tr;const wr=class _StoreService extends Ar{Delete(e){return super.Delete(e).catch(e=>{if(e.isESPExceptions&&e.Exception.some(e=>-1===e.Code))return{Exceptions:void 0,Success:!0};throw e})}Fetch(e){return super.Fetch(e).catch(e=>{if(e.isESPExceptions&&e.Exception.some(e=>-1===e.Code))return{Exceptions:void 0,Value:void 0};throw e})}};t(wr,"StoreService");let Pr=wr;var xr,Lr,Er,Mr;Lr=xr||(xr={}),(Er=Lr.TpConfigResponseFormat||(Lr.TpConfigResponseFormat={})).XML="XML",Er.YAML="YAML",(Mr=Lr.RoxieQueueFilter||(Lr.RoxieQueueFilter={})).All="All",Mr.QueriesOnly="QueriesOnly",Mr.WorkunitsOnly="WorkunitsOnly",(e=>{e.ALLNODES="ALLNODES",e.THORMACHINES="THORMACHINES",e.HOLEMACHINES="HOLEMACHINES",e.ROXIEMACHINES="ROXIEMACHINES",e.MACHINES="MACHINES",e.AVAILABLEMACHINES="AVAILABLEMACHINES",e.DROPZONE="DROPZONE",e.STANDBYNNODE="STANDBYNNODE",e.THORSPARENODES="THORSPARENODES",e.HOLESTANDBYNODES="HOLESTANDBYNODES"})(Lr.TpMachineType||(Lr.TpMachineType={}));const Nr=class _TopologyServiceBase extends te{constructor(e){super(e,"WsTopology","1.33")}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")}TpComponentConfiguration(e){return this._connection.send("TpComponentConfiguration",e,"json",!1,void 0,"TpComponentConfigurationResponse")}TpConfiguredComponents(e){return this._connection.send("TpConfiguredComponents",e,"json",!1,void 0,"TpConfiguredComponentsResponse")}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")}};t(Nr,"TopologyServiceBase");let Ir=Nr;const jr=class _TopologyService extends Ir{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(e=>{if(e.default)return e.default;let t,n;return e.TpLogicalClusters.TpLogicalCluster.some((e,s)=>(0===s&&(n=e),"hthor"===e.Type&&(t=e,!0))),t||n})}};t(jr,"TopologyService");let kr=jr;var Gr,Vr,Qr,Br,Or,Xr,Hr,$r,Jr,qr,Yr,zr,Zr,Kr,ei;Vr=Gr||(Gr={}),(Qr=Vr.ECLWUActions||(Vr.ECLWUActions={})).Abort="Abort",Qr.Delete="Delete",Qr.Deschedule="Deschedule",Qr.Reschedule="Reschedule",Qr.Pause="Pause",Qr.PauseNow="PauseNow",Qr.Protect="Protect",Qr.Unprotect="Unprotect",Qr.Restore="Restore",Qr.Resume="Resume",Qr.SetToFailed="SetToFailed",Qr.Archive="Archive",(e=>{e[e.MIN=0]="MIN",e[e.DEFAULT=1]="DEFAULT",e[e.ALL=2]="ALL",e[e.CUSTOM=3]="CUSTOM"})(Vr.LogSelectColumnMode||(Vr.LogSelectColumnMode={})),(e=>{e[e.ASC=0]="ASC",e[e.DSC=1]="DSC"})(Vr.SortDirection||(Vr.SortDirection={})),(Br=Vr.LogEventClass||(Vr.LogEventClass={})).ALL="ALL",Br.DIS="DIS",Br.ERR="ERR",Br.WRN="WRN",Br.INF="INF",Br.PRO="PRO",Br.MET="MET",Br.EVT="EVT",(Or=Vr.WUDetailsAttrValueType||(Vr.WUDetailsAttrValueType={})).Single="Single",Or.List="List",Or.Multi="Multi",(Xr=Vr.EclDefinitionActions||(Vr.EclDefinitionActions={})).SyntaxCheck="SyntaxCheck",Xr.Deploy="Deploy",Xr.Publish="Publish",(Hr=Vr.ErrorMessageFormat||(Vr.ErrorMessageFormat={})).xml="xml",Hr.json="json",Hr.text="text",($r=Vr.LogAccessLogFormat||(Vr.LogAccessLogFormat={}))[$r.XML=0]="XML",$r[$r.JSON=1]="JSON",$r[$r.CSV=2]="CSV",(Jr=Vr.WUExceptionSeverity||(Vr.WUExceptionSeverity={})).info="info",Jr.warning="warning",Jr.error="error",Jr.alert="alert",(qr=Vr.WUQueryFilterSuspendedType||(Vr.WUQueryFilterSuspendedType={})).Allqueries="All queries",qr.Notsuspended="Not suspended",qr.Suspended="Suspended",qr.Suspendedbyuser="Suspended by user",qr.Suspendedbyfirstnode="Suspended by first node",qr.Suspendedbyanynode="Suspended by any node",(Yr=Vr.WUQuerySetFilterType||(Vr.WUQuerySetFilterType={})).All="All",Yr.Id="Id",Yr.Name="Name",Yr.Alias="Alias",Yr.Status="Status",(zr=Vr.WUProtectFilter||(Vr.WUProtectFilter={})).All="All",zr.Protected="Protected",zr.NotProtected="NotProtected",(Vr.QuerySetAliasActionTypes||(Vr.QuerySetAliasActionTypes={})).Deactivate="Deactivate",(Zr=Vr.QuerysetImportActivation||(Vr.QuerysetImportActivation={})).None="None",Zr.ActivateImportedActive="ActivateImportedActive",(Kr=Vr.QuerySetQueryActionTypes||(Vr.QuerySetQueryActionTypes={})).Suspend="Suspend",Kr.Unsuspend="Unsuspend",Kr.ToggleSuspend="ToggleSuspend",Kr.Activate="Activate",Kr.Delete="Delete",Kr.DeleteQueriesAndWUs="DeleteQueriesAndWUs",Kr.RemoveAllAliases="RemoveAllAliases",Kr.ResetQueryStats="ResetQueryStats",(ei=Vr.WUQueryActivationMode||(Vr.WUQueryActivationMode={}))[ei.DoNotActivateQuery=0]="DoNotActivateQuery",ei[ei.ActivateQuery=1]="ActivateQuery",ei[ei.ActivateQuerySuspendPrevious=2]="ActivateQuerySuspendPrevious",ei[ei.ActivateQueryDeletePrevious=3]="ActivateQueryDeletePrevious";const ti=class _WorkunitsServiceBase extends te{constructor(e){super(e,"WsWorkunits","2.04")}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")}};t(ti,"WorkunitsServiceBase");let ni=ti;var si,ri,ii,oi=/* @__PURE__ */(e=>(e[e.Unknown=0]="Unknown",e[e.Compiled=1]="Compiled",e[e.Running=2]="Running",e[e.Completed=3]="Completed",e[e.Failed=4]="Failed",e[e.Archived=5]="Archived",e[e.Aborting=6]="Aborting",e[e.Aborted=7]="Aborted",e[e.Blocked=8]="Blocked",e[e.Submitted=9]="Submitted",e[e.Scheduled=10]="Scheduled",e[e.Compiling=11]="Compiling",e[e.Wait=12]="Wait",e[e.UploadingFiled=13]="UploadingFiled",e[e.DebugPaused=14]="DebugPaused",e[e.DebugRunning=15]="DebugRunning",e[e.Paused=16]="Paused",e[e.LAST=17]="LAST",e[e.NotFound=999]="NotFound",e))(oi||{});function ci(e){return"string"==typeof e.Name}function ai(e){return void 0!==e.TotalClusterTime}function ui(e){return void 0!==e.StateEx}ri=si||(si={}),(ii=ri.Action||(ri.Action={}))[ii.Unknown=0]="Unknown",ii[ii.Compile=1]="Compile",ii[ii.Check=2]="Check",ii[ii.Run=3]="Run",ii[ii.ExecuteExisting=4]="ExecuteExisting",ii[ii.Pause=5]="Pause",ii[ii.PauseNow=6]="PauseNow",ii[ii.Resume=7]="Resume",ii[ii.Debug=8]="Debug",ii[ii.__size=9]="__size",t(ci,"isECLResult"),t(ai,"isWUQueryECLWorkunit"),t(ui,"isWUInfoWorkunit");const hi=class _WorkunitsService extends ni{constructor(e){super(e)}Ping(){return this._connection.send("Ping",{},"json",!1,void 0,"WsWorkunitsPingResponse").then(()=>({result:!0}))}WUQuery(e={},t){return this._connection.send("WUQuery",e,"json",!1,t).then(e=>a({Workunits:{ECLWorkunit:[]}},e))}WUInfo(e){const t={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(t)}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,t){return this._connection.send("WUResult",e,"json",!1,t)}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(e=>{const t=u(e.Result).children();return t.length?t[0]:null})}};t(hi,"WorkunitsService");let li=hi;const di=class _WorkunitsServiceEx extends ni{WUPublishWorkunitEx(e){return this._connection.send("WUPublishWorkunit",e)}};t(di,"WorkunitsServiceEx");let pi=di;function gi(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function mi(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,s=e.slice(0,n);return[s.length>1?s[0]+s.slice(2):s,+e.slice(n+1)]}function Si(e){return(e=mi(Math.abs(e)))?e[1]:NaN}function fi(e,t){return function(n,s){for(var r=n.length,i=[],o=0,c=e[0],a=0;r>0&&c>0&&(a+c+1>s&&(c=Math.max(1,s-a)),i.push(n.substring(r-=c,r+c)),!((a+=c+1)>s));)c=e[o=(o+1)%e.length];return i.reverse().join(t)}}function _i(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}t(gi,"formatDecimal"),t(mi,"formatDecimalParts"),t(Si,"exponent"),t(fi,"formatGroup"),t(_i,"formatNumerals");var Ui,yi=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function vi(e){if(!(t=yi.exec(e)))throw new Error("invalid format: "+e);var t;return new Ci({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Ci(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function Ri(e){e:for(var t,n=e.length,s=1,r=-1;s<n;++s)switch(e[s]){case".":r=t=s;break;case"0":0===r&&(r=s),t=s;break;default:if(!+e[s])break e;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(t+1):e}function Di(e,t){var n=mi(e,t);if(!n)return e+"";var s=n[0],r=n[1],i=r-(Ui=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,o=s.length;return i===o?s:i>o?s+new Array(i-o+1).join("0"):i>0?s.slice(0,i)+"."+s.slice(i):"0."+new Array(1-i).join("0")+mi(e,Math.max(0,t+i-1))[0]}function bi(e,t){var n=mi(e,t);if(!n)return e+"";var s=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+s:s.length>r+1?s.slice(0,r+1)+"."+s.slice(r+1):s+new Array(r-s.length+2).join("0")}t(vi,"formatSpecifier"),vi.prototype=Ci.prototype,t(Ci,"FormatSpecifier"),Ci.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type},t(Ri,"formatTrim"),t(Di,"formatPrefixAuto"),t(bi,"formatRounded");const Fi={"%":/* @__PURE__ */t(function(e,t){return(100*e).toFixed(t)},"%"),b:/* @__PURE__ */t(function(e){return Math.round(e).toString(2)},"b"),c:/* @__PURE__ */t(function(e){return e+""},"c"),d:gi,e:/* @__PURE__ */t(function(e,t){return e.toExponential(t)},"e"),f:/* @__PURE__ */t(function(e,t){return e.toFixed(t)},"f"),g:/* @__PURE__ */t(function(e,t){return e.toPrecision(t)},"g"),o:/* @__PURE__ */t(function(e){return Math.round(e).toString(8)},"o"),p:/* @__PURE__ */t(function(e,t){return bi(100*e,t)},"p"),r:bi,s:Di,X:/* @__PURE__ */t(function(e){return Math.round(e).toString(16).toUpperCase()},"X"),x:/* @__PURE__ */t(function(e){return Math.round(e).toString(16)},"x")};function Wi(e){return e}t(Wi,"identity");var Ti,Ai,wi=Array.prototype.map,Pi=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function xi(e){var n=void 0===e.grouping||void 0===e.thousands?Wi:fi(wi.call(e.grouping,Number),e.thousands+""),s=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",i=e.decimal+"",o=void 0===e.numerals?Wi:_i(wi.call(e.numerals,String)),c=void 0===e.percent?"%":e.percent+"",a=e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function h(e){var h=(e=vi(e)).fill,l=e.align,d=e.sign,p=e.symbol,g=e.zero,m=e.width,S=e.comma,f=e.precision,_=e.trim,U=e.type;"n"===U?(S=!0,U="g"):Fi[U]||(void 0===f&&(f=12),_=!0,U="g"),(g||"0"===h&&"="===l)&&(g=!0,h="0",l="=");var y="$"===p?s:"#"===p&&/[boxX]/.test(U)?"0"+U.toLowerCase():"",v="$"===p?r:/[%p]/.test(U)?c:"",C=Fi[U],R=/[defgprs%]/.test(U);function D(e){var t,s,r,c=y,p=v;if("c"===U)p=C(e)+p,e="";else{var D=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:C(Math.abs(e),f),_&&(e=Ri(e)),D&&0===+e&&"+"!==d&&(D=!1),c=(D?"("===d?d:a:"-"===d||"("===d?"":d)+c,p=("s"===U?Pi[8+Ui/3]:"")+p+(D&&"("===d?")":""),R)for(t=-1,s=e.length;++t<s;)if(48>(r=e.charCodeAt(t))||r>57){p=(46===r?i+e.slice(t+1):e.slice(t))+p,e=e.slice(0,t);break}}S&&!g&&(e=n(e,1/0));var b=c.length+e.length+p.length,F=b<m?new Array(m-b+1).join(h):"";switch(S&&g&&(e=n(F+e,F.length?m-p.length:1/0),F=""),l){case"<":e=c+e+p+F;break;case"=":e=c+F+e+p;break;case"^":e=F.slice(0,b=F.length>>1)+c+e+p+F.slice(b);break;default:e=F+c+e+p}return o(e)}return f=void 0===f?6:/[gprs]/.test(U)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),t(D,"format"),D.toString=function(){return e+""},D}function l(e,t){var n=h(((e=vi(e)).type="f",e)),s=3*Math.max(-8,Math.min(8,Math.floor(Si(t)/3))),r=Math.pow(10,-s),i=Pi[8+s/3];return function(e){return n(r*e)+i}}return t(h,"newFormat"),t(l,"formatPrefix"),{format:h,formatPrefix:l}}function Li(e){return Ti=xi(e),Ai=Ti.format,Ti.formatPrefix,Ti}t(xi,"formatLocale"),Li({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),t(Li,"defaultLocale");const Ei=class _ECLGraph extends h{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,t,n){super(),this.wu=e;let s=0;for(const r of n)if(r.GraphName===t.Name&&!r.HasSubGraphId){s=Math.round(1e3*r.Seconds)/1e3;break}this.set({Time:s,...t})}fetchScopeGraph(e){return e?this.wu.fetchGraphDetails([e],["subgraph"]).then(e=>so(e)):this.wu.fetchGraphDetails([this.Name],["graph"]).then(e=>so(e))}};t(Ei,"ECLGraph");let Mi=Ei;const Ni=class _GraphCache extends l{constructor(){super(e=>l.hash([e.Name]))}};t(Ni,"GraphCache");let Ii=Ni;function ji(e,t,n){(n=n||[]).push(e),t(e.name,e.$,e.children(),n),e.children().forEach(e=>{ji(e,t,n)}),n.pop()}function ki(e){const t={};return e.forEach(e=>{"att"===e.name&&(t[e.$.name]=e.$.value)}),t}t(ji,"walkXmlJson"),t(ki,"flattenAtt");const Gi=class _XGMMLGraph extends p{};t(Gi,"XGMMLGraph");let Vi=Gi;const Qi=class _XGMMLSubgraph extends g{};t(Qi,"XGMMLSubgraph");let Bi=Qi;const Oi=class _XGMMLVertex extends m{};t(Oi,"XGMMLVertex");let Xi=Oi;const Hi=class _XGMMLEdge extends d{};t(Hi,"XGMMLEdge");let $i=Hi;function Ji(e,t){const n={},s={},r={},i=new Vi(e=>e._.id),o=[i.root];return ji(t,(e,t,i,c)=>{const a=o[o.length-1];switch(e){case"graph":break;case"node":if(i.length&&i[0].children().length&&"graph"===i[0].children()[0].name){const e=a.createSubgraph(ki(i));o.push(e),n[t.id]=e}const e=a.createVertex(ki(i));s[t.id]=e;break;case"edge":const c=a.createEdge(s[t.source],s[t.target],ki(i));r[t.id]=c}}),i}t(Ji,"createXGMMLGraph");const qi=class _ScopeGraph extends p{};t(qi,"ScopeGraph");let Yi=qi;const zi=class _ScopeSubgraph extends g{};t(zi,"ScopeSubgraph");let Zi=zi;const Ki=class _ScopeVertex extends m{};t(Ki,"ScopeVertex");let eo=Ki;const to=class _ScopeEdge extends d{};t(to,"ScopeEdge");let no=to;function so(e){const t={},n={},s={};let r;for(const o of e)switch(o.ScopeType){case"graph":r=new Yi(e=>e._.Id,o),t[o.ScopeName]=r.root;break;case"subgraph":r||(r=new Yi(e=>e._.Id,o),t[o.ScopeName]=r.root);const e=o.parentScope().split(":");let i=t[o.parentScope()];for(;e.length&&!i;)i=t[e.join(":")],e.pop();if(i){const e=i;t[o.ScopeName]=e.createSubgraph(o)}else console.warn(`Missing SG:Parent (${o.Id}): ${o.parentScope()}`);break;case"activity":const c=t[o.parentScope()];c?s[o.ScopeName]=c.createVertex(o):console.warn(`Missing A:Parent (${o.Id}): ${o.parentScope()}`);break;case"edge":n[o.ScopeName]=o;break;case"function":const a=s[o.parentScope()];a?a._.children().push(o):console.warn(`Missing F:Parent (${o.Id}): ${o.parentScope()}`)}for(const o in n){const e=n[o],s=t[e.parentScope()];if(s){const t=s;try{const n=r.vertex(e.attr("IdSource").RawValue),s=r.vertex(e.attr("IdTarget").RawValue);t.createEdge(n,s,e)}catch(i){console.warn(`Invalid Edge: ${o}`)}}else console.warn(`Missing E:Parent (${e.Id}): ${e.parentScope()}`)}return r}t(so,"createGraph");const ro=class _Resource extends h{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,t){super(),this.wu=e;const n=t.split("\\").join("/"),s=n.split("/"),r="res/"+this.wu.Wuid+"/";let i="",o="";0===n.indexOf(r)&&(i=n.substr(r.length),o=s[s.length-1]),this.set({URL:t,DisplayName:o,DisplayPath:i})}};t(ro,"Resource");let io=ro;const oo=class _XSDNode{e;constructor(e){this.e=e}fix(){delete this.e}};t(oo,"XSDNode");let co=oo;const ao=class _XSDXMLNode extends co{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 t=this._children.length-1;t>=0;--t){const e=this._children[t];"Row"===e.name&&void 0===e.type&&(this._children.push(...e._children),this._children.splice(t,1))}const e=this.setOfType();e&&(this.type=e,this.isSet=!0,this._children=[])}children(){return this._children}isAll(e){return"All"===e.name&&void 0===e.type}setOfType(){const e=this.children();if(void 0===this.type&&2===e.length){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":case"xs:nonNegativeInteger":case"xs:double":e=8;break;case"xs:string":e=32;break;default:const t="0123456789",n=this.type.lastIndexOf("_"),s=n>0?n:this.type.length;let r=s-1;for(;r>=0&&-1!==t.indexOf(this.type.charAt(r));--r);r+1<s&&(e=parseInt(this.type.substring(r+1,s),10)),0===this.type.indexOf("data")&&(e*=2)}return e<this.name.length&&(e=this.name.length),e}};t(ao,"XSDXMLNode");let uo=ao;const ho=class _XSDSimpleType extends co{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}}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()}};t(ho,"XSDSimpleType");let lo=ho;const po=class _XSDSchema{root;simpleTypes={};fields(){return this.root.children()}};t(po,"XSDSchema");let go=po;const mo=class _XSDParser extends S{schema=new go;simpleType;simpleTypes={};xsdStack=new f;startXMLNode(e){switch(super.startXMLNode(e),e.name){case"xs:element":const t=new uo(e);this.schema.root?this.xsdStack.depth()&&this.xsdStack.top().append(t):this.schema.root=t,this.xsdStack.push(t);break;case"xs:simpleType":this.simpleType=new lo(e)}}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":const t=this.xsdStack.top();for(const n in e.$)t.attrs[n]=e.$[n];break;default:this.simpleType&&this.simpleType.append(e)}super.endXMLNode(e)}};t(mo,"XSDParser");let So=mo;function fo(e){const t=new So;return t.parse(e),t.schema}t(fo,"parseXSD");const _o=class _XSDParser2 extends So{_rootName;schema=new go;simpleTypes={};xsdStack=new f;constructor(e){super(),this._rootName=e}startXMLNode(e){switch(super.startXMLNode(e),e.name){case"xsd:element":const t=new uo(e);this.schema.root||this._rootName!==e.$.name||(this.schema.root=t),this.xsdStack.depth()&&this.xsdStack.top().append(t),this.xsdStack.push(t);break;case"xsd:simpleType":this.simpleType=new lo(e)}}endXMLNode(e){if("xsd:element"===e.name){this.xsdStack.pop().fix()}super.endXMLNode(e)}};t(_o,"XSDParser2");let Uo=_o;function yo(e,t){const n=new Uo(t);return n.parse(e),n.schema}t(yo,"parseXSD2");const vo=class _GlobalResultCache extends l{constructor(){super(e=>`${e.BaseUrl}-${e.Wuid}-${e.ResultName}`)}};t(vo,"GlobalResultCache");let Co=vo;const Ro=new Co,Do=class _Result extends h{connection;_bypassCache=!1;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,t,n,s){let r;return Array.isArray(s)?(r=Ro.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:n.Name},()=>new _Result(e,t,n,s)),r.set(n)):void 0===s&&("number"==typeof n?r=Ro.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:"Sequence_"+n},()=>new _Result(e,t,n)):"string"==typeof n&&(r=Ro.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:n},()=>new _Result(e,t,n)))),r}static attachLogicalFile(e,t,n){return Ro.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:n},()=>new _Result(e,t,n,!0))}constructor(e,t,n,s){super(),this.connection=e instanceof li?e:new li(e),"boolean"==typeof s&&!0===s?this.set({NodeGroup:t,LogicalFileName:n}):ci(n)&&Array.isArray(s)?this.set({...n,Wuid:t,ResultName:n.Name,ResultViews:s}):void 0===s?"number"==typeof n?this.set({Wuid:t,ResultSequence:n}):"string"==typeof n?this.set({Wuid:t,ResultName:n}):console.warn("Unknown Result.attach (1)"):console.warn("Unknown Result.attach (2)")}isComplete(){return-1!==this.Total}bypassCache(e){return void 0===e?this._bypassCache:(this._bypassCache=e,this)}_fetchXMLSchemaPromise;fetchXMLSchema(e=!1){return this._fetchXMLSchemaPromise&&!e||(this._fetchXMLSchemaPromise=this.WUResult().then(e=>e.Result?.XmlSchema?.xml?(this.xsdSchema=fo(e.Result.XmlSchema.xml),this.xsdSchema):null)),this._fetchXMLSchemaPromise}async refresh(){return await this.fetchRows(0,1,!0),this}fetchRows(e=0,t=-1,n=!1,s={},r,i){const o=i??this._bypassCache;return this.WUResult(e,t,!n,s,r,o).then(e=>{const t=e.Result;return delete e.Result,this.set({...e}),c("XmlSchema.xml",t)&&(this.xsdSchema=fo(t.XmlSchema.xml)),c("Row",t)?t.Row:this.ResultName&&c(this.ResultName,t)?t[this.ResultName].Row:[]})}rootField(){return this.xsdSchema?this.xsdSchema.root:null}fields(){return this.xsdSchema?this.xsdSchema.root.children():[]}WUResult(e=0,t=1,n=!1,s={},r,i=!1){const o={NamedValue:{itemcount:0}};for(const a in s)o.NamedValue[o.NamedValue.itemcount++]={Name:a,Value:s[a]};const c={FilterBy:o};return this.Wuid&&void 0!==this.ResultName?(c.Wuid=this.Wuid,c.ResultName=this.ResultName):this.Wuid&&void 0!==this.ResultSequence?(c.Wuid=this.Wuid,c.Sequence=this.ResultSequence):this.LogicalFileName&&this.NodeGroup?(c.LogicalName=this.LogicalFileName,c.Cluster=this.NodeGroup):this.LogicalFileName&&(c.LogicalName=this.LogicalFileName),c.Start=e,c.Count=t,c.SuppressXmlSchema=n,c.BypassCachedResult=i,this.connection.WUResult(c,r).then(e=>e)}};t(Do,"Result");let bo=Do;const Fo=class _ResultCache extends l{constructor(){super(e=>l.hash([e.Sequence,e.Name,e.Value,e.FileName]))}};t(Fo,"ResultCache");let Wo=Fo;const To=class _Attribute extends h{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,t){super(),this.scope=e,this.set(t)}};t(To,"Attribute");let Ao=To;const wo=class _BaseScope extends h{_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(){const e=[],t={start:null,end:null};return this.Properties.Property.forEach(n=>{"ts"===n.Measure&&n.Name.indexOf("Started")>=0?t.start=n:this.ScopeName&&"ts"===n.Measure&&n.Name.indexOf("Finished")>=0?t.end=n:e.push(new Ao(this,n))}),t.start&&t.end?(t.start.FormattedEnd=t.end.Formatted,e.push(new Ao(this,t.start))):t.start?e.push(new Ao(this,t.start)):t.end&&e.push(new Ao(this,t.end)),e}constructor(e){super(),this.update(e)}update(e){this.set(e),this.CAttributes.forEach(e=>{this._attributeMap[e.Name]=e}),this.Properties.Property=[];for(const t in this._attributeMap)this._attributeMap.hasOwnProperty(t)&&this.Properties.Property.push(this._attributeMap[t].properties)}parentScope(){const 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(const t of this.children())if(t.walk(e))return!0;return e.end(this)}formattedAttrs(){const e={};for(const t in this._attributeMap)e[t]=this._attributeMap[t].Formatted||this._attributeMap[t].RawValue;return e}rawAttrs(){const e={};for(const t in this._attributeMap)e[t]=this._attributeMap[t].RawValue;return e}hasAttr(e){return void 0!==this._attributeMap[e]}attr(e){return this._attributeMap[e]||new Ao(this,{Creator:"",CreatorType:"",Formatted:"",Measure:"",Name:"",RawValue:""})}attrMeasure(e){return this._attributeMap[e].Measure}calcTooltip(e){let t="";const n=[];t=this.Id,n.push(`<tr><td class="key">ID:</td><td class="value">${this.Id}</td></tr>`),e&&n.push(`<tr><td class="key">Parent ID:</td><td class="value">${e.Id}</td></tr>`),n.push(`<tr><td class="key">Scope:</td><td class="value">${this.ScopeName}</td></tr>`);const s=this.formattedAttrs();for(const r in s)"Label"===r?t=s[r]:n.push(`<tr><td class="key">${r}</td><td class="value">${s[r]}</td></tr>`);return`<div class="eclwatch_WUGraph_Tooltip" style="max-width:480px">\n <h4 align="center">${t}</h4>\n <table>\n ${n.join("")}\n </table>\n </div>`}};t(wo,"BaseScope");let Po=wo;const xo=class _Scope extends Po{wu;constructor(e,t){super(t),this.wu=e}};t(xo,"Scope");let Lo=xo;const Eo=class _SourceFile extends h{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,t,n){super(),this.connection=e instanceof li?e:new li(e),this.set({Wuid:t,...n})}};t(Eo,"SourceFile");let Mo=Eo;const No=class _Timer extends h{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,t,n){super(),this.connection=e instanceof li?e:new li(e);const s=_(n.Value);this.set({Wuid:t,Seconds:Math.round(1e3*s)/1e3,HasSubGraphId:void 0!==n.SubGraphId,...n})}};t(No,"Timer");let Io=No;const jo=Zn("%Y-%m-%dT%H:%M:%S.%LZ"),ko=Kn("%Y-%m-%dT%H:%M:%S.%LZ"),Go=Ai(",");function Vo(e){return e&&!isNaN(+e)?Go(+e):e}t(Vo,"formatNum");const Qo="DefinitionList",Bo=/([a-zA-Z]:)?(.*[\\\/])(.*)(\((\d+),(\d+)\))/,Oo=["Avg","Min","Max","Delta","StdDev"],Xo=["SkewMin","SkewMax","NodeMin","NodeMax"],Ho=/[A-Z][a-z]*/g;function $o(e){for(const n of Xo){const t=e.indexOf(n);if(0===t){return{measure:"",ext:n,label:e.slice(t+n.length)}}}const t=e.match(Ho);if(t?.length){const e=t.shift();let n=t.join("");for(const t of Oo){const s=n.indexOf(t);if(0===s)return n=n.slice(s+t.length),{measure:e,ext:t,label:n}}return{measure:e,ext:"",label:n}}return{measure:"",ext:"",label:e}}t($o,"_splitMetric");const Jo={};function qo(e){let t=Jo[e];return t||(t=$o(e),Jo[e]=t),t}function Yo(e,t){return e.__formattedProps?.[t]??e[t]}function zo(e){if(void 0===e)return;const t=parseFloat(e);return isNaN(t)?void 0:t}function Zo(e,t,n){const s=qo(t);if(!n[s.measure]){n[s.label]=!0;const t=zo(e[`${s.measure}Avg${s.label}`]),r=zo(e[`${s.measure}Min${s.label}`]),i=zo(e[`${s.measure}Max${s.label}`]),o=zo(e[`${s.measure}StdDev${s.label}`]),c=Math.max((t-r)/o,(i-t)/o);return{Key:`${s.measure}${s.label}`,Value:Yo(e,`${s.measure}${s.label}`),Avg:Yo(e,`${s.measure}Avg${s.label}`),Min:Yo(e,`${s.measure}Min${s.label}`),Max:Yo(e,`${s.measure}Max${s.label}`),Delta:Yo(e,`${s.measure}Delta${s.label}`),StdDev:Yo(e,`${s.measure}StdDev${s.label}`),StdDevs:isNaN(c)?void 0:c,SkewMin:Yo(e,`SkewMin${s.label}`),SkewMax:Yo(e,`SkewMax${s.label}`),NodeMin:Yo(e,`NodeMin${s.label}`),NodeMax:Yo(e,`NodeMax${s.label}`)}}return null}t(qo,"splitMetric"),t(Yo,"formatValue"),t(zo,"safeParseFloat"),t(Zo,"formatValues");const Ko=n("workunit.ts"),ec=class _WorkunitCache extends l{constructor(){super(e=>`${e.BaseUrl}-${e.Wuid}`)}};t(ec,"WorkunitCache");let tc=ec;const nc=new tc,sc=class _Workunit extends h{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",oi.Unknown)}get State(){return this.get("State")||oi[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 Wo;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,()=>bo.attach(this.connection,this.Wuid,e,this.ResultViews.View)))}get SequenceResults(){const e={};return this.CResults.forEach(t=>{e[t.Sequence]=t}),e}get Timers(){return this.get("Timers",{ECLTimer:[]})}get CTimers(){return this.Timers.ECLTimer.map(e=>new Io(this.connection,this.Wuid,e))}_graphCache=new Ii;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 Mi(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 io(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 Mo(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")}get CostSavingPotential(){return this.get("CostSavingPotential")}static create(e){const t=new _Workunit(e);return t.connection.WUCreate().then(e=>(nc.set(t),t.set(e.Workunit),t))}static attach(e,t,n){const s=nc.get({BaseUrl:e.baseUrl,Wuid:t},()=>new _Workunit(e,t));return n&&s.set(n),s}static existsLocal(e,t){return nc.has({BaseUrl:e,Wuid:t})}static submit(e,t,n,s=!1){return _Workunit.create(e).then(e=>e.update({QueryText:n})).then(e=>s?e.submit(t,si.Action.Compile):e.submit(t))}static compile(e,t,n){return _Workunit.submit(e,t,n,!0)}static query(e,t){return new li(e).WUQuery(t).then(t=>t.Workunits.ECLWorkunit.map(function(t){return _Workunit.attach(e,t.Wuid,t)}))}constructor(e,t){super(),this.connection=new li(e),this.topologyConnection=new kr(e),this.clearState(t)}clearState(e){this.clear({Wuid:e,StateID:oi.Unknown})}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(e=>(this.set(e.Workunit),this))}submit(e,t=si.Action.Run,n){let s;return s=void 0!==e?Promise.resolve(e):this.topologyConnection.DefaultTpLogicalClusterQuery().then(e=>e.Name),this._debugMode=!1,t===si.Action.Debug&&(t=si.Action.Run,this._debugMode=!0),s.then(e=>this.connection.WUUpdate({Wuid:this.Wuid,Action:t,ResultLimit:n,DebugValues:{DebugValue:[{Name:"Debug",Value:this._debugMode?"1":""}]}}).then(n=>(this.set(n.Workunit),this._submitAction=t,this.connection.WUSubmit({Wuid:this.Wuid,Cluster:e})))).then(()=>this)}isComplete(){switch(this.StateID){case oi.Compiled:return"compile"===this.ActionEx||this._submitAction===si.Action.Compile;case oi.Completed:case oi.Failed:case oi.Aborted:case oi.NotFound:return!0}return!1}isFailed(){switch(this.StateID){case oi.Aborted:case oi.Failed:return!0}return!1}isDeleted(){return this.StateID===oi.NotFound}isDebugging(){switch(this.StateID){case oi.DebugPaused:case oi.DebugRunning:return!0}return this._debugMode}isRunning(){switch(this.StateID){case oi.Compiled:case oi.Running:case oi.Aborting:case oi.Blocked:case oi.DebugPaused:case oi.DebugRunning:return!0}return!1}setToFailed(){return this.WUAction(Gr.ECLWUActions.SetToFailed)}pause(){return this.WUAction(Gr.ECLWUActions.Pause)}pauseNow(){return this.WUAction(Gr.ECLWUActions.PauseNow)}resume(){return this.WUAction(Gr.ECLWUActions.Resume)}abort(){return this.WUAction(Gr.ECLWUActions.Abort)}protect(){return this.WUAction(Gr.ECLWUActions.Protect)}unprotect(){return this.WUAction(Gr.ECLWUActions.Unprotect)}delete(){return this.WUAction(Gr.ECLWUActions.Delete)}restore(){return this.WUAction(Gr.ECLWUActions.Restore)}deschedule(){return this.WUAction(Gr.ECLWUActions.Deschedule)}reschedule(){return this.WUAction(Gr.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=>_Workunit.attach(this.connection.opts(),e.WUs.WU[0].WUID).refresh())}async refreshState(){return await this.WUQuery(),this.StateID!==oi.Compiled||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,t){return e?await Promise.all([this.refreshInfo(t),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(e=>e.Scopes.Scope)}normalizeDetails(e,t){const n={id:{Measure:"label"},name:{Measure:"label"},type:{Measure:"label"}},s=/* @__PURE__ */new Map;for(const o of e.Activities?.Activity??[])s.set(o.Kind,o.Name);const r=new Array(t.length);for(let o=0;o<t.length;o++){const e=t[o],c={},a={};if(e.Id&&e.Properties?.Property)for(const t of e.Properties.Property){const e=t.Measure,r=t.Name,i=t.RawValue;if("ns"===e&&(t.Measure="s"),"Kind"===r){const e=parseInt(i,10);t.Formatted=s.get(e)??i}switch(n[r]={Name:t.Name,Measure:t.Measure,Creator:t.Creator,CreatorType:t.CreatorType},t.Measure){case"bool":c[r]=!!+i;break;case"sz":case"ns":case"cnt":case"node":case"skw":c[r]=+i;break;case"s":c[r]=+i/1e9;break;case"ts":c[r]=new Date(+i/1e3).toISOString();break;case"cost":c[r]=+i/1e6;break;default:c[r]=i}a[r]=Vo(t.Formatted??c[r])}const u={id:e.Id,name:e.ScopeName,type:e.ScopeType,Kind:e.Kind,Label:e.Label,__formattedProps:a,__groupedProps:{},__groupedRawProps:{},__StdDevs:0,__StdDevsSource:"",...c},h=u[Qo];if(h)try{const e=JSON.parse(h.split("\\").join("\\\\")),t=[];for(let n=0;n<e.length;n++){const s=e[n].match(Bo);s&&t.push({filePath:(s[1]??"")+s[2]+s[3],line:parseInt(s[5],10),col:parseInt(s[6],10)})}u[Qo]=t}catch(i){Ko.error(`Unexpected "DefinitionList": ${h}`)}const l={};let d=0,p="";for(const t in u)if(!t.startsWith("__")){const e=Zo(u,t,l);e&&(u.__groupedProps[e.Key]=e,!isNaN(e.StdDevs)&&e.StdDevs>d&&(d=e.StdDevs,p=e.Key))}u.__StdDevs=d,u.__StdDevsSource=p,r[o]=u}return{meta:e,columns:n,data:r}}fetchDetailsNormalized(e={}){return Promise.all([this.fetchDetailsMeta(),this.fetchDetailsRaw(e)]).then(e=>this.normalizeDetails(e[0],e[1]))}fetchInfo(e={}){return this.WUInfo(e)}fetchDetails(e={}){return this.WUDetails(e).then(e=>e.Scopes.Scope.map(e=>new Lo(this,e)))}fetchDetailsHierarchy(e={}){return this.WUDetails(e).then(e=>{const t=[],n={};e.Scopes.Scope.forEach(e=>{if(n[e.ScopeName])return n[e.ScopeName].update(e),null;{const t=new Lo(this,e);return n[t.ScopeName]=t,t}});for(const s in n)if(n.hasOwnProperty(s)){const e=n[s],r=e.parentScope();r&&n[r]?n[r].children().push(e):t.push(e)}return t})}fetchGraphDetails(e=[],t){return this.fetchDetails({ScopeFilter:{MaxDepth:999999,Ids:e,ScopeTypes:t},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(e=>so(e))}fetchTimeElapsed(){return this.fetchDetails({ScopeFilter:{PropertyFilters:{PropertyFilter:[{Name:"TimeElapsed"}]}}}).then(e=>{const t={};e.forEach(e=>{t[e.ScopeName]=t[e.ScopeName]||{scope:e.ScopeName,start:null,elapsed:null,finish:null},e.CAttributes.forEach(n=>{"TimeElapsed"===n.Name?t[e.ScopeName].elapsed=+n.RawValue:"ts"===n.Measure&&n.Name.indexOf("Started")>=0&&(t[e.ScopeName].start=n.Formatted)})});const n=[];for(const s in t){const e=t[s];if(e.start&&e.elapsed){const t=ko(e.start);t.setMilliseconds(t.getMilliseconds()+e.elapsed/1e6),e.finish=jo(t),n.push(e)}}return n.sort((e,t)=>e.start<t.start?-1:e.start>t.start?1:0),n})}_monitor(){this.isComplete()?this._monitorTickCount=0:super._monitor()}_monitorTimeoutDuration(){const e=super._monitorTimeoutDuration();return this._monitorTickCount<=1?1e3:this._monitorTickCount<=3?3e3:this._monitorTickCount<=5?5e3:this._monitorTickCount<=7?1e4:e}on(e,t,n){if(this.isCallback(t))switch(e){case"completed":super.on("propChanged","StateID",e=>{this.isComplete()&&t([e])});break;case"changed":super.on(e,t)}else if("changed"===e)super.on(e,t,n);return this._monitor(),this}watchUntilComplete(e){return new Promise((t,n)=>{const s=this.watch(n=>{e&&e(n),this.isComplete()&&(s.release(),t(this))})})}watchUntilRunning(e){return new Promise((t,n)=>{const s=this.watch(n=>{e&&e(n),(this.isComplete()||this.isRunning())&&(s.release(),t(this))})})}WUQuery(e={}){return this.connection.WUQuery({...e,Wuid:this.Wuid}).then(e=>(0===e.Workunits.ECLWorkunit.length?(this.clearState(this.Wuid),this.set("StateID",oi.NotFound)):this.set(e.Workunits.ECLWorkunit[0]),e)).catch(e=>{if(!e.Exception.some(e=>20081===e.Code&&(this.clearState(this.Wuid),this.set("StateID",oi.NotFound),!0)))throw Ko.warning(`Unexpected ESP exception: ${e.message}`),e;return{}})}WUCreate(){return this.connection.WUCreate().then(e=>(this.set(e.Workunit),nc.set(this),e))}WUInfo(e={}){const t=e.IncludeResults||e.IncludeResultsViewNames;return this.connection.WUInfo({...e,Wuid:this.Wuid,IncludeResults:t,IncludeResultsViewNames:t,SuppressResultSchemas:!1}).then(e=>(this.set(e.Workunit),t&&this.set({ResultViews:e.ResultViews}),e)).catch(e=>{if(!e.Exception.some(e=>20080===e.Code&&(this.clearState(this.Wuid),this.set("StateID",oi.NotFound),!0)))throw Ko.warning(`Unexpected ESP exception: ${e.message}`),e;return{}})}WUResubmit(e){return this.connection.WUResubmit(U({},e,{Wuids:{Item:[this.Wuid]}}))}WUDetailsMeta(e){return this.connection.WUDetailsMeta(e)}WUDetails(e){return this.connection.WUDetails(U({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(e=>U({Scopes:{Scope:[]}},e))}WUAction(e){return this.connection.WUAction({Wuids:{Item:[this.Wuid]},WUActionType:e}).then(e=>this.refresh().then(()=>(this._monitor(),e)))}publish(e){return this.connection.WUPublishWorkunit({Wuid:this.Wuid,Cluster:this.Cluster,JobName:e||this.Jobname,AllowForeignFiles:!0,Activate:Gr.WUQueryActivationMode.ActivateQuery,Wait:5e3})}publishEx(e){const t=new pi({baseUrl:""}),n={Wuid:this.Wuid,Cluster:this.Cluster,JobName:this.Jobname,AllowForeignFiles:!0,Activate:1,Wait:5e3,...e};return t.WUPublishWorkunitEx(n)}WUCDebug(e,t={}){let n="";for(const s in t)t.hasOwnProperty(s)&&(n+=` ${s}='${t[s]}'`);return this.connection.WUCDebugEx({Wuid:this.Wuid,Command:`<debug:${e} uid='${this.Wuid}'${n}/>`}).then(e=>e)}debug(e,t){return this.isDebugging()?this.WUCDebug(e,t).then(t=>{const n=t.children(e);return n.length?n[0]:new y(e)}).catch(t=>(Ko.error(t),Promise.resolve(new y(e)))):Promise.resolve(new y(e))}debugStatus(){return this.isDebugging()?this.debug("status").then(e=>{const t={...this.DebugState,...e.$};return this.set({DebugState:t}),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(e=>{if("break"===e.name)return e.$})}debugBreakpointAdd(e,t,n){return this.debug("breakpoint",{id:e,mode:t,action:n}).then(e=>this.debugBreakpointResponseParser(e))}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=Ji(this.Wuid,e),this._debugAllGraph))}debugBreakpointValid(e){return this.debugGraph().then(t=>ac(t,e))}debugPrint(e,t=0,n=10){return this.debug("print",{edgeID:e,startRow:t,numRows:n}).then(e=>e.children().map(e=>{const t={};return e.children().forEach(e=>{t[e.name]=e.content}),t}))}};t(sc,"Workunit");let rc=sc;const ic="definition";function oc(e){return void 0!==e._[ic]}function cc(e){const t=/([a-z]:\\(?:[-\w\.\d]+\\)*(?:[-\w\.\d]+)?|(?:\/[\w\.\-]+)+)\((\d*),(\d*)\)/.exec(e._[ic]);if(t){const[,n,s,r]=t;return n.replace(/\/\.\//g,"/"),{id:e._.id,file:n,line:+s,column:+r}}throw new Error(`Bad definition: ${e._[ic]}`)}function ac(e,t){const n=[];for(const s of e.vertices)if(oc(s)){const e=cc(s);(e&&!t||t===e.file)&&n.push(e)}return n.sort((e,t)=>e.line-t.line)}let uc;t(oc,"hasECLDefinition"),t(cc,"getECLDefinition"),t(ac,"breakpointLocations");const hc=class _Activity extends h{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,t){return uc||(uc=new _Activity(e)),t&&uc.set(t),uc}constructor(e){super(),this.connection=e instanceof Wr?e:new Wr(e),this.clear({})}runningWorkunits(e=""){return this.Running.ActiveWorkunit.filter(t=>""===e||t.ClusterName===e).map(e=>rc.attach(this.connection.connectionOptions(),e.Wuid,e))}setBanner(e){return this.connection.SetBanner({...e}).then(e=>(this.set(e),this))}lazyRefresh=v(async()=>{const e=await this.connection.Activity({});return this.set(e),this});async refresh(){return this.lazyRefresh()}};t(hc,"Activity");let lc=hc;const dc=n("logicalFile.ts"),pc=class _LogicalFileCache extends l{constructor(){super(e=>`${e.BaseUrl}-${e.Cluster}-${e.Name}`)}};t(pc,"LogicalFileCache");let gc=pc;const mc=new gc,Sc=class _LogicalFile extends h{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 CompressionType(){return this.get("CompressionType")}get properties(){return this.get()}static attach(e,t,n,s){const r=mc.get({BaseUrl:e.baseUrl,Cluster:t,Name:n},()=>new _LogicalFile(e,t,n));return s&&r.set(s),r}constructor(e,t,n){super(),this.connection=e instanceof ot?e:new ot(e),this.clear({Cluster:t,Name:n})}filePartsOnCluster(){return[...this.DFUFilePartsOnClusters?.DFUFilePartsOnCluster||[]]}fileParts(){const e=[];for(const t of this.DFUFilePartsOnClusters?.DFUFilePartsOnCluster||[])for(const n of t?.DFUFileParts?.DFUPart||[]){const s={...t,...n};delete s.DFUFileParts,e.push(s)}return e}update(e){return this.connection.DFUInfo({...e,Cluster:this.Cluster,Name:this.Name}).then(e=>(this.set({Cluster:this.Cluster,...e.FileDetail}),e))}fetchInfo(){return this.connection.DFUInfo({Cluster:this.Cluster,Name:this.Name}).then(e=>(this.set({Cluster:this.Cluster,...e.FileDetail,ProtectList:e?.FileDetail?.ProtectList??{DFUFileProtect:[]}}),e.FileDetail)).catch(e=>{if(!e.Exception.some(e=>20038===e.Code&&(this.set("Name",this.Name+" (Deleted)"),this.set("StateID",999),!0)))throw dc.warning(`Unexpected ESP exception: ${e.message}`),e;return{}})}fetchDefFile(e){return this.connection.DFUFile({Name:this.Name,Format:e})}fetchAllLogicalFiles(){return this.connection.recursiveFetchLogicalFiles([this])}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||[])}};t(Sc,"LogicalFile");let fc=Sc;const _c=class _MachineCache extends l{constructor(){super(e=>e.Address)}};t(_c,"MachineCache");let Uc=_c;const yc=new Uc,vc=class _Machine extends h{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,t,n){const s=yc.get({Address:t},()=>new _Machine(e));return n&&s.set(n),s}constructor(e){super(),this.connection=e instanceof rn?e:new rn(e)}};t(vc,"Machine");let Cc=vc;const Rc=class _TargetClusterCache extends l{constructor(){super(e=>`${e.BaseUrl}-${e.Name}`)}};t(Rc,"TargetClusterCache");let Dc=Rc;const bc=new Dc,Fc=class _TargetCluster extends h{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=>Cc.attach(this.machineConnection,e.Address,e))}static attach(e,t,n){const s=bc.get({BaseUrl:e.baseUrl,Name:t},()=>new _TargetCluster(e,t));return n&&s.set(n),s}constructor(e,t){super(),e instanceof kr?(this.connection=e,this.machineConnection=new rn(e.connectionOptions())):(this.connection=new kr(e),this.machineConnection=new rn(e)),this.clear({Name:t})}fetchMachines(e={}){return this.machineConnection.GetTargetClusterInfo({TargetClusters:{Item:[`${this.Type}:${this.Name}`]},...e}).then(e=>{const t=[];for(const n of e.TargetClusterInfoList.TargetClusterInfo)for(const e of n.Processes.MachineInfoEx)t.push(e);return this.set("MachineInfoEx",t),this.CMachineInfoEx})}machineStats(){let e=0,t=0,n=0;for(const s of this.CMachineInfoEx)for(const r of s.Storage.StorageInfo){t+=r.Available,n+=r.Total;const s=1-r.Available/r.Total;s>e&&(e=s)}return{maxDisk:e,meanDisk:1-(n?t/n:1)}}fetchUsage(){return this.machineConnection.GetTargetClusterUsageEx([this.Name])}};t(Fc,"TargetCluster");let Wc=Fc;function Tc(e){let t;return t=e instanceof kr?e:new kr(e),t.TpListTargetClusters({}).then(t=>t.TargetClusters.TpClusterNameType.map(t=>Wc.attach(e,t.Name,t)))}t(Tc,"targetClusters");const Ac={};function wc(e){if(!Ac[e.baseUrl]){let t;t=e instanceof kr?e:new kr(e),Ac[e.baseUrl]=t.TpListTargetClusters({}).then(t=>{let n,s,r;t.TargetClusters.TpClusterNameType.forEach(e=>{n||(n=e),s||!0!==e.IsDefault||(s=e),r||"hthor"!==e.Type||(r=e)});const i=s||r||n;return Wc.attach(e,i.Name,i)})}return Ac[e.baseUrl]}t(wc,"defaultTargetCluster");const Pc=class _TopologyCache extends l{constructor(){super(e=>e.BaseUrl)}};t(Pc,"TopologyCache");let xc=Pc;const Lc=new xc,Ec=class _Topology extends h{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=>Wc.attach(this.connection,e.Name,e))}get LogicalClusters(){return this.get("LogicalClusters")}get Services(){return this.get("Services")}static attach(e,t){const n=Lc.get({BaseUrl:e.baseUrl},()=>new _Topology(e));return t&&n.set(t),n}constructor(e){super(),this.connection=e instanceof kr?e:new kr(e)}GetESPServiceBaseURL(e=""){return this.connection.TpServiceQuery({}).then(t=>{const n=this.connection.protocol(),s=this.connection.ip();let r="https:"===n?"18002":"8002";if(c("ServiceList.TpEspServers.TpEspServer",t))for(const i of t.ServiceList.TpEspServers.TpEspServer)if(c("TpBindings.TpBinding",i))for(const t of i.TpBindings.TpBinding)t.Service===e&&t.Protocol+":"===n&&(r=t.Port);return`${n}//${s}:${r}/`})}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(e=>(this.set({LogicalClusters:e.TpLogicalClusters.TpLogicalCluster}),this.LogicalClusters))}fetchServices(e={}){return this.connection.TpServiceQuery(e).then(e=>(this.set({Services:e.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,t,n){if(this.isCallback(t)){if("changed"===e)super.on(e,t)}else if("changed"===e)super.on(e,t,n);return this._monitor(),this}};t(Ec,"Topology");let Mc=Ec;function Nc(e,t,n){"__proto__"!==t&&"constructor"!==t&&"prototype"!==t&&(e[t]=n)}function Ic(e){return(e=""+e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(/\n/g," ").replace(/\r/g," ")}function jc(e){if(!e)return 0;if(!isNaN(+e))return parseFloat(e);const t=/(?:(?:(\d+).days.)?(?:(\d+)h)?(?:(\d+)m)?(?:(\d+\.\d+|\d+)s))|(?:(\d+\.\d+|\d+)ms|(\d+\.\d+|\d+)us|(\d+\.\d+|\d+)ns)/.exec(e);if(!t)return 0;return 24*(+t[1]||0)*60*60+60*(+t[2]||0)*60+60*(+t[3]||0)+(+t[4]||0)+(+t[5]||0)/1e3+(+t[6]||0)/1e6+(+t[7]||0)/1e9}function kc(e,t){const n=e.indexOf(t);return-1!==n?parseFloat(e.substring(0,n)):-1}function Gc(e){if(!e)return 0;if(!isNaN(+e))return parseFloat(e);let t=kc(e,"Kb");return t>=0?1024*t:(t=kc(e,"Mb"),t>=0?t*Math.pow(1024,2):(t=kc(e,"Gb"),t>=0?t*Math.pow(1024,3):(t=kc(e,"Tb"),t>=0?t*Math.pow(1024,4):(t=kc(e,"Pb"),t>=0?t*Math.pow(1024,5):(t=kc(e,"Eb"),t>=0?t*Math.pow(1024,6):(t=kc(e,"Zb"),t>=0?t*Math.pow(1024,7):(t=kc(e,"b"),t>=0?t:0)))))))}function Vc(e){return e?parseFloat(e):0}t(Nc,"safeAssign"),t(Ic,"xmlEncode"),t(jc,"espTime2Seconds"),t(kc,"unitTest"),t(Gc,"espSize2Bytes"),t(Vc,"espSkew2Number");const Qc=class _LocalisedXGMMLWriter{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,t,n,s){this.noSpills=s,e.forEach(e=>{this.graph.isVertex(e)?(this.calcInVertexVisibility(e,n),this.calcOutVertexVisibility(e,n)):this.graph.isEdge(e)?(this.calcInVertexVisibility(e.getSource(),n-1),this.calcOutVertexVisibility(e.getTarget(),n-1)):this.graph.isSubgraph(e)&&(this.m_visibleSubgraphs[e.__hpcc_id]=e,this.calcSubgraphVisibility(e,t-1))}),this.calcVisibility2()}calcInVertexVisibility(e,t){this.noSpills&&e.isSpill()&&t++,this.m_visibleVertices[e.__hpcc_id]=e,t>0&&e.getInEdges().forEach(e=>{this.calcInVertexVisibility(e.getSource(),t-1)})}calcOutVertexVisibility(e,t){this.noSpills&&e.isSpill()&&t++,this.m_visibleVertices[e.__hpcc_id]=e,t>0&&e.getOutEdges().forEach(e=>{this.calcOutVertexVisibility(e.getTarget(),t-1)})}calcSubgraphVisibility(e,t){if(t<0)return;t>0&&e.__hpcc_subgraphs.forEach((e,n)=>{this.calcSubgraphVisibility(e,t-1)}),e.__hpcc_subgraphs.forEach((e,t)=>{this.m_visibleSubgraphs[e.__hpcc_id]=e}),e.__hpcc_vertices.forEach((e,t)=>{this.m_visibleVertices[e.__hpcc_id]=e});const n={};this.graph.edges.forEach((t,s)=>{t.getSource().__hpcc_parent!==t.getTarget().__hpcc_parent&&e===this.getCommonAncestor(t)&&(n[t.getSource().__hpcc_parent.__hpcc_id+"::"+t.getTarget().__hpcc_parent.__hpcc_id]||(n[t.getSource().__hpcc_parent.__hpcc_id+"::"+t.getTarget().__hpcc_parent.__hpcc_id]=!0,this.m_visibleEdges[t.__hpcc_id]=t))})}buildVertexString(e,t){let n="",s="";const r=e.getProperties();for(const i in r)t&&i.indexOf("_kind")>=0?s+='<att name="_kind" value="point"/>':"id"===i||"label"===i?n+=" "+i+'="'+Ic(r[i])+'"':s+='<att name="'+i+'" value="'+Ic(r[i])+'"/>';return"<node"+n+">"+s+"</node>"}buildEdgeString(e){let t="",n="";const s=e.getProperties();for(const r in s)"id"===r.toLowerCase()||"label"===r.toLowerCase()||"source"===r.toLowerCase()||"target"===r.toLowerCase()?t+=" "+r+'="'+Ic(s[r])+'"':n+='<att name="'+r+'" value="'+Ic(s[r])+'"/>';return"<edge"+t+">"+n+"</edge>"}getAncestors(e,t){let n=e.__hpcc_parent;for(;n;)t.push(n),n=n.__hpcc_parent}getCommonAncestorV(e,t){const n=[],s=[];this.getAncestors(e,n),this.getAncestors(t,s);let r=n.length-1,i=s.length-1,o=null;for(;r>=0&&i>=0&&n[r]===s[i];)o=n[r],--r,--i;return o}getCommonAncestor(e){return this.getCommonAncestorV(e.getSource(),e.getTarget())}calcAncestorVisibility(e){const t=[];this.getAncestors(e,t),t.forEach((e,t)=>{this.m_visibleSubgraphs[e.__hpcc_id]=e})}calcVisibility2(){for(const e in this.m_visibleVertices){const t=this.m_visibleVertices[e];t.getInEdges().forEach((e,t)=>{this.m_visibleEdges[e.__hpcc_id]=e}),t.getOutEdges().forEach((e,t)=>{this.m_visibleEdges[e.__hpcc_id]=e}),this.calcAncestorVisibility(t)}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(const e in this.m_visibleEdges){const t=this.m_visibleEdges[e];let n=t.getSource();for(this.addSemiVisibleVertex(n);this.noSpills&&n.isSpill();){const e=n.getInEdges();if(!e.length)break;this.addSemiVisibleEdge(e[0]),n=e[0].getSource(),this.addSemiVisibleVertex(n)}let s=t.getTarget();for(this.addSemiVisibleVertex(s);this.noSpills&&s.isSpill();){const e=s.getOutEdges();if(!e.length)break;this.addSemiVisibleEdge(e[0]),s=e[0].getTarget(),this.addSemiVisibleVertex(s)}}}writeXgmml(){this.subgraphVisited(this.graph.subgraphs[0],!0),this.graph.edges.forEach((e,t)=>{this.edgeVisited(e)})}subgraphVisited(e,t=!1){if(this.m_visibleSubgraphs[e.__hpcc_id]){let n="";this.m_xgmml+=t?"":'<node id="'+e.__hpcc_id+'"><att><graph>';const s=this.m_xgmml.length;if(e.walkSubgraphs(this),e.walkVertices(this),s===this.m_xgmml.length){const t=e.__hpcc_vertices[0];t&&(this.m_xgmml+=this.buildVertexString(t,!0))}const r=e.getProperties();for(const e in r)n+='<att name="'+e+'" value="'+Ic(r[e])+'"/>';this.m_xgmml+=t?"":"</graph></att>"+n+"</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))}};t(Qc,"LocalisedXGMMLWriter");let Bc=Qc;const Oc=class _GraphItem{__hpcc_graph;__hpcc_parent;__widget;__hpcc_id;_globalID;constructor(e,t){this.__hpcc_graph=e,this.__hpcc_id=t,this._globalID=t}getProperties(){const e={};for(const t in this)0!==t.indexOf("__")&&this.hasOwnProperty(t)&&(e[t]=this[t]);return e}};t(Oc,"GraphItem");let Xc=Oc;const Hc=class _Subgraph extends Xc{_globalType;__hpcc_subgraphs;__hpcc_vertices;__hpcc_edges;id;constructor(e,t){super(e,t),this._globalType="0"===t?"Graph":"Cluster",this.__hpcc_subgraphs=[],this.__hpcc_vertices=[],this.__hpcc_edges=[],this.id=t}addSubgraph(e){e.__hpcc_parent=this,this.__hpcc_subgraphs.some(t=>e===t)||this.__hpcc_subgraphs.push(e)}addVertex(e){e.__hpcc_parent=this,this.__hpcc_vertices.some(t=>e===t)||this.__hpcc_vertices.push(e)}removeVertex(e){this.__hpcc_vertices=this.__hpcc_vertices.filter(t=>e!==t)}addEdge(e){e.__hpcc_parent=this,this.__hpcc_edges.some(t=>e===t)||this.__hpcc_edges.push(e)}removeEdge(e){this.__hpcc_edges=this.__hpcc_edges.filter(t=>e!==t)}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((t,n)=>{e.subgraphVisited(t)&&t.walkSubgraphs(e)})}walkVertices(e){this.__hpcc_vertices.forEach((t,n)=>{e.vertexVisited(t)})}};t(Hc,"Subgraph");let $c=Hc;const Jc=class _Vertex extends Xc{_globalType="Vertex";_isSpill;constructor(e,t){super(e,t)}isSpill(){return this._isSpill}remove(){const e=this.getInVertices();e.length<=1&&console.warn(this.__hpcc_id+": remove only supports single or zero inputs activities..."),this.getInEdges().forEach(e=>{e.remove()}),this.getOutEdges().forEach(t=>{t.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)}};t(Jc,"Vertex");let qc=Jc;const Yc=class _Edge extends Xc{_globalType="Edge";_sourceActivity;source;_targetActivity;target;constructor(e,t){super(e,t),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]}};t(Yc,"Edge");let zc=Yc;const Zc=class _QueryGraph{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;const t=(new DOMParser).parseFromString(e,"text/xml");this.walkDocument(t.documentElement,"0")}isSubgraph(e){return e instanceof $c}isVertex(e){return e instanceof qc}isEdge(e){return e instanceof zc}getGlobalType(e){return e instanceof qc?3:e instanceof zc?4:e instanceof $c?2:e instanceof _QueryGraph?1:0}getGlobalTypeString(e){return e instanceof qc?"Vertex":e instanceof zc?"Edge":e instanceof $c?"Cluster":e instanceof _QueryGraph?"Graph":"Unknown"}getItem(e,t){if(!this.idx[t])switch(e.tagName){case"graph":const e=new $c(this,t);this.subgraphs.push(e),this.idx[t]=e;break;case"node":const n=new qc(this,t);this.vertices.push(n),this.idx[t]=n;break;case"edge":const s=new zc(this,t);this.edges.push(s),this.idx[t]=s;break;default:console.warn("Graph.getItem - Unknown Node Type!")}const n=this.idx[t];return Array.from(e.attributes).forEach(e=>{Nc(n,e.name,e.value)}),n}removeItem(e){delete this.idx[e.__hpcc_id],e instanceof $c?this.subgraphs=this.subgraphs.filter(t=>e!==t):e instanceof qc?this.vertices=this.vertices.filter(t=>e!==t):e instanceof zc&&(this.edges=this.edges.filter(t=>e!==t))}getChildByTagName(e,t){let n=null;return Array.from(e.childNodes).some(e=>{if(e.tagName===t)return n=e,!0}),n}walkDocument(e,t){const n=this.getItem(e,t);return e.childNodes.forEach(e=>{if(1===e.nodeType)switch(e.tagName){case"graph":break;case"node":let t=!1;const s=this.getChildByTagName(e,"att");if(s){const r=this.getChildByTagName(s,"graph");if(r){t=!0;const s=this.walkDocument(r,e.getAttribute("id"));n.addSubgraph(s)}}if(!t){const t=this.walkDocument(e,e.getAttribute("id"));n.addVertex(t)}break;case"att":const r=e.getAttribute("name"),i="_"+r,o=e.getAttribute("value");0===r.indexOf("Time")?(Nc(n,i,o),Nc(n,r,""+jc(o))):0===r.indexOf("Size")?(Nc(n,i,o),Nc(n,r,""+Gc(o))):0===r.indexOf("Skew")?(Nc(n,i,o),Nc(n,r,""+Vc(o))):Nc(n,r,o);break;case"edge":const c=this.walkDocument(e,e.getAttribute("id"));if(void 0!==c.NumRowsProcessed?c._eclwatchCount=c.NumRowsProcessed.replace(/\B(?=(\d{3})+(?!\d))/g,","):void 0!==c.Count?c._eclwatchCount=c.Count.replace(/\B(?=(\d{3})+(?!\d))/g,","):void 0!==c.count&&(c._eclwatchCount=c.count.replace(/\B(?=(\d{3})+(?!\d))/g,",")),c.inputProgress&&(c._eclwatchInputProgress="["+c.inputProgress.replace(/\B(?=(\d{3})+(?!\d))/g,",")+"]"),c.SkewMaxRowsProcessed&&c.SkewMinRowsProcessed&&(c._eclwatchSkew="+"+c.SkewMaxRowsProcessed+", "+c.SkewMinRowsProcessed),c._dependsOn);else if(c._childGraph);else if(c._sourceActivity||c._targetActivity){c._isSpill=!0;const e=c.getSource();e&&(e._isSpill=!0);const t=c.getTarget();t&&(t._isSpill=!0)}n.addEdge(c)}}),n}removeSubgraphs(){[...this.subgraphs].forEach(e=>{e.__hpcc_parent instanceof $c&&e.remove()})}removeSpillVertices(){[...this.vertices].forEach(e=>{e.isSpill()&&e.remove()})}getLocalisedXGMML(e,t,n,s){const r=new Bc(this);return r.calcVisibility(e,t,n,s),r.writeXgmml(),"<graph>"+r.m_xgmml+"</graph>"}};t(Zc,"QueryGraph");let Kc=Zc;const ea=n("@hpcc-js/comms/ecl/query.ts"),ta=Ai("~s");function na(e){return!isNaN(parseFloat(e))&&!isNaN(e-0)}t(na,"isNumber");const sa=class _QueryCache extends l{constructor(){super(e=>l.hash([e.QueryId,e.QuerySet]))}};t(sa,"QueryCache");const ra=new sa,ia=class _Query extends h{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,t,n,s){super(),this.wsWorkunitsService=e instanceof li?e:new li(e),this.topology=Mc.attach(this.wsWorkunitsService.opts()),this.set({QuerySet:t,QueryId:n,...s})}static attach(e,t,n,s){const r=ra.get({BaseUrl:e.baseUrl,QuerySet:t,QueryId:n},()=>new _Query(e,t,n));return s&&r.set(s),r}_eclService;async wsEclService(){return this._eclService||(this._eclService=this.topology.fetchServices({}).then(e=>{for(const t of e?.TpEspServers?.TpEspServer??[])for(const e of t?.TpBindings?.TpBinding??[])if("ws_ecl"===e?.Service){const t=`${e.Protocol}://${globalThis.location.hostname}:${e.Port}`;return new mt({baseUrl:t})}})),this._eclService}async fetchDetails(){const e=await this.wsWorkunitsService.WUQueryDetails({QuerySet:this.QuerySet,QueryId:this.QueryId,IncludeStateOnClusters:!0,IncludeSuperFiles:!0,IncludeWsEclAddresses:!0,CheckAllNodes:!1});this.set({...e})}async fetchRequestSchema(){const e=await this.wsEclService();try{this._requestSchema=await(e?.requestJson(this.QuerySet,this.QueryId))??[]}catch(t){ea.debug(t.message??t),this._requestSchema=[]}}async fetchResponseSchema(){const e=await this.wsEclService();try{this._responseSchema=await(e?.responseJson(this.QuerySet,this.QueryId))??{}}catch(t){ea.debug(t.message??t),this._responseSchema={}}}async fetchSchema(){await Promise.all([this.fetchRequestSchema(),this.fetchResponseSchema()])}fetchSummaryStats(){return this.wsWorkunitsService.WUQueryGetSummaryStats({Target:this.QuerySet,QueryId:this.QueryId})}fetchGraph(e="",t=""){return this.wsWorkunitsService.WUQueryGetGraph({Target:this.QuerySet,QueryId:this.QueryId,GraphName:e,SubGraphId:t}).then(e=>{const t=new Kc;let n=!0;for(const s of e?.Graphs?.ECLGraphEx||[])n?(t.load(s.Graph),n=!1):t.merge(s.Graph);return t})}fetchDetailsNormalized(e={}){const t=rc.attach(this.wsWorkunitsService,this.Wuid);return t?Promise.all([this.fetchGraph(),t.fetchDetailsMeta(),t.fetchDetailsRaw(e)]).then(e=>{const n=e[0],s=e[1],r=e[2].map(e=>{const t=e.Id[0];if("a"===t||"e"===t){const t=n.idx[e.Id.substring(1)];if(!t)return ea.debug(`Missing graph data for metric ID: ${e.Id}`),e;const s=new Set(e.Properties.Property.map(e=>e.Name)),r=[];for(const e in t){const n=e.charAt(0);if("_"!==n&&n===n.toUpperCase()&&!s.has(e)){const n=t[e],s=typeof n;if("string"===s||"number"===s||"boolean"===s){let t=na(n)?parseFloat(n):n,s=n;e.indexOf("Time")>=0&&(t/=1e9,s=ta(t)+"s"),r.push({Name:e,RawValue:t,Formatted:s})}}}r.length>0&&e.Properties.Property.push(...r)}return e});return t.normalizeDetails(s,r)}):Promise.resolve({meta:void 0,columns:void 0,data:void 0})}async submit(e){const t=await this.wsEclService();try{return t?.submit(this.QuerySet,this.QueryId,e).then(e=>{for(const t in e)e[t]=e[t].Row;return e})??[]}catch(n){return ea.debug(n.message??n),[]}}async refresh(){return await Promise.all([this.fetchDetails(),this.fetchSchema()]),this}requestFields(){return this._requestSchema?this._requestSchema:[]}responseFields(){return this._responseSchema?this._responseSchema:{}}resultNames(){const e=[];for(const t in this.responseFields())e.push(t);return e}resultFields(e){return this._responseSchema[e]?this._responseSchema[e]:[]}};t(ia,"Query");let oa=ia;const ca=class _StoreCache extends l{constructor(){super(e=>`${e.BaseUrl}-${e.Name}:${e.UserSpecific}-${e.Namespace}`)}};t(ca,"StoreCache");let aa=ca;const ua=new aa,ha=class _ValueChangedMessage extends R{constructor(e,t,n){super(),this.key=e,this.value=t,this.oldValue=n}key;value;oldValue;get canConflate(){return!0}conflate(e){return this.key===e.key&&(this.value=e.value,!0)}void(){return this.value===this.oldValue}};t(ha,"ValueChangedMessage");let la=ha;const da=class _Store{connection;get BaseUrl(){return this.connection.baseUrl}Name;UserSpecific;Namespace;_dispatch=new C;static attach(e,t="HPCCApps",n,s=!0){return ua.get({BaseUrl:e.baseUrl,Name:t,UserSpecific:s,Namespace:n},()=>new _Store(e,t,n,s))}constructor(e,t,n,s){this.connection=e instanceof Pr?e:new Pr(e),this.Name=t,this.UserSpecific=s,this.Namespace=n}_knownValues={};create(){this.connection.CreateStore({Name:this.Name,Type:"",Description:""})}set(e,t,n=!0){return this.connection.Set({StoreName:this.Name,UserSpecific:this.UserSpecific,Namespace:this.Namespace,Key:e,Value:t}).then(s=>{const r=this._knownValues[e];this._knownValues[e]=t,n&&this._dispatch.post(new la(e,t,r))}).catch(n=>{console.error(`Store.set("${e}", "${t}") failed:`,n)})}get(e,t=!0){return this.connection.Fetch({StoreName:this.Name,UserSpecific:this.UserSpecific,Namespace:this.Namespace,Key:e}).then(n=>{const s=this._knownValues[e];return this._knownValues[e]=n.Value,t&&this._dispatch.post(new la(e,n.Value,s)),n.Value}).catch(t=>{console.error(`Store.get(${e}) failed:`,t)})}getAll(e=!0){return this.connection.FetchAll({StoreName:this.Name,UserSpecific:this.UserSpecific,Namespace:this.Namespace}).then(t=>{const n={},s=this._knownValues;if(this._knownValues={},t.Pairs.Pair.forEach(t=>{const r=this._knownValues[t.Key];this._knownValues[t.Key]=t.Value,delete s[t.Key],n[t.Key]=t.Value,e&&this._dispatch.post(new la(t.Key,t.Value,r))}),e)for(const e in s)this._dispatch.post(new la(e,void 0,s[e]));return n}).catch(e=>(console.error("Store.getAll failed:",e),{}))}delete(e,t=!0){return this.connection.Delete({StoreName:this.Name,UserSpecific:this.UserSpecific,Namespace:this.Namespace,Key:e}).then(n=>{const s=this._knownValues[e];delete this._knownValues[e],t&&this._dispatch.post(new la(e,void 0,s))}).catch(t=>{console.error(`Store.delete(${e}) failed:`,t)})}monitor(e){return this._dispatch.attach(e)}};t(da,"Store");let pa=da;const ga=n("@hpcc-js/comms/dfuWorkunit.ts"),ma=class _DFUWorkunitCache extends l{constructor(){super(e=>`${e.BaseUrl}-${e.ID}`)}};t(ma,"DFUWorkunitCache");let Sa=ma;const fa=new Sa,_a=class _DFUWorkunit extends h{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,t){const n=new _DFUWorkunit(e);return n.connection.CreateDFUWorkunit({DFUServerQueue:t}).then(e=>(fa.set(n),n.set(e.result),n))}static attach(e,t,n){const s=fa.get({BaseUrl:e.baseUrl,ID:t},()=>new _DFUWorkunit(e,t));return n&&s.set(n),s}static sprayFixed(e,t){const n=new he(e);return n.SprayFixedEx({...t}).then(t=>{const s=t.wuid;return n.GetDFUWorkunit({wuid:s}).then(t=>_DFUWorkunit.attach(e,s,t.result))})}static sprayVariable(e,t){const n=new he(e);return n.SprayVariableEx({...t}).then(t=>{const s=t.wuid;return n.GetDFUWorkunit({wuid:s}).then(t=>_DFUWorkunit.attach(e,s,t.result))})}static despray(e,t){const n=new he(e);return n.DesprayEx({...t}).then(t=>{const s=t.wuid;return n.GetDFUWorkunit({wuid:s}).then(t=>_DFUWorkunit.attach(e,s,t.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}return!1}isFailed(){return!(!this.isComplete()||6===this.State)}isDeleted(){return 999===this.State}isRunning(){return!this.isComplete()}abort(){return this.connection.AbortDFUWorkunit({wuid:this.ID})}delete(){return this.DFUWUAction(ne.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(){this.isComplete()?this._monitorTickCount=0:super._monitor()}_monitorTimeoutDuration(){const 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(e=>e).catch(e=>"")}DFUWUAction(e){return this.connection.DFUWorkunitsAction({wuids:{Item:[this.ID]},Type:e}).then(t=>e===ne.DFUWUActions.Delete?t:this.refresh().then(()=>(this._monitor(),t)))}on(e,t,n){if(this.isCallback(t))switch(e){case"finished":super.on("propChanged","State",e=>{this.isComplete()&&t([e])});break;case"changed":super.on(e,t)}else if("changed"===e)super.on(e,t,n);return this._monitor(),this}watchUntilComplete(e){return new Promise((t,n)=>{const s=this.watch(n=>{e&&e(n),this.isComplete()&&(s.release(),t(this))})})}watchUntilRunning(e){return new Promise((t,n)=>{const s=this.watch(n=>{e&&e(n),(this.isComplete()||this.isRunning())&&(s.release(),t(this))})})}constructor(e,t){super(),this.connection=new he(e),this.topologyConnection=new kr(e),this.clearState(t)}clearState(e){this.clear({ID:e,State:0})}GetDFUWorkunit(e={}){return this.connection.GetDFUWorkunit({...e,wuid:this.ID}).then(e=>(this.set(e.result),e)).catch(e=>{if(!e.Exception.some(e=>(20080===e.Code||20081===e.Code)&&(this.clearState(this.ID),this.set("State",999),!0)))throw ga.warning(`Unexpected ESP exception: ${e.message}`),e;return{}})}};t(_a,"DFUWorkunit");let Ua=_a;export{ve as AccessService,be as AccountService,lc as Activity,Ao as Attribute,F as BUILD_VERSION,Po as BaseScope,Le as CloudService,ke as CodesignService,O as Connection,tt as DFUArrayActions,st as DFUChangeProtection,rt as DFUChangeRestriction,nt as DFUDefFileFormat,ot as DFUService,ae as DFUWUTypes,Ua as DFUWorkunit,Sa as DFUWorkunitCache,ht as DFUXRefService,Be as DaliService,Mi as ECLGraph,K as ESPConnection,q as ESPExceptions,mt as EclService,Ut as ElkService,ne as FileSpray,he as FileSprayService,ce as FileSprayStates,Co as GlobalResultCache,Ii as GraphCache,Lt as LogType,Ot as LogaccessService,fc as LogicalFile,gc as LogicalFileCache,Cc as Machine,Uc as MachineCache,rn as MachineService,D as PKG_NAME,b as PKG_VERSION,un as PackageProcessService,Oo as PropertyType,oa as Query,Kc as QueryGraph,Xo as RelatedProperty,io as Resource,pn as ResourcesService,bo as Result,Wo as ResultCache,Wr as SMCService,yn as SashaService,Lo as Scope,no as ScopeEdge,Yi as ScopeGraph,Zi as ScopeSubgraph,eo as ScopeVertex,te as Service,Mo as SourceFile,pa as Store,aa as StoreCache,Pr as StoreService,Et as TargetAudience,Wc as TargetCluster,Dc as TargetClusterCache,Io as Timer,Mc as Topology,xc as TopologyCache,kr as TopologyService,la as ValueChangedMessage,oi as WUStateID,si as WUUpdate,rc as Workunit,tc as WorkunitCache,li as WorkunitsService,pi as WorkunitsServiceEx,le as WsAccess,Ee as WsCodesign,Oe as WsDfu,yt as WsLogaccess,es as WsSMC,gn as WsSasha,xr as WsTopology,Gr as WsWorkunits,$i as XGMMLEdge,Vi as XGMMLGraph,Bi as XGMMLSubgraph,Xi as XGMMLVertex,co as XSDNode,go as XSDSchema,lo as XSDSimpleType,uo as XSDXMLNode,X as createConnection,so as createGraph,Ji as createXGMMLGraph,wc as defaultTargetCluster,L as deserializeResponse,k as get,Q as hookSend,w as instanceOfIConnection,T as instanceOfIOptions,$ as isArray,ci as isECLResult,Y as isExceptions,ui as isWUInfoWorkunit,ai as isWUQueryECLWorkunit,E as jsonp,fo as parseXSD,yo as parseXSD2,j as post,G as send,x as serializeRequest,H as setTransportFactory,qo as splitMetric,Tc as targetClusters};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|