@hpcc-js/comms 3.13.0 → 3.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +4 -4
- package/dist/node/index.js +9 -9
- package/dist/node/index.js.map +4 -4
- package/package.json +3 -5
- package/src/ecl/workunit.ts +1 -0
- package/src/index.node.ts +11 -27
- package/src/services/wsSMC.ts +1 -1
- package/src/services/wsWorkunits.ts +1 -1
- package/src/services/wsdl/WsSMC/v1.29/WsSMC.ts +660 -0
- package/src/services/wsdl/WsWorkunits/v2.03/WsWorkunits.ts +3164 -0
- package/types/ecl/workunit.d.ts +1 -0
- package/types/services/wsSMC.d.ts +1 -1
- package/types/services/wsWorkunits.d.ts +1 -1
- package/types/services/wsdl/WsSMC/{v1.28 → v1.29}/WsSMC.d.ts +10 -0
- package/types/services/wsdl/WsWorkunits/{v2.02 → v2.03}/WsWorkunits.d.ts +2 -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,promiseTimeout as r,utf8ToBase64 as i,exists as o,deepMixin as c,xml2json as a,StateObject as u,Cache as h,Graph as l,Subgraph as d,Vertex as p,Edge as g,SAXStackParser as m,Stack as S,espTime2Seconds as f,deepMixinT as _,XMLNode as U,debounce as y,Message as v,Dispatch as C}from"@hpcc-js/util";const D="@hpcc-js/comms",R="3.13.0",b="3.18.0",F=n("comms/connection.ts");function W(e){return"baseUrl"in e}t(W,"instanceOfIOptions");const T={type:"post",baseUrl:"",userID:"",password:"",rejectUnauthorized:!0,timeoutSecs:60};function A(e){return"function"==typeof e.opts&&"function"==typeof e.send&&"function"==typeof e.clone}function w(e,t){return void 0===t||!0===t?encodeURIComponent(e):""+e}function P(e,t=!0,n=""){if(n&&(n+="."),"object"!=typeof e)return w(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(P(e,t,n+w(`${r}.${o}`,t)))):s.push(n+w(`${r}_i${o}`,t)+"="+P(e,t))}),i&&s.push(n+w(`${r}.itemcount`,t)+"="+e[r].length)}else"object"==typeof e[r]?e[r]&&e[r].Item instanceof Array?(s.push(P(e[r].Item,t,n+w(r,t))),s.push(n+w(`${r}.itemcount`,t)+"="+e[r].Item.length)):s.push(P(e[r],t,n+w(r,t))):void 0!==e[r]?s.push(n+w(r,t)+"="+w(e[r],t)):s.push(n+w(r,t));return s.join("&")}function x(e){return JSON.parse(e)}function L(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?x(e):e)};const h=document.createElement("script");let l=s(e.baseUrl,n);l+=l.indexOf("?")>=0?"&":"?",h.src=l+"jsonp="+u+"&"+P(r,e.encodeRequest),document.body.appendChild(h);const d=setInterval(function(){a<=0?clearInterval(d):(a-=5e3,a<=0?(clearInterval(d),F.error("Request timeout: "+h.src),p(),c(Error("Request timeout: "+h.src))):F.debug("Request pending ("+a/1e3+" sec): "+h.src))},5e3);function p(){delete window[u],document.body.removeChild(h)}t(p,"doCallback")})}function E(e){return e.userID?{Authorization:`Basic ${i(`${e.userID}:${e.password}`)}`}:{}}t(A,"instanceOfIConnection"),t(w,"encode"),t(P,"serializeRequest"),t(x,"deserializeResponse"),t(L,"jsonp"),t(E,"authHeader");const M={};function N(e,n,i,o,c){function a(e){if(e.ok)return"json"===c?e.json():e.text();throw new Error(e.statusText)}return o={...E(e),...o},i={credentials:M[e.baseUrl]?"omit":"include",...i,headers:o},fetch.__setGlobalDispatcher&&fetch.__setGlobalDispatcher(fetch.__defaultAgent),0===e.baseUrl.indexOf("https:")&&(!1===e.rejectUnauthorized&&fetch.__rejectUnauthorizedAgent?fetch.__setGlobalDispatcher?fetch.__setGlobalDispatcher(fetch.__rejectUnauthorizedAgent):i.agent=fetch.__rejectUnauthorizedAgent:fetch.__trustwaveAgent&&(i.agent=fetch.__trustwaveAgent)),t(a,"handleResponse"),r(1e3*e.timeoutSecs,fetch(s(e.baseUrl,n),i).then(a).catch(t=>(i.credentials=M[e.baseUrl]?"include":"omit",fetch(s(e.baseUrl,n),i).then(a).then(t=>(M[e.baseUrl]=!M[e.baseUrl],t)))))}function I(e,t,n,s="json",r){let i;return n.upload_&&(delete n.upload_,t+="?upload_"),n.abortSignal_&&(i=n.abortSignal_,delete n.abortSignal_),N(e,t,{method:"post",body:P(n,e.encodeRequest),signal:i},{"Content-Type":"application/x-www-form-urlencoded",...r},s)}function j(e,t,n,s="json",r){let i;return n.abortSignal_&&(i=n.abortSignal_,delete n.abortSignal_),N(e,`${t}?${P(n,e.encodeRequest)}`,{method:"get",signal:i},{...r},s)}function k(e,t,n,s="json",r){let i;switch(e.type){case"jsonp":i=L(e,t,n,s,r);break;case"get":i=j(e,t,n,s,r);break;default:i=I(e,t,n,s,r)}return i}t(N,"doFetch"),t(I,"post"),t(j,"get"),t(k,"send");let G=k;function V(e){const t=G;return e&&(G=e),t}t(V,"hookSend");const Q=class _Connection{_opts;get baseUrl(){return this._opts.baseUrl}constructor(e){this.opts(e)}opts(e){return 0===arguments.length?this._opts:(this._opts={...T,...e},this)}send(e,t,n="json",s){return this._opts.hookSend?this._opts.hookSend(this._opts,e,t,n,G,s):G(this._opts,e,t,n,s)}clone(){return new _Connection(this.opts())}};t(Q,"Connection");let B=Q,O=/* @__PURE__ */t(function(e){return new B(e)},"createConnection");function X(e){const t=O;return O=e,t}function H(e){return"[object Array]"===Object.prototype.toString.call(e)}t(X,"setTransportFactory"),t(H,"isArray");const $=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($,"ESPExceptions");let J=$;function q(e){return e instanceof J||e.isESPExceptions&&Array.isArray(e.Exception)}function Y(e){return void 0!==e.send}t(q,"isExceptions"),t(Y,"isConnection");const z=class _ESPConnection{_connection;get baseUrl(){return this._connection.opts().baseUrl}_service;_version;constructor(e,t,n){this._connection=Y(e)?e:O(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(H(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 J(e,c,t.Exceptions);if(t&&(n=t[o||e+"Response"]),!n)throw new J(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 Z=z;const K=class _Service{_connection;get baseUrl(){return this._connection.opts().baseUrl}constructor(e,t,n){this._connection=new Z(e,t,n)}opts(){return this._connection.opts()}connection(){return this._connection.clone()}};t(K,"Service");let ee=K;var te,ne,se;ne=te||(te={}),(se=ne.DFUWUActions||(ne.DFUWUActions={})).Delete="Delete",se.Protect="Protect",se.Unprotect="Unprotect",se.Restore="Restore",se.SetToFailed="SetToFailed",se.Archive="Archive";const re=class _FileSprayServiceBase extends ee{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(re,"FileSprayServiceBase");let ie=re;var oe=/* @__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))(oe||{});const ce=class _FileSprayService extends ie{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(ce,"FileSprayService");let ae=ce;var ue,he,le,de,pe,ge,me;he=ue||(ue={}),(le=he.ViewMemberType||(he.ViewMemberType={})).User="User",le.Group="Group",(de=he.UserSortBy||(he.UserSortBy={})).username="username",de.fullname="fullname",de.passwordexpiration="passwordexpiration",de.employeeID="employeeID",de.employeeNumber="employeeNumber",(pe=he.GroupSortBy||(he.GroupSortBy={})).Name="Name",pe.ManagedBy="ManagedBy",(ge=he.AccountTypeReq||(he.AccountTypeReq={})).Any="Any",ge.User="User",ge.Group="Group",(me=he.ResourcePermissionSortBy||(he.ResourcePermissionSortBy={})).Name="Name",me.Type="Type",(he.ResourceSortBy||(he.ResourceSortBy={})).Name="Name";const Se=class _AccessServiceBase extends ee{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(Se,"AccessServiceBase");let fe=Se;const _e=class _AccessService extends fe{};t(_e,"AccessService");let Ue=_e;const ye=class _AccountServiceBase extends ee{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(ye,"AccountServiceBase");let ve=ye;const Ce=class _AccountService extends ve{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(Ce,"AccountService");let De=Ce;const Re=class _CloudServiceBase extends ee{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(Re,"CloudServiceBase");let be=Re;const Fe=n("@hpcc-js/comms/services/wsCloud.ts");function We(e){return void 0!==e?.Pods}function Te(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 Ae(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:Te(e)}}})}t(We,"isGetPODsResponse_v1_02"),t(Te,"mapPorts"),t(Ae,"mapPods");const we=class _CloudService extends be{getPODs(){return super.GetPODs({}).then(e=>{if(We(e))return e.Pods?.Pod??[];try{const t="string"==typeof e.Result?JSON.parse(e.Result):e.Result;return Ae(t?.items??[])}catch(t){return Fe.error(`Error parsing V1Pods json '${t instanceof Error?t.message:String(t)}'`),[]}})}};t(we,"CloudService");let Pe=we;var xe,Le;((Le=xe||(xe={})).SigningMethodType||(Le.SigningMethodType={})).gpg="gpg";const Ee=class _CodesignServiceBase extends ee{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(Ee,"CodesignServiceBase");let Me=Ee;const Ne=class _CodesignService extends Me{ListUserIDsEx(e){return super.ListUserIDs(e).then(e=>e.UserIDs.Item).catch(e=>[])}Sign(e){return super.Sign({SigningMethod:xe.SigningMethodType.gpg,...e})}};t(Ne,"CodesignService");let Ie=Ne;const je=class _DaliServiceBase extends ee{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(je,"DaliServiceBase");let ke=je;const Ge=class _DaliService extends ke{};t(Ge,"DaliService");let Ve=Ge;var Qe,Be,Oe,Xe,He,$e,Je,qe,Ye;Be=Qe||(Qe={}),(Oe=Be.DFUArrayActions||(Be.DFUArrayActions={})).Delete="Delete",Oe.AddToSuperfile="Add To Superfile",Oe.ChangeProtection="Change Protection",Oe.ChangeRestriction="Change Restriction",(Xe=Be.DFUChangeProtection||(Be.DFUChangeProtection={}))[Xe.NoChange=0]="NoChange",Xe[Xe.Protect=1]="Protect",Xe[Xe.Unprotect=2]="Unprotect",Xe[Xe.UnprotectAll=3]="UnprotectAll",(He=Be.DFUChangeRestriction||(Be.DFUChangeRestriction={}))[He.NoChange=0]="NoChange",He[He.Restrict=1]="Restrict",He[He.Unrestricted=2]="Unrestricted",($e=Be.DFUDefFileFormat||(Be.DFUDefFileFormat={})).xml="xml",$e.def="def",(Je=Be.FileAccessRole||(Be.FileAccessRole={})).Token="Token",Je.Engine="Engine",Je.External="External",(qe=Be.SecAccessType||(Be.SecAccessType={})).None="None",qe.Access="Access",qe.Read="Read",qe.Write="Write",qe.Full="Full",(Ye=Be.DFUFileType||(Be.DFUFileType={})).Flat="Flat",Ye.Index="Index",Ye.Xml="Xml",Ye.Csv="Csv",Ye.Json="Json",Ye.IndexLocal="IndexLocal",Ye.IndexPartitioned="IndexPartitioned",Ye.Unset="Unset";const ze=class _DfuServiceBase extends ee{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(ze,"DfuServiceBase");let Ze=ze;const Ke=Qe.DFUArrayActions,et=Qe.DFUDefFileFormat,tt=Qe.DFUChangeProtection,nt=Qe.DFUChangeRestriction,st=class _DFUService extends Ze{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(st,"DFUService");let rt=st;const it=class _DFUXRefServiceBase extends ee{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(it,"DFUXRefServiceBase");let ot=it;const ct=class _DFUXRefService extends ot{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(ct,"DFUXRefService");let at=ct;function ut(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:ht(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:lt(t)}}default:throw new Error("Unknown field type")}}function ht(e){e.Row&&e.Row instanceof Array&&(e=e.Row[0]);const t=[];for(const n in e)t.push(ut(n,e[n]));return t}function lt(e){const t={};for(const n in e)t[n]=ut(n,e[n]);return t}t(ut,"jsonToIField"),t(ht,"jsonToIFieldArr"),t(lt,"jsonToIFieldObj");const dt=class _EclService extends ee{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(ht)}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]=ht(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 J(s,n,{Source:"wsEcl.submit",Exception:e.Results.Exception});return e.Results})}};t(dt,"EclService");let pt=dt;const gt=class _ElkServiceBase extends ee{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(gt,"ElkServiceBase");let mt=gt;const St=class _ElkService extends mt{};t(St,"ElkService");let ft=St;var _t,Ut,yt,vt,Ct,Dt,Rt,bt,Ft,Wt;Ut=_t||(_t={}),(yt=Ut.LogColumnType||(Ut.LogColumnType={})).global="global",yt.workunits="workunits",yt.components="components",yt.audience="audience",yt.class="class",yt.instance="instance",yt.node="node",yt.message="message",yt.logid="logid",yt.processid="processid",yt.threadid="threadid",yt.timestamp="timestamp",yt.pod="pod",yt.traceid="traceid",yt.spanid="spanid",(vt=Ut.LogColumnValueType||(Ut.LogColumnValueType={})).string="string",vt.numeric="numeric",vt.datetime="datetime",vt.enum="enum",vt.epoch="epoch",(Ct=Ut.LogAccessType||(Ut.LogAccessType={}))[Ct.All=0]="All",Ct[Ct.ByJobID=1]="ByJobID",Ct[Ct.ByComponent=2]="ByComponent",Ct[Ct.ByLogType=3]="ByLogType",Ct[Ct.ByTargetAudience=4]="ByTargetAudience",Ct[Ct.BySourceInstance=5]="BySourceInstance",Ct[Ct.BySourceNode=6]="BySourceNode",Ct[Ct.ByFieldName=7]="ByFieldName",Ct[Ct.ByPod=8]="ByPod",Ct[Ct.ByTraceID=9]="ByTraceID",Ct[Ct.BySpanID=10]="BySpanID",(Dt=Ut.LogAccessStatusCode||(Ut.LogAccessStatusCode={}))[Dt.Success=0]="Success",Dt[Dt.Warning=1]="Warning",Dt[Dt.Fail=2]="Fail",(Rt=Ut.LogAccessFilterOperator||(Ut.LogAccessFilterOperator={}))[Rt.NONE=0]="NONE",Rt[Rt.AND=1]="AND",Rt[Rt.OR=2]="OR",(bt=Ut.LogSelectColumnMode||(Ut.LogSelectColumnMode={}))[bt.MIN=0]="MIN",bt[bt.DEFAULT=1]="DEFAULT",bt[bt.ALL=2]="ALL",bt[bt.CUSTOM=3]="CUSTOM",(Ft=Ut.SortColumType||(Ut.SortColumType={}))[Ft.ByDate=0]="ByDate",Ft[Ft.ByJobID=1]="ByJobID",Ft[Ft.ByComponent=2]="ByComponent",Ft[Ft.ByLogType=3]="ByLogType",Ft[Ft.ByTargetAudience=4]="ByTargetAudience",Ft[Ft.BySourceInstance=5]="BySourceInstance",Ft[Ft.BySourceNode=6]="BySourceNode",Ft[Ft.ByFieldName=7]="ByFieldName",Ft[Ft.ByPod=8]="ByPod",Ft[Ft.ByTraceID=9]="ByTraceID",Ft[Ft.BySpanID=10]="BySpanID",(Wt=Ut.SortDirection||(Ut.SortDirection={}))[Wt.ASC=0]="ASC",Wt[Wt.DSC=1]="DSC";const Tt=class _LogaccessServiceBase extends ee{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(Tt,"LogaccessServiceBase");let At=Tt;const wt=n("@hpcc-js/comms/services/wsLogaccess.ts");var Pt=/* @__PURE__ */(e=>(e.Disaster="DIS",e.Error="ERR",e.Warning="WRN",e.Information="INF",e.Progress="PRO",e.Metric="MET",e))(Pt||{}),xt=/* @__PURE__ */(e=>(e.Operator="OPR",e.User="USR",e.Programmer="PRO",e.Audit="ADT",e))(xt||{});const Lt=class _LogaccessService extends At{_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:_t.LogAccessType.All}}]}},Range:{StartDate:/* @__PURE__ */new Date(0).toISOString()},LogLineStartFrom:e.LogLineStartFrom??0,LogLineLimit:e.LogLineLimit??100,SelectColumnMode:_t.LogSelectColumnMode.DEFAULT,Format:"JSON",SortBy:{SortCondition:[{BySortType:_t.SortColumType.ByDate,ColumnName:"",Direction:0}]}},o=[];for(const t in e){let n,r;if(t in s&&(n=Object.values(_t.LogColumnType).includes(t)?t:s[t]),n){switch(n){case _t.LogColumnType.workunits:case"hpcc.log.jobid":r=_t.LogAccessType.ByJobID;break;case _t.LogColumnType.audience:case"hpcc.log.audience":r=_t.LogAccessType.ByTargetAudience;break;case _t.LogColumnType.class:case"hpcc.log.class":r=_t.LogAccessType.ByLogType;break;case _t.LogColumnType.components:case"kubernetes.container.name":r=_t.LogAccessType.ByComponent;break;default:r=_t.LogAccessType.ByFieldName,n=s[t]}if(Array.isArray(e[t]))e[t].forEach(e=>{r===_t.LogAccessType.ByComponent&&(e+="*"),o.push({LogCategory:r,SearchField:n,SearchByValue:e})});else{let s=e[t];r===_t.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=_t.LogAccessFilterOperator.AND;n>0?(o[n-1].SearchField===t.SearchField&&(s=_t.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:_t.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=_t.LogAccessFilterOperator.AND,o[0].SearchField===o[1].SearchField&&(i.Filter.Operator=_t.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:wt.warning(`Unknown RemoteLogManagerType: ${n.RemoteLogManagerType}`),s=[]}return{lines:s,total:e.TotalLogLinesAvailable??1e4}}catch(t){wt.error(t.message??t)}return{lines:[],total:0}})}};t(Lt,"LogaccessService");let Et=Lt;function Mt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Nt(e){return 1===e.length&&(e=It(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 It(e){return function(t,n){return Mt(e(t),n)}}function jt(e){return null===e?NaN:+e}function kt(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 Gt(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 Vt,Qt,Bt,Ot;t(Mt,"ascending"),t(Nt,"bisector"),t(It,"ascendingComparator"),Nt(Mt),t(jt,"number"),t(kt,"d3Max"),t(Gt,"d3Mean"),Qt=Vt||(Vt={}),(Bt=Qt.ThresholdType||(Qt.ThresholdType={}))[Bt.THRESHOLD_PERCENTAGE=0]="THRESHOLD_PERCENTAGE",Bt[Bt.THRESHOLD_MB=1]="THRESHOLD_MB",(Ot=Qt.TpMachineType||(Qt.TpMachineType={})).ALLNODES="ALLNODES",Ot.THORMACHINES="THORMACHINES",Ot.HOLEMACHINES="HOLEMACHINES",Ot.ROXIEMACHINES="ROXIEMACHINES",Ot.MACHINES="MACHINES",Ot.AVAILABLEMACHINES="AVAILABLEMACHINES",Ot.DROPZONE="DROPZONE",Ot.STANDBYNNODE="STANDBYNNODE",Ot.THORSPARENODES="THORSPARENODES",Ot.HOLESTANDBYNODES="HOLESTANDBYNODES";const Xt=class _MachineServiceBase extends ee{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(Xt,"MachineServiceBase");let Ht=Xt;const $t=class _MachineService extends Ht{GetTargetClusterUsageEx(e,t=!1){return this._connection.send("GetTargetClusterUsage",{TargetClusters:e?{Item:e}:{},BypassCachedResult:t}).then(e=>o("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:Gt(t.filter(e=>!isNaN(e.PercentUsed)),e=>e.PercentUsed),max:kt(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:Gt(t.filter(e=>!isNaN(e.mean)),e=>e.mean),max:kt(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:Gt(t.filter(e=>!isNaN(e.mean)),e=>e.mean),max:kt(t.filter(e=>!isNaN(e.max)),e=>e.max)}}))}};t($t,"MachineService");let Jt=$t;const qt=class _PackageProcessServiceBase extends ee{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(qt,"PackageProcessServiceBase");let Yt=qt;const zt=class _PackageProcessService extends Yt{};t(zt,"PackageProcessService");let Zt=zt;const Kt=class _ResourcesServiceBase extends ee{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(Kt,"ResourcesServiceBase");let en=Kt;const tn=class _ResourcesService extends en{};t(tn,"ResourcesService");let nn=tn;var sn,rn,on;rn=sn||(sn={}),(on=rn.WUTypes||(rn.WUTypes={})).ECL="ECL",on.DFU="DFU";const cn=class _SashaServiceBase extends ee{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(cn,"SashaServiceBase");let an=cn;const un=class _SashaService extends an{};t(un,"SashaService");let hn=un;var ln=/* @__PURE__ */new Date,dn=/* @__PURE__ */new Date;function pn(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 pn(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 ln.setTime(+t),dn.setTime(+n),e(ln),e(dn),Math.floor(s(ln,dn))},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(pn,"newInterval");var gn=864e5,mn=6048e5,Sn=pn(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()))/gn},function(e){return e.getDate()-1});function fn(e){return pn(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()))/mn})}Sn.range,t(fn,"weekday");var _n=fn(0),Un=fn(1),yn=fn(2),vn=fn(3),Cn=fn(4),Dn=fn(5),Rn=fn(6);_n.range,Un.range,yn.range,vn.range,Cn.range,Dn.range,Rn.range;var bn=pn(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()});bn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?pn(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},bn.range;var Fn=pn(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/gn},function(e){return e.getUTCDate()-1});function Wn(e){return pn(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)/mn})}Fn.range,t(Wn,"utcWeekday");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=pn(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 Nn(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 In(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 kn(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=es(i),l=ts(i),d=es(o),p=ts(o),g=es(c),m=ts(c),S=es(a),f=ts(a),_=es(u),U=ts(u),y={a:E,A:M,b:N,B:I,c:null,d:Cs,e:Cs,f:Ws,g:js,G:Gs,H:Ds,I:Rs,j:bs,L:Fs,m:Ts,M:As,p:j,q:k,Q:ur,s:hr,S:ws,u:Ps,U:xs,V:Es,w:Ms,W:Ns,x:null,X:null,y:Is,Y:ks,Z:Vs,"%":ar},v={a:G,A:V,b:Q,B:B,c:null,d:Qs,e:Qs,f:$s,g:rr,G:or,H:Bs,I:Os,j:Xs,L:Hs,m:Js,M:qs,p:O,q:X,Q:ur,s:hr,S:Ys,u:zs,U:Zs,V:er,w:tr,W:nr,x:null,X:null,y:sr,Y:ir,Z:cr,"%":ar},C={a:W,A:T,b:A,B:w,c:P,d:ds,e:ds,f:_s,g:as,G:cs,H:gs,I:gs,j:ps,L:fs,m:ls,M:ms,p:F,q:hs,Q:ys,s:vs,S:Ss,u:ss,U:rs,V:is,w:ns,W:os,x:x,X:L,y:as,Y:cs,Z:us,"%":Us};function D(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=Jn[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 R(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=In(jn(i.y,0,1))).getUTCDay(),s=r>4||0===r?An.ceil(s):An(s),s=Fn.offset(s,7*(i.V-1)),i.y=s.getUTCFullYear(),i.m=s.getUTCMonth(),i.d=s.getUTCDate()+(i.w+6)%7):(r=(s=Nn(jn(i.y,0,1))).getDay(),s=r>4||0===r?Un.ceil(s):Un(s),s=Sn.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?In(jn(i.y,0,1)).getUTCDay():Nn(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,In(i)):Nn(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 Jn?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=D(s,y),y.X=D(r,y),y.c=D(n,y),v.x=D(s,v),v.X=D(r,v),v.c=D(n,v),t(D,"newFormat"),t(R,"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=D(e+="",y);return t.toString=function(){return e},t},"format"),parse:/* @__PURE__ */t(function(e){var t=R(e+="",!1);return t.toString=function(){return e},t},"parse"),utcFormat:/* @__PURE__ */t(function(e){var t=D(e+="",v);return t.toString=function(){return e},t},"utcFormat"),utcParse:/* @__PURE__ */t(function(e){var t=R(e+="",!0);return t.toString=function(){return e},t},"utcParse")}}Mn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?pn(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},Mn.range,t(Nn,"localDate"),t(In,"utcDate"),t(jn,"newDate"),t(kn,"formatLocale$1");var Gn,Vn,Qn,Bn,On,Xn,Hn,$n,Jn={"-":"",_:" ",0:"0"},qn=/^\s*\d+/,Yn=/^%/,zn=/[\\^$*+?|[\]().{}]/g;function Zn(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 Kn(e){return e.replace(zn,"\\$&")}function es(e){return new RegExp("^(?:"+e.map(Kn).join("|")+")","i")}function ts(e){for(var t={},n=-1,s=e.length;++n<s;)t[e[n].toLowerCase()]=n;return t}function ns(e,t,n){var s=qn.exec(t.slice(n,n+1));return s?(e.w=+s[0],n+s[0].length):-1}function ss(e,t,n){var s=qn.exec(t.slice(n,n+1));return s?(e.u=+s[0],n+s[0].length):-1}function rs(e,t,n){var s=qn.exec(t.slice(n,n+2));return s?(e.U=+s[0],n+s[0].length):-1}function is(e,t,n){var s=qn.exec(t.slice(n,n+2));return s?(e.V=+s[0],n+s[0].length):-1}function os(e,t,n){var s=qn.exec(t.slice(n,n+2));return s?(e.W=+s[0],n+s[0].length):-1}function cs(e,t,n){var s=qn.exec(t.slice(n,n+4));return s?(e.y=+s[0],n+s[0].length):-1}function as(e,t,n){var s=qn.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 hs(e,t,n){var s=qn.exec(t.slice(n,n+1));return s?(e.q=3*s[0]-3,n+s[0].length):-1}function ls(e,t,n){var s=qn.exec(t.slice(n,n+2));return s?(e.m=s[0]-1,n+s[0].length):-1}function ds(e,t,n){var s=qn.exec(t.slice(n,n+2));return s?(e.d=+s[0],n+s[0].length):-1}function ps(e,t,n){var s=qn.exec(t.slice(n,n+3));return s?(e.m=0,e.d=+s[0],n+s[0].length):-1}function gs(e,t,n){var s=qn.exec(t.slice(n,n+2));return s?(e.H=+s[0],n+s[0].length):-1}function ms(e,t,n){var s=qn.exec(t.slice(n,n+2));return s?(e.M=+s[0],n+s[0].length):-1}function Ss(e,t,n){var s=qn.exec(t.slice(n,n+2));return s?(e.S=+s[0],n+s[0].length):-1}function fs(e,t,n){var s=qn.exec(t.slice(n,n+3));return s?(e.L=+s[0],n+s[0].length):-1}function _s(e,t,n){var s=qn.exec(t.slice(n,n+6));return s?(e.L=Math.floor(s[0]/1e3),n+s[0].length):-1}function Us(e,t,n){var s=Yn.exec(t.slice(n,n+1));return s?n+s[0].length:-1}function ys(e,t,n){var s=qn.exec(t.slice(n));return s?(e.Q=+s[0],n+s[0].length):-1}function vs(e,t,n){var s=qn.exec(t.slice(n));return s?(e.s=+s[0],n+s[0].length):-1}function Cs(e,t){return Zn(e.getDate(),t,2)}function Ds(e,t){return Zn(e.getHours(),t,2)}function Rs(e,t){return Zn(e.getHours()%12||12,t,2)}function bs(e,t){return Zn(1+Sn.count(bn(e),e),t,3)}function Fs(e,t){return Zn(e.getMilliseconds(),t,3)}function Ws(e,t){return Fs(e,t)+"000"}function Ts(e,t){return Zn(e.getMonth()+1,t,2)}function As(e,t){return Zn(e.getMinutes(),t,2)}function ws(e,t){return Zn(e.getSeconds(),t,2)}function Ps(e){var t=e.getDay();return 0===t?7:t}function xs(e,t){return Zn(_n.count(bn(e)-1,e),t,2)}function Ls(e){var t=e.getDay();return t>=4||0===t?Cn(e):Cn.ceil(e)}function Es(e,t){return e=Ls(e),Zn(Cn.count(bn(e),e)+(4===bn(e).getDay()),t,2)}function Ms(e){return e.getDay()}function Ns(e,t){return Zn(Un.count(bn(e)-1,e),t,2)}function Is(e,t){return Zn(e.getFullYear()%100,t,2)}function js(e,t){return Zn((e=Ls(e)).getFullYear()%100,t,2)}function ks(e,t){return Zn(e.getFullYear()%1e4,t,4)}function Gs(e,t){var n=e.getDay();return Zn((e=n>=4||0===n?Cn(e):Cn.ceil(e)).getFullYear()%1e4,t,4)}function Vs(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Zn(t/60|0,"0",2)+Zn(t%60,"0",2)}function Qs(e,t){return Zn(e.getUTCDate(),t,2)}function Bs(e,t){return Zn(e.getUTCHours(),t,2)}function Os(e,t){return Zn(e.getUTCHours()%12||12,t,2)}function Xs(e,t){return Zn(1+Fn.count(Mn(e),e),t,3)}function Hs(e,t){return Zn(e.getUTCMilliseconds(),t,3)}function $s(e,t){return Hs(e,t)+"000"}function Js(e,t){return Zn(e.getUTCMonth()+1,t,2)}function qs(e,t){return Zn(e.getUTCMinutes(),t,2)}function Ys(e,t){return Zn(e.getUTCSeconds(),t,2)}function zs(e){var t=e.getUTCDay();return 0===t?7:t}function Zs(e,t){return Zn(Tn.count(Mn(e)-1,e),t,2)}function Ks(e){var t=e.getUTCDay();return t>=4||0===t?xn(e):xn.ceil(e)}function er(e,t){return e=Ks(e),Zn(xn.count(Mn(e),e)+(4===Mn(e).getUTCDay()),t,2)}function tr(e){return e.getUTCDay()}function nr(e,t){return Zn(An.count(Mn(e)-1,e),t,2)}function sr(e,t){return Zn(e.getUTCFullYear()%100,t,2)}function rr(e,t){return Zn((e=Ks(e)).getUTCFullYear()%100,t,2)}function ir(e,t){return Zn(e.getUTCFullYear()%1e4,t,4)}function or(e,t){var n=e.getUTCDay();return Zn((e=n>=4||0===n?xn(e):xn.ceil(e)).getUTCFullYear()%1e4,t,4)}function cr(){return"+0000"}function ar(){return"%"}function ur(e){return+e}function hr(e){return Math.floor(+e/1e3)}function lr(e){return(Gn=kn(e)).format,Vn=Gn.parse,Qn=Gn.utcFormat,Bn=Gn.utcParse,Gn}t(Zn,"pad"),t(Kn,"requote"),t(es,"formatRe"),t(ts,"formatLookup"),t(ns,"parseWeekdayNumberSunday"),t(ss,"parseWeekdayNumberMonday"),t(rs,"parseWeekNumberSunday"),t(is,"parseWeekNumberISO"),t(os,"parseWeekNumberMonday"),t(cs,"parseFullYear"),t(as,"parseYear"),t(us,"parseZone"),t(hs,"parseQuarter"),t(ls,"parseMonthNumber"),t(ds,"parseDayOfMonth"),t(ps,"parseDayOfYear"),t(gs,"parseHour24"),t(ms,"parseMinutes"),t(Ss,"parseSeconds"),t(fs,"parseMilliseconds"),t(_s,"parseMicroseconds"),t(Us,"parseLiteralPercent"),t(ys,"parseUnixTimestamp"),t(vs,"parseUnixTimestampSeconds"),t(Cs,"formatDayOfMonth"),t(Ds,"formatHour24"),t(Rs,"formatHour12"),t(bs,"formatDayOfYear"),t(Fs,"formatMilliseconds"),t(Ws,"formatMicroseconds"),t(Ts,"formatMonthNumber"),t(As,"formatMinutes"),t(ws,"formatSeconds"),t(Ps,"formatWeekdayNumberMonday"),t(xs,"formatWeekNumberSunday"),t(Ls,"dISO"),t(Es,"formatWeekNumberISO"),t(Ms,"formatWeekdayNumberSunday"),t(Ns,"formatWeekNumberMonday"),t(Is,"formatYear"),t(js,"formatYearISO"),t(ks,"formatFullYear"),t(Gs,"formatFullYearISO"),t(Vs,"formatZone"),t(Qs,"formatUTCDayOfMonth"),t(Bs,"formatUTCHour24"),t(Os,"formatUTCHour12"),t(Xs,"formatUTCDayOfYear"),t(Hs,"formatUTCMilliseconds"),t($s,"formatUTCMicroseconds"),t(Js,"formatUTCMonthNumber"),t(qs,"formatUTCMinutes"),t(Ys,"formatUTCSeconds"),t(zs,"formatUTCWeekdayNumberMonday"),t(Zs,"formatUTCWeekNumberSunday"),t(Ks,"UTCdISO"),t(er,"formatUTCWeekNumberISO"),t(tr,"formatUTCWeekdayNumberSunday"),t(nr,"formatUTCWeekNumberMonday"),t(sr,"formatUTCYear"),t(rr,"formatUTCYearISO"),t(ir,"formatUTCFullYear"),t(or,"formatUTCFullYearISO"),t(cr,"formatUTCZone"),t(ar,"formatLiteralPercent"),t(ur,"formatUnixTimestamp"),t(hr,"formatUnixTimestampSeconds"),lr({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(lr,"defaultLocale$1"),Xn=On||(On={}),(Hn=Xn.LockModes||(Xn.LockModes={})).ALL="ALL",Hn.READ="READ",Hn.WRITE="WRITE",Hn.HOLD="HOLD",Hn.SUB="SUB",($n=Xn.RoxieControlCmdType||(Xn.RoxieControlCmdType={})).Attach="Attach",$n.Detach="Detach",$n.State="State",$n.Reload="Reload",$n.ReloadRetry="ReloadRetry",$n.MemLock="MemLock",$n.MemUnlock="MemUnlock",$n.GetMemLocked="GetMemLocked";const dr=class _SMCServiceBase extends ee{constructor(e){super(e,"WsSMC","1.28")}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")}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(dr,"SMCServiceBase");let pr=dr;const gr=Vn("%Y%m%d%H");function mr(e){return"number"==typeof e||"string"==typeof e&&""!==e.trim()&&!isNaN(+e)}t(mr,"isNumeric");const Sr=class _SMCService extends pr{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")?gr(t):e.startsWith("Num")?+t:e.startsWith("Time")?+t/1e9:e.startsWith("When")?new Date(+t/1e3).toISOString():mr(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(Sr,"SMCService");let fr=Sr;const _r=class _storeServiceBase extends ee{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(_r,"storeServiceBase");let Ur=_r;const yr=class _StoreService extends Ur{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(yr,"StoreService");let vr=yr;var Cr,Dr,Rr,br;Dr=Cr||(Cr={}),(Rr=Dr.TpConfigResponseFormat||(Dr.TpConfigResponseFormat={})).XML="XML",Rr.YAML="YAML",(br=Dr.RoxieQueueFilter||(Dr.RoxieQueueFilter={})).All="All",br.QueriesOnly="QueriesOnly",br.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"})(Dr.TpMachineType||(Dr.TpMachineType={}));const Fr=class _TopologyServiceBase extends ee{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(Fr,"TopologyServiceBase");let Wr=Fr;const Tr=class _TopologyService extends Wr{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(Tr,"TopologyService");let Ar=Tr;var wr,Pr,xr,Lr,Er,Mr,Nr,Ir,jr,kr,Gr,Vr,Qr,Br,Or;Pr=wr||(wr={}),(xr=Pr.ECLWUActions||(Pr.ECLWUActions={})).Abort="Abort",xr.Delete="Delete",xr.Deschedule="Deschedule",xr.Reschedule="Reschedule",xr.Pause="Pause",xr.PauseNow="PauseNow",xr.Protect="Protect",xr.Unprotect="Unprotect",xr.Restore="Restore",xr.Resume="Resume",xr.SetToFailed="SetToFailed",xr.Archive="Archive",(e=>{e[e.MIN=0]="MIN",e[e.DEFAULT=1]="DEFAULT",e[e.ALL=2]="ALL",e[e.CUSTOM=3]="CUSTOM"})(Pr.LogSelectColumnMode||(Pr.LogSelectColumnMode={})),(e=>{e[e.ASC=0]="ASC",e[e.DSC=1]="DSC"})(Pr.SortDirection||(Pr.SortDirection={})),(Lr=Pr.LogEventClass||(Pr.LogEventClass={})).ALL="ALL",Lr.DIS="DIS",Lr.ERR="ERR",Lr.WRN="WRN",Lr.INF="INF",Lr.PRO="PRO",Lr.MET="MET",Lr.EVT="EVT",(Er=Pr.WUDetailsAttrValueType||(Pr.WUDetailsAttrValueType={})).Single="Single",Er.List="List",Er.Multi="Multi",(Mr=Pr.EclDefinitionActions||(Pr.EclDefinitionActions={})).SyntaxCheck="SyntaxCheck",Mr.Deploy="Deploy",Mr.Publish="Publish",(Nr=Pr.ErrorMessageFormat||(Pr.ErrorMessageFormat={})).xml="xml",Nr.json="json",Nr.text="text",(Ir=Pr.LogAccessLogFormat||(Pr.LogAccessLogFormat={}))[Ir.XML=0]="XML",Ir[Ir.JSON=1]="JSON",Ir[Ir.CSV=2]="CSV",(jr=Pr.WUExceptionSeverity||(Pr.WUExceptionSeverity={})).info="info",jr.warning="warning",jr.error="error",jr.alert="alert",(kr=Pr.WUQueryFilterSuspendedType||(Pr.WUQueryFilterSuspendedType={})).Allqueries="All queries",kr.Notsuspended="Not suspended",kr.Suspended="Suspended",kr.Suspendedbyuser="Suspended by user",kr.Suspendedbyfirstnode="Suspended by first node",kr.Suspendedbyanynode="Suspended by any node",(Gr=Pr.WUQuerySetFilterType||(Pr.WUQuerySetFilterType={})).All="All",Gr.Id="Id",Gr.Name="Name",Gr.Alias="Alias",Gr.Status="Status",(Vr=Pr.WUProtectFilter||(Pr.WUProtectFilter={})).All="All",Vr.Protected="Protected",Vr.NotProtected="NotProtected",(Pr.QuerySetAliasActionTypes||(Pr.QuerySetAliasActionTypes={})).Deactivate="Deactivate",(Qr=Pr.QuerysetImportActivation||(Pr.QuerysetImportActivation={})).None="None",Qr.ActivateImportedActive="ActivateImportedActive",(Br=Pr.QuerySetQueryActionTypes||(Pr.QuerySetQueryActionTypes={})).Suspend="Suspend",Br.Unsuspend="Unsuspend",Br.ToggleSuspend="ToggleSuspend",Br.Activate="Activate",Br.Delete="Delete",Br.DeleteQueriesAndWUs="DeleteQueriesAndWUs",Br.RemoveAllAliases="RemoveAllAliases",Br.ResetQueryStats="ResetQueryStats",(Or=Pr.WUQueryActivationMode||(Pr.WUQueryActivationMode={}))[Or.DoNotActivateQuery=0]="DoNotActivateQuery",Or[Or.ActivateQuery=1]="ActivateQuery",Or[Or.ActivateQuerySuspendPrevious=2]="ActivateQuerySuspendPrevious",Or[Or.ActivateQueryDeletePrevious=3]="ActivateQueryDeletePrevious";const Xr=class _WorkunitsServiceBase extends ee{constructor(e){super(e,"WsWorkunits","2.02")}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(Xr,"WorkunitsServiceBase");let Hr=Xr;var $r,Jr,qr,Yr=/* @__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))(Yr||{});function zr(e){return"string"==typeof e.Name}function Zr(e){return void 0!==e.TotalClusterTime}function Kr(e){return void 0!==e.StateEx}Jr=$r||($r={}),(qr=Jr.Action||(Jr.Action={}))[qr.Unknown=0]="Unknown",qr[qr.Compile=1]="Compile",qr[qr.Check=2]="Check",qr[qr.Run=3]="Run",qr[qr.ExecuteExisting=4]="ExecuteExisting",qr[qr.Pause=5]="Pause",qr[qr.PauseNow=6]="PauseNow",qr[qr.Resume=7]="Resume",qr[qr.Debug=8]="Debug",qr[qr.__size=9]="__size",t(zr,"isECLResult"),t(Zr,"isWUQueryECLWorkunit"),t(Kr,"isWUInfoWorkunit");const ei=class _WorkunitsService extends Hr{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=>c({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=a(e.Result).children();return t.length?t[0]:null})}};t(ei,"WorkunitsService");let ti=ei;const ni=class _WorkunitsServiceEx extends Hr{WUPublishWorkunitEx(e){return this._connection.send("WUPublishWorkunit",e)}};t(ni,"WorkunitsServiceEx");let si=ni;function ri(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function ii(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 oi(e){return(e=ii(Math.abs(e)))?e[1]:NaN}function ci(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 ai(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}t(ri,"formatDecimal"),t(ii,"formatDecimalParts"),t(oi,"exponent"),t(ci,"formatGroup"),t(ai,"formatNumerals");var ui,hi=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function li(e){if(!(t=hi.exec(e)))throw new Error("invalid format: "+e);var t;return new di({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 di(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 pi(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 gi(e,t){var n=ii(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")+ii(e,Math.max(0,t+i-1))[0]}function mi(e,t){var n=ii(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(li,"formatSpecifier"),li.prototype=di.prototype,t(di,"FormatSpecifier"),di.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(pi,"formatTrim"),t(gi,"formatPrefixAuto"),t(mi,"formatRounded");const Si={"%":/* @__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:ri,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 mi(100*e,t)},"p"),r:mi,s:gi,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 fi(e){return e}t(fi,"identity");var _i,Ui,yi=Array.prototype.map,vi=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ci(e){var n=void 0===e.grouping||void 0===e.thousands?fi:ci(yi.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?fi:ai(yi.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=li(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"):Si[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=Si[U],D=/[defgprs%]/.test(U);function R(e){var t,s,r,c=y,p=v;if("c"===U)p=C(e)+p,e="";else{var R=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:C(Math.abs(e),f),_&&(e=pi(e)),R&&0===+e&&"+"!==d&&(R=!1),c=(R?"("===d?d:a:"-"===d||"("===d?"":d)+c,p=("s"===U?vi[8+ui/3]:"")+p+(R&&"("===d?")":""),D)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(R,"format"),R.toString=function(){return e+""},R}function l(e,t){var n=h(((e=li(e)).type="f",e)),s=3*Math.max(-8,Math.min(8,Math.floor(oi(t)/3))),r=Math.pow(10,-s),i=vi[8+s/3];return function(e){return n(r*e)+i}}return t(h,"newFormat"),t(l,"formatPrefix"),{format:h,formatPrefix:l}}function Di(e){return _i=Ci(e),Ui=_i.format,_i.formatPrefix,_i}t(Ci,"formatLocale"),Di({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),t(Di,"defaultLocale");const Ri=class _ECLGraph extends u{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=>$i(e)):this.wu.fetchGraphDetails([this.Name],["graph"]).then(e=>$i(e))}};t(Ri,"ECLGraph");let bi=Ri;const Fi=class _GraphCache extends h{constructor(){super(e=>h.hash([e.Name]))}};t(Fi,"GraphCache");let Wi=Fi;function Ti(e,t,n){(n=n||[]).push(e),t(e.name,e.$,e.children(),n),e.children().forEach(e=>{Ti(e,t,n)}),n.pop()}function Ai(e){const t={};return e.forEach(e=>{"att"===e.name&&(t[e.$.name]=e.$.value)}),t}t(Ti,"walkXmlJson"),t(Ai,"flattenAtt");const wi=class _XGMMLGraph extends l{};t(wi,"XGMMLGraph");let Pi=wi;const xi=class _XGMMLSubgraph extends d{};t(xi,"XGMMLSubgraph");let Li=xi;const Ei=class _XGMMLVertex extends p{};t(Ei,"XGMMLVertex");let Mi=Ei;const Ni=class _XGMMLEdge extends g{};t(Ni,"XGMMLEdge");let Ii=Ni;function ji(e,t){const n={},s={},r={},i=new Pi(e=>e._.id),o=[i.root];return Ti(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(Ai(i));o.push(e),n[t.id]=e}const e=a.createVertex(Ai(i));s[t.id]=e;break;case"edge":const c=a.createEdge(s[t.source],s[t.target],Ai(i));r[t.id]=c}}),i}t(ji,"createXGMMLGraph");const ki=class _ScopeGraph extends l{};t(ki,"ScopeGraph");let Gi=ki;const Vi=class _ScopeSubgraph extends d{};t(Vi,"ScopeSubgraph");let Qi=Vi;const Bi=class _ScopeVertex extends p{};t(Bi,"ScopeVertex");let Oi=Bi;const Xi=class _ScopeEdge extends g{};t(Xi,"ScopeEdge");let Hi=Xi;function $i(e){const t={},n={},s={};let r;for(const o of e)switch(o.ScopeType){case"graph":r=new Gi(e=>e._.Id,o),t[o.ScopeName]=r.root;break;case"subgraph":r||(r=new Gi(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($i,"createGraph");const Ji=class _Resource extends u{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(Ji,"Resource");let qi=Ji;const Yi=class _XSDNode{e;constructor(e){this.e=e}fix(){delete this.e}};t(Yi,"XSDNode");let zi=Yi;const Zi=class _XSDXMLNode extends zi{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(Zi,"XSDXMLNode");let Ki=Zi;const eo=class _XSDSimpleType extends zi{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(eo,"XSDSimpleType");let to=eo;const no=class _XSDSchema{root;simpleTypes={};fields(){return this.root.children()}};t(no,"XSDSchema");let so=no;const ro=class _XSDParser extends m{schema=new so;simpleType;simpleTypes={};xsdStack=new S;startXMLNode(e){switch(super.startXMLNode(e),e.name){case"xs:element":const t=new Ki(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 to(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(ro,"XSDParser");let io=ro;function oo(e){const t=new io;return t.parse(e),t.schema}t(oo,"parseXSD");const co=class _XSDParser2 extends io{_rootName;schema=new so;simpleTypes={};xsdStack=new S;constructor(e){super(),this._rootName=e}startXMLNode(e){switch(super.startXMLNode(e),e.name){case"xsd:element":const t=new Ki(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 to(e)}}endXMLNode(e){if("xsd:element"===e.name){this.xsdStack.pop().fix()}super.endXMLNode(e)}};t(co,"XSDParser2");let ao=co;function uo(e,t){const n=new ao(t);return n.parse(e),n.schema}t(uo,"parseXSD2");const ho=class _GlobalResultCache extends h{constructor(){super(e=>`${e.BaseUrl}-${e.Wuid}-${e.ResultName}`)}};t(ho,"GlobalResultCache");let lo=ho;const po=new lo,go=class _Result extends u{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=po.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=po.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:"Sequence_"+n},()=>new _Result(e,t,n)):"string"==typeof n&&(r=po.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:n},()=>new _Result(e,t,n)))),r}static attachLogicalFile(e,t,n){return po.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:n},()=>new _Result(e,t,n,!0))}constructor(e,t,n,s){super(),this.connection=e instanceof ti?e:new ti(e),"boolean"==typeof s&&!0===s?this.set({NodeGroup:t,LogicalFileName:n}):zr(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=oo(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 c=i??this._bypassCache;return this.WUResult(e,t,!n,s,r,c).then(e=>{const t=e.Result;return delete e.Result,this.set({...e}),o("XmlSchema.xml",t)&&(this.xsdSchema=oo(t.XmlSchema.xml)),o("Row",t)?t.Row:this.ResultName&&o(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(go,"Result");let mo=go;const So=class _ResultCache extends h{constructor(){super(e=>h.hash([e.Sequence,e.Name,e.Value,e.FileName]))}};t(So,"ResultCache");let fo=So;const _o=class _Attribute extends u{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(_o,"Attribute");let Uo=_o;const yo=class _BaseScope extends u{_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 Uo(this,n))}),t.start&&t.end?(t.start.FormattedEnd=t.end.Formatted,e.push(new Uo(this,t.start))):t.start?e.push(new Uo(this,t.start)):t.end&&e.push(new Uo(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 Uo(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(yo,"BaseScope");let vo=yo;const Co=class _Scope extends vo{wu;constructor(e,t){super(t),this.wu=e}};t(Co,"Scope");let Do=Co;const Ro=class _SourceFile extends u{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 ti?e:new ti(e),this.set({Wuid:t,...n})}};t(Ro,"SourceFile");let bo=Ro;const Fo=class _Timer extends u{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 ti?e:new ti(e);const s=f(n.Value);this.set({Wuid:t,Seconds:Math.round(1e3*s)/1e3,HasSubGraphId:void 0!==n.SubGraphId,...n})}};t(Fo,"Timer");let Wo=Fo;const To=Qn("%Y-%m-%dT%H:%M:%S.%LZ"),Ao=Bn("%Y-%m-%dT%H:%M:%S.%LZ"),wo=Ui(",");function Po(e){return e&&!isNaN(+e)?wo(+e):e}t(Po,"formatNum");const xo="DefinitionList",Lo=/([a-zA-Z]:)?(.*[\\\/])(.*)(\((\d+),(\d+)\))/,Eo=["Avg","Min","Max","Delta","StdDev"],Mo=["SkewMin","SkewMax","NodeMin","NodeMax"],No=/[A-Z][a-z]*/g;function Io(e){for(const n of Mo){const t=e.indexOf(n);if(0===t){return{measure:"",ext:n,label:e.slice(t+n.length)}}}const t=e.match(No);if(t?.length){const e=t.shift();let n=t.join("");for(const t of Eo){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(Io,"_splitMetric");const jo={};function ko(e){let t=jo[e];return t||(t=Io(e),jo[e]=t),t}function Go(e,t){return e.__formattedProps?.[t]??e[t]}function Vo(e){if(void 0===e)return;const t=parseFloat(e);return isNaN(t)?void 0:t}function Qo(e,t,n){const s=ko(t);if(!n[s.measure]){n[s.label]=!0;const t=Vo(e[`${s.measure}Avg${s.label}`]),r=Vo(e[`${s.measure}Min${s.label}`]),i=Vo(e[`${s.measure}Max${s.label}`]),o=Vo(e[`${s.measure}StdDev${s.label}`]),c=Math.max((t-r)/o,(i-t)/o);return{Key:`${s.measure}${s.label}`,Value:Go(e,`${s.measure}${s.label}`),Avg:Go(e,`${s.measure}Avg${s.label}`),Min:Go(e,`${s.measure}Min${s.label}`),Max:Go(e,`${s.measure}Max${s.label}`),Delta:Go(e,`${s.measure}Delta${s.label}`),StdDev:Go(e,`${s.measure}StdDev${s.label}`),StdDevs:isNaN(c)?void 0:c,SkewMin:Go(e,`SkewMin${s.label}`),SkewMax:Go(e,`SkewMax${s.label}`),NodeMin:Go(e,`NodeMin${s.label}`),NodeMax:Go(e,`NodeMax${s.label}`)}}return null}t(ko,"splitMetric"),t(Go,"formatValue"),t(Vo,"safeParseFloat"),t(Qo,"formatValues");const Bo=n("workunit.ts"),Oo=class _WorkunitCache extends h{constructor(){super(e=>`${e.BaseUrl}-${e.Wuid}`)}};t(Oo,"WorkunitCache");let Xo=Oo;const Ho=new Xo,$o=class _Workunit extends u{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",Yr.Unknown)}get State(){return this.get("State")||Yr[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 fo;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,()=>mo.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 Wo(this.connection,this.Wuid,e))}_graphCache=new Wi;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 bi(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 qi(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 bo(this.connection,this.Wuid,e))}get VariableCount(){return this.get("VariableCount",0)}get Variables(){return this.get("Variables",{ECLResult:[]})}get TimerCount(){return this.get("TimerCount",0)}get HasDebugValue(){return this.get("HasDebugValue")}get ApplicationValueCount(){return this.get("ApplicationValueCount",0)}get XmlParams(){return this.get("XmlParams")}get AccessFlag(){return this.get("AccessFlag")}get ClusterFlag(){return this.get("ClusterFlag")}get ResultViewCount(){return this.get("ResultViewCount",0)}get DebugValueCount(){return this.get("DebugValueCount",0)}get WorkflowCount(){return this.get("WorkflowCount",0)}get Archived(){return this.get("Archived")}get RoxieCluster(){return this.get("RoxieCluster")}get DebugState(){return this.get("DebugState",{})}get Queue(){return this.get("Queue")}get Active(){return this.get("Active")}get Action(){return this.get("Action")}get Scope(){return this.get("Scope")}get AbortBy(){return this.get("AbortBy")}get AbortTime(){return this.get("AbortTime")}get Workflows(){return this.get("Workflows")}get TimingData(){return this.get("TimingData")}get HelpersDesc(){return this.get("HelpersDesc")}get GraphsDesc(){return this.get("GraphsDesc")}get SourceFilesDesc(){return this.get("SourceFilesDesc")}get ResultsDesc(){return this.get("ResultsDesc")}get VariablesDesc(){return this.get("VariablesDesc")}get TimersDesc(){return this.get("TimersDesc")}get DebugValuesDesc(){return this.get("DebugValuesDesc")}get ApplicationValuesDesc(){return this.get("ApplicationValuesDesc")}get WorkflowsDesc(){return this.get("WorkflowsDesc")}get ServiceNames(){return this.get("ServiceNames")}get CompileCost(){return this.get("CompileCost")}get ExecuteCost(){return this.get("ExecuteCost")}get FileAccessCost(){return this.get("FileAccessCost")}get NoAccess(){return this.get("NoAccess")}get ECLWUProcessList(){return this.get("ECLWUProcessList")}static create(e){const t=new _Workunit(e);return t.connection.WUCreate().then(e=>(Ho.set(t),t.set(e.Workunit),t))}static attach(e,t,n){const s=Ho.get({BaseUrl:e.baseUrl,Wuid:t},()=>new _Workunit(e,t));return n&&s.set(n),s}static existsLocal(e,t){return Ho.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,$r.Action.Compile):e.submit(t))}static compile(e,t,n){return _Workunit.submit(e,t,n,!0)}static query(e,t){return new ti(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 ti(e),this.topologyConnection=new Ar(e),this.clearState(t)}clearState(e){this.clear({Wuid:e,StateID:Yr.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=$r.Action.Run,n){let s;return s=void 0!==e?Promise.resolve(e):this.topologyConnection.DefaultTpLogicalClusterQuery().then(e=>e.Name),this._debugMode=!1,t===$r.Action.Debug&&(t=$r.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 Yr.Compiled:return"compile"===this.ActionEx||this._submitAction===$r.Action.Compile;case Yr.Completed:case Yr.Failed:case Yr.Aborted:case Yr.NotFound:return!0}return!1}isFailed(){switch(this.StateID){case Yr.Aborted:case Yr.Failed:return!0}return!1}isDeleted(){return this.StateID===Yr.NotFound}isDebugging(){switch(this.StateID){case Yr.DebugPaused:case Yr.DebugRunning:return!0}return this._debugMode}isRunning(){switch(this.StateID){case Yr.Compiled:case Yr.Running:case Yr.Aborting:case Yr.Blocked:case Yr.DebugPaused:case Yr.DebugRunning:return!0}return!1}setToFailed(){return this.WUAction(wr.ECLWUActions.SetToFailed)}pause(){return this.WUAction(wr.ECLWUActions.Pause)}pauseNow(){return this.WUAction(wr.ECLWUActions.PauseNow)}resume(){return this.WUAction(wr.ECLWUActions.Resume)}abort(){return this.WUAction(wr.ECLWUActions.Abort)}protect(){return this.WUAction(wr.ECLWUActions.Protect)}unprotect(){return this.WUAction(wr.ECLWUActions.Unprotect)}delete(){return this.WUAction(wr.ECLWUActions.Delete)}restore(){return this.WUAction(wr.ECLWUActions.Restore)}deschedule(){return this.WUAction(wr.ECLWUActions.Deschedule)}reschedule(){return this.WUAction(wr.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!==Yr.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]=Po(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[xo];if(h)try{const e=JSON.parse(h.split("\\").join("\\\\")),t=[];for(let n=0;n<e.length;n++){const s=e[n].match(Lo);s&&t.push({filePath:(s[1]??"")+s[2]+s[3],line:parseInt(s[5],10),col:parseInt(s[6],10)})}u[xo]=t}catch(i){Bo.error(`Unexpected "DefinitionList": ${h}`)}const l={};let d=0,p="";for(const t in u)if(!t.startsWith("__")){const e=Qo(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 Do(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 Do(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=>$i(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=Ao(e.start);t.setMilliseconds(t.getMilliseconds()+e.elapsed/1e6),e.finish=To(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",Yr.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",Yr.NotFound),!0)))throw Bo.warning(`Unexpected ESP exception: ${e.message}`),e;return{}})}WUCreate(){return this.connection.WUCreate().then(e=>(this.set(e.Workunit),Ho.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",Yr.NotFound),!0)))throw Bo.warning(`Unexpected ESP exception: ${e.message}`),e;return{}})}WUResubmit(e){return this.connection.WUResubmit(_({},e,{Wuids:{Item:[this.Wuid]}}))}WUDetailsMeta(e){return this.connection.WUDetailsMeta(e)}WUDetails(e){return this.connection.WUDetails(_({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=>_({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:wr.WUQueryActivationMode.ActivateQuery,Wait:5e3})}publishEx(e){const t=new si({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 U(e)}).catch(t=>(Bo.error(t),Promise.resolve(new U(e)))):Promise.resolve(new U(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=>Zo(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($o,"Workunit");let Jo=$o;const qo="definition";function Yo(e){return void 0!==e._[qo]}function zo(e){const t=/([a-z]:\\(?:[-\w\.\d]+\\)*(?:[-\w\.\d]+)?|(?:\/[\w\.\-]+)+)\((\d*),(\d*)\)/.exec(e._[qo]);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._[qo]}`)}function Zo(e,t){const n=[];for(const s of e.vertices)if(Yo(s)){const e=zo(s);(e&&!t||t===e.file)&&n.push(e)}return n.sort((e,t)=>e.line-t.line)}let Ko;t(Yo,"hasECLDefinition"),t(zo,"getECLDefinition"),t(Zo,"breakpointLocations");const ec=class _Activity extends u{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 Ko||(Ko=new _Activity(e)),t&&Ko.set(t),Ko}constructor(e){super(),this.connection=e instanceof fr?e:new fr(e),this.clear({})}runningWorkunits(e=""){return this.Running.ActiveWorkunit.filter(t=>""===e||t.ClusterName===e).map(e=>Jo.attach(this.connection.connectionOptions(),e.Wuid,e))}setBanner(e){return this.connection.SetBanner({...e}).then(e=>(this.set(e),this))}lazyRefresh=y(async()=>{const e=await this.connection.Activity({});return this.set(e),this});async refresh(){return this.lazyRefresh()}};t(ec,"Activity");let tc=ec;const nc=n("logicalFile.ts"),sc=class _LogicalFileCache extends h{constructor(){super(e=>`${e.BaseUrl}-${e.Cluster}-${e.Name}`)}};t(sc,"LogicalFileCache");let rc=sc;const ic=new rc,oc=class _LogicalFile extends u{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=ic.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 rt?e:new rt(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 nc.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(oc,"LogicalFile");let cc=oc;const ac=class _MachineCache extends h{constructor(){super(e=>e.Address)}};t(ac,"MachineCache");let uc=ac;const hc=new uc,lc=class _Machine extends u{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=hc.get({Address:t},()=>new _Machine(e));return n&&s.set(n),s}constructor(e){super(),this.connection=e instanceof Jt?e:new Jt(e)}};t(lc,"Machine");let dc=lc;const pc=class _TargetClusterCache extends h{constructor(){super(e=>`${e.BaseUrl}-${e.Name}`)}};t(pc,"TargetClusterCache");let gc=pc;const mc=new gc,Sc=class _TargetCluster extends u{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=>dc.attach(this.machineConnection,e.Address,e))}static attach(e,t,n){const s=mc.get({BaseUrl:e.baseUrl,Name:t},()=>new _TargetCluster(e,t));return n&&s.set(n),s}constructor(e,t){super(),e instanceof Ar?(this.connection=e,this.machineConnection=new Jt(e.connectionOptions())):(this.connection=new Ar(e),this.machineConnection=new Jt(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(Sc,"TargetCluster");let fc=Sc;function _c(e){let t;return t=e instanceof Ar?e:new Ar(e),t.TpListTargetClusters({}).then(t=>t.TargetClusters.TpClusterNameType.map(t=>fc.attach(e,t.Name,t)))}t(_c,"targetClusters");const Uc={};function yc(e){if(!Uc[e.baseUrl]){let t;t=e instanceof Ar?e:new Ar(e),Uc[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 fc.attach(e,i.Name,i)})}return Uc[e.baseUrl]}t(yc,"defaultTargetCluster");const vc=class _TopologyCache extends h{constructor(){super(e=>e.BaseUrl)}};t(vc,"TopologyCache");let Cc=vc;const Dc=new Cc,Rc=class _Topology extends u{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=>fc.attach(this.connection,e.Name,e))}get LogicalClusters(){return this.get("LogicalClusters")}get Services(){return this.get("Services")}static attach(e,t){const n=Dc.get({BaseUrl:e.baseUrl},()=>new _Topology(e));return t&&n.set(t),n}constructor(e){super(),this.connection=e instanceof Ar?e:new Ar(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(o("ServiceList.TpEspServers.TpEspServer",t))for(const i of t.ServiceList.TpEspServers.TpEspServer)if(o("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(Rc,"Topology");let bc=Rc;function Fc(e,t,n){"__proto__"!==t&&"constructor"!==t&&"prototype"!==t&&(e[t]=n)}function Wc(e){return(e=""+e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(/\n/g," ").replace(/\r/g," ")}function Tc(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 Ac(e,t){const n=e.indexOf(t);return-1!==n?parseFloat(e.substring(0,n)):-1}function wc(e){if(!e)return 0;if(!isNaN(+e))return parseFloat(e);let t=Ac(e,"Kb");return t>=0?1024*t:(t=Ac(e,"Mb"),t>=0?t*Math.pow(1024,2):(t=Ac(e,"Gb"),t>=0?t*Math.pow(1024,3):(t=Ac(e,"Tb"),t>=0?t*Math.pow(1024,4):(t=Ac(e,"Pb"),t>=0?t*Math.pow(1024,5):(t=Ac(e,"Eb"),t>=0?t*Math.pow(1024,6):(t=Ac(e,"Zb"),t>=0?t*Math.pow(1024,7):(t=Ac(e,"b"),t>=0?t:0)))))))}function Pc(e){return e?parseFloat(e):0}t(Fc,"safeAssign"),t(Wc,"xmlEncode"),t(Tc,"espTime2Seconds"),t(Ac,"unitTest"),t(wc,"espSize2Bytes"),t(Pc,"espSkew2Number");const xc=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+'="'+Wc(r[i])+'"':s+='<att name="'+i+'" value="'+Wc(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+'="'+Wc(s[r])+'"':n+='<att name="'+r+'" value="'+Wc(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="'+Wc(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(xc,"LocalisedXGMMLWriter");let Lc=xc;const Ec=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(Ec,"GraphItem");let Mc=Ec;const Nc=class _Subgraph extends Mc{_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(Nc,"Subgraph");let Ic=Nc;const jc=class _Vertex extends Mc{_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 kc=jc;const Gc=class _Edge extends Mc{_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(Gc,"Edge");let Vc=Gc;const Qc=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 Ic}isVertex(e){return e instanceof kc}isEdge(e){return e instanceof Vc}getGlobalType(e){return e instanceof kc?3:e instanceof Vc?4:e instanceof Ic?2:e instanceof _QueryGraph?1:0}getGlobalTypeString(e){return e instanceof kc?"Vertex":e instanceof Vc?"Edge":e instanceof Ic?"Cluster":e instanceof _QueryGraph?"Graph":"Unknown"}getItem(e,t){if(!this.idx[t])switch(e.tagName){case"graph":const e=new Ic(this,t);this.subgraphs.push(e),this.idx[t]=e;break;case"node":const n=new kc(this,t);this.vertices.push(n),this.idx[t]=n;break;case"edge":const s=new Vc(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=>{Fc(n,e.name,e.value)}),n}removeItem(e){delete this.idx[e.__hpcc_id],e instanceof Ic?this.subgraphs=this.subgraphs.filter(t=>e!==t):e instanceof kc?this.vertices=this.vertices.filter(t=>e!==t):e instanceof Vc&&(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")?(Fc(n,i,o),Fc(n,r,""+Tc(o))):0===r.indexOf("Size")?(Fc(n,i,o),Fc(n,r,""+wc(o))):0===r.indexOf("Skew")?(Fc(n,i,o),Fc(n,r,""+Pc(o))):Fc(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 Ic&&e.remove()})}removeSpillVertices(){[...this.vertices].forEach(e=>{e.isSpill()&&e.remove()})}getLocalisedXGMML(e,t,n,s){const r=new Lc(this);return r.calcVisibility(e,t,n,s),r.writeXgmml(),"<graph>"+r.m_xgmml+"</graph>"}};t(Qc,"QueryGraph");let Bc=Qc;const Oc=n("@hpcc-js/comms/ecl/query.ts"),Xc=Ui("~s");function Hc(e){return!isNaN(parseFloat(e))&&!isNaN(e-0)}t(Hc,"isNumber");const $c=class _QueryCache extends h{constructor(){super(e=>h.hash([e.QueryId,e.QuerySet]))}};t($c,"QueryCache");const Jc=new $c,qc=class _Query extends u{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 ti?e:new ti(e),this.topology=bc.attach(this.wsWorkunitsService.opts()),this.set({QuerySet:t,QueryId:n,...s})}static attach(e,t,n,s){const r=Jc.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 pt({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){Oc.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){Oc.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 Bc;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=Jo.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 Oc.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=Hc(n)?parseFloat(n):n,s=n;e.indexOf("Time")>=0&&(t/=1e9,s=Xc(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 Oc.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(qc,"Query");let Yc=qc;const zc=class _StoreCache extends h{constructor(){super(e=>`${e.BaseUrl}-${e.Name}:${e.UserSpecific}-${e.Namespace}`)}};t(zc,"StoreCache");let Zc=zc;const Kc=new Zc,ea=class _ValueChangedMessage extends v{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(ea,"ValueChangedMessage");let ta=ea;const na=class _Store{connection;get BaseUrl(){return this.connection.baseUrl}Name;UserSpecific;Namespace;_dispatch=new C;static attach(e,t="HPCCApps",n,s=!0){return Kc.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 vr?e:new vr(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 ta(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 ta(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 ta(t.Key,t.Value,r))}),e)for(const e in s)this._dispatch.post(new ta(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 ta(e,void 0,s))}).catch(t=>{console.error(`Store.delete(${e}) failed:`,t)})}monitor(e){return this._dispatch.attach(e)}};t(na,"Store");let sa=na;const ra=n("@hpcc-js/comms/dfuWorkunit.ts"),ia=class _DFUWorkunitCache extends h{constructor(){super(e=>`${e.BaseUrl}-${e.ID}`)}};t(ia,"DFUWorkunitCache");let oa=ia;const ca=new oa,aa=class _DFUWorkunit extends u{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=>(ca.set(n),n.set(e.result),n))}static attach(e,t,n){const s=ca.get({BaseUrl:e.baseUrl,ID:t},()=>new _DFUWorkunit(e,t));return n&&s.set(n),s}static sprayFixed(e,t){const n=new ae(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 ae(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 ae(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(te.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===te.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 ae(e),this.topologyConnection=new Ar(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 ra.warning(`Unexpected ESP exception: ${e.message}`),e;return{}})}};t(aa,"DFUWorkunit");let ua=aa;export{Ue as AccessService,De as AccountService,tc as Activity,Uo as Attribute,b as BUILD_VERSION,vo as BaseScope,Pe as CloudService,Ie as CodesignService,B as Connection,Ke as DFUArrayActions,tt as DFUChangeProtection,nt as DFUChangeRestriction,et as DFUDefFileFormat,rt as DFUService,ua as DFUWorkunit,oa as DFUWorkunitCache,at as DFUXRefService,Ve as DaliService,bi as ECLGraph,Z as ESPConnection,J as ESPExceptions,pt as EclService,ft as ElkService,te as FileSpray,ae as FileSprayService,oe as FileSprayStates,lo as GlobalResultCache,Wi as GraphCache,Pt as LogType,Et as LogaccessService,cc as LogicalFile,rc as LogicalFileCache,dc as Machine,uc as MachineCache,Jt as MachineService,D as PKG_NAME,R as PKG_VERSION,Zt as PackageProcessService,Eo as PropertyType,Yc as Query,Bc as QueryGraph,Mo as RelatedProperty,qi as Resource,nn as ResourcesService,mo as Result,fo as ResultCache,fr as SMCService,hn as SashaService,Do as Scope,Hi as ScopeEdge,Gi as ScopeGraph,Qi as ScopeSubgraph,Oi as ScopeVertex,ee as Service,bo as SourceFile,sa as Store,Zc as StoreCache,vr as StoreService,xt as TargetAudience,fc as TargetCluster,gc as TargetClusterCache,Wo as Timer,bc as Topology,Cc as TopologyCache,Ar as TopologyService,ta as ValueChangedMessage,Yr as WUStateID,$r as WUUpdate,Jo as Workunit,Xo as WorkunitCache,ti as WorkunitsService,si as WorkunitsServiceEx,ue as WsAccess,xe as WsCodesign,Qe as WsDfu,_t as WsLogaccess,On as WsSMC,sn as WsSasha,Cr as WsTopology,wr as WsWorkunits,Ii as XGMMLEdge,Pi as XGMMLGraph,Li as XGMMLSubgraph,Mi as XGMMLVertex,zi as XSDNode,so as XSDSchema,to as XSDSimpleType,Ki as XSDXMLNode,O as createConnection,$i as createGraph,ji as createXGMMLGraph,yc as defaultTargetCluster,x as deserializeResponse,j as get,V as hookSend,A as instanceOfIConnection,W as instanceOfIOptions,H as isArray,zr as isECLResult,q as isExceptions,Kr as isWUInfoWorkunit,Zr as isWUQueryECLWorkunit,L as jsonp,oo as parseXSD,uo as parseXSD2,I as post,k as send,P as serializeRequest,X as setTransportFactory,ko as splitMetric,_c as targetClusters};
|
|
1
|
+
var e=Object.defineProperty,t=(t,n)=>e(t,"name",{value:n,configurable:!0});import{scopedLogger as n,join as s,promiseTimeout as r,utf8ToBase64 as i,exists as o,deepMixin as c,xml2json as a,StateObject as u,Cache as h,Graph as l,Subgraph as d,Vertex as p,Edge as g,SAXStackParser as m,Stack as S,espTime2Seconds as f,deepMixinT as _,XMLNode as U,debounce as y,Message as v,Dispatch as C}from"@hpcc-js/util";const D="@hpcc-js/comms",R="3.14.0",b="3.19.0",F=n("comms/connection.ts");function W(e){return"baseUrl"in e}t(W,"instanceOfIOptions");const T={type:"post",baseUrl:"",userID:"",password:"",rejectUnauthorized:!0,timeoutSecs:60};function A(e){return"function"==typeof e.opts&&"function"==typeof e.send&&"function"==typeof e.clone}function w(e,t){return void 0===t||!0===t?encodeURIComponent(e):""+e}function P(e,t=!0,n=""){if(n&&(n+="."),"object"!=typeof e)return w(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(P(e,t,n+w(`${r}.${o}`,t)))):s.push(n+w(`${r}_i${o}`,t)+"="+P(e,t))}),i&&s.push(n+w(`${r}.itemcount`,t)+"="+e[r].length)}else"object"==typeof e[r]?e[r]&&e[r].Item instanceof Array?(s.push(P(e[r].Item,t,n+w(r,t))),s.push(n+w(`${r}.itemcount`,t)+"="+e[r].Item.length)):s.push(P(e[r],t,n+w(r,t))):void 0!==e[r]?s.push(n+w(r,t)+"="+w(e[r],t)):s.push(n+w(r,t));return s.join("&")}function x(e){return JSON.parse(e)}function L(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?x(e):e)};const h=document.createElement("script");let l=s(e.baseUrl,n);l+=l.indexOf("?")>=0?"&":"?",h.src=l+"jsonp="+u+"&"+P(r,e.encodeRequest),document.body.appendChild(h);const d=setInterval(function(){a<=0?clearInterval(d):(a-=5e3,a<=0?(clearInterval(d),F.error("Request timeout: "+h.src),p(),c(Error("Request timeout: "+h.src))):F.debug("Request pending ("+a/1e3+" sec): "+h.src))},5e3);function p(){delete window[u],document.body.removeChild(h)}t(p,"doCallback")})}function E(e){return e.userID?{Authorization:`Basic ${i(`${e.userID}:${e.password}`)}`}:{}}t(A,"instanceOfIConnection"),t(w,"encode"),t(P,"serializeRequest"),t(x,"deserializeResponse"),t(L,"jsonp"),t(E,"authHeader");const M={};function N(e,n,i,o,c){function a(e){if(e.ok)return"json"===c?e.json():e.text();throw new Error(e.statusText)}return o={...E(e),...o},i={credentials:M[e.baseUrl]?"omit":"include",...i,headers:o},fetch.__setGlobalDispatcher&&fetch.__setGlobalDispatcher(fetch.__defaultAgent),0===e.baseUrl.indexOf("https:")&&(!1===e.rejectUnauthorized&&fetch.__rejectUnauthorizedAgent?fetch.__setGlobalDispatcher?fetch.__setGlobalDispatcher(fetch.__rejectUnauthorizedAgent):i.agent=fetch.__rejectUnauthorizedAgent:fetch.__trustwaveAgent&&(i.agent=fetch.__trustwaveAgent)),t(a,"handleResponse"),r(1e3*e.timeoutSecs,fetch(s(e.baseUrl,n),i).then(a).catch(t=>(i.credentials=M[e.baseUrl]?"include":"omit",fetch(s(e.baseUrl,n),i).then(a).then(t=>(M[e.baseUrl]=!M[e.baseUrl],t)))))}function I(e,t,n,s="json",r){let i;return n.upload_&&(delete n.upload_,t+="?upload_"),n.abortSignal_&&(i=n.abortSignal_,delete n.abortSignal_),N(e,t,{method:"post",body:P(n,e.encodeRequest),signal:i},{"Content-Type":"application/x-www-form-urlencoded",...r},s)}function j(e,t,n,s="json",r){let i;return n.abortSignal_&&(i=n.abortSignal_,delete n.abortSignal_),N(e,`${t}?${P(n,e.encodeRequest)}`,{method:"get",signal:i},{...r},s)}function k(e,t,n,s="json",r){let i;switch(e.type){case"jsonp":i=L(e,t,n,s,r);break;case"get":i=j(e,t,n,s,r);break;default:i=I(e,t,n,s,r)}return i}t(N,"doFetch"),t(I,"post"),t(j,"get"),t(k,"send");let G=k;function V(e){const t=G;return e&&(G=e),t}t(V,"hookSend");const Q=class _Connection{_opts;get baseUrl(){return this._opts.baseUrl}constructor(e){this.opts(e)}opts(e){return 0===arguments.length?this._opts:(this._opts={...T,...e},this)}send(e,t,n="json",s){return this._opts.hookSend?this._opts.hookSend(this._opts,e,t,n,G,s):G(this._opts,e,t,n,s)}clone(){return new _Connection(this.opts())}};t(Q,"Connection");let B=Q,O=/* @__PURE__ */t(function(e){return new B(e)},"createConnection");function X(e){const t=O;return O=e,t}function H(e){return"[object Array]"===Object.prototype.toString.call(e)}t(X,"setTransportFactory"),t(H,"isArray");const $=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($,"ESPExceptions");let J=$;function q(e){return e instanceof J||e.isESPExceptions&&Array.isArray(e.Exception)}function Y(e){return void 0!==e.send}t(q,"isExceptions"),t(Y,"isConnection");const z=class _ESPConnection{_connection;get baseUrl(){return this._connection.opts().baseUrl}_service;_version;constructor(e,t,n){this._connection=Y(e)?e:O(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(H(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 J(e,c,t.Exceptions);if(t&&(n=t[o||e+"Response"]),!n)throw new J(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 Z=z;const K=class _Service{_connection;get baseUrl(){return this._connection.opts().baseUrl}constructor(e,t,n){this._connection=new Z(e,t,n)}opts(){return this._connection.opts()}connection(){return this._connection.clone()}};t(K,"Service");let ee=K;var te,ne,se;ne=te||(te={}),(se=ne.DFUWUActions||(ne.DFUWUActions={})).Delete="Delete",se.Protect="Protect",se.Unprotect="Unprotect",se.Restore="Restore",se.SetToFailed="SetToFailed",se.Archive="Archive";const re=class _FileSprayServiceBase extends ee{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(re,"FileSprayServiceBase");let ie=re;var oe=/* @__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))(oe||{});const ce=class _FileSprayService extends ie{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(ce,"FileSprayService");let ae=ce;var ue,he,le,de,pe,ge,me;he=ue||(ue={}),(le=he.ViewMemberType||(he.ViewMemberType={})).User="User",le.Group="Group",(de=he.UserSortBy||(he.UserSortBy={})).username="username",de.fullname="fullname",de.passwordexpiration="passwordexpiration",de.employeeID="employeeID",de.employeeNumber="employeeNumber",(pe=he.GroupSortBy||(he.GroupSortBy={})).Name="Name",pe.ManagedBy="ManagedBy",(ge=he.AccountTypeReq||(he.AccountTypeReq={})).Any="Any",ge.User="User",ge.Group="Group",(me=he.ResourcePermissionSortBy||(he.ResourcePermissionSortBy={})).Name="Name",me.Type="Type",(he.ResourceSortBy||(he.ResourceSortBy={})).Name="Name";const Se=class _AccessServiceBase extends ee{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(Se,"AccessServiceBase");let fe=Se;const _e=class _AccessService extends fe{};t(_e,"AccessService");let Ue=_e;const ye=class _AccountServiceBase extends ee{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(ye,"AccountServiceBase");let ve=ye;const Ce=class _AccountService extends ve{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(Ce,"AccountService");let De=Ce;const Re=class _CloudServiceBase extends ee{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(Re,"CloudServiceBase");let be=Re;const Fe=n("@hpcc-js/comms/services/wsCloud.ts");function We(e){return void 0!==e?.Pods}function Te(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 Ae(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:Te(e)}}})}t(We,"isGetPODsResponse_v1_02"),t(Te,"mapPorts"),t(Ae,"mapPods");const we=class _CloudService extends be{getPODs(){return super.GetPODs({}).then(e=>{if(We(e))return e.Pods?.Pod??[];try{const t="string"==typeof e.Result?JSON.parse(e.Result):e.Result;return Ae(t?.items??[])}catch(t){return Fe.error(`Error parsing V1Pods json '${t instanceof Error?t.message:String(t)}'`),[]}})}};t(we,"CloudService");let Pe=we;var xe,Le;((Le=xe||(xe={})).SigningMethodType||(Le.SigningMethodType={})).gpg="gpg";const Ee=class _CodesignServiceBase extends ee{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(Ee,"CodesignServiceBase");let Me=Ee;const Ne=class _CodesignService extends Me{ListUserIDsEx(e){return super.ListUserIDs(e).then(e=>e.UserIDs.Item).catch(e=>[])}Sign(e){return super.Sign({SigningMethod:xe.SigningMethodType.gpg,...e})}};t(Ne,"CodesignService");let Ie=Ne;const je=class _DaliServiceBase extends ee{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(je,"DaliServiceBase");let ke=je;const Ge=class _DaliService extends ke{};t(Ge,"DaliService");let Ve=Ge;var Qe,Be,Oe,Xe,He,$e,Je,qe,Ye;Be=Qe||(Qe={}),(Oe=Be.DFUArrayActions||(Be.DFUArrayActions={})).Delete="Delete",Oe.AddToSuperfile="Add To Superfile",Oe.ChangeProtection="Change Protection",Oe.ChangeRestriction="Change Restriction",(Xe=Be.DFUChangeProtection||(Be.DFUChangeProtection={}))[Xe.NoChange=0]="NoChange",Xe[Xe.Protect=1]="Protect",Xe[Xe.Unprotect=2]="Unprotect",Xe[Xe.UnprotectAll=3]="UnprotectAll",(He=Be.DFUChangeRestriction||(Be.DFUChangeRestriction={}))[He.NoChange=0]="NoChange",He[He.Restrict=1]="Restrict",He[He.Unrestricted=2]="Unrestricted",($e=Be.DFUDefFileFormat||(Be.DFUDefFileFormat={})).xml="xml",$e.def="def",(Je=Be.FileAccessRole||(Be.FileAccessRole={})).Token="Token",Je.Engine="Engine",Je.External="External",(qe=Be.SecAccessType||(Be.SecAccessType={})).None="None",qe.Access="Access",qe.Read="Read",qe.Write="Write",qe.Full="Full",(Ye=Be.DFUFileType||(Be.DFUFileType={})).Flat="Flat",Ye.Index="Index",Ye.Xml="Xml",Ye.Csv="Csv",Ye.Json="Json",Ye.IndexLocal="IndexLocal",Ye.IndexPartitioned="IndexPartitioned",Ye.Unset="Unset";const ze=class _DfuServiceBase extends ee{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(ze,"DfuServiceBase");let Ze=ze;const Ke=Qe.DFUArrayActions,et=Qe.DFUDefFileFormat,tt=Qe.DFUChangeProtection,nt=Qe.DFUChangeRestriction,st=class _DFUService extends Ze{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(st,"DFUService");let rt=st;const it=class _DFUXRefServiceBase extends ee{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(it,"DFUXRefServiceBase");let ot=it;const ct=class _DFUXRefService extends ot{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(ct,"DFUXRefService");let at=ct;function ut(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:ht(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:lt(t)}}default:throw new Error("Unknown field type")}}function ht(e){e.Row&&e.Row instanceof Array&&(e=e.Row[0]);const t=[];for(const n in e)t.push(ut(n,e[n]));return t}function lt(e){const t={};for(const n in e)t[n]=ut(n,e[n]);return t}t(ut,"jsonToIField"),t(ht,"jsonToIFieldArr"),t(lt,"jsonToIFieldObj");const dt=class _EclService extends ee{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(ht)}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]=ht(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 J(s,n,{Source:"wsEcl.submit",Exception:e.Results.Exception});return e.Results})}};t(dt,"EclService");let pt=dt;const gt=class _ElkServiceBase extends ee{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(gt,"ElkServiceBase");let mt=gt;const St=class _ElkService extends mt{};t(St,"ElkService");let ft=St;var _t,Ut,yt,vt,Ct,Dt,Rt,bt,Ft,Wt;Ut=_t||(_t={}),(yt=Ut.LogColumnType||(Ut.LogColumnType={})).global="global",yt.workunits="workunits",yt.components="components",yt.audience="audience",yt.class="class",yt.instance="instance",yt.node="node",yt.message="message",yt.logid="logid",yt.processid="processid",yt.threadid="threadid",yt.timestamp="timestamp",yt.pod="pod",yt.traceid="traceid",yt.spanid="spanid",(vt=Ut.LogColumnValueType||(Ut.LogColumnValueType={})).string="string",vt.numeric="numeric",vt.datetime="datetime",vt.enum="enum",vt.epoch="epoch",(Ct=Ut.LogAccessType||(Ut.LogAccessType={}))[Ct.All=0]="All",Ct[Ct.ByJobID=1]="ByJobID",Ct[Ct.ByComponent=2]="ByComponent",Ct[Ct.ByLogType=3]="ByLogType",Ct[Ct.ByTargetAudience=4]="ByTargetAudience",Ct[Ct.BySourceInstance=5]="BySourceInstance",Ct[Ct.BySourceNode=6]="BySourceNode",Ct[Ct.ByFieldName=7]="ByFieldName",Ct[Ct.ByPod=8]="ByPod",Ct[Ct.ByTraceID=9]="ByTraceID",Ct[Ct.BySpanID=10]="BySpanID",(Dt=Ut.LogAccessStatusCode||(Ut.LogAccessStatusCode={}))[Dt.Success=0]="Success",Dt[Dt.Warning=1]="Warning",Dt[Dt.Fail=2]="Fail",(Rt=Ut.LogAccessFilterOperator||(Ut.LogAccessFilterOperator={}))[Rt.NONE=0]="NONE",Rt[Rt.AND=1]="AND",Rt[Rt.OR=2]="OR",(bt=Ut.LogSelectColumnMode||(Ut.LogSelectColumnMode={}))[bt.MIN=0]="MIN",bt[bt.DEFAULT=1]="DEFAULT",bt[bt.ALL=2]="ALL",bt[bt.CUSTOM=3]="CUSTOM",(Ft=Ut.SortColumType||(Ut.SortColumType={}))[Ft.ByDate=0]="ByDate",Ft[Ft.ByJobID=1]="ByJobID",Ft[Ft.ByComponent=2]="ByComponent",Ft[Ft.ByLogType=3]="ByLogType",Ft[Ft.ByTargetAudience=4]="ByTargetAudience",Ft[Ft.BySourceInstance=5]="BySourceInstance",Ft[Ft.BySourceNode=6]="BySourceNode",Ft[Ft.ByFieldName=7]="ByFieldName",Ft[Ft.ByPod=8]="ByPod",Ft[Ft.ByTraceID=9]="ByTraceID",Ft[Ft.BySpanID=10]="BySpanID",(Wt=Ut.SortDirection||(Ut.SortDirection={}))[Wt.ASC=0]="ASC",Wt[Wt.DSC=1]="DSC";const Tt=class _LogaccessServiceBase extends ee{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(Tt,"LogaccessServiceBase");let At=Tt;const wt=n("@hpcc-js/comms/services/wsLogaccess.ts");var Pt=/* @__PURE__ */(e=>(e.Disaster="DIS",e.Error="ERR",e.Warning="WRN",e.Information="INF",e.Progress="PRO",e.Metric="MET",e))(Pt||{}),xt=/* @__PURE__ */(e=>(e.Operator="OPR",e.User="USR",e.Programmer="PRO",e.Audit="ADT",e))(xt||{});const Lt=class _LogaccessService extends At{_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:_t.LogAccessType.All}}]}},Range:{StartDate:/* @__PURE__ */new Date(0).toISOString()},LogLineStartFrom:e.LogLineStartFrom??0,LogLineLimit:e.LogLineLimit??100,SelectColumnMode:_t.LogSelectColumnMode.DEFAULT,Format:"JSON",SortBy:{SortCondition:[{BySortType:_t.SortColumType.ByDate,ColumnName:"",Direction:0}]}},o=[];for(const t in e){let n,r;if(t in s&&(n=Object.values(_t.LogColumnType).includes(t)?t:s[t]),n){switch(n){case _t.LogColumnType.workunits:case"hpcc.log.jobid":r=_t.LogAccessType.ByJobID;break;case _t.LogColumnType.audience:case"hpcc.log.audience":r=_t.LogAccessType.ByTargetAudience;break;case _t.LogColumnType.class:case"hpcc.log.class":r=_t.LogAccessType.ByLogType;break;case _t.LogColumnType.components:case"kubernetes.container.name":r=_t.LogAccessType.ByComponent;break;default:r=_t.LogAccessType.ByFieldName,n=s[t]}if(Array.isArray(e[t]))e[t].forEach(e=>{r===_t.LogAccessType.ByComponent&&(e+="*"),o.push({LogCategory:r,SearchField:n,SearchByValue:e})});else{let s=e[t];r===_t.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=_t.LogAccessFilterOperator.AND;n>0?(o[n-1].SearchField===t.SearchField&&(s=_t.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:_t.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=_t.LogAccessFilterOperator.AND,o[0].SearchField===o[1].SearchField&&(i.Filter.Operator=_t.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:wt.warning(`Unknown RemoteLogManagerType: ${n.RemoteLogManagerType}`),s=[]}return{lines:s,total:e.TotalLogLinesAvailable??1e4}}catch(t){wt.error(t.message??t)}return{lines:[],total:0}})}};t(Lt,"LogaccessService");let Et=Lt;function Mt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Nt(e){return 1===e.length&&(e=It(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 It(e){return function(t,n){return Mt(e(t),n)}}function jt(e){return null===e?NaN:+e}function kt(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 Gt(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 Vt,Qt,Bt,Ot;t(Mt,"ascending"),t(Nt,"bisector"),t(It,"ascendingComparator"),Nt(Mt),t(jt,"number"),t(kt,"d3Max"),t(Gt,"d3Mean"),Qt=Vt||(Vt={}),(Bt=Qt.ThresholdType||(Qt.ThresholdType={}))[Bt.THRESHOLD_PERCENTAGE=0]="THRESHOLD_PERCENTAGE",Bt[Bt.THRESHOLD_MB=1]="THRESHOLD_MB",(Ot=Qt.TpMachineType||(Qt.TpMachineType={})).ALLNODES="ALLNODES",Ot.THORMACHINES="THORMACHINES",Ot.HOLEMACHINES="HOLEMACHINES",Ot.ROXIEMACHINES="ROXIEMACHINES",Ot.MACHINES="MACHINES",Ot.AVAILABLEMACHINES="AVAILABLEMACHINES",Ot.DROPZONE="DROPZONE",Ot.STANDBYNNODE="STANDBYNNODE",Ot.THORSPARENODES="THORSPARENODES",Ot.HOLESTANDBYNODES="HOLESTANDBYNODES";const Xt=class _MachineServiceBase extends ee{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(Xt,"MachineServiceBase");let Ht=Xt;const $t=class _MachineService extends Ht{GetTargetClusterUsageEx(e,t=!1){return this._connection.send("GetTargetClusterUsage",{TargetClusters:e?{Item:e}:{},BypassCachedResult:t}).then(e=>o("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:Gt(t.filter(e=>!isNaN(e.PercentUsed)),e=>e.PercentUsed),max:kt(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:Gt(t.filter(e=>!isNaN(e.mean)),e=>e.mean),max:kt(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:Gt(t.filter(e=>!isNaN(e.mean)),e=>e.mean),max:kt(t.filter(e=>!isNaN(e.max)),e=>e.max)}}))}};t($t,"MachineService");let Jt=$t;const qt=class _PackageProcessServiceBase extends ee{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(qt,"PackageProcessServiceBase");let Yt=qt;const zt=class _PackageProcessService extends Yt{};t(zt,"PackageProcessService");let Zt=zt;const Kt=class _ResourcesServiceBase extends ee{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(Kt,"ResourcesServiceBase");let en=Kt;const tn=class _ResourcesService extends en{};t(tn,"ResourcesService");let nn=tn;var sn,rn,on;rn=sn||(sn={}),(on=rn.WUTypes||(rn.WUTypes={})).ECL="ECL",on.DFU="DFU";const cn=class _SashaServiceBase extends ee{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(cn,"SashaServiceBase");let an=cn;const un=class _SashaService extends an{};t(un,"SashaService");let hn=un;var ln=/* @__PURE__ */new Date,dn=/* @__PURE__ */new Date;function pn(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 pn(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 ln.setTime(+t),dn.setTime(+n),e(ln),e(dn),Math.floor(s(ln,dn))},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(pn,"newInterval");var gn=864e5,mn=6048e5,Sn=pn(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()))/gn},function(e){return e.getDate()-1});function fn(e){return pn(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()))/mn})}Sn.range,t(fn,"weekday");var _n=fn(0),Un=fn(1),yn=fn(2),vn=fn(3),Cn=fn(4),Dn=fn(5),Rn=fn(6);_n.range,Un.range,yn.range,vn.range,Cn.range,Dn.range,Rn.range;var bn=pn(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()});bn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?pn(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},bn.range;var Fn=pn(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/gn},function(e){return e.getUTCDate()-1});function Wn(e){return pn(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)/mn})}Fn.range,t(Wn,"utcWeekday");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=pn(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 Nn(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 In(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 kn(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=es(i),l=ts(i),d=es(o),p=ts(o),g=es(c),m=ts(c),S=es(a),f=ts(a),_=es(u),U=ts(u),y={a:E,A:M,b:N,B:I,c:null,d:Cs,e:Cs,f:Ws,g:js,G:Gs,H:Ds,I:Rs,j:bs,L:Fs,m:Ts,M:As,p:j,q:k,Q:ur,s:hr,S:ws,u:Ps,U:xs,V:Es,w:Ms,W:Ns,x:null,X:null,y:Is,Y:ks,Z:Vs,"%":ar},v={a:G,A:V,b:Q,B:B,c:null,d:Qs,e:Qs,f:$s,g:rr,G:or,H:Bs,I:Os,j:Xs,L:Hs,m:Js,M:qs,p:O,q:X,Q:ur,s:hr,S:Ys,u:zs,U:Zs,V:er,w:tr,W:nr,x:null,X:null,y:sr,Y:ir,Z:cr,"%":ar},C={a:W,A:T,b:A,B:w,c:P,d:ds,e:ds,f:_s,g:as,G:cs,H:gs,I:gs,j:ps,L:fs,m:ls,M:ms,p:F,q:hs,Q:ys,s:vs,S:Ss,u:ss,U:rs,V:is,w:ns,W:os,x:x,X:L,y:as,Y:cs,Z:us,"%":Us};function D(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=Jn[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 R(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=In(jn(i.y,0,1))).getUTCDay(),s=r>4||0===r?An.ceil(s):An(s),s=Fn.offset(s,7*(i.V-1)),i.y=s.getUTCFullYear(),i.m=s.getUTCMonth(),i.d=s.getUTCDate()+(i.w+6)%7):(r=(s=Nn(jn(i.y,0,1))).getDay(),s=r>4||0===r?Un.ceil(s):Un(s),s=Sn.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?In(jn(i.y,0,1)).getUTCDay():Nn(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,In(i)):Nn(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 Jn?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=D(s,y),y.X=D(r,y),y.c=D(n,y),v.x=D(s,v),v.X=D(r,v),v.c=D(n,v),t(D,"newFormat"),t(R,"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=D(e+="",y);return t.toString=function(){return e},t},"format"),parse:/* @__PURE__ */t(function(e){var t=R(e+="",!1);return t.toString=function(){return e},t},"parse"),utcFormat:/* @__PURE__ */t(function(e){var t=D(e+="",v);return t.toString=function(){return e},t},"utcFormat"),utcParse:/* @__PURE__ */t(function(e){var t=R(e+="",!0);return t.toString=function(){return e},t},"utcParse")}}Mn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?pn(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},Mn.range,t(Nn,"localDate"),t(In,"utcDate"),t(jn,"newDate"),t(kn,"formatLocale$1");var Gn,Vn,Qn,Bn,On,Xn,Hn,$n,Jn={"-":"",_:" ",0:"0"},qn=/^\s*\d+/,Yn=/^%/,zn=/[\\^$*+?|[\]().{}]/g;function Zn(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 Kn(e){return e.replace(zn,"\\$&")}function es(e){return new RegExp("^(?:"+e.map(Kn).join("|")+")","i")}function ts(e){for(var t={},n=-1,s=e.length;++n<s;)t[e[n].toLowerCase()]=n;return t}function ns(e,t,n){var s=qn.exec(t.slice(n,n+1));return s?(e.w=+s[0],n+s[0].length):-1}function ss(e,t,n){var s=qn.exec(t.slice(n,n+1));return s?(e.u=+s[0],n+s[0].length):-1}function rs(e,t,n){var s=qn.exec(t.slice(n,n+2));return s?(e.U=+s[0],n+s[0].length):-1}function is(e,t,n){var s=qn.exec(t.slice(n,n+2));return s?(e.V=+s[0],n+s[0].length):-1}function os(e,t,n){var s=qn.exec(t.slice(n,n+2));return s?(e.W=+s[0],n+s[0].length):-1}function cs(e,t,n){var s=qn.exec(t.slice(n,n+4));return s?(e.y=+s[0],n+s[0].length):-1}function as(e,t,n){var s=qn.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 hs(e,t,n){var s=qn.exec(t.slice(n,n+1));return s?(e.q=3*s[0]-3,n+s[0].length):-1}function ls(e,t,n){var s=qn.exec(t.slice(n,n+2));return s?(e.m=s[0]-1,n+s[0].length):-1}function ds(e,t,n){var s=qn.exec(t.slice(n,n+2));return s?(e.d=+s[0],n+s[0].length):-1}function ps(e,t,n){var s=qn.exec(t.slice(n,n+3));return s?(e.m=0,e.d=+s[0],n+s[0].length):-1}function gs(e,t,n){var s=qn.exec(t.slice(n,n+2));return s?(e.H=+s[0],n+s[0].length):-1}function ms(e,t,n){var s=qn.exec(t.slice(n,n+2));return s?(e.M=+s[0],n+s[0].length):-1}function Ss(e,t,n){var s=qn.exec(t.slice(n,n+2));return s?(e.S=+s[0],n+s[0].length):-1}function fs(e,t,n){var s=qn.exec(t.slice(n,n+3));return s?(e.L=+s[0],n+s[0].length):-1}function _s(e,t,n){var s=qn.exec(t.slice(n,n+6));return s?(e.L=Math.floor(s[0]/1e3),n+s[0].length):-1}function Us(e,t,n){var s=Yn.exec(t.slice(n,n+1));return s?n+s[0].length:-1}function ys(e,t,n){var s=qn.exec(t.slice(n));return s?(e.Q=+s[0],n+s[0].length):-1}function vs(e,t,n){var s=qn.exec(t.slice(n));return s?(e.s=+s[0],n+s[0].length):-1}function Cs(e,t){return Zn(e.getDate(),t,2)}function Ds(e,t){return Zn(e.getHours(),t,2)}function Rs(e,t){return Zn(e.getHours()%12||12,t,2)}function bs(e,t){return Zn(1+Sn.count(bn(e),e),t,3)}function Fs(e,t){return Zn(e.getMilliseconds(),t,3)}function Ws(e,t){return Fs(e,t)+"000"}function Ts(e,t){return Zn(e.getMonth()+1,t,2)}function As(e,t){return Zn(e.getMinutes(),t,2)}function ws(e,t){return Zn(e.getSeconds(),t,2)}function Ps(e){var t=e.getDay();return 0===t?7:t}function xs(e,t){return Zn(_n.count(bn(e)-1,e),t,2)}function Ls(e){var t=e.getDay();return t>=4||0===t?Cn(e):Cn.ceil(e)}function Es(e,t){return e=Ls(e),Zn(Cn.count(bn(e),e)+(4===bn(e).getDay()),t,2)}function Ms(e){return e.getDay()}function Ns(e,t){return Zn(Un.count(bn(e)-1,e),t,2)}function Is(e,t){return Zn(e.getFullYear()%100,t,2)}function js(e,t){return Zn((e=Ls(e)).getFullYear()%100,t,2)}function ks(e,t){return Zn(e.getFullYear()%1e4,t,4)}function Gs(e,t){var n=e.getDay();return Zn((e=n>=4||0===n?Cn(e):Cn.ceil(e)).getFullYear()%1e4,t,4)}function Vs(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Zn(t/60|0,"0",2)+Zn(t%60,"0",2)}function Qs(e,t){return Zn(e.getUTCDate(),t,2)}function Bs(e,t){return Zn(e.getUTCHours(),t,2)}function Os(e,t){return Zn(e.getUTCHours()%12||12,t,2)}function Xs(e,t){return Zn(1+Fn.count(Mn(e),e),t,3)}function Hs(e,t){return Zn(e.getUTCMilliseconds(),t,3)}function $s(e,t){return Hs(e,t)+"000"}function Js(e,t){return Zn(e.getUTCMonth()+1,t,2)}function qs(e,t){return Zn(e.getUTCMinutes(),t,2)}function Ys(e,t){return Zn(e.getUTCSeconds(),t,2)}function zs(e){var t=e.getUTCDay();return 0===t?7:t}function Zs(e,t){return Zn(Tn.count(Mn(e)-1,e),t,2)}function Ks(e){var t=e.getUTCDay();return t>=4||0===t?xn(e):xn.ceil(e)}function er(e,t){return e=Ks(e),Zn(xn.count(Mn(e),e)+(4===Mn(e).getUTCDay()),t,2)}function tr(e){return e.getUTCDay()}function nr(e,t){return Zn(An.count(Mn(e)-1,e),t,2)}function sr(e,t){return Zn(e.getUTCFullYear()%100,t,2)}function rr(e,t){return Zn((e=Ks(e)).getUTCFullYear()%100,t,2)}function ir(e,t){return Zn(e.getUTCFullYear()%1e4,t,4)}function or(e,t){var n=e.getUTCDay();return Zn((e=n>=4||0===n?xn(e):xn.ceil(e)).getUTCFullYear()%1e4,t,4)}function cr(){return"+0000"}function ar(){return"%"}function ur(e){return+e}function hr(e){return Math.floor(+e/1e3)}function lr(e){return(Gn=kn(e)).format,Vn=Gn.parse,Qn=Gn.utcFormat,Bn=Gn.utcParse,Gn}t(Zn,"pad"),t(Kn,"requote"),t(es,"formatRe"),t(ts,"formatLookup"),t(ns,"parseWeekdayNumberSunday"),t(ss,"parseWeekdayNumberMonday"),t(rs,"parseWeekNumberSunday"),t(is,"parseWeekNumberISO"),t(os,"parseWeekNumberMonday"),t(cs,"parseFullYear"),t(as,"parseYear"),t(us,"parseZone"),t(hs,"parseQuarter"),t(ls,"parseMonthNumber"),t(ds,"parseDayOfMonth"),t(ps,"parseDayOfYear"),t(gs,"parseHour24"),t(ms,"parseMinutes"),t(Ss,"parseSeconds"),t(fs,"parseMilliseconds"),t(_s,"parseMicroseconds"),t(Us,"parseLiteralPercent"),t(ys,"parseUnixTimestamp"),t(vs,"parseUnixTimestampSeconds"),t(Cs,"formatDayOfMonth"),t(Ds,"formatHour24"),t(Rs,"formatHour12"),t(bs,"formatDayOfYear"),t(Fs,"formatMilliseconds"),t(Ws,"formatMicroseconds"),t(Ts,"formatMonthNumber"),t(As,"formatMinutes"),t(ws,"formatSeconds"),t(Ps,"formatWeekdayNumberMonday"),t(xs,"formatWeekNumberSunday"),t(Ls,"dISO"),t(Es,"formatWeekNumberISO"),t(Ms,"formatWeekdayNumberSunday"),t(Ns,"formatWeekNumberMonday"),t(Is,"formatYear"),t(js,"formatYearISO"),t(ks,"formatFullYear"),t(Gs,"formatFullYearISO"),t(Vs,"formatZone"),t(Qs,"formatUTCDayOfMonth"),t(Bs,"formatUTCHour24"),t(Os,"formatUTCHour12"),t(Xs,"formatUTCDayOfYear"),t(Hs,"formatUTCMilliseconds"),t($s,"formatUTCMicroseconds"),t(Js,"formatUTCMonthNumber"),t(qs,"formatUTCMinutes"),t(Ys,"formatUTCSeconds"),t(zs,"formatUTCWeekdayNumberMonday"),t(Zs,"formatUTCWeekNumberSunday"),t(Ks,"UTCdISO"),t(er,"formatUTCWeekNumberISO"),t(tr,"formatUTCWeekdayNumberSunday"),t(nr,"formatUTCWeekNumberMonday"),t(sr,"formatUTCYear"),t(rr,"formatUTCYearISO"),t(ir,"formatUTCFullYear"),t(or,"formatUTCFullYearISO"),t(cr,"formatUTCZone"),t(ar,"formatLiteralPercent"),t(ur,"formatUnixTimestamp"),t(hr,"formatUnixTimestampSeconds"),lr({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(lr,"defaultLocale$1"),Xn=On||(On={}),(Hn=Xn.LockModes||(Xn.LockModes={})).ALL="ALL",Hn.READ="READ",Hn.WRITE="WRITE",Hn.HOLD="HOLD",Hn.SUB="SUB",($n=Xn.RoxieControlCmdType||(Xn.RoxieControlCmdType={})).Attach="Attach",$n.Detach="Detach",$n.State="State",$n.Reload="Reload",$n.ReloadRetry="ReloadRetry",$n.MemLock="MemLock",$n.MemUnlock="MemUnlock",$n.GetMemLocked="GetMemLocked";const dr=class _SMCServiceBase extends ee{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(dr,"SMCServiceBase");let pr=dr;const gr=Vn("%Y%m%d%H");function mr(e){return"number"==typeof e||"string"==typeof e&&""!==e.trim()&&!isNaN(+e)}t(mr,"isNumeric");const Sr=class _SMCService extends pr{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")?gr(t):e.startsWith("Num")?+t:e.startsWith("Time")?+t/1e9:e.startsWith("When")?new Date(+t/1e3).toISOString():mr(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(Sr,"SMCService");let fr=Sr;const _r=class _storeServiceBase extends ee{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(_r,"storeServiceBase");let Ur=_r;const yr=class _StoreService extends Ur{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(yr,"StoreService");let vr=yr;var Cr,Dr,Rr,br;Dr=Cr||(Cr={}),(Rr=Dr.TpConfigResponseFormat||(Dr.TpConfigResponseFormat={})).XML="XML",Rr.YAML="YAML",(br=Dr.RoxieQueueFilter||(Dr.RoxieQueueFilter={})).All="All",br.QueriesOnly="QueriesOnly",br.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"})(Dr.TpMachineType||(Dr.TpMachineType={}));const Fr=class _TopologyServiceBase extends ee{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(Fr,"TopologyServiceBase");let Wr=Fr;const Tr=class _TopologyService extends Wr{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(Tr,"TopologyService");let Ar=Tr;var wr,Pr,xr,Lr,Er,Mr,Nr,Ir,jr,kr,Gr,Vr,Qr,Br,Or;Pr=wr||(wr={}),(xr=Pr.ECLWUActions||(Pr.ECLWUActions={})).Abort="Abort",xr.Delete="Delete",xr.Deschedule="Deschedule",xr.Reschedule="Reschedule",xr.Pause="Pause",xr.PauseNow="PauseNow",xr.Protect="Protect",xr.Unprotect="Unprotect",xr.Restore="Restore",xr.Resume="Resume",xr.SetToFailed="SetToFailed",xr.Archive="Archive",(e=>{e[e.MIN=0]="MIN",e[e.DEFAULT=1]="DEFAULT",e[e.ALL=2]="ALL",e[e.CUSTOM=3]="CUSTOM"})(Pr.LogSelectColumnMode||(Pr.LogSelectColumnMode={})),(e=>{e[e.ASC=0]="ASC",e[e.DSC=1]="DSC"})(Pr.SortDirection||(Pr.SortDirection={})),(Lr=Pr.LogEventClass||(Pr.LogEventClass={})).ALL="ALL",Lr.DIS="DIS",Lr.ERR="ERR",Lr.WRN="WRN",Lr.INF="INF",Lr.PRO="PRO",Lr.MET="MET",Lr.EVT="EVT",(Er=Pr.WUDetailsAttrValueType||(Pr.WUDetailsAttrValueType={})).Single="Single",Er.List="List",Er.Multi="Multi",(Mr=Pr.EclDefinitionActions||(Pr.EclDefinitionActions={})).SyntaxCheck="SyntaxCheck",Mr.Deploy="Deploy",Mr.Publish="Publish",(Nr=Pr.ErrorMessageFormat||(Pr.ErrorMessageFormat={})).xml="xml",Nr.json="json",Nr.text="text",(Ir=Pr.LogAccessLogFormat||(Pr.LogAccessLogFormat={}))[Ir.XML=0]="XML",Ir[Ir.JSON=1]="JSON",Ir[Ir.CSV=2]="CSV",(jr=Pr.WUExceptionSeverity||(Pr.WUExceptionSeverity={})).info="info",jr.warning="warning",jr.error="error",jr.alert="alert",(kr=Pr.WUQueryFilterSuspendedType||(Pr.WUQueryFilterSuspendedType={})).Allqueries="All queries",kr.Notsuspended="Not suspended",kr.Suspended="Suspended",kr.Suspendedbyuser="Suspended by user",kr.Suspendedbyfirstnode="Suspended by first node",kr.Suspendedbyanynode="Suspended by any node",(Gr=Pr.WUQuerySetFilterType||(Pr.WUQuerySetFilterType={})).All="All",Gr.Id="Id",Gr.Name="Name",Gr.Alias="Alias",Gr.Status="Status",(Vr=Pr.WUProtectFilter||(Pr.WUProtectFilter={})).All="All",Vr.Protected="Protected",Vr.NotProtected="NotProtected",(Pr.QuerySetAliasActionTypes||(Pr.QuerySetAliasActionTypes={})).Deactivate="Deactivate",(Qr=Pr.QuerysetImportActivation||(Pr.QuerysetImportActivation={})).None="None",Qr.ActivateImportedActive="ActivateImportedActive",(Br=Pr.QuerySetQueryActionTypes||(Pr.QuerySetQueryActionTypes={})).Suspend="Suspend",Br.Unsuspend="Unsuspend",Br.ToggleSuspend="ToggleSuspend",Br.Activate="Activate",Br.Delete="Delete",Br.DeleteQueriesAndWUs="DeleteQueriesAndWUs",Br.RemoveAllAliases="RemoveAllAliases",Br.ResetQueryStats="ResetQueryStats",(Or=Pr.WUQueryActivationMode||(Pr.WUQueryActivationMode={}))[Or.DoNotActivateQuery=0]="DoNotActivateQuery",Or[Or.ActivateQuery=1]="ActivateQuery",Or[Or.ActivateQuerySuspendPrevious=2]="ActivateQuerySuspendPrevious",Or[Or.ActivateQueryDeletePrevious=3]="ActivateQueryDeletePrevious";const Xr=class _WorkunitsServiceBase extends ee{constructor(e){super(e,"WsWorkunits","2.03")}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(Xr,"WorkunitsServiceBase");let Hr=Xr;var $r,Jr,qr,Yr=/* @__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))(Yr||{});function zr(e){return"string"==typeof e.Name}function Zr(e){return void 0!==e.TotalClusterTime}function Kr(e){return void 0!==e.StateEx}Jr=$r||($r={}),(qr=Jr.Action||(Jr.Action={}))[qr.Unknown=0]="Unknown",qr[qr.Compile=1]="Compile",qr[qr.Check=2]="Check",qr[qr.Run=3]="Run",qr[qr.ExecuteExisting=4]="ExecuteExisting",qr[qr.Pause=5]="Pause",qr[qr.PauseNow=6]="PauseNow",qr[qr.Resume=7]="Resume",qr[qr.Debug=8]="Debug",qr[qr.__size=9]="__size",t(zr,"isECLResult"),t(Zr,"isWUQueryECLWorkunit"),t(Kr,"isWUInfoWorkunit");const ei=class _WorkunitsService extends Hr{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=>c({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=a(e.Result).children();return t.length?t[0]:null})}};t(ei,"WorkunitsService");let ti=ei;const ni=class _WorkunitsServiceEx extends Hr{WUPublishWorkunitEx(e){return this._connection.send("WUPublishWorkunit",e)}};t(ni,"WorkunitsServiceEx");let si=ni;function ri(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function ii(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 oi(e){return(e=ii(Math.abs(e)))?e[1]:NaN}function ci(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 ai(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}t(ri,"formatDecimal"),t(ii,"formatDecimalParts"),t(oi,"exponent"),t(ci,"formatGroup"),t(ai,"formatNumerals");var ui,hi=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function li(e){if(!(t=hi.exec(e)))throw new Error("invalid format: "+e);var t;return new di({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 di(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 pi(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 gi(e,t){var n=ii(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")+ii(e,Math.max(0,t+i-1))[0]}function mi(e,t){var n=ii(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(li,"formatSpecifier"),li.prototype=di.prototype,t(di,"FormatSpecifier"),di.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(pi,"formatTrim"),t(gi,"formatPrefixAuto"),t(mi,"formatRounded");const Si={"%":/* @__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:ri,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 mi(100*e,t)},"p"),r:mi,s:gi,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 fi(e){return e}t(fi,"identity");var _i,Ui,yi=Array.prototype.map,vi=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ci(e){var n=void 0===e.grouping||void 0===e.thousands?fi:ci(yi.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?fi:ai(yi.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=li(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"):Si[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=Si[U],D=/[defgprs%]/.test(U);function R(e){var t,s,r,c=y,p=v;if("c"===U)p=C(e)+p,e="";else{var R=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:C(Math.abs(e),f),_&&(e=pi(e)),R&&0===+e&&"+"!==d&&(R=!1),c=(R?"("===d?d:a:"-"===d||"("===d?"":d)+c,p=("s"===U?vi[8+ui/3]:"")+p+(R&&"("===d?")":""),D)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(R,"format"),R.toString=function(){return e+""},R}function l(e,t){var n=h(((e=li(e)).type="f",e)),s=3*Math.max(-8,Math.min(8,Math.floor(oi(t)/3))),r=Math.pow(10,-s),i=vi[8+s/3];return function(e){return n(r*e)+i}}return t(h,"newFormat"),t(l,"formatPrefix"),{format:h,formatPrefix:l}}function Di(e){return _i=Ci(e),Ui=_i.format,_i.formatPrefix,_i}t(Ci,"formatLocale"),Di({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),t(Di,"defaultLocale");const Ri=class _ECLGraph extends u{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=>$i(e)):this.wu.fetchGraphDetails([this.Name],["graph"]).then(e=>$i(e))}};t(Ri,"ECLGraph");let bi=Ri;const Fi=class _GraphCache extends h{constructor(){super(e=>h.hash([e.Name]))}};t(Fi,"GraphCache");let Wi=Fi;function Ti(e,t,n){(n=n||[]).push(e),t(e.name,e.$,e.children(),n),e.children().forEach(e=>{Ti(e,t,n)}),n.pop()}function Ai(e){const t={};return e.forEach(e=>{"att"===e.name&&(t[e.$.name]=e.$.value)}),t}t(Ti,"walkXmlJson"),t(Ai,"flattenAtt");const wi=class _XGMMLGraph extends l{};t(wi,"XGMMLGraph");let Pi=wi;const xi=class _XGMMLSubgraph extends d{};t(xi,"XGMMLSubgraph");let Li=xi;const Ei=class _XGMMLVertex extends p{};t(Ei,"XGMMLVertex");let Mi=Ei;const Ni=class _XGMMLEdge extends g{};t(Ni,"XGMMLEdge");let Ii=Ni;function ji(e,t){const n={},s={},r={},i=new Pi(e=>e._.id),o=[i.root];return Ti(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(Ai(i));o.push(e),n[t.id]=e}const e=a.createVertex(Ai(i));s[t.id]=e;break;case"edge":const c=a.createEdge(s[t.source],s[t.target],Ai(i));r[t.id]=c}}),i}t(ji,"createXGMMLGraph");const ki=class _ScopeGraph extends l{};t(ki,"ScopeGraph");let Gi=ki;const Vi=class _ScopeSubgraph extends d{};t(Vi,"ScopeSubgraph");let Qi=Vi;const Bi=class _ScopeVertex extends p{};t(Bi,"ScopeVertex");let Oi=Bi;const Xi=class _ScopeEdge extends g{};t(Xi,"ScopeEdge");let Hi=Xi;function $i(e){const t={},n={},s={};let r;for(const o of e)switch(o.ScopeType){case"graph":r=new Gi(e=>e._.Id,o),t[o.ScopeName]=r.root;break;case"subgraph":r||(r=new Gi(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($i,"createGraph");const Ji=class _Resource extends u{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(Ji,"Resource");let qi=Ji;const Yi=class _XSDNode{e;constructor(e){this.e=e}fix(){delete this.e}};t(Yi,"XSDNode");let zi=Yi;const Zi=class _XSDXMLNode extends zi{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(Zi,"XSDXMLNode");let Ki=Zi;const eo=class _XSDSimpleType extends zi{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(eo,"XSDSimpleType");let to=eo;const no=class _XSDSchema{root;simpleTypes={};fields(){return this.root.children()}};t(no,"XSDSchema");let so=no;const ro=class _XSDParser extends m{schema=new so;simpleType;simpleTypes={};xsdStack=new S;startXMLNode(e){switch(super.startXMLNode(e),e.name){case"xs:element":const t=new Ki(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 to(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(ro,"XSDParser");let io=ro;function oo(e){const t=new io;return t.parse(e),t.schema}t(oo,"parseXSD");const co=class _XSDParser2 extends io{_rootName;schema=new so;simpleTypes={};xsdStack=new S;constructor(e){super(),this._rootName=e}startXMLNode(e){switch(super.startXMLNode(e),e.name){case"xsd:element":const t=new Ki(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 to(e)}}endXMLNode(e){if("xsd:element"===e.name){this.xsdStack.pop().fix()}super.endXMLNode(e)}};t(co,"XSDParser2");let ao=co;function uo(e,t){const n=new ao(t);return n.parse(e),n.schema}t(uo,"parseXSD2");const ho=class _GlobalResultCache extends h{constructor(){super(e=>`${e.BaseUrl}-${e.Wuid}-${e.ResultName}`)}};t(ho,"GlobalResultCache");let lo=ho;const po=new lo,go=class _Result extends u{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=po.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=po.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:"Sequence_"+n},()=>new _Result(e,t,n)):"string"==typeof n&&(r=po.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:n},()=>new _Result(e,t,n)))),r}static attachLogicalFile(e,t,n){return po.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:n},()=>new _Result(e,t,n,!0))}constructor(e,t,n,s){super(),this.connection=e instanceof ti?e:new ti(e),"boolean"==typeof s&&!0===s?this.set({NodeGroup:t,LogicalFileName:n}):zr(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=oo(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 c=i??this._bypassCache;return this.WUResult(e,t,!n,s,r,c).then(e=>{const t=e.Result;return delete e.Result,this.set({...e}),o("XmlSchema.xml",t)&&(this.xsdSchema=oo(t.XmlSchema.xml)),o("Row",t)?t.Row:this.ResultName&&o(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(go,"Result");let mo=go;const So=class _ResultCache extends h{constructor(){super(e=>h.hash([e.Sequence,e.Name,e.Value,e.FileName]))}};t(So,"ResultCache");let fo=So;const _o=class _Attribute extends u{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(_o,"Attribute");let Uo=_o;const yo=class _BaseScope extends u{_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 Uo(this,n))}),t.start&&t.end?(t.start.FormattedEnd=t.end.Formatted,e.push(new Uo(this,t.start))):t.start?e.push(new Uo(this,t.start)):t.end&&e.push(new Uo(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 Uo(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(yo,"BaseScope");let vo=yo;const Co=class _Scope extends vo{wu;constructor(e,t){super(t),this.wu=e}};t(Co,"Scope");let Do=Co;const Ro=class _SourceFile extends u{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 ti?e:new ti(e),this.set({Wuid:t,...n})}};t(Ro,"SourceFile");let bo=Ro;const Fo=class _Timer extends u{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 ti?e:new ti(e);const s=f(n.Value);this.set({Wuid:t,Seconds:Math.round(1e3*s)/1e3,HasSubGraphId:void 0!==n.SubGraphId,...n})}};t(Fo,"Timer");let Wo=Fo;const To=Qn("%Y-%m-%dT%H:%M:%S.%LZ"),Ao=Bn("%Y-%m-%dT%H:%M:%S.%LZ"),wo=Ui(",");function Po(e){return e&&!isNaN(+e)?wo(+e):e}t(Po,"formatNum");const xo="DefinitionList",Lo=/([a-zA-Z]:)?(.*[\\\/])(.*)(\((\d+),(\d+)\))/,Eo=["Avg","Min","Max","Delta","StdDev"],Mo=["SkewMin","SkewMax","NodeMin","NodeMax"],No=/[A-Z][a-z]*/g;function Io(e){for(const n of Mo){const t=e.indexOf(n);if(0===t){return{measure:"",ext:n,label:e.slice(t+n.length)}}}const t=e.match(No);if(t?.length){const e=t.shift();let n=t.join("");for(const t of Eo){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(Io,"_splitMetric");const jo={};function ko(e){let t=jo[e];return t||(t=Io(e),jo[e]=t),t}function Go(e,t){return e.__formattedProps?.[t]??e[t]}function Vo(e){if(void 0===e)return;const t=parseFloat(e);return isNaN(t)?void 0:t}function Qo(e,t,n){const s=ko(t);if(!n[s.measure]){n[s.label]=!0;const t=Vo(e[`${s.measure}Avg${s.label}`]),r=Vo(e[`${s.measure}Min${s.label}`]),i=Vo(e[`${s.measure}Max${s.label}`]),o=Vo(e[`${s.measure}StdDev${s.label}`]),c=Math.max((t-r)/o,(i-t)/o);return{Key:`${s.measure}${s.label}`,Value:Go(e,`${s.measure}${s.label}`),Avg:Go(e,`${s.measure}Avg${s.label}`),Min:Go(e,`${s.measure}Min${s.label}`),Max:Go(e,`${s.measure}Max${s.label}`),Delta:Go(e,`${s.measure}Delta${s.label}`),StdDev:Go(e,`${s.measure}StdDev${s.label}`),StdDevs:isNaN(c)?void 0:c,SkewMin:Go(e,`SkewMin${s.label}`),SkewMax:Go(e,`SkewMax${s.label}`),NodeMin:Go(e,`NodeMin${s.label}`),NodeMax:Go(e,`NodeMax${s.label}`)}}return null}t(ko,"splitMetric"),t(Go,"formatValue"),t(Vo,"safeParseFloat"),t(Qo,"formatValues");const Bo=n("workunit.ts"),Oo=class _WorkunitCache extends h{constructor(){super(e=>`${e.BaseUrl}-${e.Wuid}`)}};t(Oo,"WorkunitCache");let Xo=Oo;const Ho=new Xo,$o=class _Workunit extends u{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",Yr.Unknown)}get State(){return this.get("State")||Yr[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 fo;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,()=>mo.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 Wo(this.connection,this.Wuid,e))}_graphCache=new Wi;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 bi(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 qi(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 bo(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=>(Ho.set(t),t.set(e.Workunit),t))}static attach(e,t,n){const s=Ho.get({BaseUrl:e.baseUrl,Wuid:t},()=>new _Workunit(e,t));return n&&s.set(n),s}static existsLocal(e,t){return Ho.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,$r.Action.Compile):e.submit(t))}static compile(e,t,n){return _Workunit.submit(e,t,n,!0)}static query(e,t){return new ti(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 ti(e),this.topologyConnection=new Ar(e),this.clearState(t)}clearState(e){this.clear({Wuid:e,StateID:Yr.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=$r.Action.Run,n){let s;return s=void 0!==e?Promise.resolve(e):this.topologyConnection.DefaultTpLogicalClusterQuery().then(e=>e.Name),this._debugMode=!1,t===$r.Action.Debug&&(t=$r.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 Yr.Compiled:return"compile"===this.ActionEx||this._submitAction===$r.Action.Compile;case Yr.Completed:case Yr.Failed:case Yr.Aborted:case Yr.NotFound:return!0}return!1}isFailed(){switch(this.StateID){case Yr.Aborted:case Yr.Failed:return!0}return!1}isDeleted(){return this.StateID===Yr.NotFound}isDebugging(){switch(this.StateID){case Yr.DebugPaused:case Yr.DebugRunning:return!0}return this._debugMode}isRunning(){switch(this.StateID){case Yr.Compiled:case Yr.Running:case Yr.Aborting:case Yr.Blocked:case Yr.DebugPaused:case Yr.DebugRunning:return!0}return!1}setToFailed(){return this.WUAction(wr.ECLWUActions.SetToFailed)}pause(){return this.WUAction(wr.ECLWUActions.Pause)}pauseNow(){return this.WUAction(wr.ECLWUActions.PauseNow)}resume(){return this.WUAction(wr.ECLWUActions.Resume)}abort(){return this.WUAction(wr.ECLWUActions.Abort)}protect(){return this.WUAction(wr.ECLWUActions.Protect)}unprotect(){return this.WUAction(wr.ECLWUActions.Unprotect)}delete(){return this.WUAction(wr.ECLWUActions.Delete)}restore(){return this.WUAction(wr.ECLWUActions.Restore)}deschedule(){return this.WUAction(wr.ECLWUActions.Deschedule)}reschedule(){return this.WUAction(wr.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!==Yr.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]=Po(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[xo];if(h)try{const e=JSON.parse(h.split("\\").join("\\\\")),t=[];for(let n=0;n<e.length;n++){const s=e[n].match(Lo);s&&t.push({filePath:(s[1]??"")+s[2]+s[3],line:parseInt(s[5],10),col:parseInt(s[6],10)})}u[xo]=t}catch(i){Bo.error(`Unexpected "DefinitionList": ${h}`)}const l={};let d=0,p="";for(const t in u)if(!t.startsWith("__")){const e=Qo(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 Do(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 Do(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=>$i(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=Ao(e.start);t.setMilliseconds(t.getMilliseconds()+e.elapsed/1e6),e.finish=To(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",Yr.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",Yr.NotFound),!0)))throw Bo.warning(`Unexpected ESP exception: ${e.message}`),e;return{}})}WUCreate(){return this.connection.WUCreate().then(e=>(this.set(e.Workunit),Ho.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",Yr.NotFound),!0)))throw Bo.warning(`Unexpected ESP exception: ${e.message}`),e;return{}})}WUResubmit(e){return this.connection.WUResubmit(_({},e,{Wuids:{Item:[this.Wuid]}}))}WUDetailsMeta(e){return this.connection.WUDetailsMeta(e)}WUDetails(e){return this.connection.WUDetails(_({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=>_({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:wr.WUQueryActivationMode.ActivateQuery,Wait:5e3})}publishEx(e){const t=new si({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 U(e)}).catch(t=>(Bo.error(t),Promise.resolve(new U(e)))):Promise.resolve(new U(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=>Zo(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($o,"Workunit");let Jo=$o;const qo="definition";function Yo(e){return void 0!==e._[qo]}function zo(e){const t=/([a-z]:\\(?:[-\w\.\d]+\\)*(?:[-\w\.\d]+)?|(?:\/[\w\.\-]+)+)\((\d*),(\d*)\)/.exec(e._[qo]);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._[qo]}`)}function Zo(e,t){const n=[];for(const s of e.vertices)if(Yo(s)){const e=zo(s);(e&&!t||t===e.file)&&n.push(e)}return n.sort((e,t)=>e.line-t.line)}let Ko;t(Yo,"hasECLDefinition"),t(zo,"getECLDefinition"),t(Zo,"breakpointLocations");const ec=class _Activity extends u{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 Ko||(Ko=new _Activity(e)),t&&Ko.set(t),Ko}constructor(e){super(),this.connection=e instanceof fr?e:new fr(e),this.clear({})}runningWorkunits(e=""){return this.Running.ActiveWorkunit.filter(t=>""===e||t.ClusterName===e).map(e=>Jo.attach(this.connection.connectionOptions(),e.Wuid,e))}setBanner(e){return this.connection.SetBanner({...e}).then(e=>(this.set(e),this))}lazyRefresh=y(async()=>{const e=await this.connection.Activity({});return this.set(e),this});async refresh(){return this.lazyRefresh()}};t(ec,"Activity");let tc=ec;const nc=n("logicalFile.ts"),sc=class _LogicalFileCache extends h{constructor(){super(e=>`${e.BaseUrl}-${e.Cluster}-${e.Name}`)}};t(sc,"LogicalFileCache");let rc=sc;const ic=new rc,oc=class _LogicalFile extends u{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=ic.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 rt?e:new rt(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 nc.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(oc,"LogicalFile");let cc=oc;const ac=class _MachineCache extends h{constructor(){super(e=>e.Address)}};t(ac,"MachineCache");let uc=ac;const hc=new uc,lc=class _Machine extends u{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=hc.get({Address:t},()=>new _Machine(e));return n&&s.set(n),s}constructor(e){super(),this.connection=e instanceof Jt?e:new Jt(e)}};t(lc,"Machine");let dc=lc;const pc=class _TargetClusterCache extends h{constructor(){super(e=>`${e.BaseUrl}-${e.Name}`)}};t(pc,"TargetClusterCache");let gc=pc;const mc=new gc,Sc=class _TargetCluster extends u{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=>dc.attach(this.machineConnection,e.Address,e))}static attach(e,t,n){const s=mc.get({BaseUrl:e.baseUrl,Name:t},()=>new _TargetCluster(e,t));return n&&s.set(n),s}constructor(e,t){super(),e instanceof Ar?(this.connection=e,this.machineConnection=new Jt(e.connectionOptions())):(this.connection=new Ar(e),this.machineConnection=new Jt(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(Sc,"TargetCluster");let fc=Sc;function _c(e){let t;return t=e instanceof Ar?e:new Ar(e),t.TpListTargetClusters({}).then(t=>t.TargetClusters.TpClusterNameType.map(t=>fc.attach(e,t.Name,t)))}t(_c,"targetClusters");const Uc={};function yc(e){if(!Uc[e.baseUrl]){let t;t=e instanceof Ar?e:new Ar(e),Uc[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 fc.attach(e,i.Name,i)})}return Uc[e.baseUrl]}t(yc,"defaultTargetCluster");const vc=class _TopologyCache extends h{constructor(){super(e=>e.BaseUrl)}};t(vc,"TopologyCache");let Cc=vc;const Dc=new Cc,Rc=class _Topology extends u{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=>fc.attach(this.connection,e.Name,e))}get LogicalClusters(){return this.get("LogicalClusters")}get Services(){return this.get("Services")}static attach(e,t){const n=Dc.get({BaseUrl:e.baseUrl},()=>new _Topology(e));return t&&n.set(t),n}constructor(e){super(),this.connection=e instanceof Ar?e:new Ar(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(o("ServiceList.TpEspServers.TpEspServer",t))for(const i of t.ServiceList.TpEspServers.TpEspServer)if(o("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(Rc,"Topology");let bc=Rc;function Fc(e,t,n){"__proto__"!==t&&"constructor"!==t&&"prototype"!==t&&(e[t]=n)}function Wc(e){return(e=""+e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(/\n/g," ").replace(/\r/g," ")}function Tc(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 Ac(e,t){const n=e.indexOf(t);return-1!==n?parseFloat(e.substring(0,n)):-1}function wc(e){if(!e)return 0;if(!isNaN(+e))return parseFloat(e);let t=Ac(e,"Kb");return t>=0?1024*t:(t=Ac(e,"Mb"),t>=0?t*Math.pow(1024,2):(t=Ac(e,"Gb"),t>=0?t*Math.pow(1024,3):(t=Ac(e,"Tb"),t>=0?t*Math.pow(1024,4):(t=Ac(e,"Pb"),t>=0?t*Math.pow(1024,5):(t=Ac(e,"Eb"),t>=0?t*Math.pow(1024,6):(t=Ac(e,"Zb"),t>=0?t*Math.pow(1024,7):(t=Ac(e,"b"),t>=0?t:0)))))))}function Pc(e){return e?parseFloat(e):0}t(Fc,"safeAssign"),t(Wc,"xmlEncode"),t(Tc,"espTime2Seconds"),t(Ac,"unitTest"),t(wc,"espSize2Bytes"),t(Pc,"espSkew2Number");const xc=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+'="'+Wc(r[i])+'"':s+='<att name="'+i+'" value="'+Wc(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+'="'+Wc(s[r])+'"':n+='<att name="'+r+'" value="'+Wc(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="'+Wc(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(xc,"LocalisedXGMMLWriter");let Lc=xc;const Ec=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(Ec,"GraphItem");let Mc=Ec;const Nc=class _Subgraph extends Mc{_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(Nc,"Subgraph");let Ic=Nc;const jc=class _Vertex extends Mc{_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 kc=jc;const Gc=class _Edge extends Mc{_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(Gc,"Edge");let Vc=Gc;const Qc=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 Ic}isVertex(e){return e instanceof kc}isEdge(e){return e instanceof Vc}getGlobalType(e){return e instanceof kc?3:e instanceof Vc?4:e instanceof Ic?2:e instanceof _QueryGraph?1:0}getGlobalTypeString(e){return e instanceof kc?"Vertex":e instanceof Vc?"Edge":e instanceof Ic?"Cluster":e instanceof _QueryGraph?"Graph":"Unknown"}getItem(e,t){if(!this.idx[t])switch(e.tagName){case"graph":const e=new Ic(this,t);this.subgraphs.push(e),this.idx[t]=e;break;case"node":const n=new kc(this,t);this.vertices.push(n),this.idx[t]=n;break;case"edge":const s=new Vc(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=>{Fc(n,e.name,e.value)}),n}removeItem(e){delete this.idx[e.__hpcc_id],e instanceof Ic?this.subgraphs=this.subgraphs.filter(t=>e!==t):e instanceof kc?this.vertices=this.vertices.filter(t=>e!==t):e instanceof Vc&&(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")?(Fc(n,i,o),Fc(n,r,""+Tc(o))):0===r.indexOf("Size")?(Fc(n,i,o),Fc(n,r,""+wc(o))):0===r.indexOf("Skew")?(Fc(n,i,o),Fc(n,r,""+Pc(o))):Fc(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 Ic&&e.remove()})}removeSpillVertices(){[...this.vertices].forEach(e=>{e.isSpill()&&e.remove()})}getLocalisedXGMML(e,t,n,s){const r=new Lc(this);return r.calcVisibility(e,t,n,s),r.writeXgmml(),"<graph>"+r.m_xgmml+"</graph>"}};t(Qc,"QueryGraph");let Bc=Qc;const Oc=n("@hpcc-js/comms/ecl/query.ts"),Xc=Ui("~s");function Hc(e){return!isNaN(parseFloat(e))&&!isNaN(e-0)}t(Hc,"isNumber");const $c=class _QueryCache extends h{constructor(){super(e=>h.hash([e.QueryId,e.QuerySet]))}};t($c,"QueryCache");const Jc=new $c,qc=class _Query extends u{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 ti?e:new ti(e),this.topology=bc.attach(this.wsWorkunitsService.opts()),this.set({QuerySet:t,QueryId:n,...s})}static attach(e,t,n,s){const r=Jc.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 pt({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){Oc.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){Oc.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 Bc;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=Jo.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 Oc.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=Hc(n)?parseFloat(n):n,s=n;e.indexOf("Time")>=0&&(t/=1e9,s=Xc(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 Oc.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(qc,"Query");let Yc=qc;const zc=class _StoreCache extends h{constructor(){super(e=>`${e.BaseUrl}-${e.Name}:${e.UserSpecific}-${e.Namespace}`)}};t(zc,"StoreCache");let Zc=zc;const Kc=new Zc,ea=class _ValueChangedMessage extends v{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(ea,"ValueChangedMessage");let ta=ea;const na=class _Store{connection;get BaseUrl(){return this.connection.baseUrl}Name;UserSpecific;Namespace;_dispatch=new C;static attach(e,t="HPCCApps",n,s=!0){return Kc.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 vr?e:new vr(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 ta(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 ta(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 ta(t.Key,t.Value,r))}),e)for(const e in s)this._dispatch.post(new ta(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 ta(e,void 0,s))}).catch(t=>{console.error(`Store.delete(${e}) failed:`,t)})}monitor(e){return this._dispatch.attach(e)}};t(na,"Store");let sa=na;const ra=n("@hpcc-js/comms/dfuWorkunit.ts"),ia=class _DFUWorkunitCache extends h{constructor(){super(e=>`${e.BaseUrl}-${e.ID}`)}};t(ia,"DFUWorkunitCache");let oa=ia;const ca=new oa,aa=class _DFUWorkunit extends u{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=>(ca.set(n),n.set(e.result),n))}static attach(e,t,n){const s=ca.get({BaseUrl:e.baseUrl,ID:t},()=>new _DFUWorkunit(e,t));return n&&s.set(n),s}static sprayFixed(e,t){const n=new ae(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 ae(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 ae(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(te.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===te.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 ae(e),this.topologyConnection=new Ar(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 ra.warning(`Unexpected ESP exception: ${e.message}`),e;return{}})}};t(aa,"DFUWorkunit");let ua=aa;export{Ue as AccessService,De as AccountService,tc as Activity,Uo as Attribute,b as BUILD_VERSION,vo as BaseScope,Pe as CloudService,Ie as CodesignService,B as Connection,Ke as DFUArrayActions,tt as DFUChangeProtection,nt as DFUChangeRestriction,et as DFUDefFileFormat,rt as DFUService,ua as DFUWorkunit,oa as DFUWorkunitCache,at as DFUXRefService,Ve as DaliService,bi as ECLGraph,Z as ESPConnection,J as ESPExceptions,pt as EclService,ft as ElkService,te as FileSpray,ae as FileSprayService,oe as FileSprayStates,lo as GlobalResultCache,Wi as GraphCache,Pt as LogType,Et as LogaccessService,cc as LogicalFile,rc as LogicalFileCache,dc as Machine,uc as MachineCache,Jt as MachineService,D as PKG_NAME,R as PKG_VERSION,Zt as PackageProcessService,Eo as PropertyType,Yc as Query,Bc as QueryGraph,Mo as RelatedProperty,qi as Resource,nn as ResourcesService,mo as Result,fo as ResultCache,fr as SMCService,hn as SashaService,Do as Scope,Hi as ScopeEdge,Gi as ScopeGraph,Qi as ScopeSubgraph,Oi as ScopeVertex,ee as Service,bo as SourceFile,sa as Store,Zc as StoreCache,vr as StoreService,xt as TargetAudience,fc as TargetCluster,gc as TargetClusterCache,Wo as Timer,bc as Topology,Cc as TopologyCache,Ar as TopologyService,ta as ValueChangedMessage,Yr as WUStateID,$r as WUUpdate,Jo as Workunit,Xo as WorkunitCache,ti as WorkunitsService,si as WorkunitsServiceEx,ue as WsAccess,xe as WsCodesign,Qe as WsDfu,_t as WsLogaccess,On as WsSMC,sn as WsSasha,Cr as WsTopology,wr as WsWorkunits,Ii as XGMMLEdge,Pi as XGMMLGraph,Li as XGMMLSubgraph,Mi as XGMMLVertex,zi as XSDNode,so as XSDSchema,to as XSDSimpleType,Ki as XSDXMLNode,O as createConnection,$i as createGraph,ji as createXGMMLGraph,yc as defaultTargetCluster,x as deserializeResponse,j as get,V as hookSend,A as instanceOfIConnection,W as instanceOfIOptions,H as isArray,zr as isECLResult,q as isExceptions,Kr as isWUInfoWorkunit,Zr as isWUQueryECLWorkunit,L as jsonp,oo as parseXSD,uo as parseXSD2,I as post,k as send,P as serializeRequest,X as setTransportFactory,ko as splitMetric,_c as targetClusters};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|