@globus/sdk 6.0.0-rc.9 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/README.md +4 -0
  2. package/dist/cjs/core/authorization/index.js +19 -5
  3. package/dist/cjs/core/authorization/index.js.map +2 -2
  4. package/dist/cjs/core/info/index.js +1 -1
  5. package/dist/cjs/core/info/index.js.map +1 -1
  6. package/dist/cjs/index.js +27 -8
  7. package/dist/cjs/index.js.map +2 -2
  8. package/dist/cjs/services/globus-connect-server/client.js +2 -2
  9. package/dist/cjs/services/globus-connect-server/client.js.map +2 -2
  10. package/dist/esm/core/authorization/AuthorizationManager.d.ts +38 -5
  11. package/dist/esm/core/authorization/AuthorizationManager.d.ts.map +1 -1
  12. package/dist/esm/core/authorization/AuthorizationManager.js +37 -4
  13. package/dist/esm/core/authorization/AuthorizationManager.js.map +1 -1
  14. package/dist/esm/core/authorization/RedirectTransport.d.ts +2 -0
  15. package/dist/esm/core/authorization/RedirectTransport.d.ts.map +1 -1
  16. package/dist/esm/core/authorization/RedirectTransport.js.map +1 -1
  17. package/dist/esm/core/info/version.d.ts +1 -1
  18. package/dist/esm/core/info/version.js +1 -1
  19. package/dist/esm/index.d.ts +24 -2
  20. package/dist/esm/index.d.ts.map +1 -1
  21. package/dist/esm/index.js +24 -2
  22. package/dist/esm/index.js.map +1 -1
  23. package/dist/esm/open-api/types/compute.d.ts +47 -21
  24. package/dist/esm/open-api/types/compute.d.ts.map +1 -1
  25. package/dist/esm/open-api/types/flows.d.ts +507 -424
  26. package/dist/esm/open-api/types/flows.d.ts.map +1 -1
  27. package/dist/esm/open-api/types/flows.js +0 -4
  28. package/dist/esm/open-api/types/flows.js.map +1 -1
  29. package/dist/esm/open-api/types/gcs/v5.4.d.ts +1348 -1036
  30. package/dist/esm/open-api/types/gcs/v5.4.d.ts.map +1 -1
  31. package/dist/esm/open-api/types/search.d.ts +91 -7
  32. package/dist/esm/open-api/types/search.d.ts.map +1 -1
  33. package/dist/esm/open-api/types/timers.d.ts +185 -17
  34. package/dist/esm/open-api/types/timers.d.ts.map +1 -1
  35. package/dist/esm/package.json +1 -1
  36. package/dist/esm/services/flows/service/flows.d.ts +9 -8
  37. package/dist/esm/services/flows/service/flows.d.ts.map +1 -1
  38. package/dist/esm/services/flows/service/flows.js.map +1 -1
  39. package/dist/esm/services/flows/service/runs.d.ts +17 -24
  40. package/dist/esm/services/flows/service/runs.d.ts.map +1 -1
  41. package/dist/esm/services/flows/service/runs.js.map +1 -1
  42. package/dist/esm/services/globus-connect-server/client.d.ts +55 -0
  43. package/dist/esm/services/globus-connect-server/client.d.ts.map +1 -1
  44. package/dist/esm/services/shared.js +1 -1
  45. package/dist/esm/services/shared.js.map +1 -1
  46. package/dist/esm/services/transfer/service/endpoint-manager/endpoint.d.ts +3 -3
  47. package/dist/esm/services/transfer/service/endpoint-manager/endpoint.d.ts.map +1 -1
  48. package/dist/esm/services/transfer/service/endpoint.d.ts +1 -0
  49. package/dist/esm/services/transfer/service/endpoint.d.ts.map +1 -1
  50. package/dist/esm/services/transfer/service/endpoint.js.map +1 -1
  51. package/dist/esm/services/transfer/service/task.d.ts +3 -3
  52. package/dist/esm/services/transfer/service/task.d.ts.map +1 -1
  53. package/dist/esm/services/transfer/types.d.ts +1 -1
  54. package/dist/esm/services/transfer/types.d.ts.map +1 -1
  55. package/dist/esm/services/transfer/utils.d.ts.map +1 -1
  56. package/dist/esm/services/transfer/utils.js +8 -3
  57. package/dist/esm/services/transfer/utils.js.map +1 -1
  58. package/dist/esm/services/types.d.ts +4 -0
  59. package/dist/esm/services/types.d.ts.map +1 -1
  60. package/dist/umd/globus.production.js +2 -2
  61. package/dist/umd/globus.production.js.map +2 -2
  62. package/package.json +4 -4
  63. package/dist/esm/open-api/types/timer.d.ts +0 -942
  64. package/dist/esm/open-api/types/timer.d.ts.map +0 -1
  65. package/dist/esm/open-api/types/timer.js +0 -2
  66. package/dist/esm/open-api/types/timer.js.map +0 -1
  67. package/dist/esm/services/timer/config.d.ts +0 -4
  68. package/dist/esm/services/timer/config.d.ts.map +0 -1
  69. package/dist/esm/services/timer/config.js +0 -10
  70. package/dist/esm/services/timer/config.js.map +0 -1
  71. package/dist/esm/services/timer/index.d.ts +0 -16
  72. package/dist/esm/services/timer/index.d.ts.map +0 -1
  73. package/dist/esm/services/timer/index.js +0 -15
  74. package/dist/esm/services/timer/index.js.map +0 -1
  75. package/dist/esm/services/timer/service/timer.d.ts +0 -32
  76. package/dist/esm/services/timer/service/timer.d.ts.map +0 -1
  77. package/dist/esm/services/timer/service/timer.js +0 -11
  78. package/dist/esm/services/timer/service/timer.js.map +0 -1
@@ -1,3 +1,3 @@
1
- var globus=(()=>{var Ur=Object.create;var ue=Object.defineProperty;var Jr=Object.getOwnPropertyDescriptor;var $r=Object.getOwnPropertyNames;var Hr=Object.getPrototypeOf,Br=Object.prototype.hasOwnProperty;var zr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),u=(e,t)=>{for(var r in t)ue(e,r,{get:t[r],enumerable:!0})},tr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of $r(t))!Br.call(e,i)&&i!==r&&ue(e,i,{get:()=>t[i],enumerable:!(n=Jr(t,i))||n.enumerable});return e};var Yr=(e,t,r)=>(r=e!=null?Ur(Hr(e)):{},tr(t||!e||!e.__esModule?ue(r,"default",{value:e,enumerable:!0}):r,e)),Vr=e=>tr(ue({},"__esModule",{value:!0}),e);var fr=zr((U,hr)=>{var Se=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global,ve=function(){function e(){this.fetch=!1,this.DOMException=Se.DOMException}return e.prototype=Se,new e}();(function(e){var t=function(r){var n=typeof e<"u"&&e||typeof self<"u"&&self||typeof global<"u"&&global||{},i={searchParams:"URLSearchParams"in n,iterable:"Symbol"in n&&"iterator"in Symbol,blob:"FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in n,arrayBuffer:"ArrayBuffer"in n};function d(s){return s&&DataView.prototype.isPrototypeOf(s)}if(i.arrayBuffer)var h=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],f=ArrayBuffer.isView||function(s){return s&&h.indexOf(Object.prototype.toString.call(s))>-1};function A(s){if(typeof s!="string"&&(s=String(s)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(s)||s==="")throw new TypeError('Invalid character in header field name: "'+s+'"');return s.toLowerCase()}function L(s){return typeof s!="string"&&(s=String(s)),s}function M(s){var a={next:function(){var l=s.shift();return{done:l===void 0,value:l}}};return i.iterable&&(a[Symbol.iterator]=function(){return a}),a}function y(s){this.map={},s instanceof y?s.forEach(function(a,l){this.append(l,a)},this):Array.isArray(s)?s.forEach(function(a){if(a.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+a.length);this.append(a[0],a[1])},this):s&&Object.getOwnPropertyNames(s).forEach(function(a){this.append(a,s[a])},this)}y.prototype.append=function(s,a){s=A(s),a=L(a);var l=this.map[s];this.map[s]=l?l+", "+a:a},y.prototype.delete=function(s){delete this.map[A(s)]},y.prototype.get=function(s){return s=A(s),this.has(s)?this.map[s]:null},y.prototype.has=function(s){return this.map.hasOwnProperty(A(s))},y.prototype.set=function(s,a){this.map[A(s)]=L(a)},y.prototype.forEach=function(s,a){for(var l in this.map)this.map.hasOwnProperty(l)&&s.call(a,this.map[l],l,this)},y.prototype.keys=function(){var s=[];return this.forEach(function(a,l){s.push(l)}),M(s)},y.prototype.values=function(){var s=[];return this.forEach(function(a){s.push(a)}),M(s)},y.prototype.entries=function(){var s=[];return this.forEach(function(a,l){s.push([l,a])}),M(s)},i.iterable&&(y.prototype[Symbol.iterator]=y.prototype.entries);function N(s){if(!s._noBody){if(s.bodyUsed)return Promise.reject(new TypeError("Already read"));s.bodyUsed=!0}}function Y(s){return new Promise(function(a,l){s.onload=function(){a(s.result)},s.onerror=function(){l(s.error)}})}function Qt(s){var a=new FileReader,l=Y(a);return a.readAsArrayBuffer(s),l}function J(s){var a=new FileReader,l=Y(a),g=/charset=([A-Za-z0-9_-]+)/.exec(s.type),v=g?g[1]:"utf-8";return a.readAsText(s,v),l}function Lr(s){for(var a=new Uint8Array(s),l=new Array(a.length),g=0;g<a.length;g++)l[g]=String.fromCharCode(a[g]);return l.join("")}function Xt(s){if(s.slice)return s.slice(0);var a=new Uint8Array(s.byteLength);return a.set(new Uint8Array(s)),a.buffer}function Zt(){return this.bodyUsed=!1,this._initBody=function(s){this.bodyUsed=this.bodyUsed,this._bodyInit=s,s?typeof s=="string"?this._bodyText=s:i.blob&&Blob.prototype.isPrototypeOf(s)?this._bodyBlob=s:i.formData&&FormData.prototype.isPrototypeOf(s)?this._bodyFormData=s:i.searchParams&&URLSearchParams.prototype.isPrototypeOf(s)?this._bodyText=s.toString():i.arrayBuffer&&i.blob&&d(s)?(this._bodyArrayBuffer=Xt(s.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(s)||f(s))?this._bodyArrayBuffer=Xt(s):this._bodyText=s=Object.prototype.toString.call(s):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof s=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i.searchParams&&URLSearchParams.prototype.isPrototypeOf(s)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i.blob&&(this.blob=function(){var s=N(this);if(s)return s;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var s=N(this);return s||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(i.blob)return this.blob().then(Qt);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var s=N(this);if(s)return s;if(this._bodyBlob)return J(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(Lr(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i.formData&&(this.formData=function(){return this.text().then(qr)}),this.json=function(){return this.text().then(JSON.parse)},this}var Nr=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function Fr(s){var a=s.toUpperCase();return Nr.indexOf(a)>-1?a:s}function q(s,a){if(!(this instanceof q))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');a=a||{};var l=a.body;if(s instanceof q){if(s.bodyUsed)throw new TypeError("Already read");this.url=s.url,this.credentials=s.credentials,a.headers||(this.headers=new y(s.headers)),this.method=s.method,this.mode=s.mode,this.signal=s.signal,!l&&s._bodyInit!=null&&(l=s._bodyInit,s.bodyUsed=!0)}else this.url=String(s);if(this.credentials=a.credentials||this.credentials||"same-origin",(a.headers||!this.headers)&&(this.headers=new y(a.headers)),this.method=Fr(a.method||this.method||"GET"),this.mode=a.mode||this.mode||null,this.signal=a.signal||this.signal||function(){if("AbortController"in n){var m=new AbortController;return m.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&l)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(l),(this.method==="GET"||this.method==="HEAD")&&(a.cache==="no-store"||a.cache==="no-cache")){var g=/([?&])_=[^&]*/;if(g.test(this.url))this.url=this.url.replace(g,"$1_="+new Date().getTime());else{var v=/\?/;this.url+=(v.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}q.prototype.clone=function(){return new q(this,{body:this._bodyInit})};function qr(s){var a=new FormData;return s.trim().split("&").forEach(function(l){if(l){var g=l.split("="),v=g.shift().replace(/\+/g," "),m=g.join("=").replace(/\+/g," ");a.append(decodeURIComponent(v),decodeURIComponent(m))}}),a}function jr(s){var a=new y,l=s.replace(/\r?\n[\t ]+/g," ");return l.split("\r").map(function(g){return g.indexOf(`
2
- `)===0?g.substr(1,g.length):g}).forEach(function(g){var v=g.split(":"),m=v.shift().trim();if(m){var ce=v.join(":").trim();try{a.append(m,ce)}catch(Ie){console.warn("Response "+Ie.message)}}}),a}Zt.call(q.prototype);function C(s,a){if(!(this instanceof C))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(a||(a={}),this.type="default",this.status=a.status===void 0?200:a.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=a.statusText===void 0?"":""+a.statusText,this.headers=new y(a.headers),this.url=a.url||"",this._initBody(s)}Zt.call(C.prototype),C.prototype.clone=function(){return new C(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new y(this.headers),url:this.url})},C.error=function(){var s=new C(null,{status:200,statusText:""});return s.ok=!1,s.status=0,s.type="error",s};var Gr=[301,302,303,307,308];C.redirect=function(s,a){if(Gr.indexOf(a)===-1)throw new RangeError("Invalid status code");return new C(null,{status:a,headers:{location:s}})},r.DOMException=n.DOMException;try{new r.DOMException}catch{r.DOMException=function(a,l){this.message=a,this.name=l;var g=Error(a);this.stack=g.stack},r.DOMException.prototype=Object.create(Error.prototype),r.DOMException.prototype.constructor=r.DOMException}function De(s,a){return new Promise(function(l,g){var v=new q(s,a);if(v.signal&&v.signal.aborted)return g(new r.DOMException("Aborted","AbortError"));var m=new XMLHttpRequest;function ce(){m.abort()}m.onload=function(){var b={statusText:m.statusText,headers:jr(m.getAllResponseHeaders()||"")};v.url.indexOf("file://")===0&&(m.status<200||m.status>599)?b.status=200:b.status=m.status,b.url="responseURL"in m?m.responseURL:b.headers.get("X-Request-URL");var $="response"in m?m.response:m.responseText;setTimeout(function(){l(new C($,b))},0)},m.onerror=function(){setTimeout(function(){g(new TypeError("Network request failed"))},0)},m.ontimeout=function(){setTimeout(function(){g(new TypeError("Network request timed out"))},0)},m.onabort=function(){setTimeout(function(){g(new r.DOMException("Aborted","AbortError"))},0)};function Ie(b){try{return b===""&&n.location.href?n.location.href:b}catch{return b}}if(m.open(v.method,Ie(v.url),!0),v.credentials==="include"?m.withCredentials=!0:v.credentials==="omit"&&(m.withCredentials=!1),"responseType"in m&&(i.blob?m.responseType="blob":i.arrayBuffer&&(m.responseType="arraybuffer")),a&&typeof a.headers=="object"&&!(a.headers instanceof y||n.Headers&&a.headers instanceof n.Headers)){var er=[];Object.getOwnPropertyNames(a.headers).forEach(function(b){er.push(A(b)),m.setRequestHeader(b,L(a.headers[b]))}),v.headers.forEach(function(b,$){er.indexOf($)===-1&&m.setRequestHeader($,b)})}else v.headers.forEach(function(b,$){m.setRequestHeader($,b)});v.signal&&(v.signal.addEventListener("abort",ce),m.onreadystatechange=function(){m.readyState===4&&v.signal.removeEventListener("abort",ce)}),m.send(typeof v._bodyInit>"u"?null:v._bodyInit)})}return De.polyfill=!0,n.fetch||(n.fetch=De,n.Headers=y,n.Request=q,n.Response=C),r.Headers=y,r.Request=q,r.Response=C,r.fetch=De,r}({})})(ve);ve.fetch.ponyfill=!0;delete ve.fetch.polyfill;var W=Se.fetch?Se:ve;U=W.fetch;U.default=W.fetch;U.fetch=W.fetch;U.Headers=W.Headers;U.Request=W.Request;U.Response=W.Response;hr.exports=U});var gi={};u(gi,{auth:()=>et,authorization:()=>nt,compute:()=>Kt,errors:()=>Be,flows:()=>Mt,gcs:()=>Ht,groups:()=>It,info:()=>Me,logger:()=>Le,request:()=>o,search:()=>Rt,timers:()=>Yt,transfer:()=>vt,webapp:()=>Wt});var Me={};u(Me,{CLIENT_INFO:()=>ar,VERSION:()=>ir,addClientInfo:()=>Xr,getClientInfo:()=>pr,getClientInfoRequestHeaders:()=>we});var rr="X-Globus-Client-Info",Kr=!0;function nr(){return Kr}var Wr=";",Qr=",";function or(e){return(Array.isArray(e)?e:[e]).map(r=>Object.entries(r).map(([n,i])=>`${n}=${i}`).join(Qr)).join(Wr)}var sr="5.8.0";var ir=sr,ar={product:"javascript-sdk",version:ir},ke=[ar];function Xr(e){ke=ke.concat(e)}function pr(){return or(ke)}function we(){return nr()?{[rr]:pr()}:{}}var Le={};u(Le,{log:()=>E,setLogLevel:()=>en,setLogger:()=>Zr});var Ce=["debug","info","warn","error"],de,cr=Ce.indexOf("error");function Zr(e){de=e}function en(e){cr=Ce.indexOf(e)}function E(e,...t){if(!de||Ce.indexOf(e)<cr)return;(de[e]??de.log)(...t)}var nt={};u(nt,{AuthorizationManager:()=>ae,create:()=>Rn});var H=class extends Error{};H.prototype.name="InvalidTokenError";function tn(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,r)=>{let n=r.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function rn(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return tn(t)}catch{return atob(t)}}function ur(e,t){if(typeof e!="string")throw new H("Invalid token specified: must be a string");t||(t={});let r=t.header===!0?0:1,n=e.split(".")[r];if(typeof n!="string")throw new H(`Invalid token specified: missing part #${r+1}`);let i;try{i=rn(n)}catch(d){throw new H(`Invalid token specified: invalid base64 for part #${r+1} (${d.message})`)}try{return JSON.parse(i)}catch(d){throw new H(`Invalid token specified: invalid json for part #${r+1} (${d.message})`)}}var et={};u(et,{CONFIG:()=>Ze,getAuthorizationEndpoint:()=>oe,getTokenEndpoint:()=>Tn,identities:()=>Ke,isGlobusAuthTokenResponse:()=>X,isRefreshToken:()=>re,isToken:()=>Q,oauth2:()=>F,utils:()=>Xe});var ye={};u(ye,{HOSTS:()=>Je,ID:()=>O,RESOURCE_SERVERS:()=>I,SCOPES:()=>V});var le={};u(le,{HOSTS:()=>Ne,ID:()=>p,SCOPES:()=>c});var p="TRANSFER",c={ALL:"urn:globus:auth:scope:transfer.api.globus.org:all"},Ne={sandbox:"transfer.api.sandbox.globuscs.info",production:"transfer.api.globusonline.org",staging:"transfer.api.staging.globuscs.info",integration:"transfer.api.integration.globuscs.info",test:"transfer.api.test.globuscs.info",preview:"transfer.api.preview.globus.org"};var me={};u(me,{HOSTS:()=>Fe,ID:()=>P,SCOPES:()=>x});var P="FLOWS",Fe={sandbox:"sandbox.flows.automate.globus.org",production:"flows.globus.org",staging:"staging.flows.automate.globus.org",integration:"integration.flows.automate.globus.org",test:"test.flows.automate.globus.org",preview:"preview.flows.automate.globus.org"},x={MANAGE_FLOWS:"https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/manage_flows",VIEW_FLOWS:"https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/view_flows",RUN:"https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/run",RUN_STATUS:"https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/run_status",RUN_MANAGE:"https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/run_manage"};var he={};u(he,{HOSTS:()=>qe,ID:()=>T});var T="TIMERS",qe={sandbox:"sandbox.timer.automate.globus.org",production:"timer.automate.globus.org",staging:"staging.timer.automate.globus.org",integration:"integration.timer.automate.globus.org",test:"test.timer.automate.globus.org",preview:"preview.timer.automate.globus.org"};var fe={};u(fe,{HOSTS:()=>je,ID:()=>D,SCOPES:()=>j});var D="GROUPS",je={sandbox:"groups.api.sandbox.globuscs.info",production:"groups.api.globus.org",staging:"groups.api.staging.globuscs.info",integration:"groups.api.integration.globuscs.info",test:"groups.api.test.globuscs.info",preview:"groups.api.preview.globuscs.info"},j={ALL:"urn:globus:auth:scope:groups.api.globus.org:all",VIEW_MY:"urn:globus:auth:scope:groups.api.globus.org:view_my_groups_and_membership"};var ge={};u(ge,{HOSTS:()=>Ge,ID:()=>S,SCOPES:()=>R});var S="SEARCH",Ge={sandbox:"search.api.sandbox.globuscs.info",production:"search.api.globus.org",staging:"search.api.staging.globuscs.info",integration:"search.api.integration.globuscs.info",test:"search.api.test.globuscs.info",preview:"search.api.preview.globus.org"},R={ALL:"urn:globus:auth:scope:search.api.globus.org:all",INGEST:"urn:globus:auth:scope:search.api.globus.org:ingest",SEARCH:"urn:globus:auth:scope:search.api.globus.org:search"};var _e={};u(_e,{HOSTS:()=>Ue,ID:()=>w,SCOPES:()=>B});var w="COMPUTE",Ue={sandbox:"compute.api.sandbox.globuscs.info",production:"compute.api.globus.org",staging:"compute.api.staging.globuscs.info",integration:"compute.api.integration.globuscs.info",test:"compute.api.test.globuscs.info",preview:"compute.api.preview.globus.org"},B={ALL:"https://auth.globus.org/scopes/facd7ccc-c5f4-42aa-916b-a0e270e2c2a9/all"};var O="AUTH",Je={integration:"auth.integration.globuscs.info",sandbox:"auth.sandbox.globuscs.info",production:"auth.globus.org",test:"auth.test.globuscs.info",staging:"auth.staging.globuscs.info",preview:"auth.preview.globus.org"},V={VIEW_IDENTITIES:"urn:globus:auth:scope:auth.globus.org:view_identities"},I={[O]:"auth.globus.org",[p]:"transfer.api.globus.org",[P]:"flows.globus.org",[D]:"groups.api.globus.org",[S]:"search.api.globus.org",[T]:"524230d7-ea86-4a52-8312-86065a9e0417",[w]:"funcx_service"};var Be={};u(Be,{EnvironmentConfigurationError:()=>Z,isAuthorizationRequirementsError:()=>ee,isConsentRequiredError:()=>$e,isErrorWellFormed:()=>dr,toAuthorizationQueryParams:()=>He});var Z=class extends Error{name="EnvironmentConfigurationError";constructor(t,r){super(),this.message=`Invalid configuration value provided for ${t} (${r}).`}};function dr(e){return typeof e=="object"&&e!==null&&"code"in e&&"message"in e}function $e(e){return dr(e)&&e.code==="ConsentRequired"&&"required_scopes"in e&&Array.isArray(e.required_scopes)}var nn=["required_scopes"];function He(e){let t={scope:e.authorization_parameters.required_scopes?.join(" "),...e.authorization_parameters};return Object.entries(t).reduce((r,[n,i])=>{if(nn.includes(n)||i===void 0||i===null)return r;let d=i;return Array.isArray(d)?d=d.join(","):typeof i=="boolean"&&(d=d?"true":"false"),{...r,[n]:d}},{})}function ee(e){return typeof e=="object"&&e!==null&&"authorization_parameters"in e&&typeof e.authorization_parameters=="object"&&e.authorization_parameters!==null}function on(){return typeof window<"u"?window:process}function sn(e){return typeof window==typeof e}function ze(e,t){let r=on(),n;return sn(r)?n=r:n=r.env,e in n?n[e]:t}var lr={PRODUCTION:"production",PREVIEW:"preview",STAGING:"staging",SANDBOX:"sandbox",INTEGRATION:"integration",TEST:"test"},G={[O]:O,[p]:p,[P]:P,[D]:D,[S]:S,[T]:T,[w]:w},an={[O]:Je,[p]:Ne,[P]:Fe,[D]:je,[S]:Ge,[T]:qe,[w]:Ue};function Ye(e){let t=ze("GLOBUS_SDK_OPTIONS",{});return typeof t=="string"&&(t=JSON.parse(t)),{...t,...e,fetch:{...t?.fetch,...e?.fetch,options:{...t?.fetch?.options,...e?.fetch?.options,headers:{...t?.fetch?.options?.headers,...e?.fetch?.options?.headers}}}}}function K(){let e=Ye(),t=ze("GLOBUS_SDK_ENVIRONMENT",e?.environment??lr.PRODUCTION);if(e?.environment&&t!==e.environment&&E("debug","GLOBUS_SDK_ENVIRONMENT and GLOBUS_SDK_OPTIONS.environment are set to different values. GLOBUS_SDK_ENVIRONMENT will take precedence"),!t||!Object.values(lr).includes(t))throw new Z("GLOBUS_SDK_ENVIRONMENT",t);return t}function pn(e,t=K()){return an[e][t]}function mr(e,t=K()){let r=pn(e,t);return ze(`GLOBUS_SDK_SERVICE_URL_${e}`,r?`https://${r}`:void 0)}function cn(e){let t=new URLSearchParams;return Array.from(Object.entries(e)).forEach(([r,n])=>{Array.isArray(n)?t.set(r,n.join(",")):n!==void 0&&t.set(r,String(n))}),t.toString()}function un(e,t="",r=K()){let n=mr(e,r);return new URL(t,n)}function te(e,t,r,n){let i;return typeof e=="object"?i=new URL(t,e.host):i=un(e,t,n?.environment),r&&r.search&&(i.search=cn(r.search)),i.toString()}var Ke={};u(Ke,{consents:()=>Ve,get:()=>ln,getAll:()=>mn});var gr=Yr(fr());async function o(e,t,r){let n=Ye(r),i=n?.fetch?.options||{},d={...we(),...t?.headers,...i.headers},h=n?.manager,f;if(e.resource_server&&h&&(f=h.tokens.getByResourceServer(e.resource_server),f&&(d.Authorization=`Bearer ${f.access_token}`)),e.scope&&h&&(typeof e.service=="string"||"endpoint_id"in e.service)){let J=typeof e.service=="string"?I[e.service]:e.service.endpoint_id;f=h.tokens.getByResourceServer(J),f&&(d.Authorization=`Bearer ${f.access_token}`)}let A=t?.body;!A&&t?.payload&&(A=JSON.stringify(t.payload)),!d?.["Content-Type"]&&A&&(d["Content-Type"]="application/json");let L=te(e.service,e.path,{search:t?.query},n),M={method:e.method,body:A,...i,headers:d},y=gr.default;if(i?.__callable&&(y=i.__callable.bind(this),delete M.__callable),e.preventRetry||!h||!f||!re(f))return y(L,M);let N=await y(L,M);if(N.ok)return N;let Y;try{Y=ee(await N.clone().json())}catch{Y=!1}if(N.status===401&&!Y){let J=await h.refreshToken(f);return J?y(L,{...M,headers:{...M.headers,Authorization:`Bearer ${J.access_token}`}}):N}return N}var Ve={};u(Ve,{getAll:()=>dn});var dn=function(e,t={},r){return o({service:O,scope:V.VIEW_IDENTITIES,path:`/v2/api/identities/${e}/consents`},t,r)};var ln=function(e,t={},r){return o({service:O,scope:V.VIEW_IDENTITIES,path:`/v2/api/identities/${e}`},t,r)},mn=function(e={},t){return o({service:O,scope:V.VIEW_IDENTITIES,path:"/v2/api/identities"},e,t)};var F={};u(F,{token:()=>We,userinfo:()=>vn});var We={};u(We,{exchange:()=>fn,introspect:()=>gn,refresh:()=>yn,revoke:()=>_n,token:()=>_r,validate:()=>Sn});function hn(e){return new URLSearchParams(e)}function ne(e){return{...e,body:e.payload?hn(e.payload):void 0,headers:{...e?.headers||{},Accept:"application/json","Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}}var _r=function(e={},t){return o({service:O,scope:void 0,path:"/v2/oauth2/token",method:"POST",preventRetry:!0},ne(e),t)},fn=_r,gn=function(e,t){if(!e?.payload)throw new Error("'payload' is required for introspect");return o({service:O,scope:void 0,path:"/v2/oauth2/token/introspect",method:"POST",preventRetry:!0},ne(e),t)},_n=function(e,t){if(!e?.payload)throw new Error("'payload' is required for revoke");return o({service:O,scope:void 0,path:"/v2/oauth2/token/revoke",method:"POST",preventRetry:!0},ne(e),t)},yn=function(e,t){if(!e?.payload)throw new Error("'payload' is required for revoke");return o({service:O,scope:void 0,path:"/v2/oauth2/token",method:"POST",preventRetry:!0},ne(e),t)},Sn=function(e,t){if(!e?.payload)throw new Error("'payload' is required for validate");return o({service:O,scope:void 0,path:"/v2/oauth2/token/validate",method:"POST",preventRetry:!0},ne(e),t)};var vn=function(e,t){return o({service:O,scope:void 0,path:"/v2/oauth2/userinfo",method:"GET"},e,t)};var Xe={};u(Xe,{hasConsentForScope:()=>Pn,splitScopeString:()=>Qe,toScopeTree:()=>Sr});function Qe(e){let t=[],r="",n=0;return e.split("").forEach((i,d)=>{r+=i,i==="["&&(n+=1),i==="]"&&(n-=1),(i===" "&&n===0||d===e.length-1&&r)&&(t.push(r.trim()),r="")}),t}function yr(e){let t=e,r=t.startsWith("*");r&&(t=t.replace(/^\*\s*/,""));let n=[],i=t.indexOf("[");if(i===-1)return{scope:t,atomically_revocable:r,children:[]};let d=t.slice(0,i),h=t.slice(i+1,-1);return n=Qe(h).map(yr),{scope:d,atomically_revocable:r,children:n}}function Sr(e){return Qe(e).map(yr)}function Pn(e,t){let r=Sr(t);function n(i,d){let h=e.find(f=>f.scope_name===i.scope&&(d?f.dependency_path.join(",")===[...d,f.id].join(","):f.dependency_path.length===1));return h?i.children.length?i.children.every(f=>n(f,d?[...d,h.id]:[h.id])):h.status==="approved":!1}return r.every(i=>n(i))}var Ze=ye;function oe(){return te(O,"/v2/oauth2/authorize")}function Tn(){return te(O,"/v2/oauth2/token")}function Q(e){return typeof e=="object"&&e!==null&&"access_token"in e}function re(e){return Q(e)&&e!==null&&"refresh_token"in e}function X(e){return Q(e)&&e!==null&&"resource_server"in e}var se=class{constructor(t){this.name=t}#e=[];addListener(t){return this.#e.push(t),()=>this.removeListener(t)}removeListener(t){this.#e=this.#e.filter(r=>r!==t)}clearListeners(){this.#e=[]}async dispatch(t){await Promise.all(this.#e.map(r=>r(t)))}};function Te(){return"crypto"in globalThis}function rt(){return"webcrypto"in globalThis.crypto?globalThis.crypto.webcrypto:globalThis.crypto}var On=e=>btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");async function An(e){let t=await rt().subtle.digest("SHA-256",new TextEncoder().encode(e));return String.fromCharCode(...new Uint8Array(t))}var tt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",vr=`${tt}-._~`;function Oe(){return Array.from(rt().getRandomValues(new Uint8Array(43))).map(e=>vr[e%vr.length]).join("")}async function Ae(e){let t=await An(e);return On(t)}function Ee(){return Array.from(rt().getRandomValues(new Uint8Array(16))).map(e=>tt[e%tt.length]).join("")}var Pe={PKCE_STATE:"pkce_state",PKCE_CODE_VERIFIER:"pkce_code_verifier"},k={getKey(e){return e==="state"?Pe.PKCE_STATE:Pe.PKCE_CODE_VERIFIER},get:e=>sessionStorage.getItem(k.getKey(e)),set:(e,t)=>sessionStorage.setItem(k.getKey(e),t),reset:()=>{sessionStorage.removeItem(Pe.PKCE_STATE),sessionStorage.removeItem(Pe.PKCE_CODE_VERIFIER)}};var Re=class e{#e;constructor(t){if(this.#e=t,e.supported===!1)throw new Error("RedirectTransport is not supported in this environment.")}static supported=Te();async send(){let t=Oe(),r=await Ae(t),n=this.#e.params?.state??Ee();k.set("code_verifier",t),k.set("state",n);let i={response_type:"code",client_id:this.#e.client,scope:this.#e.scopes||"",redirect_uri:this.#e.redirect,state:n,code_challenge:r,code_challenge_method:"S256",...this.#e.params||{}},d=new URL(oe());d.search=new URLSearchParams(i).toString(),window.location.assign(d.toString())}async getToken(t={shouldReplace:!0,includeConsentedScopes:!1}){let r=new URL(window.location.href),n=new URLSearchParams(r.search);if(n.get("error"))throw new Error(n.get("error_description")||"An error occurred during the authorization process.");let i=n.get("code");if(!i)return;let d=k.get("state"),h=k.get("code_verifier");if(k.reset(),n.get("state")!==d)throw new Error('Invalid State. The received "state" parameter does not match the expected state.');if(!h)throw new Error("Invalid Code Verifier");let f={code:i,client_id:this.#e.client,code_verifier:h,redirect_uri:this.#e.redirect,grant_type:"authorization_code"},A=await(await F.token.exchange({query:t.includeConsentedScopes?{include_consented_scopes:!0}:void 0,payload:f})).json();return t.shouldReplace&&(n.delete("code"),n.delete("state"),r.search=n.toString(),window.location.replace(r)),A}};var be=class{#e;constructor(t){this.#e=t.manager}#r(t){let r=this.#e.storage.getItem(t)||"null",n=null;try{let i=JSON.parse(r);Q(i)&&(n=i)}catch{}return n}#t(t){let r=Ze.RESOURCE_SERVERS?.[t];return this.getByResourceServer(r)}getByResourceServer(t){return this.#r(`${this.#e.storageKeyPrefix}${t}`)}get auth(){return this.#t(G.AUTH)}get transfer(){return this.#t(G.TRANSFER)}get flows(){return this.#t(G.FLOWS)}get groups(){return this.#t(G.GROUPS)}get search(){return this.#t(G.SEARCH)}get timer(){return this.#t(G.TIMERS)}get compute(){return this.#t(G.COMPUTE)}gcs(t){return this.getByResourceServer(t)}getAll(){return Object.keys(this.#e.storage).reduce((r,n)=>(n.startsWith(this.#e.storageKeyPrefix)&&r.push(this.#r(n)),r),[]).filter(Q)}add(t){let r=Date.now(),n=r+t.expires_in*1e3;this.#e.storage.setItem(`${this.#e.storageKeyPrefix}${t.resource_server}`,JSON.stringify({...t,__metadata:{created:r,expires:n}})),"other_tokens"in t&&t.other_tokens?.forEach(i=>{this.add(i)})}remove(t){this.#e.storage.removeItem(`${this.#e.storageKeyPrefix}${t.resource_server}`)}static isTokenExpired(t,r=0){if(!(!t||!t.__metadata||typeof t.__metadata.expires!="number"))return Date.now()+r>=t.__metadata.expires}};var ie=class{#e={};getItem(t){return this.#e[t]!==void 0?this.#e[t]:null}setItem(t,r){this.#e[t]=r}removeItem(t){delete this.#e[t]}key(t){return Object.keys(this.#e)[t]}clear(){this.#e={}}get length(){return Object.keys(this.#e).length}};var Pr="globus-sdk",xe=class e{#e;#r=null;constructor(t){if(this.#e=t,e.supported===!1)throw new Error("PopupTransport is not supported in this environment.")}static supported=Te()&&"window"in globalThis&&typeof globalThis.window.open=="function";async send(){let t=Oe(),r=await Ae(t),n=this.#e.params?.state??Ee();k.set("code_verifier",t),k.set("state",n);let i={response_type:"code",client_id:this.#e.client,scope:this.#e.scopes||"",redirect_uri:this.#e.redirect,state:n,code_challenge:r,code_challenge_method:"S256",...this.#e.params||{}},d=new URL(oe());d.search=new URLSearchParams(i).toString();let h=new Promise(f=>{window.addEventListener("message",async A=>{let{data:L}=A;if(A.origin!==window.location.origin||L?.source!==Pr)return;this.#r?.close();let M=await this.#t(L.url);f(M)},!1)});if(this.#r=window.open(d.toString(),"_blank","width=800,height=600"),!this.#r)throw new Error("Unable to open window for PopupTransport.");return this.#r.focus(),h}async#t(t){let r=new URL(t),n=new URLSearchParams(r.search);if(n.get("error"))throw new Error(n.get("error_description")||"An error occurred during the authorization process.");let i=n.get("code");if(!i)return;let d=k.get("state"),h=k.get("code_verifier");if(k.reset(),n.get("state")!==d)throw new Error('Invalid State. The received "state" parameter does not match the expected state.');if(!h)throw new Error("Invalid Code Verifier");let f={code:i,client_id:this.#e.client,code_verifier:h,redirect_uri:this.#e.redirect,grant_type:"authorization_code"};return await(await F.token.exchange({payload:f})).json()}getToken(){window.opener&&window.opener.postMessage({source:Pr,url:window.location.href},window.location.origin)}};var En={redirect:Re,popup:xe},Tr={useRefreshTokens:!1,defaultScopes:"openid profile email",transport:"redirect"},Or={execute:!0,additionalParams:void 0},ae=class{#e;configuration;storage;#r=!1;get authenticated(){return this.#r}set authenticated(t){t!==this.#r&&(this.#r=t,this.#s())}tokens;events={authenticated:new se("authenticated"),revoke:new se("revoke")};constructor(t){if(!t.client)throw new Error("You must provide a `client` for your application.");let r=t.defaultScopes===!1?"":t.defaultScopes??Tr.defaultScopes;this.configuration={...Tr,...t,scopes:[t.scopes?t.scopes:"",r].filter(n=>n.length).join(" ")},this.storage=t.storage||new ie,this.configuration.events&&Object.entries(this.configuration.events).forEach(([n,i])=>{n in this.events&&this.events[n].addListener(i)}),this.tokens=new be({manager:this}),this.#t()}get storageKeyPrefix(){return`${this.configuration.client}:`}get user(){let t=this.getGlobusAuthToken();return t&&t.id_token?ur(t.id_token):null}async refreshTokens(){E("debug","AuthorizationManager.refreshTokens");let t=await Promise.allSettled(this.tokens.getAll().map(r=>re(r)?this.refreshToken(r):Promise.resolve(null)));return this.#t(),t}async refreshToken(t){E("debug",`AuthorizationManager.refreshToken | resource_server=${t.resource_server}`);try{let r=await(await F.token.refresh({payload:{client_id:this.configuration.client,refresh_token:t.refresh_token,grant_type:"refresh_token"}})).json();if(X(r))return this.addTokenResponse(r),r}catch{E("error",`AuthorizationManager.refreshToken | resource_server=${t.resource_server}`)}return null}hasGlobusAuthToken(){return this.getGlobusAuthToken()!==null}getGlobusAuthToken(){let t=this.storage.getItem(`${this.storageKeyPrefix}${I.AUTH}`);return t?JSON.parse(t):null}#t(){E("debug","AuthorizationManager.#checkAuthorizationState"),this.hasGlobusAuthToken()&&(this.authenticated=!0)}async#s(){let t=this.authenticated,r=this.getGlobusAuthToken()??void 0;await this.events.authenticated.dispatch({isAuthenticated:t,token:r})}reset(){Object.keys(this.storage).forEach(t=>{t.startsWith(this.storageKeyPrefix)&&this.storage.removeItem(t)}),this.authenticated=!1}#o(t){return`${t}${this.configuration.useRefreshTokens?" offline_access":""}`}#n(t){let{scopes:r,...n}=t??{},i=En[this.configuration.transport||"redirect"],d=this.#o(r??(this.configuration.scopes||""));return this.storage instanceof ie&&(d=[...new Set(d.split(" ").concat((this.configuration?.scopes||"").split(" ")))].join(" ")),new i({client:this.configuration.client,redirect:this.configuration.redirect,scopes:d,...n,params:{...n?.params}})}async login(t={additionalParams:{}}){E("debug","AuthorizationManager.login"),this.reset();let n=await this.#n({params:t?.additionalParams}).send();return X(n)&&this.addTokenResponse(n),n}async prompt(t){E("debug","AuthorizationManager.prompt");let n=await this.#n(t).send();return X(n)&&this.addTokenResponse(n),n}async handleCodeRedirect(t={shouldReplace:!0,additionalParams:{}}){E("debug","AuthorizationManager.handleCodeRedirect");let r=await this.#n({params:t?.additionalParams}).getToken({shouldReplace:t?.shouldReplace,includeConsentedScopes:t?.includeConsentedScopes});return X(r)&&(E("debug",`AuthorizationManager.handleCodeRedirect | response=${JSON.stringify(r)}`),this.addTokenResponse(r)),r}async handleErrorResponse(t,r){let n=typeof r=="boolean"?{...Or,execute:r}:{...Or,...r};E("debug",`AuthorizationManager.handleErrorResponse | response=${JSON.stringify(t)} execute=${n.execute}`);let i=async()=>{};return ee(t)&&(E("debug","AuthorizationManager.handleErrorResponse | error=AuthorizationRequirementsError"),i=async()=>{await this.handleAuthorizationRequirementsError(t,{additionalParams:n.additionalParams})}),$e(t)&&(E("debug","AuthorizationManager.handleErrorResponse | error=ConsentRequiredError"),i=async()=>{await this.handleConsentRequiredError(t,{additionalParams:n.additionalParams})}),"code"in t&&t.code==="AuthenticationFailed"&&(E("debug","AuthorizationManager.handleErrorResponse | error=AuthenticationFailed"),i=async()=>{await this.revoke()}),n.execute===!0?await i():i}async handleAuthorizationRequirementsError(t,r){this.#e=this.#n({params:{prompt:"login",...He(t),...r?.additionalParams}}),await this.#e.send()}async handleConsentRequiredError(t,r){this.#e=this.#n({scopes:this.#o(t.required_scopes.join(" ")),params:{...r?.additionalParams}}),await this.#e.send()}addTokenResponse=t=>{this.tokens.add(t),this.#t()};async revoke(){E("debug","AuthorizationManager.revoke");let t=Promise.all(this.tokens.getAll().map(this.#i.bind(this)));this.reset(),await t,await this.events.revoke.dispatch()}#i(t){return E("debug",`AuthorizationManager.revokeToken | resource_server=${t.resource_server}`),F.token.revoke({payload:{client_id:this.configuration.client,token:t.access_token}})}};function Rn(e){return new ae(e)}var vt={};u(vt,{CONFIG:()=>ko,access:()=>pt,collectionBookmarks:()=>ut,endpoint:()=>it,endpointManager:()=>ht,endpointSearch:()=>Ar,fileOperations:()=>ot,roles:()=>ct,task:()=>at,taskSubmission:()=>st,utils:()=>St});var Ar=function(e,t){let r={...e,query:e?.query};return o({service:p,scope:c.ALL,path:"/v0.10/endpoint_search"},r,t)};var ot={};u(ot,{ls:()=>bn,mkdir:()=>xn,rename:()=>Dn,stat:()=>kn,symlink:()=>In});function z(e){return e==="GET"?{}:{"Content-Type":"application/json"}}var bn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/operation/endpoint/${e}/ls`},t,r)},xn=function(e,t,r){let n={payload:{DATA_TYPE:"mkdir",...t?.payload},headers:{...z("POST"),...t?.headers}};return o({service:p,scope:c.ALL,path:`/v0.10/operation/endpoint/${e}/mkdir`,method:"POST"},n,r)},Dn=function(e,t,r){let n={payload:{DATA_TYPE:"rename",...t?.payload},headers:{...z("POST"),...t?.headers}};return o({service:p,scope:c.ALL,path:`/v0.10/operation/endpoint/${e}/rename`,method:"POST"},n,r)},In=function(e,t,r){let n={payload:{DATA_TYPE:"symlink",...t?.payload},headers:{...z("POST"),...t?.headers}};return o({service:p,scope:c.ALL,path:`/v0.10/operation/endpoint/${e}/symlink`,method:"POST"},n,r)},kn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/operation/endpoint/${e}/stat`},t,r)};var st={};u(st,{submissionId:()=>Cn,submitDelete:()=>wn,submitTransfer:()=>Mn});var wn=function(e,t){let r={payload:{DATA_TYPE:"delete",...e?.payload},headers:{...z("POST"),...e?.headers}};return o({service:p,scope:c.ALL,path:"/v0.10/delete",method:"POST"},r,t)},Mn=function(e,t){let r={payload:{DATA_TYPE:"transfer",...e?.payload},headers:{...z("POST"),...e?.headers}};return o({service:p,scope:c.ALL,path:"/v0.10/transfer",method:"POST"},r,t)},Cn=function(e,t){return o({service:p,scope:c.ALL,path:"/v0.10/submission_id"},e,t)};var it={};u(it,{create:()=>Nn,get:()=>Ln,remove:()=>qn,update:()=>Fn});var Ln=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}`},t,r)},Nn=function(e,t){return e?.payload&&Object.assign(e.payload,{DATA_TYPE:"shared_endpoint"}),o({service:p,scope:c.ALL,path:"/v0.10/shared_endpoint",method:"POST"},e,t)},Fn=function(e,t,r){return t?.payload&&Object.assign(t.payload,{DATA_TYPE:"endpoint"}),o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}`,method:"PUT"},t,r)},qn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}`,method:"DELETE"},t,r)};var at={};u(at,{cancel:()=>Jn,get:()=>Gn,getAll:()=>jn,getEventList:()=>Hn,getPauseInfo:()=>Yn,getSkippedErrors:()=>zn,getSuccessfulTransfers:()=>Bn,remove:()=>$n,update:()=>Un});var jn=function(e={},t){return o({service:p,scope:c.ALL,path:"/v0.10/task_list"},e,t)},Gn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/task/${e}`},t,r)},Un=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/task/${e}`,method:"PUT"},t,r)},Jn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/task/${e}/cancel`,method:"POST"},t,r)},$n=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/task/${e}/remove`,method:"POST"},t,r)},Hn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/task/${e}/event_list`},t,r)},Bn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/task/${e}/successful_transfers`},t,r)},zn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/task/${e}/skipped_errors`},t,r)},Yn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/task/${e}/pause_info`},t,r)};var pt={};u(pt,{create:()=>Kn,get:()=>Wn,getAll:()=>Vn,remove:()=>Xn,update:()=>Qn});var Vn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/access_list`},t,r)},Kn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/access`,method:"POST"},t,r)},Wn=function({endpoint_xid:e,id:t},r,n){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/access/${t}`},r,n)},Qn=function({endpoint_xid:e,id:t},r,n){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/access/${t}`,method:"PUT"},r,n)},Xn=function({endpoint_xid:e,id:t},r,n){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/access/${t}`,method:"DELETE"},r,n)};var ct={};u(ct,{create:()=>to,get:()=>eo,getAll:()=>Zn,remove:()=>ro});var Zn=function(e,t={},r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/role_list`},t,r)},eo=function({endpoint_id:e,role_id:t},r,n){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/role/${t}`},r,n)},to=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/role`,method:"POST"},t,r)},ro=function({collection_id:e,role_id:t},r,n){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/role/${t}`,method:"DELETE"},r,n)};var ut={};u(ut,{create:()=>oo,get:()=>so,getAll:()=>no,remove:()=>ao,update:()=>io});var no=function(e,t){return o({service:p,scope:c.ALL,path:"/v0.10/bookmark_list"},e,t)},oo=function(e,t){return o({service:p,scope:c.ALL,path:"/v0.10/bookmark",method:"POST"},e,t)},so=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/bookmark/${e}`},t,r)},io=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/bookmark/${e}`,method:"PUT"},t,r)},ao=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/bookmark/${e}`,method:"DELETE"},t,r)};var ht={};u(ht,{endpoint:()=>dt,pauseRule:()=>lt,task:()=>mt});var dt={};u(dt,{get:()=>po,getAccessList:()=>uo,getHostedEndpoints:()=>co,getMonitoredEndpoints:()=>lo});var po=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/endpoint/${e}`},t,r)},co=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/endpoint/${e}/hosted_endpoint_list`},t,r)},uo=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/endpoint/${e}/access_list`},t,r)},lo=function(e={},t){return o({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/monitored_endpoints"},e,t)};var lt={};u(lt,{create:()=>ho,get:()=>fo,getAll:()=>mo,remove:()=>_o,update:()=>go});var mo=function(e,t){return o({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/pause_rule_list"},e,t)},ho=function(e,t){return o({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/pause_rule",method:"POST"},e,t)},fo=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/pause_rule/${e}`},t,r)},go=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/pause_rule/${e}`,method:"PUT"},t,r)},_o=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/pause_rule/${e}`,method:"DELETE"},t,r)};var mt={};u(mt,{cancel:()=>vo,get:()=>So,getAdminCancel:()=>Po,getAll:()=>yo,getEventList:()=>To,getPauseInfo:()=>bo,getSkippedErrors:()=>Ao,getSuccessfulTransfers:()=>Oo,pause:()=>Eo,resume:()=>Ro});var yo=function(e={},t){return o({service:p,scope:c.ALL,path:"/v0.10/task_list"},e,t)},So=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}`},t,r)},vo=function(e,t){return o({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/admin_cancel",method:"POST"},e,t)},Po=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/admin_cancel/${e}`,method:"POST"},t,r)},To=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}/event_list`},t,r)},Oo=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}/successful_transfers`},t,r)},Ao=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}/skipped_errors`},t,r)},Eo=function(e,t){return o({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/admin_pause",method:"POST"},e,t)},Ro=function(e,t){return o({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/admin_resume",method:"POST"},e,t)},bo=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}/pause_info`},t,r)};var St={};u(St,{GLOBUS_DNS_DOMAINS:()=>br,getDomainFromEndpoint:()=>Io,isDirectory:()=>xo,isFileDocument:()=>Rr,isGlobusHostname:()=>xr,readableBytes:()=>Do});function Rr(e){return typeof e=="object"&&e!==null&&"DATA_TYPE"in e&&e.DATA_TYPE==="file"}function xo(e){return Rr(e)&&e.type==="dir"}var ft=1e3,gt=ft*1e3,_t=gt*1e3,yt=_t*1e3,Er=yt*1e3;function Do(e,t=2){let r="B",n=1;if(e<ft)return`${e} ${r}`;e<gt?(r="KB",n=ft):e<_t?(r="MB",n=gt):e<yt?(r="GB",n=_t):e<Er?(r="TB",n=yt):(r="PB",n=Er);let i=e/n,[d,h]=`${i}`.split("."),f=`${d}`;if(h&&h.length){let A=h.slice(0,t);A.length&&(f=`${d}.${A}`)}return`${f} ${r}`}var br=["dnsteam.globuscs.info","data.globus.org","dn.glob.us"];function xr(e){return!!br.find(t=>e.endsWith(t))}function Io(e){let{tlsftp_server:t}=e;if(!t||typeof t!="string")return null;let{hostname:r}=new URL(t.replace("tlsftp","https"));return!xr(r)&&/(?:[gm]-\w{6}.)?(\w+(\.\w+)+)$/.exec(r)?.[1]||r||null}var ko=le;var Rt={};u(Rt,{CONFIG:()=>Bo,entry:()=>Ot,index:()=>Et,query:()=>Pt,subject:()=>Tt});var Pt={};u(Pt,{get:()=>wo,post:()=>Mo});var wo=function(e,t,r){return o({service:S,scope:R.SEARCH,path:`/v1/index/${e}/search`},t,r)},Mo=function(e,t,r){return o({service:S,scope:R.SEARCH,path:`/v1/index/${e}/search`,method:"POST"},t,r)};var Tt={};u(Tt,{get:()=>Co});var Co=function(e,t,r){return o({service:S,scope:R.SEARCH,path:`/v1/index/${e}/subject`},t,r)};var Ot={};u(Ot,{get:()=>Lo});var Lo=function(e,t,r){return o({service:S,scope:R.SEARCH,path:`/v1/index/${e}/entry`},t,r)};var Et={};u(Et,{create:()=>Uo,get:()=>jo,getAll:()=>Go,ingest:()=>Ho,remove:()=>Jo,reopen:()=>$o,roles:()=>At});var At={};u(At,{create:()=>Fo,getAll:()=>No,remove:()=>qo});var No=function(e,t,r){return o({service:S,scope:R.ALL,path:`/v1/index/${e}/role_list`},t,r)},Fo=function(e,t,r){return o({service:S,scope:R.ALL,path:`/v1/index/${e}/role`,method:"POST"},t,r)},qo=function({index_id:e,role_id:t},r,n){return o({service:S,scope:R.ALL,path:`/v1/index/${e}/role/${t}`,method:"DELETE"},r,n)};var jo=function(e,t,r){return o({service:S,path:`/v1/index/${e}`},t,r)},Go=function(e,t){return o({service:S,scope:R.ALL,path:"/v1/index_list"},e,t)},Uo=function(e,t){return o({service:S,scope:R.ALL,path:"/v1/index",method:"POST"},e,t)},Jo=function(e,t,r){return o({service:S,scope:R.ALL,path:`/v1/index/${e}`,method:"DELETE"},t,r)},$o=function(e,t,r){return o({service:S,scope:R.ALL,path:`/v1/index/${e}/reopen`,method:"POST"},t,r)},Ho=function(e,t,r){return o({service:S,scope:R.ALL,path:`/v1/index/${e}/ingest`,method:"POST"},t,r)};var Bo=ge;var It={};u(It,{CONFIG:()=>Wo,groups:()=>bt,membership:()=>Dt,policies:()=>xt});var bt={};u(bt,{get:()=>Yo,getMyGroups:()=>zo});var zo=function(e,t){return o({scope:j.ALL,path:"/v2/groups/my_groups",service:D},e,t)},Yo=function(e,t,r){return o({service:D,scope:j.ALL,path:`/v2/groups/${e}`},t,r)};var xt={};u(xt,{get:()=>Vo});var Vo=function(e,t,r){return o({scope:j.ALL,path:`/v2/groups/${e}/policies`,service:D},t,r)};var Dt={};u(Dt,{act:()=>Ko});var Ko=function(e,t,r){if(!t?.payload)throw new Error("payload is required.");return o({service:D,scope:j.ALL,path:`/v2/groups/${e}`,method:"POST"},t,r)};var Wo=fe;var Mt={};u(Mt,{CONFIG:()=>ds,flows:()=>kt,runs:()=>wt});var kt={};u(kt,{create:()=>Dr,deploy:()=>rs,get:()=>Xo,getAll:()=>Qo,remove:()=>Zo,run:()=>es,update:()=>ns,validate:()=>ts});var Qo=function(e,t){return o({service:P,scope:x.VIEW_FLOWS,path:"/flows"},e,t)},Xo=function(e,t,r){return o({service:P,scope:x.VIEW_FLOWS,path:`/flows/${e}`},t,r)},Zo=function(e,t,r){return o({scope:x.MANAGE_FLOWS,service:P,path:`/flows/${e}`,method:"DELETE"},t,r)},es=function(e,t,r){return o({service:P,scope:x.VIEW_FLOWS,path:`/flows/${e}/run`,method:"POST"},t,r)},ts=function(e,t){return o({service:P,scope:x.MANAGE_FLOWS,path:"/flows/validate",method:"POST"},e,t)},Dr=function(e,t){return o({service:P,scope:x.MANAGE_FLOWS,path:"/flows",method:"POST"},e,t)},rs=Dr,ns=function(e,t,r){return o({service:P,scope:x.MANAGE_FLOWS,path:`/flows/${e}`,method:"PUT"},t,r)};var wt={};u(wt,{cancel:()=>is,get:()=>ss,getAll:()=>os,getDefinition:()=>us,getLog:()=>as,remove:()=>cs,update:()=>ps});var os=function(e={},t){return o({service:P,scope:x.RUN_MANAGE,path:"/runs"},e,t)},ss=function(e,t,r){return o({service:P,scope:x.RUN_MANAGE,path:`/runs/${e}`},t,r)},is=function(e,t,r){return o({service:P,scope:x.RUN_MANAGE,path:`/runs/${e}/cancel`,method:"POST"},t,r)},as=function(e,t,r){return o({service:P,scope:x.RUN_MANAGE,path:`/runs/${e}/log`},t,r)},ps=function(e,t,r){return o({service:P,scope:x.RUN_MANAGE,path:`/runs/${e}`,method:"PUT"},t,r)},cs=function(e,t,r){return o({service:P,scope:x.RUN_MANAGE,path:`/runs/${e}/release`,method:"POST"},t,r)},us=function(e,t,r){return o({service:P,scope:x.RUN_MANAGE,path:`/runs/${e}/definition`,method:"GET"},t,r)};var ds=me;var Ht={};u(Ht,{collections:()=>Ct,endpoint:()=>Lt,getScopes:()=>Zs,https:()=>Nt,nodes:()=>Ft,roles:()=>qt,storageGateways:()=>jt,userCredentials:()=>Gt,utils:()=>$t,versioning:()=>Jt});var Ct={};u(Ct,{create:()=>fs,get:()=>ms,getAll:()=>ls,patch:()=>_s,remove:()=>hs,resetOwnerString:()=>Ss,update:()=>gs,updateOwnerString:()=>ys});var ls=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/collections"},t,r)},ms=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}`},r,n)},hs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}`,method:"DELETE"},r,n)},fs=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/collections",method:"POST"},t,r)},gs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}`,method:"PUT"},r,n)},_s=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}`,method:"PATCH"},r,n)},ys=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}/owner_string`,method:"PUT"},r,n)},Ss=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}/owner_string`,method:"DELETE"},r,n)};var Lt={};u(Lt,{get:()=>vs,patch:()=>Ts,resetOwnerString:()=>Rs,update:()=>Ps,updateOwner:()=>As,updateOwnerString:()=>Es,updateSubscriptionId:()=>Os});var vs=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/endpoint"},t,r)},Ps=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/endpoint",method:"PUT"},t,r)},Ts=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/endpoint",method:"PATCH"},t,r)},Os=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/endpoint/subscription_id",method:"PUT"},t,r)},As=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/endpoint/owner",method:"PUT"},t,r)},Es=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/endpoint/owner_string",method:"PUT"},t,r)},Rs=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/endpoint/owner_string",method:"DELETE"},t,r)};var Nt={};u(Nt,{get:()=>bs,remove:()=>xs,update:()=>Ds});var bs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:t},r,n)},xs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:t,method:"DELETE"},r,n)},Ds=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:t,method:"PUT"},r,n)};var Ft={};u(Ft,{create:()=>Ms,get:()=>ks,getAll:()=>Is,patch:()=>Ls,remove:()=>ws,update:()=>Cs});var Is=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/nodes"},t,r)},ks=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/nodes/${t}`},r,n)},ws=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/nodes/${t}`,method:"DELETE"},r,n)},Ms=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/nodes",method:"POST"},t,r)},Cs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/nodes/${t}`,method:"PUT"},r,n)},Ls=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/nodes/${t}`,method:"PATCH"},r,n)};var qt={};u(qt,{create:()=>js,get:()=>Fs,getAll:()=>Ns,remove:()=>qs});var Ns=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/roles"},t,r)},Fs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/roles/${t}`},r,n)},qs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/roles/${t}`,method:"DELETE"},r,n)},js=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/roles",method:"POST"},t,r)};var jt={};u(jt,{create:()=>$s,get:()=>Us,getAll:()=>Gs,patch:()=>Bs,remove:()=>Js,update:()=>Hs});var Gs=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/storage_gateways"},t,r)},Us=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/storage_gateways/${t}`},r,n)},Js=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/storage_gateways/${t}`,method:"DELETE"},r,n)},$s=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/storage_gateways",method:"POST"},t,r)},Hs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/storage_gateways/${t}`,method:"PUT"},r,n)},Bs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/storage_gateways/${t}`,method:"PATCH"},r,n)};var Gt={};u(Gt,{create:()=>Ks,get:()=>Ys,getAll:()=>zs,patch:()=>Qs,remove:()=>Vs,update:()=>Ws});var zs=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/user_credentials"},t,r)},Ys=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/user_credentials/${t}`},r,n)},Vs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/user_credentials/${t}`,method:"DELETE"},r,n)},Ks=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/user_credentials",method:"POST"},t,r)},Ws=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/user_credentials/${t}`,method:"PUT"},r,n)},Qs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/user_credentials/${t}`,method:"PATCH"},r,n)};var Jt={};u(Jt,{info:()=>Ut});var Ut=function(e,t,r){return o({service:e,path:"/api/info"},t,r)};var $t={};u($t,{getEndpointIdFromURL:()=>Xs,getGCSDomainFromURL:()=>Ir});var pe="data.globus.org";function Ir(e){let{host:t}=typeof e=="string"?new URL(e):e;if(!t.endsWith(pe))return t;let[r]=t.split(`.${pe}`),n=r.split(".");return(n.length===2?[...n,pe]:[n[1],n[2],pe]).join(".")}async function Xs(e){let t=typeof e=="string"?new URL(e):e;if(!t.host.endsWith(pe))return null;let i=(await(await Ut({host:`https://${Ir(t)}`})).json()).data?.filter(d=>d.DATA_TYPE.startsWith("info#"))[0];return i&&"endpoint_id"in i?i.endpoint_id:null}var kr={HIGH_ASSURANCE:"urn:globus:auth:scope:<ENDPOINT_ID>:manage_collections",NON_HIGH_ASSURANCE:"urn:globus:auth:scope:<ENDPOINT_ID>:manage_collections[*https://auth.globus.org/scopes/<MAPPED_COLLECTION_ID>/data_access]"};function Zs(e,t){let{endpoint_id:r}=e;if(!r)throw new Error("An 'endpoint_id' is required to determine the required scopes");return t?kr[t].replace("<ENDPOINT_ID>",r):Object.entries(kr).reduce((n,[i,d])=>({...n,[i]:d.replace("<ENDPOINT_ID>",r)}),{})}var Yt={};u(Yt,{CONFIG:()=>ai,jobs:()=>zt,timer:()=>Bt});var Bt={};u(Bt,{create:()=>ei});var ei=function(e,t){return o({service:T,resource_server:I.TIMERS,path:"/v2/timer",method:"POST"},e,t)};var zt={};u(zt,{get:()=>ri,getAll:()=>ti,patch:()=>ni,pause:()=>oi,remove:()=>ii,resume:()=>si});var ti=function(e,t){return o({service:T,resource_server:I[T],path:"/jobs",method:"GET"},e,t)},ri=function(e,t,r){return o({service:T,resource_server:I[T],path:`/jobs/${e}`,method:"GET"},t,r)},ni=function(e,t,r){return o({service:T,resource_server:I[T],path:`/jobs/${e}`,method:"PATCH"},t,r)},oi=function(e,t,r){return o({service:T,resource_server:I[T],path:`/jobs/${e}/pause`,method:"POST"},t,r)},si=function(e,t,r){return o({service:T,resource_server:I[T],path:`/jobs/${e}/resume`,method:"POST"},t,r)},ii=function(e,t,r){return o({service:T,resource_server:I[T],path:`/jobs/${e}`,method:"DELETE"},t,r)};var ai=he;var Kt={};u(Kt,{CONFIG:()=>mi,endpoints:()=>Vt});var Vt={};u(Vt,{get:()=>ci,getAll:()=>pi,getStatus:()=>ui,remove:()=>li,update:()=>di});var pi=function(e,t){return o({service:w,scope:B.ALL,path:"/v2/endpoints",method:"GET"},e,t)},ci=function(e,t,r){return o({service:w,scope:B.ALL,path:`/v2/endpoints/${e}`,method:"GET"},t,r)},ui=function(e,t,r){return o({service:w,scope:B.ALL,path:`/v2/endpoints/${e}/status`},t,r)},di=function(e,t,r){return o({service:w,scope:B.ALL,path:`/v3/endpoints/${e}`,method:"PUT"},t,r)},li=function(e,t,r){return o({service:w,scope:B.ALL,path:`/v2/endpoints/${e}`,method:"DELETE"},t,r)};var mi=_e;var Wt={};u(Wt,{HOSTS:()=>wr,host:()=>Mr,url:()=>Cr,urlFor:()=>fi});var wr={integration:"app.integration.globuscs.info",sandbox:"app.sandbox.globuscs.info",test:"app.test.globuscs.info",staging:"app.staging.globuscs.info",preview:"app.preview.globus.org",production:"app.globus.org"};function Mr(e=K()){return wr[e]}function Cr(e,t){return new URL(e||"",`https://${Mr(t?.environment)}`)}var hi={TASK:"/activity/%s/overview",COLLECTION:"/file-manager/collections/%s/overview",ENDPOINT:"/file-manager/collections/%s/overview"};function fi(e,t,r){let n=hi[e].replace(/%s/g,t?.join("/")||"");return Cr(n,r)}return Vr(gi);})();
1
+ var globus=(()=>{var Ur=Object.create;var ue=Object.defineProperty;var Jr=Object.getOwnPropertyDescriptor;var $r=Object.getOwnPropertyNames;var Hr=Object.getPrototypeOf,Br=Object.prototype.hasOwnProperty;var zr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),u=(e,t)=>{for(var r in t)ue(e,r,{get:t[r],enumerable:!0})},tr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of $r(t))!Br.call(e,i)&&i!==r&&ue(e,i,{get:()=>t[i],enumerable:!(n=Jr(t,i))||n.enumerable});return e};var Yr=(e,t,r)=>(r=e!=null?Ur(Hr(e)):{},tr(t||!e||!e.__esModule?ue(r,"default",{value:e,enumerable:!0}):r,e)),Vr=e=>tr(ue({},"__esModule",{value:!0}),e);var fr=zr((U,hr)=>{var Se=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global,ve=(function(){function e(){this.fetch=!1,this.DOMException=Se.DOMException}return e.prototype=Se,new e})();(function(e){var t=(function(r){var n=typeof e<"u"&&e||typeof self<"u"&&self||typeof global<"u"&&global||{},i={searchParams:"URLSearchParams"in n,iterable:"Symbol"in n&&"iterator"in Symbol,blob:"FileReader"in n&&"Blob"in n&&(function(){try{return new Blob,!0}catch{return!1}})(),formData:"FormData"in n,arrayBuffer:"ArrayBuffer"in n};function d(s){return s&&DataView.prototype.isPrototypeOf(s)}if(i.arrayBuffer)var h=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],f=ArrayBuffer.isView||function(s){return s&&h.indexOf(Object.prototype.toString.call(s))>-1};function T(s){if(typeof s!="string"&&(s=String(s)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(s)||s==="")throw new TypeError('Invalid character in header field name: "'+s+'"');return s.toLowerCase()}function L(s){return typeof s!="string"&&(s=String(s)),s}function M(s){var a={next:function(){var l=s.shift();return{done:l===void 0,value:l}}};return i.iterable&&(a[Symbol.iterator]=function(){return a}),a}function y(s){this.map={},s instanceof y?s.forEach(function(a,l){this.append(l,a)},this):Array.isArray(s)?s.forEach(function(a){if(a.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+a.length);this.append(a[0],a[1])},this):s&&Object.getOwnPropertyNames(s).forEach(function(a){this.append(a,s[a])},this)}y.prototype.append=function(s,a){s=T(s),a=L(a);var l=this.map[s];this.map[s]=l?l+", "+a:a},y.prototype.delete=function(s){delete this.map[T(s)]},y.prototype.get=function(s){return s=T(s),this.has(s)?this.map[s]:null},y.prototype.has=function(s){return this.map.hasOwnProperty(T(s))},y.prototype.set=function(s,a){this.map[T(s)]=L(a)},y.prototype.forEach=function(s,a){for(var l in this.map)this.map.hasOwnProperty(l)&&s.call(a,this.map[l],l,this)},y.prototype.keys=function(){var s=[];return this.forEach(function(a,l){s.push(l)}),M(s)},y.prototype.values=function(){var s=[];return this.forEach(function(a){s.push(a)}),M(s)},y.prototype.entries=function(){var s=[];return this.forEach(function(a,l){s.push([l,a])}),M(s)},i.iterable&&(y.prototype[Symbol.iterator]=y.prototype.entries);function N(s){if(!s._noBody){if(s.bodyUsed)return Promise.reject(new TypeError("Already read"));s.bodyUsed=!0}}function Y(s){return new Promise(function(a,l){s.onload=function(){a(s.result)},s.onerror=function(){l(s.error)}})}function Qt(s){var a=new FileReader,l=Y(a);return a.readAsArrayBuffer(s),l}function J(s){var a=new FileReader,l=Y(a),g=/charset=([A-Za-z0-9_-]+)/.exec(s.type),v=g?g[1]:"utf-8";return a.readAsText(s,v),l}function Lr(s){for(var a=new Uint8Array(s),l=new Array(a.length),g=0;g<a.length;g++)l[g]=String.fromCharCode(a[g]);return l.join("")}function Xt(s){if(s.slice)return s.slice(0);var a=new Uint8Array(s.byteLength);return a.set(new Uint8Array(s)),a.buffer}function Zt(){return this.bodyUsed=!1,this._initBody=function(s){this.bodyUsed=this.bodyUsed,this._bodyInit=s,s?typeof s=="string"?this._bodyText=s:i.blob&&Blob.prototype.isPrototypeOf(s)?this._bodyBlob=s:i.formData&&FormData.prototype.isPrototypeOf(s)?this._bodyFormData=s:i.searchParams&&URLSearchParams.prototype.isPrototypeOf(s)?this._bodyText=s.toString():i.arrayBuffer&&i.blob&&d(s)?(this._bodyArrayBuffer=Xt(s.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(s)||f(s))?this._bodyArrayBuffer=Xt(s):this._bodyText=s=Object.prototype.toString.call(s):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof s=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i.searchParams&&URLSearchParams.prototype.isPrototypeOf(s)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i.blob&&(this.blob=function(){var s=N(this);if(s)return s;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var s=N(this);return s||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(i.blob)return this.blob().then(Qt);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var s=N(this);if(s)return s;if(this._bodyBlob)return J(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(Lr(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i.formData&&(this.formData=function(){return this.text().then(qr)}),this.json=function(){return this.text().then(JSON.parse)},this}var Nr=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function Fr(s){var a=s.toUpperCase();return Nr.indexOf(a)>-1?a:s}function q(s,a){if(!(this instanceof q))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');a=a||{};var l=a.body;if(s instanceof q){if(s.bodyUsed)throw new TypeError("Already read");this.url=s.url,this.credentials=s.credentials,a.headers||(this.headers=new y(s.headers)),this.method=s.method,this.mode=s.mode,this.signal=s.signal,!l&&s._bodyInit!=null&&(l=s._bodyInit,s.bodyUsed=!0)}else this.url=String(s);if(this.credentials=a.credentials||this.credentials||"same-origin",(a.headers||!this.headers)&&(this.headers=new y(a.headers)),this.method=Fr(a.method||this.method||"GET"),this.mode=a.mode||this.mode||null,this.signal=a.signal||this.signal||(function(){if("AbortController"in n){var m=new AbortController;return m.signal}})(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&l)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(l),(this.method==="GET"||this.method==="HEAD")&&(a.cache==="no-store"||a.cache==="no-cache")){var g=/([?&])_=[^&]*/;if(g.test(this.url))this.url=this.url.replace(g,"$1_="+new Date().getTime());else{var v=/\?/;this.url+=(v.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}q.prototype.clone=function(){return new q(this,{body:this._bodyInit})};function qr(s){var a=new FormData;return s.trim().split("&").forEach(function(l){if(l){var g=l.split("="),v=g.shift().replace(/\+/g," "),m=g.join("=").replace(/\+/g," ");a.append(decodeURIComponent(v),decodeURIComponent(m))}}),a}function jr(s){var a=new y,l=s.replace(/\r?\n[\t ]+/g," ");return l.split("\r").map(function(g){return g.indexOf(`
2
+ `)===0?g.substr(1,g.length):g}).forEach(function(g){var v=g.split(":"),m=v.shift().trim();if(m){var ce=v.join(":").trim();try{a.append(m,ce)}catch(Ie){console.warn("Response "+Ie.message)}}}),a}Zt.call(q.prototype);function C(s,a){if(!(this instanceof C))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(a||(a={}),this.type="default",this.status=a.status===void 0?200:a.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=a.statusText===void 0?"":""+a.statusText,this.headers=new y(a.headers),this.url=a.url||"",this._initBody(s)}Zt.call(C.prototype),C.prototype.clone=function(){return new C(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new y(this.headers),url:this.url})},C.error=function(){var s=new C(null,{status:200,statusText:""});return s.ok=!1,s.status=0,s.type="error",s};var Gr=[301,302,303,307,308];C.redirect=function(s,a){if(Gr.indexOf(a)===-1)throw new RangeError("Invalid status code");return new C(null,{status:a,headers:{location:s}})},r.DOMException=n.DOMException;try{new r.DOMException}catch{r.DOMException=function(a,l){this.message=a,this.name=l;var g=Error(a);this.stack=g.stack},r.DOMException.prototype=Object.create(Error.prototype),r.DOMException.prototype.constructor=r.DOMException}function De(s,a){return new Promise(function(l,g){var v=new q(s,a);if(v.signal&&v.signal.aborted)return g(new r.DOMException("Aborted","AbortError"));var m=new XMLHttpRequest;function ce(){m.abort()}m.onload=function(){var b={statusText:m.statusText,headers:jr(m.getAllResponseHeaders()||"")};v.url.indexOf("file://")===0&&(m.status<200||m.status>599)?b.status=200:b.status=m.status,b.url="responseURL"in m?m.responseURL:b.headers.get("X-Request-URL");var $="response"in m?m.response:m.responseText;setTimeout(function(){l(new C($,b))},0)},m.onerror=function(){setTimeout(function(){g(new TypeError("Network request failed"))},0)},m.ontimeout=function(){setTimeout(function(){g(new TypeError("Network request timed out"))},0)},m.onabort=function(){setTimeout(function(){g(new r.DOMException("Aborted","AbortError"))},0)};function Ie(b){try{return b===""&&n.location.href?n.location.href:b}catch{return b}}if(m.open(v.method,Ie(v.url),!0),v.credentials==="include"?m.withCredentials=!0:v.credentials==="omit"&&(m.withCredentials=!1),"responseType"in m&&(i.blob?m.responseType="blob":i.arrayBuffer&&(m.responseType="arraybuffer")),a&&typeof a.headers=="object"&&!(a.headers instanceof y||n.Headers&&a.headers instanceof n.Headers)){var er=[];Object.getOwnPropertyNames(a.headers).forEach(function(b){er.push(T(b)),m.setRequestHeader(b,L(a.headers[b]))}),v.headers.forEach(function(b,$){er.indexOf($)===-1&&m.setRequestHeader($,b)})}else v.headers.forEach(function(b,$){m.setRequestHeader($,b)});v.signal&&(v.signal.addEventListener("abort",ce),m.onreadystatechange=function(){m.readyState===4&&v.signal.removeEventListener("abort",ce)}),m.send(typeof v._bodyInit>"u"?null:v._bodyInit)})}return De.polyfill=!0,n.fetch||(n.fetch=De,n.Headers=y,n.Request=q,n.Response=C),r.Headers=y,r.Request=q,r.Response=C,r.fetch=De,r})({})})(ve);ve.fetch.ponyfill=!0;delete ve.fetch.polyfill;var W=Se.fetch?Se:ve;U=W.fetch;U.default=W.fetch;U.fetch=W.fetch;U.Headers=W.Headers;U.Request=W.Request;U.Response=W.Response;hr.exports=U});var gi={};u(gi,{auth:()=>et,authorization:()=>nt,compute:()=>Kt,errors:()=>Be,flows:()=>Mt,gcs:()=>Ht,groups:()=>It,info:()=>Me,logger:()=>Le,request:()=>o,search:()=>Rt,timers:()=>Yt,transfer:()=>vt,webapp:()=>Wt});var Me={};u(Me,{CLIENT_INFO:()=>ar,VERSION:()=>ir,addClientInfo:()=>Xr,getClientInfo:()=>pr,getClientInfoRequestHeaders:()=>we});var rr="X-Globus-Client-Info",Kr=!0;function nr(){return Kr}var Wr=";",Qr=",";function or(e){return(Array.isArray(e)?e:[e]).map(r=>Object.entries(r).map(([n,i])=>`${n}=${i}`).join(Qr)).join(Wr)}var sr="6.0.0";var ir=sr,ar={product:"javascript-sdk",version:ir},ke=[ar];function Xr(e){ke=ke.concat(e)}function pr(){return or(ke)}function we(){return nr()?{[rr]:pr()}:{}}var Le={};u(Le,{log:()=>E,setLogLevel:()=>en,setLogger:()=>Zr});var Ce=["debug","info","warn","error"],de,cr=Ce.indexOf("error");function Zr(e){de=e}function en(e){cr=Ce.indexOf(e)}function E(e,...t){if(!de||Ce.indexOf(e)<cr)return;(de[e]??de.log)(...t)}var nt={};u(nt,{AuthorizationManager:()=>ae,create:()=>Rn});var H=class extends Error{};H.prototype.name="InvalidTokenError";function tn(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,r)=>{let n=r.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function rn(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return tn(t)}catch{return atob(t)}}function ur(e,t){if(typeof e!="string")throw new H("Invalid token specified: must be a string");t||(t={});let r=t.header===!0?0:1,n=e.split(".")[r];if(typeof n!="string")throw new H(`Invalid token specified: missing part #${r+1}`);let i;try{i=rn(n)}catch(d){throw new H(`Invalid token specified: invalid base64 for part #${r+1} (${d.message})`)}try{return JSON.parse(i)}catch(d){throw new H(`Invalid token specified: invalid json for part #${r+1} (${d.message})`)}}var et={};u(et,{CONFIG:()=>Ze,getAuthorizationEndpoint:()=>oe,getTokenEndpoint:()=>On,identities:()=>Ke,isGlobusAuthTokenResponse:()=>X,isRefreshToken:()=>re,isToken:()=>Q,oauth2:()=>F,utils:()=>Xe});var ye={};u(ye,{HOSTS:()=>Je,ID:()=>A,RESOURCE_SERVERS:()=>I,SCOPES:()=>V});var le={};u(le,{HOSTS:()=>Ne,ID:()=>p,SCOPES:()=>c});var p="TRANSFER",c={ALL:"urn:globus:auth:scope:transfer.api.globus.org:all"},Ne={sandbox:"transfer.api.sandbox.globuscs.info",production:"transfer.api.globusonline.org",staging:"transfer.api.staging.globuscs.info",integration:"transfer.api.integration.globuscs.info",test:"transfer.api.test.globuscs.info",preview:"transfer.api.preview.globus.org"};var me={};u(me,{HOSTS:()=>Fe,ID:()=>P,SCOPES:()=>x});var P="FLOWS",Fe={sandbox:"sandbox.flows.automate.globus.org",production:"flows.globus.org",staging:"staging.flows.automate.globus.org",integration:"integration.flows.automate.globus.org",test:"test.flows.automate.globus.org",preview:"preview.flows.automate.globus.org"},x={MANAGE_FLOWS:"https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/manage_flows",VIEW_FLOWS:"https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/view_flows",RUN:"https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/run",RUN_STATUS:"https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/run_status",RUN_MANAGE:"https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/run_manage"};var he={};u(he,{HOSTS:()=>qe,ID:()=>O});var O="TIMERS",qe={sandbox:"sandbox.timer.automate.globus.org",production:"timer.automate.globus.org",staging:"staging.timer.automate.globus.org",integration:"integration.timer.automate.globus.org",test:"test.timer.automate.globus.org",preview:"preview.timer.automate.globus.org"};var fe={};u(fe,{HOSTS:()=>je,ID:()=>D,SCOPES:()=>j});var D="GROUPS",je={sandbox:"groups.api.sandbox.globuscs.info",production:"groups.api.globus.org",staging:"groups.api.staging.globuscs.info",integration:"groups.api.integration.globuscs.info",test:"groups.api.test.globuscs.info",preview:"groups.api.preview.globuscs.info"},j={ALL:"urn:globus:auth:scope:groups.api.globus.org:all",VIEW_MY:"urn:globus:auth:scope:groups.api.globus.org:view_my_groups_and_membership"};var ge={};u(ge,{HOSTS:()=>Ge,ID:()=>S,SCOPES:()=>R});var S="SEARCH",Ge={sandbox:"search.api.sandbox.globuscs.info",production:"search.api.globus.org",staging:"search.api.staging.globuscs.info",integration:"search.api.integration.globuscs.info",test:"search.api.test.globuscs.info",preview:"search.api.preview.globus.org"},R={ALL:"urn:globus:auth:scope:search.api.globus.org:all",INGEST:"urn:globus:auth:scope:search.api.globus.org:ingest",SEARCH:"urn:globus:auth:scope:search.api.globus.org:search"};var _e={};u(_e,{HOSTS:()=>Ue,ID:()=>w,SCOPES:()=>B});var w="COMPUTE",Ue={sandbox:"compute.api.sandbox.globuscs.info",production:"compute.api.globus.org",staging:"compute.api.staging.globuscs.info",integration:"compute.api.integration.globuscs.info",test:"compute.api.test.globuscs.info",preview:"compute.api.preview.globus.org"},B={ALL:"https://auth.globus.org/scopes/facd7ccc-c5f4-42aa-916b-a0e270e2c2a9/all"};var A="AUTH",Je={integration:"auth.integration.globuscs.info",sandbox:"auth.sandbox.globuscs.info",production:"auth.globus.org",test:"auth.test.globuscs.info",staging:"auth.staging.globuscs.info",preview:"auth.preview.globus.org"},V={VIEW_IDENTITIES:"urn:globus:auth:scope:auth.globus.org:view_identities"},I={[A]:"auth.globus.org",[p]:"transfer.api.globus.org",[P]:"flows.globus.org",[D]:"groups.api.globus.org",[S]:"search.api.globus.org",[O]:"524230d7-ea86-4a52-8312-86065a9e0417",[w]:"funcx_service"};var Be={};u(Be,{EnvironmentConfigurationError:()=>Z,isAuthorizationRequirementsError:()=>ee,isConsentRequiredError:()=>$e,isErrorWellFormed:()=>dr,toAuthorizationQueryParams:()=>He});var Z=class extends Error{name="EnvironmentConfigurationError";constructor(t,r){super(),this.message=`Invalid configuration value provided for ${t} (${r}).`}};function dr(e){return typeof e=="object"&&e!==null&&"code"in e&&"message"in e}function $e(e){return dr(e)&&e.code==="ConsentRequired"&&"required_scopes"in e&&Array.isArray(e.required_scopes)}var nn=["required_scopes"];function He(e){let t={scope:e.authorization_parameters.required_scopes?.join(" "),...e.authorization_parameters};return Object.entries(t).reduce((r,[n,i])=>{if(nn.includes(n)||i===void 0||i===null)return r;let d=i;return Array.isArray(d)?d=d.join(","):typeof i=="boolean"&&(d=d?"true":"false"),{...r,[n]:d}},{})}function ee(e){return typeof e=="object"&&e!==null&&"authorization_parameters"in e&&typeof e.authorization_parameters=="object"&&e.authorization_parameters!==null}function on(){return typeof window<"u"?window:process}function sn(e){return typeof window==typeof e}function ze(e,t){let r=on(),n;return sn(r)?n=r:n=r.env,e in n?n[e]:t}var lr={PRODUCTION:"production",PREVIEW:"preview",STAGING:"staging",SANDBOX:"sandbox",INTEGRATION:"integration",TEST:"test"},G={[A]:A,[p]:p,[P]:P,[D]:D,[S]:S,[O]:O,[w]:w},an={[A]:Je,[p]:Ne,[P]:Fe,[D]:je,[S]:Ge,[O]:qe,[w]:Ue};function Ye(e){let t=ze("GLOBUS_SDK_OPTIONS",{});return typeof t=="string"&&(t=JSON.parse(t)),{...t,...e,fetch:{...t?.fetch,...e?.fetch,options:{...t?.fetch?.options,...e?.fetch?.options,headers:{...t?.fetch?.options?.headers,...e?.fetch?.options?.headers}}}}}function K(){let e=Ye(),t=ze("GLOBUS_SDK_ENVIRONMENT",e?.environment??lr.PRODUCTION);if(e?.environment&&t!==e.environment&&E("debug","GLOBUS_SDK_ENVIRONMENT and GLOBUS_SDK_OPTIONS.environment are set to different values. GLOBUS_SDK_ENVIRONMENT will take precedence"),!t||!Object.values(lr).includes(t))throw new Z("GLOBUS_SDK_ENVIRONMENT",t);return t}function pn(e,t=K()){return an[e][t]}function mr(e,t=K()){let r=pn(e,t);return ze(`GLOBUS_SDK_SERVICE_URL_${e}`,r?`https://${r}`:void 0)}function cn(e){let t=new URLSearchParams;return Array.from(Object.entries(e)).forEach(([r,n])=>{Array.isArray(n)?t.set(r,n.join(",")):n!==void 0&&t.set(r,String(n))}),t.toString()}function un(e,t="",r=K()){let n=mr(e,r);return new URL(t,n)}function te(e,t,r,n){let i;return typeof e=="object"?i=new URL(t,e.host):i=un(e,t,n?.environment),r&&r.search&&(i.search=cn(r.search)),i.toString()}var Ke={};u(Ke,{consents:()=>Ve,get:()=>ln,getAll:()=>mn});var gr=Yr(fr());async function o(e,t,r){let n=Ye(r),i=n?.fetch?.options||{},d={...we(),...t?.headers,...i.headers},h=t?.manager||n?.manager,f;if(e.resource_server&&h&&(f=h.tokens.getByResourceServer(e.resource_server),f&&(d.Authorization=`Bearer ${f.access_token}`)),e.scope&&h&&(typeof e.service=="string"||"endpoint_id"in e.service)){let J=typeof e.service=="string"?I[e.service]:e.service.endpoint_id;f=h.tokens.getByResourceServer(J),f&&(d.Authorization=`Bearer ${f.access_token}`)}let T=t?.body;!T&&t?.payload&&(T=JSON.stringify(t.payload)),!d?.["Content-Type"]&&T&&(d["Content-Type"]="application/json");let L=te(e.service,e.path,{search:t?.query},n),M={method:e.method,body:T,...i,headers:d},y=gr.default;if(i?.__callable&&(y=i.__callable.bind(this),delete M.__callable),e.preventRetry||!h||!f||!re(f))return y(L,M);let N=await y(L,M);if(N.ok)return N;let Y;try{Y=ee(await N.clone().json())}catch{Y=!1}if(N.status===401&&!Y){let J=await h.refreshToken(f);return J?y(L,{...M,headers:{...M.headers,Authorization:`Bearer ${J.access_token}`}}):N}return N}var Ve={};u(Ve,{getAll:()=>dn});var dn=function(e,t={},r){return o({service:A,scope:V.VIEW_IDENTITIES,path:`/v2/api/identities/${e}/consents`},t,r)};var ln=function(e,t={},r){return o({service:A,scope:V.VIEW_IDENTITIES,path:`/v2/api/identities/${e}`},t,r)},mn=function(e={},t){return o({service:A,scope:V.VIEW_IDENTITIES,path:"/v2/api/identities"},e,t)};var F={};u(F,{token:()=>We,userinfo:()=>vn});var We={};u(We,{exchange:()=>fn,introspect:()=>gn,refresh:()=>yn,revoke:()=>_n,token:()=>_r,validate:()=>Sn});function hn(e){return new URLSearchParams(e)}function ne(e){return{...e,body:e.payload?hn(e.payload):void 0,headers:{...e?.headers||{},Accept:"application/json","Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}}var _r=function(e={},t){return o({service:A,scope:void 0,path:"/v2/oauth2/token",method:"POST",preventRetry:!0},ne(e),t)},fn=_r,gn=function(e,t){if(!e?.payload)throw new Error("'payload' is required for introspect");return o({service:A,scope:void 0,path:"/v2/oauth2/token/introspect",method:"POST",preventRetry:!0},ne(e),t)},_n=function(e,t){if(!e?.payload)throw new Error("'payload' is required for revoke");return o({service:A,scope:void 0,path:"/v2/oauth2/token/revoke",method:"POST",preventRetry:!0},ne(e),t)},yn=function(e,t){if(!e?.payload)throw new Error("'payload' is required for revoke");return o({service:A,scope:void 0,path:"/v2/oauth2/token",method:"POST",preventRetry:!0},ne(e),t)},Sn=function(e,t){if(!e?.payload)throw new Error("'payload' is required for validate");return o({service:A,scope:void 0,path:"/v2/oauth2/token/validate",method:"POST",preventRetry:!0},ne(e),t)};var vn=function(e,t){return o({service:A,scope:void 0,path:"/v2/oauth2/userinfo",method:"GET"},e,t)};var Xe={};u(Xe,{hasConsentForScope:()=>Pn,splitScopeString:()=>Qe,toScopeTree:()=>Sr});function Qe(e){let t=[],r="",n=0;return e.split("").forEach((i,d)=>{r+=i,i==="["&&(n+=1),i==="]"&&(n-=1),(i===" "&&n===0||d===e.length-1&&r)&&(t.push(r.trim()),r="")}),t}function yr(e){let t=e,r=t.startsWith("*");r&&(t=t.replace(/^\*\s*/,""));let n=[],i=t.indexOf("[");if(i===-1)return{scope:t,atomically_revocable:r,children:[]};let d=t.slice(0,i),h=t.slice(i+1,-1);return n=Qe(h).map(yr),{scope:d,atomically_revocable:r,children:n}}function Sr(e){return Qe(e).map(yr)}function Pn(e,t){let r=Sr(t);function n(i,d){let h=e.find(f=>f.scope_name===i.scope&&(d?f.dependency_path.join(",")===[...d,f.id].join(","):f.dependency_path.length===1));return h?i.children.length?i.children.every(f=>n(f,d?[...d,h.id]:[h.id])):h.status==="approved":!1}return r.every(i=>n(i))}var Ze=ye;function oe(){return te(A,"/v2/oauth2/authorize")}function On(){return te(A,"/v2/oauth2/token")}function Q(e){return typeof e=="object"&&e!==null&&"access_token"in e}function re(e){return Q(e)&&e!==null&&"refresh_token"in e}function X(e){return Q(e)&&e!==null&&"resource_server"in e}var se=class{constructor(t){this.name=t}#e=[];addListener(t){return this.#e.push(t),()=>this.removeListener(t)}removeListener(t){this.#e=this.#e.filter(r=>r!==t)}clearListeners(){this.#e=[]}async dispatch(t){await Promise.all(this.#e.map(r=>r(t)))}};function Oe(){return"crypto"in globalThis}function rt(){return"webcrypto"in globalThis.crypto?globalThis.crypto.webcrypto:globalThis.crypto}var An=e=>btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");async function Tn(e){let t=await rt().subtle.digest("SHA-256",new TextEncoder().encode(e));return String.fromCharCode(...new Uint8Array(t))}var tt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",vr=`${tt}-._~`;function Ae(){return Array.from(rt().getRandomValues(new Uint8Array(43))).map(e=>vr[e%vr.length]).join("")}async function Te(e){let t=await Tn(e);return An(t)}function Ee(){return Array.from(rt().getRandomValues(new Uint8Array(16))).map(e=>tt[e%tt.length]).join("")}var Pe={PKCE_STATE:"pkce_state",PKCE_CODE_VERIFIER:"pkce_code_verifier"},k={getKey(e){return e==="state"?Pe.PKCE_STATE:Pe.PKCE_CODE_VERIFIER},get:e=>sessionStorage.getItem(k.getKey(e)),set:(e,t)=>sessionStorage.setItem(k.getKey(e),t),reset:()=>{sessionStorage.removeItem(Pe.PKCE_STATE),sessionStorage.removeItem(Pe.PKCE_CODE_VERIFIER)}};var Re=class e{#e;constructor(t){if(this.#e=t,e.supported===!1)throw new Error("RedirectTransport is not supported in this environment.")}static supported=Oe();async send(){let t=Ae(),r=await Te(t),n=this.#e.params?.state??Ee();k.set("code_verifier",t),k.set("state",n);let i={response_type:"code",client_id:this.#e.client,scope:this.#e.scopes||"",redirect_uri:this.#e.redirect,state:n,code_challenge:r,code_challenge_method:"S256",...this.#e.params||{}},d=new URL(oe());d.search=new URLSearchParams(i).toString(),window.location.assign(d.toString())}async getToken(t={shouldReplace:!0,includeConsentedScopes:!1}){let r=new URL(window.location.href),n=new URLSearchParams(r.search);if(n.get("error"))throw new Error(n.get("error_description")||"An error occurred during the authorization process.");let i=n.get("code");if(!i)return;let d=k.get("state"),h=k.get("code_verifier");if(k.reset(),n.get("state")!==d)throw new Error('Invalid State. The received "state" parameter does not match the expected state.');if(!h)throw new Error("Invalid Code Verifier");let f={code:i,client_id:this.#e.client,code_verifier:h,redirect_uri:this.#e.redirect,grant_type:"authorization_code"},T=await(await F.token.exchange({query:t.includeConsentedScopes?{include_consented_scopes:!0}:void 0,payload:f})).json();return t.shouldReplace&&(n.delete("code"),n.delete("state"),r.search=n.toString(),window.location.replace(r)),T}};var be=class{#e;constructor(t){this.#e=t.manager}#r(t){let r=this.#e.storage.getItem(t)||"null",n=null;try{let i=JSON.parse(r);Q(i)&&(n=i)}catch{}return n}#t(t){let r=Ze.RESOURCE_SERVERS?.[t];return this.getByResourceServer(r)}getByResourceServer(t){return this.#r(`${this.#e.storageKeyPrefix}${t}`)}get auth(){return this.#t(G.AUTH)}get transfer(){return this.#t(G.TRANSFER)}get flows(){return this.#t(G.FLOWS)}get groups(){return this.#t(G.GROUPS)}get search(){return this.#t(G.SEARCH)}get timer(){return this.#t(G.TIMERS)}get compute(){return this.#t(G.COMPUTE)}gcs(t){return this.getByResourceServer(t)}getAll(){return Object.keys(this.#e.storage).reduce((r,n)=>(n.startsWith(this.#e.storageKeyPrefix)&&r.push(this.#r(n)),r),[]).filter(Q)}add(t){let r=Date.now(),n=r+t.expires_in*1e3;this.#e.storage.setItem(`${this.#e.storageKeyPrefix}${t.resource_server}`,JSON.stringify({...t,__metadata:{created:r,expires:n}})),"other_tokens"in t&&t.other_tokens?.forEach(i=>{this.add(i)})}remove(t){this.#e.storage.removeItem(`${this.#e.storageKeyPrefix}${t.resource_server}`)}static isTokenExpired(t,r=0){if(!(!t||!t.__metadata||typeof t.__metadata.expires!="number"))return Date.now()+r>=t.__metadata.expires}};var ie=class{#e={};getItem(t){return this.#e[t]!==void 0?this.#e[t]:null}setItem(t,r){this.#e[t]=r}removeItem(t){delete this.#e[t]}key(t){return Object.keys(this.#e)[t]}clear(){this.#e={}}get length(){return Object.keys(this.#e).length}};var Pr="globus-sdk",xe=class e{#e;#r=null;constructor(t){if(this.#e=t,e.supported===!1)throw new Error("PopupTransport is not supported in this environment.")}static supported=Oe()&&"window"in globalThis&&typeof globalThis.window.open=="function";async send(){let t=Ae(),r=await Te(t),n=this.#e.params?.state??Ee();k.set("code_verifier",t),k.set("state",n);let i={response_type:"code",client_id:this.#e.client,scope:this.#e.scopes||"",redirect_uri:this.#e.redirect,state:n,code_challenge:r,code_challenge_method:"S256",...this.#e.params||{}},d=new URL(oe());d.search=new URLSearchParams(i).toString();let h=new Promise(f=>{window.addEventListener("message",async T=>{let{data:L}=T;if(T.origin!==window.location.origin||L?.source!==Pr)return;this.#r?.close();let M=await this.#t(L.url);f(M)},!1)});if(this.#r=window.open(d.toString(),"_blank","width=800,height=600"),!this.#r)throw new Error("Unable to open window for PopupTransport.");return this.#r.focus(),h}async#t(t){let r=new URL(t),n=new URLSearchParams(r.search);if(n.get("error"))throw new Error(n.get("error_description")||"An error occurred during the authorization process.");let i=n.get("code");if(!i)return;let d=k.get("state"),h=k.get("code_verifier");if(k.reset(),n.get("state")!==d)throw new Error('Invalid State. The received "state" parameter does not match the expected state.');if(!h)throw new Error("Invalid Code Verifier");let f={code:i,client_id:this.#e.client,code_verifier:h,redirect_uri:this.#e.redirect,grant_type:"authorization_code"};return await(await F.token.exchange({payload:f})).json()}getToken(){window.opener&&window.opener.postMessage({source:Pr,url:window.location.href},window.location.origin)}};var En={redirect:Re,popup:xe},Or={useRefreshTokens:!1,defaultScopes:"openid profile email",transport:"redirect"},Ar={execute:!0,additionalParams:void 0},ae=class{#e;configuration;storage;#r=!1;get authenticated(){return this.#r}set authenticated(t){t!==this.#r&&(this.#r=t,this.#s())}tokens;events={authenticated:new se("authenticated"),revoke:new se("revoke")};constructor(t){if(!t.client)throw new Error("You must provide a `client` for your application.");let r=t.defaultScopes===!1?"":t.defaultScopes??Or.defaultScopes;this.configuration={...Or,...t,scopes:[t.scopes?t.scopes:"",r].filter(n=>n.length).join(" ")},this.storage=t.storage||new ie,this.configuration.events&&Object.entries(this.configuration.events).forEach(([n,i])=>{n in this.events&&this.events[n].addListener(i)}),this.tokens=new be({manager:this}),this.#t()}get storageKeyPrefix(){return`${this.configuration.client}:`}get user(){let t=this.getGlobusAuthToken();return t&&t.id_token?ur(t.id_token):null}async refreshTokens(){E("debug","AuthorizationManager.refreshTokens");let t=await Promise.allSettled(this.tokens.getAll().map(r=>re(r)?this.refreshToken(r):Promise.resolve(null)));return this.#t(),t}async refreshToken(t){E("debug",`AuthorizationManager.refreshToken | resource_server=${t.resource_server}`);try{let r=await(await F.token.refresh({payload:{client_id:this.configuration.client,refresh_token:t.refresh_token,grant_type:"refresh_token"}})).json();if(X(r))return this.addTokenResponse(r),r}catch{E("error",`AuthorizationManager.refreshToken | resource_server=${t.resource_server}`)}return null}hasGlobusAuthToken(){return this.getGlobusAuthToken()!==null}getGlobusAuthToken(){let t=this.storage.getItem(`${this.storageKeyPrefix}${I.AUTH}`);return t?JSON.parse(t):null}#t(){E("debug","AuthorizationManager.#checkAuthorizationState"),this.hasGlobusAuthToken()&&(this.authenticated=!0)}async#s(){let t=this.authenticated,r=this.getGlobusAuthToken()??void 0;await this.events.authenticated.dispatch({isAuthenticated:t,token:r})}reset(){Object.keys(this.storage).forEach(t=>{t.startsWith(this.storageKeyPrefix)&&this.storage.removeItem(t)}),this.authenticated=!1}#o(t){return`${t}${this.configuration.useRefreshTokens?" offline_access":""}`}#n(t){let{scopes:r,...n}=t??{},i=En[this.configuration.transport||"redirect"],d=this.#o(r??(this.configuration.scopes||""));return this.storage instanceof ie&&(d=[...new Set(d.split(" ").concat((this.configuration?.scopes||"").split(" ")))].join(" ")),new i({client:this.configuration.client,redirect:this.configuration.redirect,scopes:d,...n,params:{...n?.params}})}async login(t={additionalParams:{}}){E("debug","AuthorizationManager.login"),this.reset();let n=await this.#n({params:t?.additionalParams}).send();return X(n)&&this.addTokenResponse(n),n}async prompt(t){E("debug","AuthorizationManager.prompt");let n=await this.#n(t).send();return X(n)&&this.addTokenResponse(n),n}async handleCodeRedirect(t={shouldReplace:!0,additionalParams:{}}){E("debug","AuthorizationManager.handleCodeRedirect");let r=await this.#n({params:t?.additionalParams}).getToken({shouldReplace:t?.shouldReplace,includeConsentedScopes:t?.includeConsentedScopes});return X(r)&&(E("debug",`AuthorizationManager.handleCodeRedirect | response=${JSON.stringify(r)}`),this.addTokenResponse(r)),r}async handleErrorResponse(t,r){let n=typeof r=="boolean"?{...Ar,execute:r}:{...Ar,...r};E("debug",`AuthorizationManager.handleErrorResponse | response=${JSON.stringify(t)} execute=${n.execute}`);let i=async()=>{};return ee(t)&&(E("debug","AuthorizationManager.handleErrorResponse | error=AuthorizationRequirementsError"),i=async()=>{await this.handleAuthorizationRequirementsError(t,{additionalParams:n.additionalParams})}),$e(t)&&(E("debug","AuthorizationManager.handleErrorResponse | error=ConsentRequiredError"),i=async()=>{await this.handleConsentRequiredError(t,{additionalParams:n.additionalParams})}),"code"in t&&t.code==="AuthenticationFailed"&&(E("debug","AuthorizationManager.handleErrorResponse | error=AuthenticationFailed"),i=async()=>{await this.revoke()}),n.execute===!0?await i():i}async handleAuthorizationRequirementsError(t,r){this.#e=this.#n({params:{prompt:"login",...He(t),...r?.additionalParams}}),await this.#e.send()}async handleConsentRequiredError(t,r){this.#e=this.#n({scopes:this.#o(t.required_scopes.join(" ")),params:{...r?.additionalParams}}),await this.#e.send()}addTokenResponse=t=>{this.tokens.add(t),this.#t()};async revoke(){E("debug","AuthorizationManager.revoke");let t=Promise.all(this.tokens.getAll().map(this.#i.bind(this)));this.reset(),await t,await this.events.revoke.dispatch()}#i(t){return E("debug",`AuthorizationManager.revokeToken | resource_server=${t.resource_server}`),F.token.revoke({payload:{client_id:this.configuration.client,token:t.access_token}})}};function Rn(e){return new ae(e)}var vt={};u(vt,{CONFIG:()=>ko,access:()=>pt,collectionBookmarks:()=>ut,endpoint:()=>it,endpointManager:()=>ht,endpointSearch:()=>Tr,fileOperations:()=>ot,roles:()=>ct,task:()=>at,taskSubmission:()=>st,utils:()=>St});var Tr=function(e,t){let r={...e,query:e?.query};return o({service:p,scope:c.ALL,path:"/v0.10/endpoint_search"},r,t)};var ot={};u(ot,{ls:()=>bn,mkdir:()=>xn,rename:()=>Dn,stat:()=>kn,symlink:()=>In});function z(e){return e==="GET"?{}:{"Content-Type":"application/json"}}var bn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/operation/endpoint/${e}/ls`},t,r)},xn=function(e,t,r){let n={payload:{DATA_TYPE:"mkdir",...t?.payload},headers:{...z("POST"),...t?.headers}};return o({service:p,scope:c.ALL,path:`/v0.10/operation/endpoint/${e}/mkdir`,method:"POST"},n,r)},Dn=function(e,t,r){let n={payload:{DATA_TYPE:"rename",...t?.payload},headers:{...z("POST"),...t?.headers}};return o({service:p,scope:c.ALL,path:`/v0.10/operation/endpoint/${e}/rename`,method:"POST"},n,r)},In=function(e,t,r){let n={payload:{DATA_TYPE:"symlink",...t?.payload},headers:{...z("POST"),...t?.headers}};return o({service:p,scope:c.ALL,path:`/v0.10/operation/endpoint/${e}/symlink`,method:"POST"},n,r)},kn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/operation/endpoint/${e}/stat`},t,r)};var st={};u(st,{submissionId:()=>Cn,submitDelete:()=>wn,submitTransfer:()=>Mn});var wn=function(e,t){let r={payload:{DATA_TYPE:"delete",...e?.payload},headers:{...z("POST"),...e?.headers}};return o({service:p,scope:c.ALL,path:"/v0.10/delete",method:"POST"},r,t)},Mn=function(e,t){let r={payload:{DATA_TYPE:"transfer",...e?.payload},headers:{...z("POST"),...e?.headers}};return o({service:p,scope:c.ALL,path:"/v0.10/transfer",method:"POST"},r,t)},Cn=function(e,t){return o({service:p,scope:c.ALL,path:"/v0.10/submission_id"},e,t)};var it={};u(it,{create:()=>Nn,get:()=>Ln,remove:()=>qn,update:()=>Fn});var Ln=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}`},t,r)},Nn=function(e,t){return e?.payload&&Object.assign(e.payload,{DATA_TYPE:"shared_endpoint"}),o({service:p,scope:c.ALL,path:"/v0.10/shared_endpoint",method:"POST"},e,t)},Fn=function(e,t,r){return t?.payload&&Object.assign(t.payload,{DATA_TYPE:"endpoint"}),o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}`,method:"PUT"},t,r)},qn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}`,method:"DELETE"},t,r)};var at={};u(at,{cancel:()=>Jn,get:()=>Gn,getAll:()=>jn,getEventList:()=>Hn,getPauseInfo:()=>Yn,getSkippedErrors:()=>zn,getSuccessfulTransfers:()=>Bn,remove:()=>$n,update:()=>Un});var jn=function(e={},t){return o({service:p,scope:c.ALL,path:"/v0.10/task_list"},e,t)},Gn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/task/${e}`},t,r)},Un=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/task/${e}`,method:"PUT"},t,r)},Jn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/task/${e}/cancel`,method:"POST"},t,r)},$n=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/task/${e}/remove`,method:"POST"},t,r)},Hn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/task/${e}/event_list`},t,r)},Bn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/task/${e}/successful_transfers`},t,r)},zn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/task/${e}/skipped_errors`},t,r)},Yn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/task/${e}/pause_info`},t,r)};var pt={};u(pt,{create:()=>Kn,get:()=>Wn,getAll:()=>Vn,remove:()=>Xn,update:()=>Qn});var Vn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/access_list`},t,r)},Kn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/access`,method:"POST"},t,r)},Wn=function({endpoint_xid:e,id:t},r,n){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/access/${t}`},r,n)},Qn=function({endpoint_xid:e,id:t},r,n){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/access/${t}`,method:"PUT"},r,n)},Xn=function({endpoint_xid:e,id:t},r,n){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/access/${t}`,method:"DELETE"},r,n)};var ct={};u(ct,{create:()=>to,get:()=>eo,getAll:()=>Zn,remove:()=>ro});var Zn=function(e,t={},r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/role_list`},t,r)},eo=function({endpoint_id:e,role_id:t},r,n){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/role/${t}`},r,n)},to=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/role`,method:"POST"},t,r)},ro=function({collection_id:e,role_id:t},r,n){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/role/${t}`,method:"DELETE"},r,n)};var ut={};u(ut,{create:()=>oo,get:()=>so,getAll:()=>no,remove:()=>ao,update:()=>io});var no=function(e,t){return o({service:p,scope:c.ALL,path:"/v0.10/bookmark_list"},e,t)},oo=function(e,t){return o({service:p,scope:c.ALL,path:"/v0.10/bookmark",method:"POST"},e,t)},so=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/bookmark/${e}`},t,r)},io=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/bookmark/${e}`,method:"PUT"},t,r)},ao=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/bookmark/${e}`,method:"DELETE"},t,r)};var ht={};u(ht,{endpoint:()=>dt,pauseRule:()=>lt,task:()=>mt});var dt={};u(dt,{get:()=>po,getAccessList:()=>uo,getHostedEndpoints:()=>co,getMonitoredEndpoints:()=>lo});var po=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/endpoint/${e}`},t,r)},co=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/endpoint/${e}/hosted_endpoint_list`},t,r)},uo=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/endpoint/${e}/access_list`},t,r)},lo=function(e={},t){return o({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/monitored_endpoints"},e,t)};var lt={};u(lt,{create:()=>ho,get:()=>fo,getAll:()=>mo,remove:()=>_o,update:()=>go});var mo=function(e,t){return o({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/pause_rule_list"},e,t)},ho=function(e,t){return o({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/pause_rule",method:"POST"},e,t)},fo=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/pause_rule/${e}`},t,r)},go=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/pause_rule/${e}`,method:"PUT"},t,r)},_o=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/pause_rule/${e}`,method:"DELETE"},t,r)};var mt={};u(mt,{cancel:()=>vo,get:()=>So,getAdminCancel:()=>Po,getAll:()=>yo,getEventList:()=>Oo,getPauseInfo:()=>bo,getSkippedErrors:()=>To,getSuccessfulTransfers:()=>Ao,pause:()=>Eo,resume:()=>Ro});var yo=function(e={},t){return o({service:p,scope:c.ALL,path:"/v0.10/task_list"},e,t)},So=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}`},t,r)},vo=function(e,t){return o({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/admin_cancel",method:"POST"},e,t)},Po=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/admin_cancel/${e}`,method:"POST"},t,r)},Oo=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}/event_list`},t,r)},Ao=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}/successful_transfers`},t,r)},To=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}/skipped_errors`},t,r)},Eo=function(e,t){return o({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/admin_pause",method:"POST"},e,t)},Ro=function(e,t){return o({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/admin_resume",method:"POST"},e,t)},bo=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}/pause_info`},t,r)};var St={};u(St,{GLOBUS_DNS_DOMAINS:()=>br,getDomainFromEndpoint:()=>Io,isDirectory:()=>xo,isFileDocument:()=>Rr,isGlobusHostname:()=>xr,readableBytes:()=>Do});function Rr(e){return typeof e=="object"&&e!==null&&"DATA_TYPE"in e&&e.DATA_TYPE==="file"}function xo(e){return Rr(e)&&e.type==="dir"}var ft=1e3,gt=ft*1e3,_t=gt*1e3,yt=_t*1e3,Er=yt*1e3;function Do(e,t=2){let r="B",n=1;if(e<ft)return`${e} ${r}`;e<gt?(r="KB",n=ft):e<_t?(r="MB",n=gt):e<yt?(r="GB",n=_t):e<Er?(r="TB",n=yt):(r="PB",n=Er);let i=e/n,[d,h]=`${i}`.split("."),f=`${d}`;if(h&&h.length){let T=h.slice(0,t);T.length&&(f=`${d}.${T}`)}return`${f} ${r}`}var br=["dnsteam.globuscs.info","data.globus.org","dn.glob.us","gaccess.io"];function xr(e){return!!br.find(t=>e.endsWith(`.${t}`))}function Io(e){let{tlsftp_server:t}=e;if(!t||typeof t!="string")return null;let{hostname:r}=new URL(t.replace("tlsftp","https"));return!xr(r)&&/(?:[gm]-\w{6}.)?([\w-]+(\.[\w-]+)+)$/.exec(r)?.[1]||r||null}var ko=le;var Rt={};u(Rt,{CONFIG:()=>Bo,entry:()=>At,index:()=>Et,query:()=>Pt,subject:()=>Ot});var Pt={};u(Pt,{get:()=>wo,post:()=>Mo});var wo=function(e,t,r){return o({service:S,scope:R.SEARCH,path:`/v1/index/${e}/search`},t,r)},Mo=function(e,t,r){return o({service:S,scope:R.SEARCH,path:`/v1/index/${e}/search`,method:"POST"},t,r)};var Ot={};u(Ot,{get:()=>Co});var Co=function(e,t,r){return o({service:S,scope:R.SEARCH,path:`/v1/index/${e}/subject`},t,r)};var At={};u(At,{get:()=>Lo});var Lo=function(e,t,r){return o({service:S,scope:R.SEARCH,path:`/v1/index/${e}/entry`},t,r)};var Et={};u(Et,{create:()=>Uo,get:()=>jo,getAll:()=>Go,ingest:()=>Ho,remove:()=>Jo,reopen:()=>$o,roles:()=>Tt});var Tt={};u(Tt,{create:()=>Fo,getAll:()=>No,remove:()=>qo});var No=function(e,t,r){return o({service:S,scope:R.ALL,path:`/v1/index/${e}/role_list`},t,r)},Fo=function(e,t,r){return o({service:S,scope:R.ALL,path:`/v1/index/${e}/role`,method:"POST"},t,r)},qo=function({index_id:e,role_id:t},r,n){return o({service:S,scope:R.ALL,path:`/v1/index/${e}/role/${t}`,method:"DELETE"},r,n)};var jo=function(e,t,r){return o({service:S,path:`/v1/index/${e}`},t,r)},Go=function(e,t){return o({service:S,scope:R.ALL,path:"/v1/index_list"},e,t)},Uo=function(e,t){return o({service:S,scope:R.ALL,path:"/v1/index",method:"POST"},e,t)},Jo=function(e,t,r){return o({service:S,scope:R.ALL,path:`/v1/index/${e}`,method:"DELETE"},t,r)},$o=function(e,t,r){return o({service:S,scope:R.ALL,path:`/v1/index/${e}/reopen`,method:"POST"},t,r)},Ho=function(e,t,r){return o({service:S,scope:R.ALL,path:`/v1/index/${e}/ingest`,method:"POST"},t,r)};var Bo=ge;var It={};u(It,{CONFIG:()=>Wo,groups:()=>bt,membership:()=>Dt,policies:()=>xt});var bt={};u(bt,{get:()=>Yo,getMyGroups:()=>zo});var zo=function(e,t){return o({scope:j.ALL,path:"/v2/groups/my_groups",service:D},e,t)},Yo=function(e,t,r){return o({service:D,scope:j.ALL,path:`/v2/groups/${e}`},t,r)};var xt={};u(xt,{get:()=>Vo});var Vo=function(e,t,r){return o({scope:j.ALL,path:`/v2/groups/${e}/policies`,service:D},t,r)};var Dt={};u(Dt,{act:()=>Ko});var Ko=function(e,t,r){if(!t?.payload)throw new Error("payload is required.");return o({service:D,scope:j.ALL,path:`/v2/groups/${e}`,method:"POST"},t,r)};var Wo=fe;var Mt={};u(Mt,{CONFIG:()=>ds,flows:()=>kt,runs:()=>wt});var kt={};u(kt,{create:()=>Dr,deploy:()=>rs,get:()=>Xo,getAll:()=>Qo,remove:()=>Zo,run:()=>es,update:()=>ns,validate:()=>ts});var Qo=function(e,t){return o({service:P,scope:x.VIEW_FLOWS,path:"/flows"},e,t)},Xo=function(e,t,r){return o({service:P,scope:x.VIEW_FLOWS,path:`/flows/${e}`},t,r)},Zo=function(e,t,r){return o({scope:x.MANAGE_FLOWS,service:P,path:`/flows/${e}`,method:"DELETE"},t,r)},es=function(e,t,r){return o({service:P,scope:x.VIEW_FLOWS,path:`/flows/${e}/run`,method:"POST"},t,r)},ts=function(e,t){return o({service:P,scope:x.MANAGE_FLOWS,path:"/flows/validate",method:"POST"},e,t)},Dr=function(e,t){return o({service:P,scope:x.MANAGE_FLOWS,path:"/flows",method:"POST"},e,t)},rs=Dr,ns=function(e,t,r){return o({service:P,scope:x.MANAGE_FLOWS,path:`/flows/${e}`,method:"PUT"},t,r)};var wt={};u(wt,{cancel:()=>is,get:()=>ss,getAll:()=>os,getDefinition:()=>us,getLog:()=>as,remove:()=>cs,update:()=>ps});var os=function(e={},t){return o({service:P,scope:x.RUN_MANAGE,path:"/runs"},e,t)},ss=function(e,t,r){return o({service:P,scope:x.RUN_MANAGE,path:`/runs/${e}`},t,r)},is=function(e,t,r){return o({service:P,scope:x.RUN_MANAGE,path:`/runs/${e}/cancel`,method:"POST"},t,r)},as=function(e,t,r){return o({service:P,scope:x.RUN_MANAGE,path:`/runs/${e}/log`},t,r)},ps=function(e,t,r){return o({service:P,scope:x.RUN_MANAGE,path:`/runs/${e}`,method:"PUT"},t,r)},cs=function(e,t,r){return o({service:P,scope:x.RUN_MANAGE,path:`/runs/${e}/release`,method:"POST"},t,r)},us=function(e,t,r){return o({service:P,scope:x.RUN_MANAGE,path:`/runs/${e}/definition`,method:"GET"},t,r)};var ds=me;var Ht={};u(Ht,{collections:()=>Ct,endpoint:()=>Lt,getScopes:()=>Zs,https:()=>Nt,nodes:()=>Ft,roles:()=>qt,storageGateways:()=>jt,userCredentials:()=>Gt,utils:()=>$t,versioning:()=>Jt});var Ct={};u(Ct,{create:()=>fs,get:()=>ms,getAll:()=>ls,patch:()=>_s,remove:()=>hs,resetOwnerString:()=>Ss,update:()=>gs,updateOwnerString:()=>ys});var ls=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/collections"},t,r)},ms=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}`},r,n)},hs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}`,method:"DELETE"},r,n)},fs=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/collections",method:"POST"},t,r)},gs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}`,method:"PUT"},r,n)},_s=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}`,method:"PATCH"},r,n)},ys=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}/owner_string`,method:"PUT"},r,n)},Ss=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}/owner_string`,method:"DELETE"},r,n)};var Lt={};u(Lt,{get:()=>vs,patch:()=>Os,resetOwnerString:()=>Rs,update:()=>Ps,updateOwner:()=>Ts,updateOwnerString:()=>Es,updateSubscriptionId:()=>As});var vs=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/endpoint"},t,r)},Ps=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/endpoint",method:"PUT"},t,r)},Os=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/endpoint",method:"PATCH"},t,r)},As=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/endpoint/subscription_id",method:"PUT"},t,r)},Ts=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/endpoint/owner",method:"PUT"},t,r)},Es=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/endpoint/owner_string",method:"PUT"},t,r)},Rs=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/endpoint/owner_string",method:"DELETE"},t,r)};var Nt={};u(Nt,{get:()=>bs,remove:()=>xs,update:()=>Ds});var bs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:t},r,n)},xs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:t,method:"DELETE"},r,n)},Ds=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:t,method:"PUT"},r,n)};var Ft={};u(Ft,{create:()=>Ms,get:()=>ks,getAll:()=>Is,patch:()=>Ls,remove:()=>ws,update:()=>Cs});var Is=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/nodes"},t,r)},ks=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/nodes/${t}`},r,n)},ws=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/nodes/${t}`,method:"DELETE"},r,n)},Ms=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/nodes",method:"POST"},t,r)},Cs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/nodes/${t}`,method:"PUT"},r,n)},Ls=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/nodes/${t}`,method:"PATCH"},r,n)};var qt={};u(qt,{create:()=>js,get:()=>Fs,getAll:()=>Ns,remove:()=>qs});var Ns=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/roles"},t,r)},Fs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/roles/${t}`},r,n)},qs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/roles/${t}`,method:"DELETE"},r,n)},js=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/roles",method:"POST"},t,r)};var jt={};u(jt,{create:()=>$s,get:()=>Us,getAll:()=>Gs,patch:()=>Bs,remove:()=>Js,update:()=>Hs});var Gs=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/storage_gateways"},t,r)},Us=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/storage_gateways/${t}`},r,n)},Js=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/storage_gateways/${t}`,method:"DELETE"},r,n)},$s=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/storage_gateways",method:"POST"},t,r)},Hs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/storage_gateways/${t}`,method:"PUT"},r,n)},Bs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/storage_gateways/${t}`,method:"PATCH"},r,n)};var Gt={};u(Gt,{create:()=>Ks,get:()=>Ys,getAll:()=>zs,patch:()=>Qs,remove:()=>Vs,update:()=>Ws});var zs=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/user_credentials"},t,r)},Ys=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/user_credentials/${t}`},r,n)},Vs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/user_credentials/${t}`,method:"DELETE"},r,n)},Ks=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/user_credentials",method:"POST"},t,r)},Ws=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/user_credentials/${t}`,method:"PUT"},r,n)},Qs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/user_credentials/${t}`,method:"PATCH"},r,n)};var Jt={};u(Jt,{info:()=>Ut});var Ut=function(e,t,r){return o({service:e,path:"/api/info"},t,r)};var $t={};u($t,{getEndpointIdFromURL:()=>Xs,getGCSDomainFromURL:()=>Ir});var pe="data.globus.org";function Ir(e){let{host:t}=typeof e=="string"?new URL(e):e;if(!t.endsWith(pe))return t;let[r]=t.split(`.${pe}`),n=r.split(".");return(n.length===2?[...n,pe]:[n[1],n[2],pe]).join(".")}async function Xs(e){let t=typeof e=="string"?new URL(e):e;if(!t.host.endsWith(pe))return null;let i=(await(await Ut({host:`https://${Ir(t)}`})).json()).data?.filter(d=>d.DATA_TYPE.startsWith("info#"))[0];return i&&"endpoint_id"in i?i.endpoint_id:null}var kr={HIGH_ASSURANCE:"urn:globus:auth:scope:<ENDPOINT_ID>:manage_collections",NON_HIGH_ASSURANCE:"urn:globus:auth:scope:<ENDPOINT_ID>:manage_collections[*https://auth.globus.org/scopes/<MAPPED_COLLECTION_ID>/data_access]"};function Zs(e,t){let{endpoint_id:r}=e;if(!r)throw new Error("An 'endpoint_id' is required to determine the required scopes");return t?kr[t].replace("<ENDPOINT_ID>",r):Object.entries(kr).reduce((n,[i,d])=>({...n,[i]:d.replace("<ENDPOINT_ID>",r)}),{})}var Yt={};u(Yt,{CONFIG:()=>ai,jobs:()=>zt,timer:()=>Bt});var Bt={};u(Bt,{create:()=>ei});var ei=function(e,t){return o({service:O,resource_server:I.TIMERS,path:"/v2/timer",method:"POST"},e,t)};var zt={};u(zt,{get:()=>ri,getAll:()=>ti,patch:()=>ni,pause:()=>oi,remove:()=>ii,resume:()=>si});var ti=function(e,t){return o({service:O,resource_server:I[O],path:"/jobs",method:"GET"},e,t)},ri=function(e,t,r){return o({service:O,resource_server:I[O],path:`/jobs/${e}`,method:"GET"},t,r)},ni=function(e,t,r){return o({service:O,resource_server:I[O],path:`/jobs/${e}`,method:"PATCH"},t,r)},oi=function(e,t,r){return o({service:O,resource_server:I[O],path:`/jobs/${e}/pause`,method:"POST"},t,r)},si=function(e,t,r){return o({service:O,resource_server:I[O],path:`/jobs/${e}/resume`,method:"POST"},t,r)},ii=function(e,t,r){return o({service:O,resource_server:I[O],path:`/jobs/${e}`,method:"DELETE"},t,r)};var ai=he;var Kt={};u(Kt,{CONFIG:()=>mi,endpoints:()=>Vt});var Vt={};u(Vt,{get:()=>ci,getAll:()=>pi,getStatus:()=>ui,remove:()=>li,update:()=>di});var pi=function(e,t){return o({service:w,scope:B.ALL,path:"/v2/endpoints",method:"GET"},e,t)},ci=function(e,t,r){return o({service:w,scope:B.ALL,path:`/v2/endpoints/${e}`,method:"GET"},t,r)},ui=function(e,t,r){return o({service:w,scope:B.ALL,path:`/v2/endpoints/${e}/status`},t,r)},di=function(e,t,r){return o({service:w,scope:B.ALL,path:`/v3/endpoints/${e}`,method:"PUT"},t,r)},li=function(e,t,r){return o({service:w,scope:B.ALL,path:`/v2/endpoints/${e}`,method:"DELETE"},t,r)};var mi=_e;var Wt={};u(Wt,{HOSTS:()=>wr,host:()=>Mr,url:()=>Cr,urlFor:()=>fi});var wr={integration:"app.integration.globuscs.info",sandbox:"app.sandbox.globuscs.info",test:"app.test.globuscs.info",staging:"app.staging.globuscs.info",preview:"app.preview.globus.org",production:"app.globus.org"};function Mr(e=K()){return wr[e]}function Cr(e,t){return new URL(e||"",`https://${Mr(t?.environment)}`)}var hi={TASK:"/activity/%s/overview",COLLECTION:"/file-manager/collections/%s/overview",ENDPOINT:"/file-manager/collections/%s/overview"};function fi(e,t,r){let n=hi[e].replace(/%s/g,t?.join("/")||"");return Cr(n,r)}return Vr(gi);})();
3
3
  //# sourceMappingURL=globus.production.js.map