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