@stacksjs/buddy 0.70.18 → 0.70.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-52kyqrp3.js → chunk-0evg5jp6.js} +1 -1
- package/dist/chunk-0g26g7ka.js +2 -0
- package/dist/{chunk-cqn8te7s.js → chunk-2qmcf9vp.js} +1 -1
- package/dist/{chunk-0jxg9wtp.js → chunk-3gg1gwg5.js} +2 -2
- package/dist/{chunk-g30vw45j.js → chunk-3jjq84ww.js} +151 -151
- package/dist/{chunk-5tcm3e40.js → chunk-6tfy93kv.js} +1 -1
- package/dist/{chunk-t6dr6rak.js → chunk-76q55r9x.js} +1 -1
- package/dist/{chunk-38tjpppq.js → chunk-7cmkzkmc.js} +1 -1
- package/dist/chunk-aydc3pns.js +10 -0
- package/dist/{chunk-x63gk2p6.js → chunk-b1s03qnq.js} +1 -1
- package/dist/{chunk-6cj2q4z5.js → chunk-d2kb25t6.js} +1 -1
- package/dist/{chunk-yfn5e0ky.js → chunk-g1f16je5.js} +1 -1
- package/dist/chunk-ga357601.js +2 -0
- package/dist/{chunk-hytw59py.js → chunk-jgcb2h70.js} +1 -1
- package/dist/chunk-kxq03s4j.js +2 -0
- package/dist/{chunk-8shfhpe4.js → chunk-n549129b.js} +1 -1
- package/dist/chunk-p8rsk0jk.js +2 -0
- package/dist/{chunk-bd2fcep6.js → chunk-rcdezkfx.js} +1 -1
- package/dist/{chunk-fbvjqk5b.js → chunk-s60z5tm3.js} +1 -1
- package/dist/{chunk-mznacez6.js → chunk-t1e7ryas.js} +1 -1
- package/dist/chunk-v07vvpcr.js +1 -0
- package/dist/{chunk-32hzcz6w.js → chunk-v649k10a.js} +1 -1
- package/dist/chunk-w2b5c4s1.js +3 -0
- package/dist/chunk-wchdk5rr.js +1 -0
- package/dist/chunk-wy8d4q00.js +6 -0
- package/dist/chunk-x0j2dg1x.js +3 -0
- package/dist/{chunk-ecyvtfdz.js → chunk-xe04sf1b.js} +2 -2
- package/dist/{chunk-hc21eaj7.js → chunk-xv24dwhq.js} +1 -1
- package/dist/{chunk-46gp2nz5.js → chunk-y0kfnrfm.js} +2 -2
- package/dist/{chunk-tgjbbxam.js → chunk-y8ps0h71.js} +1 -1
- package/dist/{chunk-t1zcfas5.js → chunk-zs3ndhp8.js} +2 -2
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +45 -45
- package/dist/chunk-7qshr3j6.js +0 -1
- package/dist/chunk-adkpvcss.js +0 -2
- package/dist/chunk-bt8w5dcz.js +0 -2
- package/dist/chunk-d8m7se01.js +0 -6
- package/dist/chunk-ejjg44ge.js +0 -2
- package/dist/chunk-kjs2w927.js +0 -5
- package/dist/chunk-mcrcnw62.js +0 -3
- package/dist/chunk-mnxsveqe.js +0 -10
- package/dist/chunk-xf3x08tz.js +0 -2
- package/dist/chunk-zxb0bj0c.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_c as QZ,ad as ZZ}from"./chunk-yfn5e0ky.js";var U_=ZZ((BO,N_)=>{var B_,d0,i0,o0,n0,r0,U0,m1,C0,s0,M_,a0,w0,t0,e0,_1,e,J_,z1,Z1,OZ;t0=/\/(?![*\/])(?:\[(?:[^\]\\\n\r\u2028\u2029]+|\\.)*\]?|[^\/[\\\n\r\u2028\u2029]+|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu;w0=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y;d0=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]+|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu;_1=/(['"])(?:[^'"\\\n\r]+|(?!\1)['"]|\\(?:\r\n|[^]))*(\1)?/y;a0=/(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y;e=/[`}](?:[^`\\$]+|\\[^]|\$(?!\{))*(`|\$\{)?/y;Z1=/[\t\v\f\ufeff\p{Zs}]+/yu;C0=/\r?\n|[\r\u2028\u2029]/y;s0=/\/\*(?:[^*]+|\*(?!\/))*(\*\/)?/y;e0=/\/\/.*/y;B_=/^#!.*/;o0=/[<>.:={}]|\/(?![\/*])/y;i0=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu;n0=/(['"])(?:[^'"]+|(?!\1)['"])*(\1)?/y;r0=/[^<>{}]+/y;z1=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/;J_=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/;U0=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/;m1=/^(?:return|throw|yield)$/;M_=RegExp(C0.source);N_.exports=OZ=function*(_,{jsx:z=!1}={}){var Z,O,Q,j,H,$,K,W,Y,G,V,q,C,B;if({length:$}=_,j=0,H="",B=[{tag:"JS"}],Z=[],V=0,q=!1,K=B_.exec(_))yield{type:"HashbangComment",value:K[0]},j=K[0].length;while(j<$){switch(W=B[B.length-1],W.tag){case"JS":case"JSNonExpressionParen":case"InterpolationInTemplate":case"InterpolationInJSX":if(_[j]==="/"&&(z1.test(H)||U0.test(H))){if(t0.lastIndex=j,K=t0.exec(_)){j=t0.lastIndex,H=K[0],q=!0,yield{type:"RegularExpressionLiteral",value:K[0],closed:K[1]!==void 0&&K[1]!=="\\"};continue}}if(w0.lastIndex=j,K=w0.exec(_)){switch(C=K[0],Y=w0.lastIndex,G=C,C){case"(":if(H==="?NonExpressionParenKeyword")B.push({tag:"JSNonExpressionParen",nesting:V});V++,q=!1;break;case")":if(V--,q=!0,W.tag==="JSNonExpressionParen"&&V===W.nesting)B.pop(),G="?NonExpressionParenEnd",q=!1;break;case"{":w0.lastIndex=0,Q=!J_.test(H)&&(z1.test(H)||U0.test(H)),Z.push(Q),q=!1;break;case"}":switch(W.tag){case"InterpolationInTemplate":if(Z.length===W.nesting){if(e.lastIndex=j,K=e.exec(_),j=e.lastIndex,H=K[0],K[1]==="${")H="?InterpolationInTemplate",q=!1,yield{type:"TemplateMiddle",value:K[0]};else B.pop(),q=!0,yield{type:"TemplateTail",value:K[0],closed:K[1]==="`"};continue}break;case"InterpolationInJSX":if(Z.length===W.nesting){B.pop(),j+=1,H="}",yield{type:"JSXPunctuator",value:"}"};continue}}q=Z.pop(),G=q?"?ExpressionBraceEnd":"}";break;case"]":q=!0;break;case"++":case"--":G=q?"?PostfixIncDec":"?UnaryIncDec";break;case"<":if(z&&(z1.test(H)||U0.test(H))){B.push({tag:"JSXTag"}),j+=1,H="<",yield{type:"JSXPunctuator",value:C};continue}q=!1;break;default:q=!1}j=Y,H=G,yield{type:"Punctuator",value:C};continue}if(d0.lastIndex=j,K=d0.exec(_)){switch(j=d0.lastIndex,G=K[0],K[0]){case"for":case"if":case"while":case"with":if(H!=="."&&H!=="?.")G="?NonExpressionParenKeyword"}H=G,q=!U0.test(K[0]),yield{type:K[1]==="#"?"PrivateIdentifier":"IdentifierName",value:K[0]};continue}if(_1.lastIndex=j,K=_1.exec(_)){j=_1.lastIndex,H=K[0],q=!0,yield{type:"StringLiteral",value:K[0],closed:K[2]!==void 0};continue}if(a0.lastIndex=j,K=a0.exec(_)){j=a0.lastIndex,H=K[0],q=!0,yield{type:"NumericLiteral",value:K[0]};continue}if(e.lastIndex=j,K=e.exec(_)){if(j=e.lastIndex,H=K[0],K[1]==="${")H="?InterpolationInTemplate",B.push({tag:"InterpolationInTemplate",nesting:Z.length}),q=!1,yield{type:"TemplateHead",value:K[0]};else q=!0,yield{type:"NoSubstitutionTemplate",value:K[0],closed:K[1]==="`"};continue}break;case"JSXTag":case"JSXTagEnd":if(o0.lastIndex=j,K=o0.exec(_)){switch(j=o0.lastIndex,G=K[0],K[0]){case"<":B.push({tag:"JSXTag"});break;case">":if(B.pop(),H==="/"||W.tag==="JSXTagEnd")G="?JSX",q=!0;else B.push({tag:"JSXChildren"});break;case"{":B.push({tag:"InterpolationInJSX",nesting:Z.length}),G="?InterpolationInJSX",q=!1;break;case"/":if(H==="<"){if(B.pop(),B[B.length-1].tag==="JSXChildren")B.pop();B.push({tag:"JSXTagEnd"})}}H=G,yield{type:"JSXPunctuator",value:K[0]};continue}if(i0.lastIndex=j,K=i0.exec(_)){j=i0.lastIndex,H=K[0],yield{type:"JSXIdentifier",value:K[0]};continue}if(n0.lastIndex=j,K=n0.exec(_)){j=n0.lastIndex,H=K[0],yield{type:"JSXString",value:K[0],closed:K[2]!==void 0};continue}break;case"JSXChildren":if(r0.lastIndex=j,K=r0.exec(_)){j=r0.lastIndex,H=K[0],yield{type:"JSXText",value:K[0]};continue}switch(_[j]){case"<":B.push({tag:"JSXTag"}),j++,H="<",yield{type:"JSXPunctuator",value:"<"};continue;case"{":B.push({tag:"InterpolationInJSX",nesting:Z.length}),j++,H="?InterpolationInJSX",q=!1,yield{type:"JSXPunctuator",value:"{"};continue}}if(Z1.lastIndex=j,K=Z1.exec(_)){j=Z1.lastIndex,yield{type:"WhiteSpace",value:K[0]};continue}if(C0.lastIndex=j,K=C0.exec(_)){if(j=C0.lastIndex,q=!1,m1.test(H))H="?NoLineTerminatorHere";yield{type:"LineTerminatorSequence",value:K[0]};continue}if(s0.lastIndex=j,K=s0.exec(_)){if(j=s0.lastIndex,M_.test(K[0])){if(q=!1,m1.test(H))H="?NoLineTerminatorHere"}yield{type:"MultiLineComment",value:K[0],closed:K[1]!==void 0};continue}if(e0.lastIndex=j,K=e0.exec(_)){j=e0.lastIndex,q=!1,yield{type:"SingleLineComment",value:K[0]};continue}O=String.fromCodePoint(_.codePointAt(j)),j+=O.length,H=O,q=!1,yield{type:W.tag.startsWith("JSX")?"JSXInvalid":"Invalid",value:O}}return}});var D_=/^[A-Za-z]:\//;function K0(_=""){if(!_)return _;return _.replace(/\\/g,"/").replace(D_,(z)=>z.toUpperCase())}var v_=/^[/\\]{2}/,y_=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,i1=/^[A-Za-z]:$/,d1=/^\/([A-Za-z]:)?$/,S_=/.(\.[^./]+|\.)$/,f_=/^[/\\]|^[a-zA-Z]:[/\\]/;var o1=function(_){if(_.length===0)return".";_=K0(_);let z=_.match(v_),Z=l(_),O=_[_.length-1]==="/";if(_=j1(_,!Z),_.length===0){if(Z)return"/";return O?"./":"."}if(O)_+="/";if(i1.test(_))_+="/";if(z){if(!Z)return`//./${_}`;return`//${_}`}return Z&&!l(_)?`/${_}`:_},I_=function(..._){let z="";for(let Z of _){if(!Z)continue;if(z.length>0){let O=z[z.length-1]==="/",Q=Z[0]==="/";if(O&&Q)z+=Z.slice(1);else z+=O||Q?Z:`/${Z}`}else z+=Z}return o1(z)};function b_(){if(typeof process!=="undefined"&&typeof process.cwd==="function")return process.cwd().replace(/\\/g,"/");return"/"}var $0=function(..._){_=_.map((O)=>K0(O));let z="",Z=!1;for(let O=_.length-1;O>=-1&&!Z;O--){let Q=O>=0?_[O]:b_();if(!Q||Q.length===0)continue;z=`${Q}/${z}`,Z=l(Q)}if(z=j1(z,!Z),Z&&!l(z))return`/${z}`;return z.length>0?z:"."};function j1(_,z){let Z="",O=0,Q=-1,j=0,H=null;for(let $=0;$<=_.length;++$){if($<_.length)H=_[$];else if(H==="/")break;else H="/";if(H==="/"){if(Q===$-1||j===1);else if(j===2){if(Z.length<2||O!==2||Z[Z.length-1]!=="."||Z[Z.length-2]!=="."){if(Z.length>2){let K=Z.lastIndexOf("/");if(K===-1)Z="",O=0;else Z=Z.slice(0,K),O=Z.length-1-Z.lastIndexOf("/");Q=$,j=0;continue}else if(Z.length>0){Z="",O=0,Q=$,j=0;continue}}if(z)Z+=Z.length>0?"/..":"..",O=2}else{if(Z.length>0)Z+=`/${_.slice(Q+1,$)}`;else Z=_.slice(Q+1,$);O=$-Q-1}Q=$,j=0}else if(H==="."&&j!==-1)++j;else j=-1}return Z}var l=function(_){return y_.test(_)};var n1=function(_){if(_==="..")return"";let z=S_.exec(K0(_));return z&&z[1]||""},H1=function(_,z){let Z=$0(_).replace(d1,"$1").split("/"),O=$0(z).replace(d1,"$1").split("/");if(O[0][1]===":"&&Z[0][1]===":"&&Z[0]!==O[0])return O.join("/");let Q=[...Z];for(let j of Q){if(O[0]!==j)break;Z.shift(),O.shift()}return[...Z.map(()=>".."),...O].join("/")},r1=function(_){let z=K0(_).replace(/\/$/,"").split("/").slice(0,-1);if(z.length===1&&i1.test(z[0]))z[0]+="/";return z.join("/")||(l(_)?"/":".")};var s1=function(_,z){let Z=K0(_).split("/"),O="";for(let Q=Z.length-1;Q>=0;Q--){let j=Z[Q];if(j){O=j;break}}return z&&O.endsWith(z)?O.slice(0,-z.length):O},k_=function(_){let z=f_.exec(_)?.[0]?.replace(/\\/g,"/")||"",Z=s1(_),O=n1(Z);return{root:z,dir:r1(_),base:Z,ext:O,name:Z.slice(0,Z.length-O.length)}};var x_=/\d/,h_=["-","_","/","."];function g_(_=""){if(x_.test(_))return;return _!==_.toLowerCase()}function a1(_,z){let Z=z??h_,O=[];if(!_||typeof _!=="string")return O;let Q="",j,H;for(let $ of _){let K=Z.includes($);if(K===!0){O.push(Q),Q="",j=void 0;continue}let W=g_($);if(H===!1){if(j===!1&&W===!0){O.push(Q),Q=$,j=W;continue}if(j===!0&&W===!1&&Q.length>1){let Y=Q.at(-1);O.push(Q.slice(0,Math.max(0,Q.length-1))),Q=Y+$,j=W;continue}}Q+=$,j=W,H=K}return O.push(Q),O}function u_(_){return _?_[0].toUpperCase()+_.slice(1):""}function m_(_){return _?_[0].toLowerCase()+_.slice(1):""}function l_(_,z){return _?(Array.isArray(_)?_:a1(_)).map((Z)=>u_(z?.normalize?Z.toLowerCase():Z)).join(""):""}function R1(_,z){return m_(l_(_||"",z))}function T0(_,z){return _?(Array.isArray(_)?_:a1(_)).map((Z)=>Z.toLowerCase()).join(z??"-"):""}var _2=new Uint8Array(64),p_=new Uint8Array(128);for(let _=0;_<64;_++){let z="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(_);_2[_]=z,p_[z]=_}function W0(_,z,Z){let O=z-Z;O=O<0?-O<<1|1:O<<1;do{let Q=O&31;if(O>>>=5,O>0)Q|=32;_.write(_2[Q])}while(O>0);return z}var t1=16384,e1=typeof TextDecoder!=="undefined"?new TextDecoder:typeof Buffer!=="undefined"?{decode(_){return Buffer.from(_.buffer,_.byteOffset,_.byteLength).toString()}}:{decode(_){let z="";for(let Z=0;Z<_.length;Z++)z+=String.fromCharCode(_[Z]);return z}};class z2{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(t1)}write(_){let{buffer:z}=this;if(z[this.pos++]=_,this.pos===t1)this.out+=e1.decode(z),this.pos=0}flush(){let{buffer:_,out:z,pos:Z}=this;return Z>0?z+e1.decode(_.subarray(0,Z)):z}}function Z2(_){let z=new z2,Z=0,O=0,Q=0,j=0;for(let H=0;H<_.length;H++){let $=_[H];if(H>0)z.write(59);if($.length===0)continue;let K=0;for(let W=0;W<$.length;W++){let Y=$[W];if(W>0)z.write(44);if(K=W0(z,Y[0],K),Y.length===1)continue;if(Z=W0(z,Y[1],Z),O=W0(z,Y[2],O),Q=W0(z,Y[3],Q),Y.length===4)continue;j=W0(z,Y[4],j)}}return z.flush()}class E0{constructor(_){this.bits=_ instanceof E0?_.bits.slice():[]}add(_){this.bits[_>>5]|=1<<(_&31)}has(_){return!!(this.bits[_>>5]&1<<(_&31))}}class G0{constructor(_,z,Z){this.start=_,this.end=z,this.original=Z,this.intro="",this.outro="",this.content=Z,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(_){this.outro+=_}appendRight(_){this.intro=this.intro+_}clone(){let _=new G0(this.start,this.end,this.original);return _.intro=this.intro,_.outro=this.outro,_.content=this.content,_.storeName=this.storeName,_.edited=this.edited,_}contains(_){return this.start<_&&_<this.end}eachNext(_){let z=this;while(z)_(z),z=z.next}eachPrevious(_){let z=this;while(z)_(z),z=z.previous}edit(_,z,Z){if(this.content=_,!Z)this.intro="",this.outro="";return this.storeName=z,this.edited=!0,this}prependLeft(_){this.outro=_+this.outro}prependRight(_){this.intro=_+this.intro}reset(){if(this.intro="",this.outro="",this.edited)this.content=this.original,this.storeName=!1,this.edited=!1}split(_){let z=_-this.start,Z=this.original.slice(0,z),O=this.original.slice(z);this.original=Z;let Q=new G0(_,this.end,O);if(Q.outro=this.outro,this.outro="",this.end=_,this.edited)Q.edit("",!1),this.content="";else this.content=Z;if(Q.next=this.next,Q.next)Q.next.previous=Q;return Q.previous=this,this.next=Q,Q}toString(){return this.intro+this.content+this.outro}trimEnd(_){if(this.outro=this.outro.replace(_,""),this.outro.length)return!0;let z=this.content.replace(_,"");if(z.length){if(z!==this.content){if(this.split(this.start+z.length).edit("",void 0,!0),this.edited)this.edit(z,this.storeName,!0)}return!0}else if(this.edit("",void 0,!0),this.intro=this.intro.replace(_,""),this.intro.length)return!0}trimStart(_){if(this.intro=this.intro.replace(_,""),this.intro.length)return!0;let z=this.content.replace(_,"");if(z.length){if(z!==this.content){let Z=this.split(this.end-z.length);if(this.edited)Z.edit(z,this.storeName,!0);this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(_,""),this.outro.length)return!0}}function c_(){if(typeof globalThis!=="undefined"&&typeof globalThis.btoa==="function")return(_)=>globalThis.btoa(unescape(encodeURIComponent(_)));else if(typeof Buffer==="function")return(_)=>Buffer.from(_,"utf-8").toString("base64");else return()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}var d_=c_();class Q2{constructor(_){if(this.version=3,this.file=_.file,this.sources=_.sources,this.sourcesContent=_.sourcesContent,this.names=_.names,this.mappings=Z2(_.mappings),typeof _.x_google_ignoreList!=="undefined")this.x_google_ignoreList=_.x_google_ignoreList;if(typeof _.debugId!=="undefined")this.debugId=_.debugId}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+d_(this.toString())}}function i_(_){let z=_.split(`
|
|
1
|
+
import{Yc as QZ,_c as ZZ}from"./chunk-g1f16je5.js";var U_=ZZ((BO,N_)=>{var B_,d0,i0,o0,n0,r0,U0,m1,C0,s0,M_,a0,w0,t0,e0,_1,e,J_,z1,Z1,OZ;t0=/\/(?![*\/])(?:\[(?:[^\]\\\n\r\u2028\u2029]+|\\.)*\]?|[^\/[\\\n\r\u2028\u2029]+|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu;w0=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y;d0=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]+|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu;_1=/(['"])(?:[^'"\\\n\r]+|(?!\1)['"]|\\(?:\r\n|[^]))*(\1)?/y;a0=/(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y;e=/[`}](?:[^`\\$]+|\\[^]|\$(?!\{))*(`|\$\{)?/y;Z1=/[\t\v\f\ufeff\p{Zs}]+/yu;C0=/\r?\n|[\r\u2028\u2029]/y;s0=/\/\*(?:[^*]+|\*(?!\/))*(\*\/)?/y;e0=/\/\/.*/y;B_=/^#!.*/;o0=/[<>.:={}]|\/(?![\/*])/y;i0=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu;n0=/(['"])(?:[^'"]+|(?!\1)['"])*(\1)?/y;r0=/[^<>{}]+/y;z1=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/;J_=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/;U0=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/;m1=/^(?:return|throw|yield)$/;M_=RegExp(C0.source);N_.exports=OZ=function*(_,{jsx:z=!1}={}){var Z,O,Q,j,H,$,K,W,Y,G,V,q,C,B;if({length:$}=_,j=0,H="",B=[{tag:"JS"}],Z=[],V=0,q=!1,K=B_.exec(_))yield{type:"HashbangComment",value:K[0]},j=K[0].length;while(j<$){switch(W=B[B.length-1],W.tag){case"JS":case"JSNonExpressionParen":case"InterpolationInTemplate":case"InterpolationInJSX":if(_[j]==="/"&&(z1.test(H)||U0.test(H))){if(t0.lastIndex=j,K=t0.exec(_)){j=t0.lastIndex,H=K[0],q=!0,yield{type:"RegularExpressionLiteral",value:K[0],closed:K[1]!==void 0&&K[1]!=="\\"};continue}}if(w0.lastIndex=j,K=w0.exec(_)){switch(C=K[0],Y=w0.lastIndex,G=C,C){case"(":if(H==="?NonExpressionParenKeyword")B.push({tag:"JSNonExpressionParen",nesting:V});V++,q=!1;break;case")":if(V--,q=!0,W.tag==="JSNonExpressionParen"&&V===W.nesting)B.pop(),G="?NonExpressionParenEnd",q=!1;break;case"{":w0.lastIndex=0,Q=!J_.test(H)&&(z1.test(H)||U0.test(H)),Z.push(Q),q=!1;break;case"}":switch(W.tag){case"InterpolationInTemplate":if(Z.length===W.nesting){if(e.lastIndex=j,K=e.exec(_),j=e.lastIndex,H=K[0],K[1]==="${")H="?InterpolationInTemplate",q=!1,yield{type:"TemplateMiddle",value:K[0]};else B.pop(),q=!0,yield{type:"TemplateTail",value:K[0],closed:K[1]==="`"};continue}break;case"InterpolationInJSX":if(Z.length===W.nesting){B.pop(),j+=1,H="}",yield{type:"JSXPunctuator",value:"}"};continue}}q=Z.pop(),G=q?"?ExpressionBraceEnd":"}";break;case"]":q=!0;break;case"++":case"--":G=q?"?PostfixIncDec":"?UnaryIncDec";break;case"<":if(z&&(z1.test(H)||U0.test(H))){B.push({tag:"JSXTag"}),j+=1,H="<",yield{type:"JSXPunctuator",value:C};continue}q=!1;break;default:q=!1}j=Y,H=G,yield{type:"Punctuator",value:C};continue}if(d0.lastIndex=j,K=d0.exec(_)){switch(j=d0.lastIndex,G=K[0],K[0]){case"for":case"if":case"while":case"with":if(H!=="."&&H!=="?.")G="?NonExpressionParenKeyword"}H=G,q=!U0.test(K[0]),yield{type:K[1]==="#"?"PrivateIdentifier":"IdentifierName",value:K[0]};continue}if(_1.lastIndex=j,K=_1.exec(_)){j=_1.lastIndex,H=K[0],q=!0,yield{type:"StringLiteral",value:K[0],closed:K[2]!==void 0};continue}if(a0.lastIndex=j,K=a0.exec(_)){j=a0.lastIndex,H=K[0],q=!0,yield{type:"NumericLiteral",value:K[0]};continue}if(e.lastIndex=j,K=e.exec(_)){if(j=e.lastIndex,H=K[0],K[1]==="${")H="?InterpolationInTemplate",B.push({tag:"InterpolationInTemplate",nesting:Z.length}),q=!1,yield{type:"TemplateHead",value:K[0]};else q=!0,yield{type:"NoSubstitutionTemplate",value:K[0],closed:K[1]==="`"};continue}break;case"JSXTag":case"JSXTagEnd":if(o0.lastIndex=j,K=o0.exec(_)){switch(j=o0.lastIndex,G=K[0],K[0]){case"<":B.push({tag:"JSXTag"});break;case">":if(B.pop(),H==="/"||W.tag==="JSXTagEnd")G="?JSX",q=!0;else B.push({tag:"JSXChildren"});break;case"{":B.push({tag:"InterpolationInJSX",nesting:Z.length}),G="?InterpolationInJSX",q=!1;break;case"/":if(H==="<"){if(B.pop(),B[B.length-1].tag==="JSXChildren")B.pop();B.push({tag:"JSXTagEnd"})}}H=G,yield{type:"JSXPunctuator",value:K[0]};continue}if(i0.lastIndex=j,K=i0.exec(_)){j=i0.lastIndex,H=K[0],yield{type:"JSXIdentifier",value:K[0]};continue}if(n0.lastIndex=j,K=n0.exec(_)){j=n0.lastIndex,H=K[0],yield{type:"JSXString",value:K[0],closed:K[2]!==void 0};continue}break;case"JSXChildren":if(r0.lastIndex=j,K=r0.exec(_)){j=r0.lastIndex,H=K[0],yield{type:"JSXText",value:K[0]};continue}switch(_[j]){case"<":B.push({tag:"JSXTag"}),j++,H="<",yield{type:"JSXPunctuator",value:"<"};continue;case"{":B.push({tag:"InterpolationInJSX",nesting:Z.length}),j++,H="?InterpolationInJSX",q=!1,yield{type:"JSXPunctuator",value:"{"};continue}}if(Z1.lastIndex=j,K=Z1.exec(_)){j=Z1.lastIndex,yield{type:"WhiteSpace",value:K[0]};continue}if(C0.lastIndex=j,K=C0.exec(_)){if(j=C0.lastIndex,q=!1,m1.test(H))H="?NoLineTerminatorHere";yield{type:"LineTerminatorSequence",value:K[0]};continue}if(s0.lastIndex=j,K=s0.exec(_)){if(j=s0.lastIndex,M_.test(K[0])){if(q=!1,m1.test(H))H="?NoLineTerminatorHere"}yield{type:"MultiLineComment",value:K[0],closed:K[1]!==void 0};continue}if(e0.lastIndex=j,K=e0.exec(_)){j=e0.lastIndex,q=!1,yield{type:"SingleLineComment",value:K[0]};continue}O=String.fromCodePoint(_.codePointAt(j)),j+=O.length,H=O,q=!1,yield{type:W.tag.startsWith("JSX")?"JSXInvalid":"Invalid",value:O}}return}});var D_=/^[A-Za-z]:\//;function K0(_=""){if(!_)return _;return _.replace(/\\/g,"/").replace(D_,(z)=>z.toUpperCase())}var v_=/^[/\\]{2}/,y_=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,i1=/^[A-Za-z]:$/,d1=/^\/([A-Za-z]:)?$/,S_=/.(\.[^./]+|\.)$/,f_=/^[/\\]|^[a-zA-Z]:[/\\]/;var o1=function(_){if(_.length===0)return".";_=K0(_);let z=_.match(v_),Z=l(_),O=_[_.length-1]==="/";if(_=j1(_,!Z),_.length===0){if(Z)return"/";return O?"./":"."}if(O)_+="/";if(i1.test(_))_+="/";if(z){if(!Z)return`//./${_}`;return`//${_}`}return Z&&!l(_)?`/${_}`:_},I_=function(..._){let z="";for(let Z of _){if(!Z)continue;if(z.length>0){let O=z[z.length-1]==="/",Q=Z[0]==="/";if(O&&Q)z+=Z.slice(1);else z+=O||Q?Z:`/${Z}`}else z+=Z}return o1(z)};function b_(){if(typeof process!=="undefined"&&typeof process.cwd==="function")return process.cwd().replace(/\\/g,"/");return"/"}var $0=function(..._){_=_.map((O)=>K0(O));let z="",Z=!1;for(let O=_.length-1;O>=-1&&!Z;O--){let Q=O>=0?_[O]:b_();if(!Q||Q.length===0)continue;z=`${Q}/${z}`,Z=l(Q)}if(z=j1(z,!Z),Z&&!l(z))return`/${z}`;return z.length>0?z:"."};function j1(_,z){let Z="",O=0,Q=-1,j=0,H=null;for(let $=0;$<=_.length;++$){if($<_.length)H=_[$];else if(H==="/")break;else H="/";if(H==="/"){if(Q===$-1||j===1);else if(j===2){if(Z.length<2||O!==2||Z[Z.length-1]!=="."||Z[Z.length-2]!=="."){if(Z.length>2){let K=Z.lastIndexOf("/");if(K===-1)Z="",O=0;else Z=Z.slice(0,K),O=Z.length-1-Z.lastIndexOf("/");Q=$,j=0;continue}else if(Z.length>0){Z="",O=0,Q=$,j=0;continue}}if(z)Z+=Z.length>0?"/..":"..",O=2}else{if(Z.length>0)Z+=`/${_.slice(Q+1,$)}`;else Z=_.slice(Q+1,$);O=$-Q-1}Q=$,j=0}else if(H==="."&&j!==-1)++j;else j=-1}return Z}var l=function(_){return y_.test(_)};var n1=function(_){if(_==="..")return"";let z=S_.exec(K0(_));return z&&z[1]||""},H1=function(_,z){let Z=$0(_).replace(d1,"$1").split("/"),O=$0(z).replace(d1,"$1").split("/");if(O[0][1]===":"&&Z[0][1]===":"&&Z[0]!==O[0])return O.join("/");let Q=[...Z];for(let j of Q){if(O[0]!==j)break;Z.shift(),O.shift()}return[...Z.map(()=>".."),...O].join("/")},r1=function(_){let z=K0(_).replace(/\/$/,"").split("/").slice(0,-1);if(z.length===1&&i1.test(z[0]))z[0]+="/";return z.join("/")||(l(_)?"/":".")};var s1=function(_,z){let Z=K0(_).split("/"),O="";for(let Q=Z.length-1;Q>=0;Q--){let j=Z[Q];if(j){O=j;break}}return z&&O.endsWith(z)?O.slice(0,-z.length):O},k_=function(_){let z=f_.exec(_)?.[0]?.replace(/\\/g,"/")||"",Z=s1(_),O=n1(Z);return{root:z,dir:r1(_),base:Z,ext:O,name:Z.slice(0,Z.length-O.length)}};var x_=/\d/,h_=["-","_","/","."];function g_(_=""){if(x_.test(_))return;return _!==_.toLowerCase()}function a1(_,z){let Z=z??h_,O=[];if(!_||typeof _!=="string")return O;let Q="",j,H;for(let $ of _){let K=Z.includes($);if(K===!0){O.push(Q),Q="",j=void 0;continue}let W=g_($);if(H===!1){if(j===!1&&W===!0){O.push(Q),Q=$,j=W;continue}if(j===!0&&W===!1&&Q.length>1){let Y=Q.at(-1);O.push(Q.slice(0,Math.max(0,Q.length-1))),Q=Y+$,j=W;continue}}Q+=$,j=W,H=K}return O.push(Q),O}function u_(_){return _?_[0].toUpperCase()+_.slice(1):""}function m_(_){return _?_[0].toLowerCase()+_.slice(1):""}function l_(_,z){return _?(Array.isArray(_)?_:a1(_)).map((Z)=>u_(z?.normalize?Z.toLowerCase():Z)).join(""):""}function R1(_,z){return m_(l_(_||"",z))}function T0(_,z){return _?(Array.isArray(_)?_:a1(_)).map((Z)=>Z.toLowerCase()).join(z??"-"):""}var _2=new Uint8Array(64),p_=new Uint8Array(128);for(let _=0;_<64;_++){let z="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(_);_2[_]=z,p_[z]=_}function W0(_,z,Z){let O=z-Z;O=O<0?-O<<1|1:O<<1;do{let Q=O&31;if(O>>>=5,O>0)Q|=32;_.write(_2[Q])}while(O>0);return z}var t1=16384,e1=typeof TextDecoder!=="undefined"?new TextDecoder:typeof Buffer!=="undefined"?{decode(_){return Buffer.from(_.buffer,_.byteOffset,_.byteLength).toString()}}:{decode(_){let z="";for(let Z=0;Z<_.length;Z++)z+=String.fromCharCode(_[Z]);return z}};class z2{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(t1)}write(_){let{buffer:z}=this;if(z[this.pos++]=_,this.pos===t1)this.out+=e1.decode(z),this.pos=0}flush(){let{buffer:_,out:z,pos:Z}=this;return Z>0?z+e1.decode(_.subarray(0,Z)):z}}function Z2(_){let z=new z2,Z=0,O=0,Q=0,j=0;for(let H=0;H<_.length;H++){let $=_[H];if(H>0)z.write(59);if($.length===0)continue;let K=0;for(let W=0;W<$.length;W++){let Y=$[W];if(W>0)z.write(44);if(K=W0(z,Y[0],K),Y.length===1)continue;if(Z=W0(z,Y[1],Z),O=W0(z,Y[2],O),Q=W0(z,Y[3],Q),Y.length===4)continue;j=W0(z,Y[4],j)}}return z.flush()}class E0{constructor(_){this.bits=_ instanceof E0?_.bits.slice():[]}add(_){this.bits[_>>5]|=1<<(_&31)}has(_){return!!(this.bits[_>>5]&1<<(_&31))}}class G0{constructor(_,z,Z){this.start=_,this.end=z,this.original=Z,this.intro="",this.outro="",this.content=Z,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(_){this.outro+=_}appendRight(_){this.intro=this.intro+_}clone(){let _=new G0(this.start,this.end,this.original);return _.intro=this.intro,_.outro=this.outro,_.content=this.content,_.storeName=this.storeName,_.edited=this.edited,_}contains(_){return this.start<_&&_<this.end}eachNext(_){let z=this;while(z)_(z),z=z.next}eachPrevious(_){let z=this;while(z)_(z),z=z.previous}edit(_,z,Z){if(this.content=_,!Z)this.intro="",this.outro="";return this.storeName=z,this.edited=!0,this}prependLeft(_){this.outro=_+this.outro}prependRight(_){this.intro=_+this.intro}reset(){if(this.intro="",this.outro="",this.edited)this.content=this.original,this.storeName=!1,this.edited=!1}split(_){let z=_-this.start,Z=this.original.slice(0,z),O=this.original.slice(z);this.original=Z;let Q=new G0(_,this.end,O);if(Q.outro=this.outro,this.outro="",this.end=_,this.edited)Q.edit("",!1),this.content="";else this.content=Z;if(Q.next=this.next,Q.next)Q.next.previous=Q;return Q.previous=this,this.next=Q,Q}toString(){return this.intro+this.content+this.outro}trimEnd(_){if(this.outro=this.outro.replace(_,""),this.outro.length)return!0;let z=this.content.replace(_,"");if(z.length){if(z!==this.content){if(this.split(this.start+z.length).edit("",void 0,!0),this.edited)this.edit(z,this.storeName,!0)}return!0}else if(this.edit("",void 0,!0),this.intro=this.intro.replace(_,""),this.intro.length)return!0}trimStart(_){if(this.intro=this.intro.replace(_,""),this.intro.length)return!0;let z=this.content.replace(_,"");if(z.length){if(z!==this.content){let Z=this.split(this.end-z.length);if(this.edited)Z.edit(z,this.storeName,!0);this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(_,""),this.outro.length)return!0}}function c_(){if(typeof globalThis!=="undefined"&&typeof globalThis.btoa==="function")return(_)=>globalThis.btoa(unescape(encodeURIComponent(_)));else if(typeof Buffer==="function")return(_)=>Buffer.from(_,"utf-8").toString("base64");else return()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}var d_=c_();class Q2{constructor(_){if(this.version=3,this.file=_.file,this.sources=_.sources,this.sourcesContent=_.sourcesContent,this.names=_.names,this.mappings=Z2(_.mappings),typeof _.x_google_ignoreList!=="undefined")this.x_google_ignoreList=_.x_google_ignoreList;if(typeof _.debugId!=="undefined")this.debugId=_.debugId}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+d_(this.toString())}}function i_(_){let z=_.split(`
|
|
2
2
|
`),Z=z.filter((j)=>/^\t+/.test(j)),O=z.filter((j)=>/^ {2,}/.test(j));if(Z.length===0&&O.length===0)return null;if(Z.length>=O.length)return"\t";let Q=O.reduce((j,H)=>{let $=/^ +/.exec(H)[0].length;return Math.min($,j)},1/0);return new Array(Q+1).join(" ")}function o_(_,z){let Z=_.split(/[/\\]/),O=z.split(/[/\\]/);Z.pop();while(Z[0]===O[0])Z.shift(),O.shift();if(Z.length){let Q=Z.length;while(Q--)Z[Q]=".."}return Z.concat(O).join("/")}var n_=Object.prototype.toString;function r_(_){return n_.call(_)==="[object Object]"}function O2(_){let z=_.split(`
|
|
3
3
|
`),Z=[];for(let O=0,Q=0;O<z.length;O++)Z.push(Q),Q+=z[O].length+1;return function O(Q){let j=0,H=Z.length;while(j<H){let W=j+H>>1;if(Q<Z[W])H=W;else j=W+1}let $=j-1,K=Q-Z[$];return{line:$,column:K}}}var s_=/\w/;class j2{constructor(_){this.hires=_,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(_,z,Z,O){if(z.length){let Q=z.length-1,j=z.indexOf(`
|
|
4
4
|
`,0),H=-1;while(j>=0&&Q>j){let K=[this.generatedCodeColumn,_,Z.line,Z.column];if(O>=0)K.push(O);this.rawSegments.push(K),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,H=j,j=z.indexOf(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{G as D,i as C}from"./chunk-
|
|
2
|
+
import{G as D,i as C}from"./chunk-6tfy93kv.js";import"./chunk-g1f16je5.js";class E{constructor(){this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:()=>this.should_skip=!0,remove:()=>this.should_remove=!0,replace:(c)=>this.replacement=c}}replace(c,r,f,s){if(c&&r)if(f!=null)c[r][f]=s;else c[r]=s}remove(c,r,f){if(c&&r)if(f!==null&&f!==void 0)c[r].splice(f,1);else delete c[r]}}class w extends E{constructor(c,r){super();this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:()=>this.should_skip=!0,remove:()=>this.should_remove=!0,replace:(f)=>this.replacement=f},this.enter=c,this.leave=r}visit(c,r,f,s){if(c){if(this.enter){let i=this.should_skip,I=this.should_remove,l=this.replacement;if(this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.enter.call(this.context,c,r,f,s),this.replacement)c=this.replacement,this.replace(r,f,s,c);if(this.should_remove)this.remove(r,f,s);let t=this.should_skip,m=this.should_remove;if(this.should_skip=i,this.should_remove=I,this.replacement=l,t)return c;if(m)return null}let a;for(a in c){let i=c[a];if(i&&typeof i==="object"){if(Array.isArray(i)){let I=i;for(let l=0;l<I.length;l+=1){let t=I[l];if(e(t)){if(!this.visit(t,c,a,l))l--}}}else if(e(i))this.visit(i,c,a,null)}}if(this.leave){let i=this.replacement,I=this.should_remove;if(this.replacement=null,this.should_remove=!1,this.leave.call(this.context,c,r,f,s),this.replacement)c=this.replacement,this.replace(r,f,s,c);if(this.should_remove)this.remove(r,f,s);let l=this.should_remove;if(this.replacement=i,this.should_remove=I,l)return null}}return c}}function e(c){return c!==null&&typeof c==="object"&&"type"in c&&typeof c.type==="string"}function b(c,{enter:r,leave:f}){return new w(r,f).visit(c,null)}async function G(c,r,f){let s=D(c),a=await r.getImportMap(),i=[],I=f?.autoImport!==!1,l=f?.transformVirtualImports!==!1&&r.options.virtualImports?.length;if(I||l){let t=C(s.original,{sourceType:"module",ecmaVersion:"latest",locations:!0}),m=y(a,r.options.virtualImports),u=V(t,l?m.walk:{});if(I){let S=u.unmatched;i.push(...Array.from(S).map((g)=>{let h=a.get(g);if(h&&!h.disabled)return h;return null}).filter(Boolean));for(let g of r.addons)i=await g.matchImports?.call(r,S,i)||i}m.ranges.forEach(([S,g])=>{s.remove(S,g)}),i.push(...m.imports)}return{s,strippedCode:c.toString(),matchedImports:i,isCJSContext:!1,firstOccurrence:0}}function V(c,r){let f=[],s=void 0,a=[];function i(t){s={node:t,parent:s,declarations:new Set,references:new Set},f.push(s),a.push(s)}function I(t){if(a.pop()?.node!==t)throw new Error("Scope mismatch");s=a[a.length-1]}i(void 0),b(c,{enter(t,m,u,S){switch(r?.enter?.call(this,t,m,u,S),t.type){case"ImportSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":s.declarations.add(t.local.name);return;case"FunctionDeclaration":case"ClassDeclaration":if(t.id)s.declarations.add(t.id.name);return;case"VariableDeclarator":if(t.id.type==="Identifier")s.declarations.add(t.id.name);else b(t.id,{enter(g){if(g.type==="ObjectPattern")g.properties.forEach((h)=>{if(h.type==="Property"&&h.value.type==="Identifier")s.declarations.add(h.value.name);else if(h.type==="RestElement"&&h.argument.type==="Identifier")s.declarations.add(h.argument.name)});else if(g.type==="ArrayPattern")g.elements.forEach((h)=>{if(h?.type==="Identifier")s.declarations.add(h.name);if(h?.type==="RestElement"&&h.argument.type==="Identifier")s.declarations.add(h.argument.name)})}});return;case"BlockStatement":i(t);return;case"Identifier":switch(m?.type){case"CallExpression":if(m.callee===t||m.arguments.includes(t))s.references.add(t.name);return;case"MemberExpression":if(m.object===t)s.references.add(t.name);return;case"VariableDeclarator":if(m.init===t)s.references.add(t.name);return;case"SpreadElement":if(m.argument===t)s.references.add(t.name);return;case"ClassDeclaration":if(m.superClass===t)s.references.add(t.name);return;case"Property":if(m.value===t)s.references.add(t.name);return;case"TemplateLiteral":if(m.expressions.includes(t))s.references.add(t.name);return;case"AssignmentExpression":if(m.right===t)s.references.add(t.name);return;case"IfStatement":case"WhileStatement":case"DoWhileStatement":if(m.test===t)s.references.add(t.name);return;case"SwitchStatement":if(m.discriminant===t)s.references.add(t.name);return}if(m?.type.includes("Expression"))s.references.add(t.name)}},leave(t,m,u,S){switch(r?.leave?.call(this,t,m,u,S),t.type){case"BlockStatement":I(t)}}});let l=new Set;for(let t of f)for(let m of t.references){let u=!1,S=t;while(S){if(S.declarations.has(m)){u=!0;break}S=S?.parent}if(!u)l.add(m)}return{unmatched:l,scopes:f}}function y(c,r=[]){let f=[],s=[];return{imports:f,ranges:s,walk:{enter(a){if(a.type==="ImportDeclaration"){if(r.includes(a.source.value))s.push([a.start,a.end]),a.specifiers.forEach((i)=>{if(i.type==="ImportSpecifier"&&i.imported.type==="Identifier"){let I=c.get(i.imported.name);if(!I)throw new Error(`[unimport] failed to find "${i.imported.name}" imported from "${a.source.value}"`);f.push({from:I.from,name:I.name,as:i.local.name})}})}}}}}export{V as traveseScopes,G as detectImportsAcorn,y as createVirtualImportsAcronWalker};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Dc as _,Jc as A}from"./chunk-wchdk5rr.js";import"./chunk-v07vvpcr.js";import{Sc as o}from"./chunk-xv24dwhq.js";import{Xc as K}from"./chunk-zs3ndhp8.js";import{Yc as E}from"./chunk-g1f16je5.js";import{exec as T}from"node:child_process";import{promisify as y}from"node:util";var w=E(K(),1),S=(c,n,e)=>{if(n.Version!==1)throw Error(`Profile ${c} credential_process did not return Version 1.`);if(n.AccessKeyId===void 0||n.SecretAccessKey===void 0)throw Error(`Profile ${c} credential_process returned invalid credentials.`);if(n.Expiration){let i=new Date;if(new Date(n.Expiration)<i)throw Error(`Profile ${c} credential_process returned expired credentials.`)}let s=n.AccountId;if(!s&&e?.[c]?.aws_account_id)s=e[c].aws_account_id;let t={accessKeyId:n.AccessKeyId,secretAccessKey:n.SecretAccessKey,...n.SessionToken&&{sessionToken:n.SessionToken},...n.Expiration&&{expiration:new Date(n.Expiration)},...n.CredentialScope&&{credentialScope:n.CredentialScope},...s&&{accountId:s}};return w.setCredentialFeature(t,"CREDENTIALS_PROCESS","w"),t};var x=async(c,n,e)=>{let s=n[c];if(n[c]){let t=s.credential_process;if(t!==void 0){let i=y(T);try{let{stdout:r}=await i(t),u;try{u=JSON.parse(r.trim())}catch{throw Error(`Profile ${c} credential_process returned invalid JSON.`)}return S(c,u,n)}catch(r){throw new o(r.message,{logger:e})}}else throw new o(`Profile ${c} did not contain credential_process.`,{logger:e})}else throw new o(`Profile ${c} could not be found in shared credentials file.`,{logger:e})};var F=(c={})=>async({callerClientConfig:n}={})=>{c.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");let e=await A(c);return x(_({profile:c.profile??n?.profile}),e,c.logger)};export{F as fromProcess};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{_c as U,bd as h}from"./chunk-g1f16je5.js";var E0=U((Zw,k0)=>{var{defineProperty:u,getOwnPropertyDescriptor:o6,getOwnPropertyNames:e6}=Object,$4=Object.prototype.hasOwnProperty,l=($,w)=>u($,"name",{value:w,configurable:!0}),w4=($,w)=>{for(var z in w)u($,z,{get:w[z],enumerable:!0})},z4=($,w,z,Y)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of e6(w))if(!$4.call($,Z)&&Z!==z)u($,Z,{get:()=>w[Z],enumerable:!(Y=o6(w,Z))||Y.enumerable})}return $},Z4=($)=>z4(u({},"__esModule",{value:!0}),$),h0={};w4(h0,{AlgorithmId:()=>x0,EndpointURLScheme:()=>I0,FieldPosition:()=>A0,HttpApiKeyAuthLocation:()=>O0,HttpAuthLocation:()=>b0,IniSectionType:()=>S0,RequestHandlerProtocol:()=>T0,SMITHY_CONTEXT_KEY:()=>B4,getDefaultClientConfiguration:()=>X4,resolveDefaultRuntimeConfig:()=>G4});k0.exports=Z4(h0);var b0=(($)=>{return $.HEADER="header",$.QUERY="query",$})(b0||{}),O0=(($)=>{return $.HEADER="header",$.QUERY="query",$})(O0||{}),I0=(($)=>{return $.HTTP="http",$.HTTPS="https",$})(I0||{}),x0=(($)=>{return $.MD5="md5",$.CRC32="crc32",$.CRC32C="crc32c",$.SHA1="sha1",$.SHA256="sha256",$})(x0||{}),Y4=l(($)=>{let w=[];if($.sha256!==void 0)w.push({algorithmId:()=>"sha256",checksumConstructor:()=>$.sha256});if($.md5!=null)w.push({algorithmId:()=>"md5",checksumConstructor:()=>$.md5});return{addChecksumAlgorithm(z){w.push(z)},checksumAlgorithms(){return w}}},"getChecksumConfiguration"),Q4=l(($)=>{let w={};return $.checksumAlgorithms().forEach((z)=>{w[z.algorithmId()]=z.checksumConstructor()}),w},"resolveChecksumRuntimeConfig"),X4=l(($)=>{return Y4($)},"getDefaultClientConfiguration"),G4=l(($)=>{return Q4($)},"resolveDefaultRuntimeConfig"),A0=(($)=>{return $[$.HEADER=0]="HEADER",$[$.TRAILER=1]="TRAILER",$})(A0||{}),B4="__smithy_context",S0=(($)=>{return $.PROFILE="profile",$.SSO_SESSION="sso-session",$.SERVICES="services",$})(S0||{}),T0=(($)=>{return $.HTTP_0_9="http/0.9",$.HTTP_1_0="http/1.0",$.TDS_8_0="tds/8.0",$})(T0||{})});var _=U((Yw,g0)=>{var{defineProperty:d,getOwnPropertyDescriptor:K4,getOwnPropertyNames:V4}=Object,W4=Object.prototype.hasOwnProperty,k=($,w)=>d($,"name",{value:w,configurable:!0}),U4=($,w)=>{for(var z in w)d($,z,{get:w[z],enumerable:!0})},L4=($,w,z,Y)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of V4(w))if(!W4.call($,Z)&&Z!==z)d($,Z,{get:()=>w[Z],enumerable:!(Y=K4(w,Z))||Y.enumerable})}return $},J4=($)=>L4(d({},"__esModule",{value:!0}),$),y0={};U4(y0,{Field:()=>D4,Fields:()=>v4,HttpRequest:()=>N4,HttpResponse:()=>C4,IHttpRequest:()=>f0.HttpRequest,getHttpHandlerExtensionConfiguration:()=>j4,isValidHostname:()=>q0,resolveHttpHandlerRuntimeConfig:()=>F4});g0.exports=J4(y0);var j4=k(($)=>{return{setHttpHandler(w){$.httpHandler=w},httpHandler(){return $.httpHandler},updateHttpClientConfig(w,z){$.httpHandler?.updateHttpClientConfig(w,z)},httpHandlerConfigs(){return $.httpHandler.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),F4=k(($)=>{return{httpHandler:$.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),f0=E0(),D4=class{static{k(this,"Field")}constructor({name:$,kind:w=f0.FieldPosition.HEADER,values:z=[]}){this.name=$,this.kind=w,this.values=z}add($){this.values.push($)}set($){this.values=$}remove($){this.values=this.values.filter((w)=>w!==$)}toString(){return this.values.map(($)=>$.includes(",")||$.includes(" ")?`"${$}"`:$).join(", ")}get(){return this.values}},v4=class{constructor({fields:$=[],encoding:w="utf-8"}){this.entries={},$.forEach(this.setField.bind(this)),this.encoding=w}static{k(this,"Fields")}setField($){this.entries[$.name.toLowerCase()]=$}getField($){return this.entries[$.toLowerCase()]}removeField($){delete this.entries[$.toLowerCase()]}getByType($){return Object.values(this.entries).filter((w)=>w.kind===$)}},N4=class ${static{k(this,"HttpRequest")}constructor(w){this.method=w.method||"GET",this.hostname=w.hostname||"localhost",this.port=w.port,this.query=w.query||{},this.headers=w.headers||{},this.body=w.body,this.protocol=w.protocol?w.protocol.slice(-1)!==":"?`${w.protocol}:`:w.protocol:"https:",this.path=w.path?w.path.charAt(0)!=="/"?`/${w.path}`:w.path:"/",this.username=w.username,this.password=w.password,this.fragment=w.fragment}static clone(w){let z=new $({...w,headers:{...w.headers}});if(z.query)z.query=P0(z.query);return z}static isInstance(w){if(!w)return!1;let z=w;return"method"in z&&"protocol"in z&&"hostname"in z&&"path"in z&&typeof z.query==="object"&&typeof z.headers==="object"}clone(){return $.clone(this)}};function P0($){return Object.keys($).reduce((w,z)=>{let Y=$[z];return{...w,[z]:Array.isArray(Y)?[...Y]:Y}},{})}k(P0,"cloneQuery");var C4=class{static{k(this,"HttpResponse")}constructor($){this.statusCode=$.statusCode,this.reason=$.reason,this.headers=$.headers||{},this.body=$.body}static isInstance($){if(!$)return!1;let w=$;return typeof w.statusCode==="number"&&typeof w.headers==="object"}};function q0($){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test($)}k(q0,"isValidHostname")});var d0=U((Bw,l0)=>{var{defineProperty:p,getOwnPropertyDescriptor:M4,getOwnPropertyNames:R4}=Object,H4=Object.prototype.hasOwnProperty,Z0=($,w)=>p($,"name",{value:w,configurable:!0}),h4=($,w)=>{for(var z in w)p($,z,{get:w[z],enumerable:!0})},b4=($,w,z,Y)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of R4(w))if(!H4.call($,Z)&&Z!==z)p($,Z,{get:()=>w[Z],enumerable:!(Y=M4(w,Z))||Y.enumerable})}return $},O4=($)=>b4(p({},"__esModule",{value:!0}),$),c0={};h4(c0,{escapeUri:()=>u0,escapeUriPath:()=>x4});l0.exports=O4(c0);var u0=Z0(($)=>encodeURIComponent($).replace(/[!'()*]/g,I4),"escapeUri"),I4=Z0(($)=>`%${$.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),x4=Z0(($)=>$.split("/").map(u0).join("/"),"escapeUriPath")});var Q0=U((Kw,i0)=>{var{defineProperty:i,getOwnPropertyDescriptor:A4,getOwnPropertyNames:S4}=Object,T4=Object.prototype.hasOwnProperty,k4=($,w)=>i($,"name",{value:w,configurable:!0}),E4=($,w)=>{for(var z in w)i($,z,{get:w[z],enumerable:!0})},y4=($,w,z,Y)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of S4(w))if(!T4.call($,Z)&&Z!==z)i($,Z,{get:()=>w[Z],enumerable:!(Y=A4(w,Z))||Y.enumerable})}return $},f4=($)=>y4(i({},"__esModule",{value:!0}),$),_0={};E4(_0,{buildQueryString:()=>p0});i0.exports=f4(_0);var Y0=d0();function p0($){let w=[];for(let z of Object.keys($).sort()){let Y=$[z];if(z=Y0.escapeUri(z),Array.isArray(Y))for(let Z=0,G=Y.length;Z<G;Z++)w.push(`${z}=${Y0.escapeUri(Y[Z])}`);else{let Z=z;if(Y||typeof Y==="string")Z+=`=${Y0.escapeUri(Y)}`;w.push(Z)}}return w.join("&")}k4(p0,"buildQueryString")});var X1=U((Vw,Q1)=>{var{create:P4,defineProperty:g,getOwnPropertyDescriptor:q4,getOwnPropertyNames:g4,getPrototypeOf:c4}=Object,u4=Object.prototype.hasOwnProperty,L=($,w)=>g($,"name",{value:w,configurable:!0}),l4=($,w)=>{for(var z in w)g($,z,{get:w[z],enumerable:!0})},r0=($,w,z,Y)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of g4(w))if(!u4.call($,Z)&&Z!==z)g($,Z,{get:()=>w[Z],enumerable:!(Y=q4(w,Z))||Y.enumerable})}return $},d4=($,w,z)=>(z=$!=null?P4(c4($)):{},r0(w||!$||!$.__esModule?g(z,"default",{value:$,enumerable:!0}):z,$)),_4=($)=>r0(g({},"__esModule",{value:!0}),$),t0={};l4(t0,{DEFAULT_REQUEST_TIMEOUT:()=>Z1,NodeHttp2Handler:()=>e4,NodeHttpHandler:()=>s4,streamCollector:()=>w$});Q1.exports=_4(t0);var o0=_(),e0=Q0(),X0=h("node:http"),G0=h("node:https"),p4=["ECONNRESET","EPIPE","ETIMEDOUT"],$1=L(($)=>{let w={};for(let z of Object.keys($)){let Y=$[z];w[z]=Array.isArray(Y)?Y.join(","):Y}return w},"getTransformedHeaders"),M={setTimeout:($,w)=>setTimeout($,w),clearTimeout:($)=>clearTimeout($)},a0=1000,i4=L(($,w,z=0)=>{if(!z)return-1;let Y=L((Z)=>{let G=M.setTimeout(()=>{$.destroy(),w(Object.assign(new Error(`Socket timed out without establishing a connection within ${z} ms`),{name:"TimeoutError"}))},z-Z),Q=L((X)=>{if(X?.connecting)X.on("connect",()=>{M.clearTimeout(G)});else M.clearTimeout(G)},"doWithSocket");if($.socket)Q($.socket);else $.on("socket",Q)},"registerTimeout");if(z<2000)return Y(0),0;return M.setTimeout(Y.bind(null,a0),a0)},"setConnectionTimeout"),a4=3000,m4=L(($,{keepAlive:w,keepAliveMsecs:z},Y=a4)=>{if(w!==!0)return-1;let Z=L(()=>{if($.socket)$.socket.setKeepAlive(w,z||0);else $.on("socket",(G)=>{G.setKeepAlive(w,z||0)})},"registerListener");if(Y===0)return Z(),0;return M.setTimeout(Z,Y)},"setSocketKeepAlive"),m0=3000,n4=L(($,w,z=Z1)=>{let Y=L((Z)=>{let G=z-Z,Q=L(()=>{$.destroy(),w(Object.assign(new Error(`Connection timed out after ${z} ms`),{name:"TimeoutError"}))},"onTimeout");if($.socket)$.socket.setTimeout(G,Q),$.on("close",()=>$.socket?.removeListener("timeout",Q));else $.setTimeout(G,Q)},"registerTimeout");if(0<z&&z<6000)return Y(0),0;return M.setTimeout(Y.bind(null,z===0?0:m0),m0)},"setSocketTimeout"),w1=h("node:stream"),n0=6000;async function B0($,w,z=n0){let Y=w.headers??{},Z=Y.Expect||Y.expect,G=-1,Q=!0;if(Z==="100-continue")Q=await Promise.race([new Promise((X)=>{G=Number(M.setTimeout(()=>X(!0),Math.max(n0,z)))}),new Promise((X)=>{$.on("continue",()=>{M.clearTimeout(G),X(!0)}),$.on("response",()=>{M.clearTimeout(G),X(!1)}),$.on("error",()=>{M.clearTimeout(G),X(!1)})})]);if(Q)z1($,w.body)}L(B0,"writeRequestBody");function z1($,w){if(w instanceof w1.Readable){w.pipe($);return}if(w){if(Buffer.isBuffer(w)||typeof w==="string"){$.end(w);return}let z=w;if(typeof z==="object"&&z.buffer&&typeof z.byteOffset==="number"&&typeof z.byteLength==="number"){$.end(Buffer.from(z.buffer,z.byteOffset,z.byteLength));return}$.end(Buffer.from(w));return}$.end()}L(z1,"writeBody");var Z1=0,s4=class ${constructor(w){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((z,Y)=>{if(typeof w==="function")w().then((Z)=>{z(this.resolveDefaultConfig(Z))}).catch(Y);else z(this.resolveDefaultConfig(w))})}static{L(this,"NodeHttpHandler")}static create(w){if(typeof w?.handle==="function")return w;return new $(w)}static checkSocketUsage(w,z,Y=console){let{sockets:Z,requests:G,maxSockets:Q}=w;if(typeof Q!=="number"||Q===1/0)return z;let X=15000;if(Date.now()-X<z)return z;if(Z&&G)for(let B in Z){let K=Z[B]?.length??0,W=G[B]?.length??0;if(K>=Q&&W>=2*Q)return Y?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${K} and ${W} additional requests are enqueued.
|
|
2
|
+
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
3
|
+
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return z}resolveDefaultConfig(w){let{requestTimeout:z,connectionTimeout:Y,socketTimeout:Z,socketAcquisitionWarningTimeout:G,httpAgent:Q,httpsAgent:X}=w||{},B=!0,K=50;return{connectionTimeout:Y,requestTimeout:z??Z,socketAcquisitionWarningTimeout:G,httpAgent:(()=>{if(Q instanceof X0.Agent||typeof Q?.destroy==="function")return Q;return new X0.Agent({keepAlive:!0,maxSockets:50,...Q})})(),httpsAgent:(()=>{if(X instanceof G0.Agent||typeof X?.destroy==="function")return X;return new G0.Agent({keepAlive:!0,maxSockets:50,...X})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(w,{abortSignal:z}={}){if(!this.config)this.config=await this.configProvider;return new Promise((Y,Z)=>{let G=void 0,Q=[],X=L(async(V)=>{await G,Q.forEach(M.clearTimeout),Y(V)},"resolve"),B=L(async(V)=>{await G,Q.forEach(M.clearTimeout),Z(V)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(z?.aborted){let V=new Error("Request aborted");V.name="AbortError",B(V);return}let K=w.protocol==="https:",W=K?this.config.httpsAgent:this.config.httpAgent;Q.push(M.setTimeout(()=>{this.socketWarningTimestamp=$.checkSocketUsage(W,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let N=e0.buildQueryString(w.query||{}),v=void 0;if(w.username!=null||w.password!=null){let V=w.username??"",j=w.password??"";v=`${V}:${j}`}let D=w.path;if(N)D+=`?${N}`;if(w.fragment)D+=`#${w.fragment}`;let C=w.hostname??"";if(C[0]==="["&&C.endsWith("]"))C=w.hostname.slice(1,-1);else C=w.hostname;let S={headers:w.headers,host:C,method:w.method,path:D,port:w.port,agent:W,auth:v},J=(K?G0.request:X0.request)(S,(V)=>{let j=new o0.HttpResponse({statusCode:V.statusCode||-1,reason:V.statusMessage,headers:$1(V.headers),body:V});X({response:j})});if(J.on("error",(V)=>{if(p4.includes(V.code))B(Object.assign(V,{name:"TimeoutError"}));else B(V)}),z){let V=L(()=>{J.destroy();let j=new Error("Request aborted");j.name="AbortError",B(j)},"onAbort");if(typeof z.addEventListener==="function"){let j=z;j.addEventListener("abort",V,{once:!0}),J.once("close",()=>j.removeEventListener("abort",V))}else z.onabort=V}Q.push(i4(J,B,this.config.connectionTimeout)),Q.push(n4(J,B,this.config.requestTimeout));let R=S.agent;if(typeof R==="object"&&"keepAlive"in R)Q.push(m4(J,{keepAlive:R.keepAlive,keepAliveMsecs:R.keepAliveMsecs}));G=B0(J,w,this.config.requestTimeout).catch((V)=>{return Q.forEach(M.clearTimeout),Z(V)})})}updateHttpClientConfig(w,z){this.config=void 0,this.configProvider=this.configProvider.then((Y)=>{return{...Y,[w]:z}})}httpHandlerConfigs(){return this.config??{}}},s0=h("node:http2"),r4=d4(h("node:http2")),t4=class{constructor($){this.sessions=[],this.sessions=$??[]}static{L(this,"NodeHttp2ConnectionPool")}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast($){this.sessions.push($)}contains($){return this.sessions.includes($)}remove($){this.sessions=this.sessions.filter((w)=>w!==$)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy($){for(let w of this.sessions)if(w===$){if(!w.destroyed)w.destroy()}}},o4=class{constructor($){if(this.sessionCache=new Map,this.config=$,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}static{L(this,"NodeHttp2ConnectionManager")}lease($,w){let z=this.getUrlString($),Y=this.sessionCache.get(z);if(Y){let X=Y.poll();if(X&&!this.config.disableConcurrency)return X}let Z=r4.default.connect(z);if(this.config.maxConcurrency)Z.settings({maxConcurrentStreams:this.config.maxConcurrency},(X)=>{if(X)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+$.destination.toString())});Z.unref();let G=L(()=>{Z.destroy(),this.deleteSession(z,Z)},"destroySessionCb");if(Z.on("goaway",G),Z.on("error",G),Z.on("frameError",G),Z.on("close",()=>this.deleteSession(z,Z)),w.requestTimeout)Z.setTimeout(w.requestTimeout,G);let Q=this.sessionCache.get(z)||new t4;return Q.offerLast(Z),this.sessionCache.set(z,Q),Z}deleteSession($,w){let z=this.sessionCache.get($);if(!z)return;if(!z.contains(w))return;z.remove(w),this.sessionCache.set($,z)}release($,w){let z=this.getUrlString($);this.sessionCache.get(z)?.offerLast(w)}destroy(){for(let[$,w]of this.sessionCache){for(let z of w){if(!z.destroyed)z.destroy();w.remove(z)}this.sessionCache.delete($)}}setMaxConcurrentStreams($){if($&&$<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=$}setDisableConcurrentStreams($){this.config.disableConcurrency=$}getUrlString($){return $.destination.toString()}},e4=class ${constructor(w){this.metadata={handlerProtocol:"h2"},this.connectionManager=new o4({}),this.configProvider=new Promise((z,Y)=>{if(typeof w==="function")w().then((Z)=>{z(Z||{})}).catch(Y);else z(w||{})})}static{L(this,"NodeHttp2Handler")}static create(w){if(typeof w?.handle==="function")return w;return new $(w)}destroy(){this.connectionManager.destroy()}async handle(w,{abortSignal:z}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}let{requestTimeout:Y,disableConcurrentStreams:Z}=this.config;return new Promise((G,Q)=>{let X=!1,B=void 0,K=L(async(F)=>{await B,G(F)},"resolve"),W=L(async(F)=>{await B,Q(F)},"reject");if(z?.aborted){X=!0;let F=new Error("Request aborted");F.name="AbortError",W(F);return}let{hostname:N,method:v,port:D,protocol:C,query:S}=w,T="";if(w.username!=null||w.password!=null){let F=w.username??"",b=w.password??"";T=`${F}:${b}@`}let J=`${C}//${T}${N}${D?`:${D}`:""}`,R={destination:new URL(J)},V=this.connectionManager.lease(R,{requestTimeout:this.config?.sessionTimeout,disableConcurrentStreams:Z||!1}),j=L((F)=>{if(Z)this.destroySession(V);X=!0,W(F)},"rejectWithDestroy"),f=e0.buildQueryString(S||{}),z0=w.path;if(f)z0+=`?${f}`;if(w.fragment)z0+=`#${w.fragment}`;let H=V.request({...w.headers,[s0.constants.HTTP2_HEADER_PATH]:z0,[s0.constants.HTTP2_HEADER_METHOD]:v});if(V.ref(),H.on("response",(F)=>{let b=new o0.HttpResponse({statusCode:F[":status"]||-1,headers:$1(F),body:H});if(X=!0,K({response:b}),Z)V.close(),this.connectionManager.deleteSession(J,V)}),Y)H.setTimeout(Y,()=>{H.close();let F=new Error(`Stream timed out because of no activity for ${Y} ms`);F.name="TimeoutError",j(F)});if(z){let F=L(()=>{H.close();let b=new Error("Request aborted");b.name="AbortError",j(b)},"onAbort");if(typeof z.addEventListener==="function"){let b=z;b.addEventListener("abort",F,{once:!0}),H.once("close",()=>b.removeEventListener("abort",F))}else z.onabort=F}H.on("frameError",(F,b,t6)=>{j(new Error(`Frame type id ${F} in stream id ${t6} has failed with code ${b}.`))}),H.on("error",j),H.on("aborted",()=>{j(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${H.rstCode}.`))}),H.on("close",()=>{if(V.unref(),Z)V.destroy();if(!X)j(new Error("Unexpected error: http2 request did not get a response"))}),B=B0(H,w,Y)})}updateHttpClientConfig(w,z){this.config=void 0,this.configProvider=this.configProvider.then((Y)=>{return{...Y,[w]:z}})}httpHandlerConfigs(){return this.config??{}}destroySession(w){if(!w.destroyed)w.destroy()}},$$=class extends w1.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}static{L(this,"Collector")}_write($,w,z){this.bufferedBytes.push($),z()}},w$=L(($)=>{if(z$($))return Y1($);return new Promise((w,z)=>{let Y=new $$;$.pipe(Y),$.on("error",(Z)=>{Y.end(),z(Z)}),Y.on("error",z),Y.on("finish",function(){let Z=new Uint8Array(Buffer.concat(this.bufferedBytes));w(Z)})})},"streamCollector"),z$=L(($)=>typeof ReadableStream==="function"&&$ instanceof ReadableStream,"isReadableStreamInstance");async function Y1($){let w=[],z=$.getReader(),Y=!1,Z=0;while(!Y){let{done:X,value:B}=await z.read();if(B)w.push(B),Z+=B.length;Y=X}let G=new Uint8Array(Z),Q=0;for(let X of w)G.set(X,Q),Q+=X.length;return G}L(Y1,"collectReadableStream")});var K1=U((Jw,B1)=>{var{defineProperty:a,getOwnPropertyDescriptor:Z$,getOwnPropertyNames:Y$}=Object,Q$=Object.prototype.hasOwnProperty,X$=($,w)=>a($,"name",{value:w,configurable:!0}),G$=($,w)=>{for(var z in w)a($,z,{get:w[z],enumerable:!0})},B$=($,w,z,Y)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of Y$(w))if(!Q$.call($,Z)&&Z!==z)a($,Z,{get:()=>w[Z],enumerable:!(Y=Z$(w,Z))||Y.enumerable})}return $},K$=($)=>B$(a({},"__esModule",{value:!0}),$),G1={};G$(G1,{isArrayBuffer:()=>V$});B1.exports=K$(G1);var V$=X$(($)=>typeof ArrayBuffer==="function"&&$ instanceof ArrayBuffer||Object.prototype.toString.call($)==="[object ArrayBuffer]","isArrayBuffer")});var c=U((jw,U1)=>{var{defineProperty:m,getOwnPropertyDescriptor:W$,getOwnPropertyNames:U$}=Object,L$=Object.prototype.hasOwnProperty,V1=($,w)=>m($,"name",{value:w,configurable:!0}),J$=($,w)=>{for(var z in w)m($,z,{get:w[z],enumerable:!0})},j$=($,w,z,Y)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of U$(w))if(!L$.call($,Z)&&Z!==z)m($,Z,{get:()=>w[Z],enumerable:!(Y=W$(w,Z))||Y.enumerable})}return $},F$=($)=>j$(m({},"__esModule",{value:!0}),$),W1={};J$(W1,{fromArrayBuffer:()=>v$,fromString:()=>N$});U1.exports=F$(W1);var D$=K1(),K0=h("node:buffer"),v$=V1(($,w=0,z=$.byteLength-w)=>{if(!D$.isArrayBuffer($))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof $} (${$})`);return K0.Buffer.from($,w,z)},"fromArrayBuffer"),N$=V1(($,w)=>{if(typeof $!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof $} (${$})`);return w?K0.Buffer.from($,w):K0.Buffer.from($)},"fromString")});var j1=U((L1)=>{Object.defineProperty(L1,"__esModule",{value:!0});L1.fromBase64=void 0;var C$=c(),M$=/^[A-Za-z0-9+/]*={0,2}$/,R$=($)=>{if($.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!M$.exec($))throw new TypeError("Invalid base64 string.");let w=C$.fromString($,"base64");return new Uint8Array(w.buffer,w.byteOffset,w.byteLength)};L1.fromBase64=R$});var s=U((Dw,N1)=>{var{defineProperty:n,getOwnPropertyDescriptor:H$,getOwnPropertyNames:h$}=Object,b$=Object.prototype.hasOwnProperty,V0=($,w)=>n($,"name",{value:w,configurable:!0}),O$=($,w)=>{for(var z in w)n($,z,{get:w[z],enumerable:!0})},I$=($,w,z,Y)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of h$(w))if(!b$.call($,Z)&&Z!==z)n($,Z,{get:()=>w[Z],enumerable:!(Y=H$(w,Z))||Y.enumerable})}return $},x$=($)=>I$(n({},"__esModule",{value:!0}),$),F1={};O$(F1,{fromUtf8:()=>v1,toUint8Array:()=>A$,toUtf8:()=>S$});N1.exports=x$(F1);var D1=c(),v1=V0(($)=>{let w=D1.fromString($,"utf8");return new Uint8Array(w.buffer,w.byteOffset,w.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),A$=V0(($)=>{if(typeof $==="string")return v1($);if(ArrayBuffer.isView($))return new Uint8Array($.buffer,$.byteOffset,$.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array($)},"toUint8Array"),S$=V0(($)=>{if(typeof $==="string")return $;if(typeof $!=="object"||typeof $.byteOffset!=="number"||typeof $.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return D1.fromArrayBuffer($.buffer,$.byteOffset,$.byteLength).toString("utf8")},"toUtf8")});var R1=U((C1)=>{Object.defineProperty(C1,"__esModule",{value:!0});C1.toBase64=void 0;var T$=c(),k$=s(),E$=($)=>{let w;if(typeof $==="string")w=k$.fromUtf8($);else w=$;if(typeof w!=="object"||typeof w.byteOffset!=="number"||typeof w.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return T$.fromArrayBuffer(w.buffer,w.byteOffset,w.byteLength).toString("base64")};C1.toBase64=E$});var P=U((Nw,r)=>{var{defineProperty:H1,getOwnPropertyDescriptor:y$,getOwnPropertyNames:f$}=Object,P$=Object.prototype.hasOwnProperty,W0=($,w,z,Y)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of f$(w))if(!P$.call($,Z)&&Z!==z)H1($,Z,{get:()=>w[Z],enumerable:!(Y=y$(w,Z))||Y.enumerable})}return $},h1=($,w,z)=>(W0($,w,"default"),z&&W0(z,w,"default")),q$=($)=>W0(H1({},"__esModule",{value:!0}),$),U0={};r.exports=q$(U0);h1(U0,j1(),r.exports);h1(U0,R1(),r.exports)});var L0=U((O1)=>{Object.defineProperty(O1,"__esModule",{value:!0});O1.ChecksumStream=void 0;var g$=P(),c$=h("node:stream");class b1 extends c$.Duplex{constructor({expectedChecksum:$,checksum:w,source:z,checksumSourceLocation:Y,base64Encoder:Z}){var G,Q;super();if(typeof z.pipe==="function")this.source=z;else throw new Error(`@smithy/util-stream: unsupported source type ${(Q=(G=z===null||z===void 0?void 0:z.constructor)===null||G===void 0?void 0:G.name)!==null&&Q!==void 0?Q:z} in ChecksumStream.`);this.base64Encoder=Z!==null&&Z!==void 0?Z:g$.toBase64,this.expectedChecksum=$,this.checksum=w,this.checksumSourceLocation=Y,this.source.pipe(this)}_read($){}_write($,w,z){try{this.checksum.update($),this.push($)}catch(Y){return z(Y)}return z()}async _final($){try{let w=await this.checksum.digest(),z=this.base64Encoder(w);if(this.expectedChecksum!==z)return $(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${z}" in response header "${this.checksumSourceLocation}".`))}catch(w){return $(w)}return this.push(null),$()}}O1.ChecksumStream=b1});var E=U((x1)=>{Object.defineProperty(x1,"__esModule",{value:!0});x1.isBlob=x1.isReadableStream=void 0;var u$=($)=>{var w;return typeof ReadableStream==="function"&&(((w=$===null||$===void 0?void 0:$.constructor)===null||w===void 0?void 0:w.name)===ReadableStream.name||$ instanceof ReadableStream)};x1.isReadableStream=u$;var l$=($)=>{var w;return typeof Blob==="function"&&(((w=$===null||$===void 0?void 0:$.constructor)===null||w===void 0?void 0:w.name)===Blob.name||$ instanceof Blob)};x1.isBlob=l$});var E1=U((T1)=>{Object.defineProperty(T1,"__esModule",{value:!0});T1.ChecksumStream=void 0;var _$=typeof ReadableStream==="function"?ReadableStream:function(){};class S1 extends _${}T1.ChecksumStream=S1});var P1=U((y1)=>{Object.defineProperty(y1,"__esModule",{value:!0});y1.createChecksumStream=void 0;var p$=P(),i$=E(),a$=E1(),m$=({expectedChecksum:$,checksum:w,source:z,checksumSourceLocation:Y,base64Encoder:Z})=>{var G,Q;if(!i$.isReadableStream(z))throw new Error(`@smithy/util-stream: unsupported source type ${(Q=(G=z===null||z===void 0?void 0:z.constructor)===null||G===void 0?void 0:G.name)!==null&&Q!==void 0?Q:z} in ChecksumStream.`);let X=Z!==null&&Z!==void 0?Z:p$.toBase64;if(typeof TransformStream!=="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");let B=new TransformStream({start(){},async transform(W,N){w.update(W),N.enqueue(W)},async flush(W){let N=await w.digest(),v=X(N);if($!==v){let D=new Error(`Checksum mismatch: expected "${$}" but received "${v}" in response header "${Y}".`);W.error(D)}else W.terminate()}});z.pipeThrough(B);let K=B.readable;return Object.setPrototypeOf(K,a$.ChecksumStream.prototype),K};y1.createChecksumStream=m$});var c1=U((q1)=>{Object.defineProperty(q1,"__esModule",{value:!0});q1.createChecksumStream=void 0;var n$=E(),s$=L0(),r$=P1();function t$($){if(typeof ReadableStream==="function"&&n$.isReadableStream($.source))return r$.createChecksumStream($);return new s$.ChecksumStream($)}q1.createChecksumStream=t$});var J0=U((l1)=>{Object.defineProperty(l1,"__esModule",{value:!0});l1.ByteArrayCollector=void 0;class u1{constructor($){this.allocByteArray=$,this.byteLength=0,this.byteArrays=[]}push($){this.byteArrays.push($),this.byteLength+=$.byteLength}flush(){if(this.byteArrays.length===1){let z=this.byteArrays[0];return this.reset(),z}let $=this.allocByteArray(this.byteLength),w=0;for(let z=0;z<this.byteArrays.length;++z){let Y=this.byteArrays[z];$.set(Y,w),w+=Y.byteLength}return this.reset(),$}reset(){this.byteArrays=[],this.byteLength=0}}l1.ByteArrayCollector=u1});var n1=U((a1)=>{Object.defineProperty(a1,"__esModule",{value:!0});a1.modeOf=a1.sizeOf=a1.flush=a1.merge=a1.createBufferedReadable=a1.createBufferedReadableStream=void 0;var o$=J0();function _1($,w,z){let Y=$.getReader(),Z=!1,G=0,Q=["",new o$.ByteArrayCollector((K)=>new Uint8Array(K))],X=-1,B=async(K)=>{let{value:W,done:N}=await Y.read(),v=W;if(N){if(X!==-1){let D=t(Q,X);if(q(D)>0)K.enqueue(D)}K.close()}else{let D=i1(v,!1);if(X!==D){if(X>=0)K.enqueue(t(Q,X));X=D}if(X===-1){K.enqueue(v);return}let C=q(v);G+=C;let S=q(Q[X]);if(C>=w&&S===0)K.enqueue(v);else{let T=p1(Q,X,v);if(!Z&&G>w*2)Z=!0,z===null||z===void 0||z.warn(`@smithy/util-stream - stream chunk size ${C} is below threshold of ${w}, automatically buffering.`);if(T>=w)K.enqueue(t(Q,X));else await B(K)}}};return new ReadableStream({pull:B})}a1.createBufferedReadableStream=_1;a1.createBufferedReadable=_1;function p1($,w,z){switch(w){case 0:return $[0]+=z,q($[0]);case 1:case 2:return $[w].push(z),q($[w])}}a1.merge=p1;function t($,w){switch(w){case 0:let z=$[0];return $[0]="",z;case 1:case 2:return $[w].flush()}throw new Error(`@smithy/util-stream - invalid index ${w} given to flush()`)}a1.flush=t;function q($){var w,z;return(z=(w=$===null||$===void 0?void 0:$.byteLength)!==null&&w!==void 0?w:$===null||$===void 0?void 0:$.length)!==null&&z!==void 0?z:0}a1.sizeOf=q;function i1($,w=!0){if(w&&typeof Buffer!=="undefined"&&$ instanceof Buffer)return 2;if($ instanceof Uint8Array)return 1;if(typeof $==="string")return 0;return-1}a1.modeOf=i1});var o1=U((r1)=>{Object.defineProperty(r1,"__esModule",{value:!0});r1.createBufferedReadable=void 0;var Y8=h("node:stream"),s1=J0(),A=n1(),Q8=E();function X8($,w,z){if(Q8.isReadableStream($))return A.createBufferedReadableStream($,w,z);let Y=new Y8.Readable({read(){}}),Z=!1,G=0,Q=["",new s1.ByteArrayCollector((B)=>new Uint8Array(B)),new s1.ByteArrayCollector((B)=>Buffer.from(new Uint8Array(B)))],X=-1;return $.on("data",(B)=>{let K=A.modeOf(B,!0);if(X!==K){if(X>=0)Y.push(A.flush(Q,X));X=K}if(X===-1){Y.push(B);return}let W=A.sizeOf(B);G+=W;let N=A.sizeOf(Q[X]);if(W>=w&&N===0)Y.push(B);else{let v=A.merge(Q,X,B);if(!Z&&G>w*2)Z=!0,z===null||z===void 0||z.warn(`@smithy/util-stream - stream chunk size ${W} is below threshold of ${w}, automatically buffering.`);if(v>=w)Y.push(A.flush(Q,X))}}),$.on("end",()=>{if(X!==-1){let B=A.flush(Q,X);if(A.sizeOf(B)>0)Y.push(B)}Y.push(null)}),Y}r1.createBufferedReadable=X8});var w6=U((e1)=>{Object.defineProperty(e1,"__esModule",{value:!0});e1.getAwsChunkedEncodingStream=void 0;var G8=h("node:stream"),B8=($,w)=>{let{base64Encoder:z,bodyLengthChecker:Y,checksumAlgorithmFn:Z,checksumLocationName:G,streamHasher:Q}=w,X=z!==void 0&&Z!==void 0&&G!==void 0&&Q!==void 0,B=X?Q(Z,$):void 0,K=new G8.Readable({read:()=>{}});return $.on("data",(W)=>{let N=Y(W)||0;K.push(`${N.toString(16)}\r
|
|
4
|
+
`),K.push(W),K.push(`\r
|
|
5
|
+
`)}),$.on("end",async()=>{if(K.push(`0\r
|
|
6
|
+
`),X){let W=z(await B);K.push(`${G}:${W}\r
|
|
7
|
+
`),K.push(`\r
|
|
8
|
+
`)}K.push(null)}),K};e1.getAwsChunkedEncodingStream=B8});var Y6=U((z6)=>{Object.defineProperty(z6,"__esModule",{value:!0});z6.headStream=void 0;async function K8($,w){var z;let Y=0,Z=[],G=$.getReader(),Q=!1;while(!Q){let{done:K,value:W}=await G.read();if(W)Z.push(W),Y+=(z=W===null||W===void 0?void 0:W.byteLength)!==null&&z!==void 0?z:0;if(Y>=w)break;Q=K}G.releaseLock();let X=new Uint8Array(Math.min(w,Y)),B=0;for(let K of Z){if(K.byteLength>X.byteLength-B){X.set(K.subarray(0,X.byteLength-B),B);break}else X.set(K,B);B+=K.length}return X}z6.headStream=K8});var B6=U((X6)=>{Object.defineProperty(X6,"__esModule",{value:!0});X6.headStream=void 0;var V8=h("node:stream"),W8=Y6(),U8=E(),L8=($,w)=>{if(U8.isReadableStream($))return W8.headStream($,w);return new Promise((z,Y)=>{let Z=new Q6;Z.limit=w,$.pipe(Z),$.on("error",(G)=>{Z.end(),Y(G)}),Z.on("error",Y),Z.on("finish",function(){let G=new Uint8Array(Buffer.concat(this.buffers));z(G)})})};X6.headStream=L8;class Q6 extends V8.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,this.bytesBuffered=0}_write($,w,z){var Y;if(this.buffers.push($),this.bytesBuffered+=(Y=$.byteLength)!==null&&Y!==void 0?Y:0,this.bytesBuffered>=this.limit){let Z=this.bytesBuffered-this.limit,G=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=G.subarray(0,G.byteLength-Z),this.emit("finish")}z()}}});var F6=U((Tw,j6)=>{var{defineProperty:e,getOwnPropertyDescriptor:J8,getOwnPropertyNames:j8}=Object,F8=Object.prototype.hasOwnProperty,O=($,w)=>e($,"name",{value:w,configurable:!0}),D8=($,w)=>{for(var z in w)e($,z,{get:w[z],enumerable:!0})},v8=($,w,z,Y)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of j8(w))if(!F8.call($,Z)&&Z!==z)e($,Z,{get:()=>w[Z],enumerable:!(Y=J8(w,Z))||Y.enumerable})}return $},N8=($)=>v8(e({},"__esModule",{value:!0}),$),V6={};D8(V6,{FetchHttpHandler:()=>M8,keepAliveSupport:()=>o,streamCollector:()=>H8});j6.exports=N8(V6);var K6=_(),C8=Q0();function j0($,w){return new Request($,w)}O(j0,"createRequest");function W6($=0){return new Promise((w,z)=>{if($)setTimeout(()=>{let Y=new Error(`Request did not complete within ${$} ms`);Y.name="TimeoutError",z(Y)},$)})}O(W6,"requestTimeout");var o={supported:void 0},M8=class ${static{O(this,"FetchHttpHandler")}static create(w){if(typeof w?.handle==="function")return w;return new $(w)}constructor(w){if(typeof w==="function")this.configProvider=w().then((z)=>z||{});else this.config=w??{},this.configProvider=Promise.resolve(this.config);if(o.supported===void 0)o.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in j0("https://[::1]"))}destroy(){}async handle(w,{abortSignal:z}={}){if(!this.config)this.config=await this.configProvider;let Y=this.config.requestTimeout,Z=this.config.keepAlive===!0,G=this.config.credentials;if(z?.aborted){let J=new Error("Request aborted");return J.name="AbortError",Promise.reject(J)}let Q=w.path,X=C8.buildQueryString(w.query||{});if(X)Q+=`?${X}`;if(w.fragment)Q+=`#${w.fragment}`;let B="";if(w.username!=null||w.password!=null){let J=w.username??"",R=w.password??"";B=`${J}:${R}@`}let{port:K,method:W}=w,N=`${w.protocol}//${B}${w.hostname}${K?`:${K}`:""}${Q}`,v=W==="GET"||W==="HEAD"?void 0:w.body,D={body:v,headers:new Headers(w.headers),method:W,credentials:G};if(this.config?.cache)D.cache=this.config.cache;if(v)D.duplex="half";if(typeof AbortController!=="undefined")D.signal=z;if(o.supported)D.keepalive=Z;if(typeof this.config.requestInit==="function")Object.assign(D,this.config.requestInit(w));let C=O(()=>{},"removeSignalEventListener"),S=j0(N,D),T=[fetch(S).then((J)=>{let R=J.headers,V={};for(let f of R.entries())V[f[0]]=f[1];if(J.body==null)return J.blob().then((f)=>({response:new K6.HttpResponse({headers:V,reason:J.statusText,statusCode:J.status,body:f})}));return{response:new K6.HttpResponse({headers:V,reason:J.statusText,statusCode:J.status,body:J.body})}}),W6(Y)];if(z)T.push(new Promise((J,R)=>{let V=O(()=>{let j=new Error("Request aborted");j.name="AbortError",R(j)},"onAbort");if(typeof z.addEventListener==="function"){let j=z;j.addEventListener("abort",V,{once:!0}),C=O(()=>j.removeEventListener("abort",V),"removeSignalEventListener")}else z.onabort=V}));return Promise.race(T).finally(C)}updateHttpClientConfig(w,z){this.config=void 0,this.configProvider=this.configProvider.then((Y)=>{return Y[w]=z,Y})}httpHandlerConfigs(){return this.config??{}}},R8=P(),H8=O(async($)=>{if(typeof Blob==="function"&&$ instanceof Blob||$.constructor?.name==="Blob"){if(Blob.prototype.arrayBuffer!==void 0)return new Uint8Array(await $.arrayBuffer());return U6($)}return L6($)},"streamCollector");async function U6($){let w=await J6($),z=R8.fromBase64(w);return new Uint8Array(z)}O(U6,"collectBlob");async function L6($){let w=[],z=$.getReader(),Y=!1,Z=0;while(!Y){let{done:X,value:B}=await z.read();if(B)w.push(B),Z+=B.length;Y=X}let G=new Uint8Array(Z),Q=0;for(let X of w)G.set(X,Q),Q+=X.length;return G}O(L6,"collectStream");function J6($){return new Promise((w,z)=>{let Y=new FileReader;Y.onloadend=()=>{if(Y.readyState!==2)return z(new Error("Reader aborted too early"));let Z=Y.result??"",G=Z.indexOf(","),Q=G>-1?G+1:Z.length;w(Z.substring(Q))},Y.onabort=()=>z(new Error("Read aborted")),Y.onerror=()=>z(Y.error),Y.readAsDataURL($)})}O(J6,"readToBase64")});var H6=U((kw,R6)=>{var{defineProperty:$0,getOwnPropertyDescriptor:h8,getOwnPropertyNames:b8}=Object,O8=Object.prototype.hasOwnProperty,D6=($,w)=>$0($,"name",{value:w,configurable:!0}),I8=($,w)=>{for(var z in w)$0($,z,{get:w[z],enumerable:!0})},x8=($,w,z,Y)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of b8(w))if(!O8.call($,Z)&&Z!==z)$0($,Z,{get:()=>w[Z],enumerable:!(Y=h8(w,Z))||Y.enumerable})}return $},A8=($)=>x8($0({},"__esModule",{value:!0}),$),v6={};I8(v6,{fromHex:()=>C6,toHex:()=>M6});R6.exports=A8(v6);var N6={},F0={};for(let $=0;$<256;$++){let w=$.toString(16).toLowerCase();if(w.length===1)w=`0${w}`;N6[$]=w,F0[w]=$}function C6($){if($.length%2!==0)throw new Error("Hex encoded strings must have an even number length");let w=new Uint8Array($.length/2);for(let z=0;z<$.length;z+=2){let Y=$.slice(z,z+2).toLowerCase();if(Y in F0)w[z/2]=F0[Y];else throw new Error(`Cannot decode unrecognized sequence ${Y} as hexadecimal`)}return w}D6(C6,"fromHex");function M6($){let w="";for(let z=0;z<$.byteLength;z++)w+=N6[$[z]];return w}D6(M6,"toHex")});var A6=U((I6)=>{Object.defineProperty(I6,"__esModule",{value:!0});I6.sdkStreamMixin=void 0;var S8=F6(),T8=P(),k8=H6(),E8=s(),h6=E(),b6="The stream has already been transformed.",y8=($)=>{var w,z;if(!O6($)&&!h6.isReadableStream($)){let Q=((z=(w=$===null||$===void 0?void 0:$.__proto__)===null||w===void 0?void 0:w.constructor)===null||z===void 0?void 0:z.name)||$;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${Q}`)}let Y=!1,Z=async()=>{if(Y)throw new Error(b6);return Y=!0,await S8.streamCollector($)},G=(Q)=>{if(typeof Q.stream!=="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
|
|
9
|
+
If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return Q.stream()};return Object.assign($,{transformToByteArray:Z,transformToString:async(Q)=>{let X=await Z();if(Q==="base64")return T8.toBase64(X);else if(Q==="hex")return k8.toHex(X);else if(Q===void 0||Q==="utf8"||Q==="utf-8")return E8.toUtf8(X);else if(typeof TextDecoder==="function")return new TextDecoder(Q).decode(X);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(Y)throw new Error(b6);if(Y=!0,O6($))return G($);else if(h6.isReadableStream($))return $;else throw new Error(`Cannot transform payload to web stream, got ${$}`)}})};I6.sdkStreamMixin=y8;var O6=($)=>typeof Blob==="function"&&$ instanceof Blob});var E6=U((T6)=>{Object.defineProperty(T6,"__esModule",{value:!0});T6.sdkStreamMixin=void 0;var f8=X1(),P8=c(),D0=h("node:stream"),q8=A6(),S6="The stream has already been transformed.",g8=($)=>{var w,z;if(!($ instanceof D0.Readable))try{return q8.sdkStreamMixin($)}catch(G){let Q=((z=(w=$===null||$===void 0?void 0:$.__proto__)===null||w===void 0?void 0:w.constructor)===null||z===void 0?void 0:z.name)||$;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${Q}`)}let Y=!1,Z=async()=>{if(Y)throw new Error(S6);return Y=!0,await f8.streamCollector($)};return Object.assign($,{transformToByteArray:Z,transformToString:async(G)=>{let Q=await Z();if(G===void 0||Buffer.isEncoding(G))return P8.fromArrayBuffer(Q.buffer,Q.byteOffset,Q.byteLength).toString(G);else return new TextDecoder(G).decode(Q)},transformToWebStream:()=>{if(Y)throw new Error(S6);if($.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof D0.Readable.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");return Y=!0,D0.Readable.toWeb($)}})};T6.sdkStreamMixin=g8});var P6=U((y6)=>{Object.defineProperty(y6,"__esModule",{value:!0});y6.splitStream=void 0;async function c8($){if(typeof $.stream==="function")$=$.stream();return $.tee()}y6.splitStream=c8});var l6=U((c6)=>{Object.defineProperty(c6,"__esModule",{value:!0});c6.splitStream=void 0;var q6=h("node:stream"),u8=P6(),g6=E();async function l8($){if(g6.isReadableStream($)||g6.isBlob($))return u8.splitStream($);let w=new q6.PassThrough,z=new q6.PassThrough;return $.pipe(w),$.pipe(z),[w,z]}c6.splitStream=l8});var a6=U((qw,x)=>{var{defineProperty:w0,getOwnPropertyDescriptor:d8,getOwnPropertyNames:_8}=Object,p8=Object.prototype.hasOwnProperty,C0=($,w)=>w0($,"name",{value:w,configurable:!0}),i8=($,w)=>{for(var z in w)w0($,z,{get:w[z],enumerable:!0})},v0=($,w,z,Y)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of _8(w))if(!p8.call($,Z)&&Z!==z)w0($,Z,{get:()=>w[Z],enumerable:!(Y=d8(w,Z))||Y.enumerable})}return $},y=($,w,z)=>(v0($,w,"default"),z&&v0(z,w,"default")),a8=($)=>v0(w0({},"__esModule",{value:!0}),$),I={};i8(I,{Uint8ArrayBlobAdapter:()=>N0});x.exports=a8(I);var d6=P(),_6=s();function p6($,w="utf-8"){if(w==="base64")return d6.toBase64($);return _6.toUtf8($)}C0(p6,"transformToString");function i6($,w){if(w==="base64")return N0.mutate(d6.fromBase64($));return N0.mutate(_6.fromUtf8($))}C0(i6,"transformFromString");var N0=class $ extends Uint8Array{static{C0(this,"Uint8ArrayBlobAdapter")}static fromString(w,z="utf-8"){switch(typeof w){case"string":return i6(w,z);default:throw new Error(`Unsupported conversion from ${typeof w} to Uint8ArrayBlobAdapter.`)}}static mutate(w){return Object.setPrototypeOf(w,$.prototype),w}transformToString(w="utf-8"){return p6(this,w)}};y(I,L0(),x.exports);y(I,c1(),x.exports);y(I,o1(),x.exports);y(I,w6(),x.exports);y(I,B6(),x.exports);y(I,E6(),x.exports);y(I,l6(),x.exports);y(I,E(),x.exports)});var zw=U((gw,r6)=>{var{defineProperty:H0,getOwnPropertyDescriptor:m8,getOwnPropertyNames:n8}=Object,s8=Object.prototype.hasOwnProperty,r8=($,w)=>{for(var z in w)H0($,z,{get:w[z],enumerable:!0})},t8=($,w,z,Y)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of n8(w))if(!s8.call($,Z)&&Z!==z)H0($,Z,{get:()=>w[Z],enumerable:!(Y=m8(w,Z))||Y.enumerable})}return $},o8=($)=>t8(H0({},"__esModule",{value:!0}),$),m6={};r8(m6,{RequestBuilder:()=>s6,collectBody:()=>e8,extendedEncodeURIComponent:()=>R0,requestBuilder:()=>ww,resolvedPath:()=>n6});r6.exports=o8(m6);var M0=a6(),e8=async($=new Uint8Array,w)=>{if($ instanceof Uint8Array)return M0.Uint8ArrayBlobAdapter.mutate($);if(!$)return M0.Uint8ArrayBlobAdapter.mutate(new Uint8Array);let z=w.streamCollector($);return M0.Uint8ArrayBlobAdapter.mutate(await z)};function R0($){return encodeURIComponent($).replace(/[!'()*]/g,function(w){return"%"+w.charCodeAt(0).toString(16).toUpperCase()})}var $w=_(),n6=($,w,z,Y,Z,G)=>{if(w!=null&&w[z]!==void 0){let Q=Y();if(Q.length<=0)throw new Error("Empty value provided for input HTTP label: "+z+".");$=$.replace(Z,G?Q.split("/").map((X)=>R0(X)).join("/"):R0(Q))}else throw new Error("No value provided for input HTTP label: "+z+".");return $};function ww($,w){return new s6($,w)}var s6=class{constructor($,w){this.input=$,this.context=w,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){let{hostname:$,protocol:w="https",port:z,path:Y}=await this.context.endpoint();this.path=Y;for(let Z of this.resolvePathStack)Z(this.path);return new $w.HttpRequest({protocol:w,hostname:this.hostname||$,port:z,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn($){return this.hostname=$,this}bp($){return this.resolvePathStack.push((w)=>{this.path=`${w?.endsWith("/")?w.slice(0,-1):w||""}`+$}),this}p($,w,z,Y){return this.resolvePathStack.push((Z)=>{this.path=n6(Z,this.input,$,w,z,Y)}),this}h($){return this.headers=$,this}q($){return this.query=$,this}b($){return this.body=$,this}m($){return this.method=$,this}}});
|
|
10
|
+
export{E0 as rc,_ as sc,K1 as tc,c as uc,s as vc,P as wc,d0 as xc,X1 as yc,H6 as zc,a6 as Ac,zw as Bc};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Sc as _}from"./chunk-xv24dwhq.js";import{Xc as A}from"./chunk-zs3ndhp8.js";import{Yc as p}from"./chunk-g1f16je5.js";var S=p(A(),1);var C="AWS_ACCESS_KEY_ID",N="AWS_SECRET_ACCESS_KEY",a="AWS_SESSION_TOKEN",i="AWS_CREDENTIAL_EXPIRATION",I="AWS_CREDENTIAL_SCOPE",d="AWS_ACCOUNT_ID",T=(e)=>async()=>{e?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");let o=process.env[C],r=process.env[N],n=process.env[a],s=process.env[i],t=process.env[I],E=process.env[d];if(o&&r){let c={accessKeyId:o,secretAccessKey:r,...n&&{sessionToken:n},...s&&{expiration:new Date(s)},...t&&{credentialScope:t},...E&&{accountId:E}};return S.setCredentialFeature(c,"CREDENTIALS_ENV_VARS","g"),c}throw new _("Unable to find environment variable credentials.",{logger:e?.logger})};export{T as fromEnv,a as ENV_SESSION,N as ENV_SECRET,C as ENV_KEY,i as ENV_EXPIRATION,I as ENV_CREDENTIAL_SCOPE,d as ENV_ACCOUNT_ID};export{C as Oc,N as Pc,T as Qc};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ga as I2,Ha as O2}from"./chunk-6v69415e.js";import"./chunk-
|
|
2
|
+
import{Ga as I2,Ha as O2}from"./chunk-6v69415e.js";import"./chunk-g1f16je5.js";/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function E2(z){return typeof z>"u"||z===null}function c2(z){return typeof z=="object"&&z!==null}function f2(z){return Array.isArray(z)?z:E2(z)?[]:[z]}function u2(z,J){var Q,X,V,$;if(J)for($=Object.keys(J),Q=0,X=$.length;Q<X;Q+=1)V=$[Q],z[V]=J[V];return z}function o2(z,J){var Q="",X;for(X=0;X<J;X+=1)Q+=z;return Q}function l2(z){return z===0&&Number.NEGATIVE_INFINITY===1/z}var r2=E2,i2=c2,n2=f2,e2=o2,z3=l2,J3=u2,D={isNothing:r2,isObject:i2,toArray:n2,repeat:e2,isNegativeZero:z3,extend:J3};function T2(z,J){var Q="",X=z.reason||"(unknown reason)";return z.mark?(z.mark.name&&(Q+='in "'+z.mark.name+'" '),Q+="("+(z.mark.line+1)+":"+(z.mark.column+1)+")",!J&&z.mark.snippet&&(Q+=`
|
|
3
3
|
|
|
4
4
|
`+z.mark.snippet),X+" "+Q):X}function v(z,J){Error.call(this),this.name="YAMLException",this.reason=z,this.mark=J,this.message=T2(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}v.prototype=Object.create(Error.prototype),v.prototype.constructor=v,v.prototype.toString=function(z){return this.name+": "+T2(this,z)};var O=v;function l(z,J,Q,X,V){var $="",Z="",q=Math.floor(V/2)-1;return X-J>q&&($=" ... ",J=X-q+$.length),Q-X>q&&(Z=" ...",Q=X+q-Z.length),{str:$+z.slice(J,Q).replace(/\t/g,"\u2192")+Z,pos:X-J+$.length}}function r(z,J){return D.repeat(" ",J-z.length)+z}function Q3(z,J){if(J=Object.create(J||null),!z.buffer)return null;J.maxLength||(J.maxLength=79),typeof J.indent!="number"&&(J.indent=1),typeof J.linesBefore!="number"&&(J.linesBefore=3),typeof J.linesAfter!="number"&&(J.linesAfter=2);for(var Q=/\r?\n|\r|\0/g,X=[0],V=[],$,Z=-1;$=Q.exec(z.buffer);)V.push($.index),X.push($.index+$[0].length),z.position<=$.index&&Z<0&&(Z=X.length-2);Z<0&&(Z=X.length-1);var q="",G,K,H=Math.min(z.line+J.linesAfter,V.length).toString().length,W=J.maxLength-(J.indent+H+3);for(G=1;G<=J.linesBefore&&!(Z-G<0);G++)K=l(z.buffer,X[Z-G],V[Z-G],z.position-(X[Z]-X[Z-G]),W),q=D.repeat(" ",J.indent)+r((z.line-G+1).toString(),H)+" | "+K.str+`
|
|
5
5
|
`+q;for(K=l(z.buffer,X[Z],V[Z],z.position,W),q+=D.repeat(" ",J.indent)+r((z.line+1).toString(),H)+" | "+K.str+`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
var j=Object.create;var{getPrototypeOf:k,defineProperty:e,getOwnPropertyNames:h,getOwnPropertyDescriptor:l}=Object,i=Object.prototype.hasOwnProperty;var m=(a,b,c)=>{c=a!=null?j(k(a)):{};let d=b||!a||!a.__esModule?e(c,"default",{value:a,enumerable:!0}):c;for(let f of h(a))if(!i.call(d,f))e(d,f,{get:()=>a[f],enumerable:!0});return d},g=new WeakMap,n=(a)=>{var b=g.get(a),c;if(b)return b;if(b=e({},"__esModule",{value:!0}),a&&typeof a==="object"||typeof a==="function")h(a).map((d)=>!i.call(b,d)&&e(b,d,{get:()=>a[d],enumerable:!(c=l(a,d))||c.enumerable}));return g.set(a,b),b},o=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var p=(a,b)=>{for(var c in b)e(a,c,{get:b[c],enumerable:!0,configurable:!0,set:(d)=>b[c]=()=>d})};var q=(a,b)=>()=>(a&&(b=a(a=0)),b);var r=import.meta.require;
|
|
2
|
-
export{m as
|
|
2
|
+
export{m as Yc,n as Zc,o as _c,p as $c,q as ad,r as bd};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Ia as gr,Ja as jr,Ka as nr,La as ir,Ma as Ir,Na as ar,Oa as Se,Pa as fr,Qa as kr,Ra as Nr,Sa as we,Ta as wr,Ua as Ne,Va as Cr,Wa as Ar,Xa as Gr,Ya as Hr,Za as Lr,_a as mr}from"./chunk-w2b5c4s1.js";import{jc as Oe,kc as $r,lc as B,mc as Tr,oc as E,pc as w}from"./chunk-3gg1gwg5.js";import{sc as hr,vc as Pr,wc as Sr,yc as Mr}from"./chunk-aydc3pns.js";import"./chunk-zs3ndhp8.js";import{_c as d}from"./chunk-g1f16je5.js";var H=d((X)=>{Object.defineProperty(X,"__esModule",{value:!0});X.resolveHttpAuthSchemeConfig=X.defaultSSOOIDCHttpAuthSchemeProvider=X.defaultSSOOIDCHttpAuthSchemeParametersProvider=void 0;var xe=w(),K=Oe(),ce=async(e,r,l)=>{return{operation:K.getSmithyContext(r).operation,region:await K.normalizeProvider(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};X.defaultSSOOIDCHttpAuthSchemeParametersProvider=ce;function oe(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(r,l)=>({signingProperties:{config:r,context:l}})}}function ue(e){return{schemeId:"smithy.api#noAuth"}}var pe=(e)=>{let r=[];switch(e.operation){case"CreateToken":{r.push(ue(e));break}default:r.push(oe(e))}return r};X.defaultSSOOIDCHttpAuthSchemeProvider=pe;var te=(e)=>{let r=xe.resolveAwsSdkSigV4Config(e);return Object.assign(r,{})};X.resolveHttpAuthSchemeConfig=te});var p=d((o)=>{Object.defineProperty(o,"__esModule",{value:!0});o.ruleSet=void 0;var m="required",S="fn",N="argv",U="ref",J=!0,Q="isSet",k="booleanEquals",F="error",_="endpoint",s="tree",L="PartitionResult",V="getAttr",Z={[m]:!1,type:"String"},$={[m]:!0,default:!1,type:"Boolean"},h={[U]:"Endpoint"},O={[S]:k,[N]:[{[U]:"UseFIPS"},!0]},x={[S]:k,[N]:[{[U]:"UseDualStack"},!0]},P={},g={[S]:V,[N]:[{[U]:L},"supportsFIPS"]},c={[U]:L},j={[S]:k,[N]:[!0,{[S]:V,[N]:[c,"supportsDualStack"]}]},n=[O],a=[x],f=[{[U]:"Region"}],lr={version:"1.0",parameters:{Region:Z,UseDualStack:$,UseFIPS:$,Endpoint:Z},rules:[{conditions:[{[S]:Q,[N]:[h]}],rules:[{conditions:n,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:F},{conditions:a,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:F},{endpoint:{url:h,properties:P,headers:P},type:_}],type:s},{conditions:[{[S]:Q,[N]:f}],rules:[{conditions:[{[S]:"aws.partition",[N]:f,assign:L}],rules:[{conditions:[O,x],rules:[{conditions:[{[S]:k,[N]:[J,g]},j],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:P,headers:P},type:_}],type:s},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:F}],type:s},{conditions:n,rules:[{conditions:[{[S]:k,[N]:[g,J]}],rules:[{conditions:[{[S]:"stringEquals",[N]:[{[S]:V,[N]:[c,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:P,headers:P},type:_},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:P,headers:P},type:_}],type:s},{error:"FIPS is enabled but this partition does not support FIPS",type:F}],type:s},{conditions:a,rules:[{conditions:[j],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:P,headers:P},type:_}],type:s},{error:"DualStack is enabled but this partition does not support DualStack",type:F}],type:s},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:P,headers:P},type:_}],type:s}],type:s},{error:"Invalid Configuration: Missing Region",type:F}]};o.ruleSet=lr});var re=d((t)=>{Object.defineProperty(t,"__esModule",{value:!0});t.defaultEndpointResolver=void 0;var vr=Ir(),b=ir(),Dr=p(),qr=new b.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),yr=(e,r={})=>{return qr.get(e,()=>b.resolveEndpoint(Dr.ruleSet,{endpointParams:e,logger:r.logger}))};t.defaultEndpointResolver=yr;b.customEndpointFunctions.aws=vr.awsEndpointFunctions});var De=d((Ie)=>{Object.defineProperty(Ie,"__esModule",{value:!0});Ie.getRuntimeConfig=void 0;var Rr=w(),Er=B(),sr=E(),dr=Nr(),le=Sr(),ie=Pr(),Fr=H(),_r=re(),Ur=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??le.fromBase64,base64Encoder:e?.base64Encoder??le.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??_r.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Fr.defaultSSOOIDCHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(r)=>r.getIdentityProvider("aws.auth#sigv4"),signer:new Rr.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(r)=>r.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Er.NoAuthSigner}],logger:e?.logger??new sr.NoOpLogger,serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??dr.parseUrl,utf8Decoder:e?.utf8Decoder??ie.fromUtf8,utf8Encoder:e?.utf8Encoder??ie.toUtf8}};Ie.getRuntimeConfig=Ur});var se=d((Re)=>{Object.defineProperty(Re,"__esModule",{value:!0});Re.getRuntimeConfig=void 0;var Vr=Tr(),br=Vr.__importDefault(Cr()),Br=w(),qe=Ar(),C=Se(),Wr=Gr(),ye=Ne(),M=kr(),Pe=Mr(),Yr=Hr(),Kr=wr(),Xr=De(),zr=E(),Jr=Lr(),Qr=E(),Zr=(e)=>{Qr.emitWarningIfUnsupportedVersion(process.version);let r=Jr.resolveDefaultsModeConfig(e),l=()=>r().then(zr.loadConfigsForDefaultMode),v=Xr.getRuntimeConfig(e);Br.emitWarningIfUnsupportedVersion(process.version);let I={profile:e?.profile};return{...v,...e,runtime:"node",defaultsMode:r,bodyLengthChecker:e?.bodyLengthChecker??Yr.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??qe.createDefaultUserAgentProvider({serviceId:v.serviceId,clientVersion:br.default.version}),maxAttempts:e?.maxAttempts??M.loadConfig(ye.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??M.loadConfig(C.NODE_REGION_CONFIG_OPTIONS,{...C.NODE_REGION_CONFIG_FILE_OPTIONS,...I}),requestHandler:Pe.NodeHttpHandler.create(e?.requestHandler??l),retryMode:e?.retryMode??M.loadConfig({...ye.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await l()).retryMode||Kr.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??Wr.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??Pe.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??M.loadConfig(C.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,I),useFipsEndpoint:e?.useFipsEndpoint??M.loadConfig(C.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,I),userAgentAppId:e?.userAgentAppId??M.loadConfig(qe.NODE_APP_ID_CONFIG_OPTIONS,I)}};Re.getRuntimeConfig=Zr});var Wl=d((Ql,je)=>{var{defineProperty:A,getOwnPropertyDescriptor:Or,getOwnPropertyNames:xr}=Object,cr=Object.prototype.hasOwnProperty,D=(e,r)=>A(e,"name",{value:r,configurable:!0}),or=(e,r)=>{for(var l in r)A(e,l,{get:r[l],enumerable:!0})},ur=(e,r,l,v)=>{if(r&&typeof r==="object"||typeof r==="function"){for(let I of xr(r))if(!cr.call(e,I)&&I!==l)A(e,I,{get:()=>r[I],enumerable:!(v=Or(r,I))||v.enumerable})}return e},pr=(e)=>ur(A({},"__esModule",{value:!0}),e),Ce={};or(Ce,{$Command:()=>He.Command,AccessDeniedException:()=>Le,AuthorizationPendingException:()=>Ve,CreateTokenCommand:()=>he,CreateTokenRequestFilterSensitiveLog:()=>be,CreateTokenResponseFilterSensitiveLog:()=>Be,ExpiredTokenException:()=>We,InternalServerException:()=>Ye,InvalidClientException:()=>Ke,InvalidGrantException:()=>Xe,InvalidRequestException:()=>ze,InvalidScopeException:()=>Je,SSOOIDC:()=>ge,SSOOIDCClient:()=>Ge,SSOOIDCServiceException:()=>y,SlowDownException:()=>Qe,UnauthorizedClientException:()=>Ze,UnsupportedGrantTypeException:()=>$e,__Client:()=>Ae.Client});je.exports=pr(Ce);var de=gr(),tr=jr(),el=nr(),Fe=ar(),rl=Se(),W=B(),ll=fr(),il=we(),_e=Ne(),Ae=E(),Ue=H(),Il=D((e)=>{return Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"})},"resolveClientEndpointParameters"),vl={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Dl=se(),Me=mr(),Te=hr(),ke=E(),ql=D((e)=>{let{httpAuthSchemes:r,httpAuthSchemeProvider:l,credentials:v}=e;return{setHttpAuthScheme(I){let q=r.findIndex((G)=>G.schemeId===I.schemeId);if(q===-1)r.push(I);else r.splice(q,1,I)},httpAuthSchemes(){return r},setHttpAuthSchemeProvider(I){l=I},httpAuthSchemeProvider(){return l},setCredentials(I){v=I},credentials(){return v}}},"getHttpAuthExtensionConfiguration"),yl=D((e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}},"resolveHttpAuthRuntimeConfig"),Pl=D((e,r)=>{let l=Object.assign(Me.getAwsRegionExtensionConfiguration(e),ke.getDefaultExtensionConfiguration(e),Te.getHttpHandlerExtensionConfiguration(e),ql(e));return r.forEach((v)=>v.configure(l)),Object.assign(e,Me.resolveAwsRegionExtensionConfiguration(l),ke.resolveDefaultRuntimeConfig(l),Te.resolveHttpHandlerRuntimeConfig(l),yl(l))},"resolveRuntimeExtensions"),Ge=class extends Ae.Client{static{D(this,"SSOOIDCClient")}config;constructor(...[e]){let r=Dl.getRuntimeConfig(e||{});super(r);this.initConfig=r;let l=Il(r),v=Fe.resolveUserAgentConfig(l),I=_e.resolveRetryConfig(v),q=rl.resolveRegionConfig(I),G=de.resolveHostHeaderConfig(q),ne=il.resolveEndpointConfig(G),ae=Ue.resolveHttpAuthSchemeConfig(ne),fe=Pl(ae,e?.extensions||[]);this.config=fe,this.middlewareStack.use(Fe.getUserAgentPlugin(this.config)),this.middlewareStack.use(_e.getRetryPlugin(this.config)),this.middlewareStack.use(ll.getContentLengthPlugin(this.config)),this.middlewareStack.use(de.getHostHeaderPlugin(this.config)),this.middlewareStack.use(tr.getLoggerPlugin(this.config)),this.middlewareStack.use(el.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(W.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Ue.defaultSSOOIDCHttpAuthSchemeParametersProvider,identityProviderConfigProvider:D(async(me)=>new W.DefaultIdentityProviderConfig({"aws.auth#sigv4":me.credentials}),"identityProviderConfigProvider")})),this.middlewareStack.use(W.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}},Sl=E(),Nl=we(),Rl=$r(),He=E(),T=E(),El=E(),y=class e extends El.ServiceException{static{D(this,"SSOOIDCServiceException")}constructor(r){super(r);Object.setPrototypeOf(this,e.prototype)}},Le=class e extends y{static{D(this,"AccessDeniedException")}name="AccessDeniedException";$fault="client";error;error_description;constructor(r){super({name:"AccessDeniedException",$fault:"client",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},Ve=class e extends y{static{D(this,"AuthorizationPendingException")}name="AuthorizationPendingException";$fault="client";error;error_description;constructor(r){super({name:"AuthorizationPendingException",$fault:"client",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},be=D((e)=>({...e,...e.clientSecret&&{clientSecret:T.SENSITIVE_STRING},...e.refreshToken&&{refreshToken:T.SENSITIVE_STRING},...e.codeVerifier&&{codeVerifier:T.SENSITIVE_STRING}}),"CreateTokenRequestFilterSensitiveLog"),Be=D((e)=>({...e,...e.accessToken&&{accessToken:T.SENSITIVE_STRING},...e.refreshToken&&{refreshToken:T.SENSITIVE_STRING},...e.idToken&&{idToken:T.SENSITIVE_STRING}}),"CreateTokenResponseFilterSensitiveLog"),We=class e extends y{static{D(this,"ExpiredTokenException")}name="ExpiredTokenException";$fault="client";error;error_description;constructor(r){super({name:"ExpiredTokenException",$fault:"client",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},Ye=class e extends y{static{D(this,"InternalServerException")}name="InternalServerException";$fault="server";error;error_description;constructor(r){super({name:"InternalServerException",$fault:"server",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},Ke=class e extends y{static{D(this,"InvalidClientException")}name="InvalidClientException";$fault="client";error;error_description;constructor(r){super({name:"InvalidClientException",$fault:"client",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},Xe=class e extends y{static{D(this,"InvalidGrantException")}name="InvalidGrantException";$fault="client";error;error_description;constructor(r){super({name:"InvalidGrantException",$fault:"client",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},ze=class e extends y{static{D(this,"InvalidRequestException")}name="InvalidRequestException";$fault="client";error;error_description;constructor(r){super({name:"InvalidRequestException",$fault:"client",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},Je=class e extends y{static{D(this,"InvalidScopeException")}name="InvalidScopeException";$fault="client";error;error_description;constructor(r){super({name:"InvalidScopeException",$fault:"client",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},Qe=class e extends y{static{D(this,"SlowDownException")}name="SlowDownException";$fault="client";error;error_description;constructor(r){super({name:"SlowDownException",$fault:"client",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},Ze=class e extends y{static{D(this,"UnauthorizedClientException")}name="UnauthorizedClientException";$fault="client";error;error_description;constructor(r){super({name:"UnauthorizedClientException",$fault:"client",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},$e=class e extends y{static{D(this,"UnsupportedGrantTypeException")}name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(r){super({name:"UnsupportedGrantTypeException",$fault:"client",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},Y=w(),sl=B(),i=E(),dl=D(async(e,r)=>{let l=sl.requestBuilder(e,r),v={"content-type":"application/json"};l.bp("/token");let I;return I=JSON.stringify(i.take(e,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:D((q)=>i._json(q),"scope")})),l.m("POST").h(v).b(I),l.build()},"se_CreateTokenCommand"),Fl=D(async(e,r)=>{if(e.statusCode!==200&&e.statusCode>=300)return _l(e,r);let l=i.map({$metadata:R(e)}),v=i.expectNonNull(i.expectObject(await Y.parseJsonBody(e.body,r)),"body"),I=i.take(v,{accessToken:i.expectString,expiresIn:i.expectInt32,idToken:i.expectString,refreshToken:i.expectString,tokenType:i.expectString});return Object.assign(l,I),l},"de_CreateTokenCommand"),_l=D(async(e,r)=>{let l={...e,body:await Y.parseJsonErrorBody(e.body,r)},v=Y.loadRestJsonErrorCode(e,l.body);switch(v){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await Ml(l,r);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await Tl(l,r);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await kl(l,r);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await wl(l,r);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await Cl(l,r);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await Al(l,r);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await Gl(l,r);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await Hl(l,r);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await Ll(l,r);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await Vl(l,r);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await bl(l,r);default:let I=l.body;return Ul({output:e,parsedBody:I,errorCode:v})}},"de_CommandError"),Ul=i.withBaseException(y),Ml=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new Le({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_AccessDeniedExceptionRes"),Tl=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new Ve({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_AuthorizationPendingExceptionRes"),kl=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new We({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_ExpiredTokenExceptionRes"),wl=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new Ye({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_InternalServerExceptionRes"),Cl=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new Ke({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_InvalidClientExceptionRes"),Al=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new Xe({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_InvalidGrantExceptionRes"),Gl=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new ze({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_InvalidRequestExceptionRes"),Hl=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new Je({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_InvalidScopeExceptionRes"),Ll=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new Qe({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_SlowDownExceptionRes"),Vl=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new Ze({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_UnauthorizedClientExceptionRes"),bl=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new $e({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_UnsupportedGrantTypeExceptionRes"),R=D((e)=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),"deserializeMetadata"),he=class extends He.Command.classBuilder().ep(vl).m(function(e,r,l,v){return[Rl.getSerdePlugin(l,this.serialize,this.deserialize),Nl.getEndpointPlugin(l,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(be,Be).ser(dl).de(Fl).build(){static{D(this,"CreateTokenCommand")}},Bl={CreateTokenCommand:he},ge=class extends Ge{static{D(this,"SSOOIDC")}};Sl.createAggregatedClient(Bl,ge)});export default Wl();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ga as U,Ha as m}from"./chunk-6v69415e.js";import"./chunk-
|
|
2
|
+
import{Ga as U,Ha as m}from"./chunk-6v69415e.js";import"./chunk-g1f16je5.js";/*!
|
|
3
3
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Gb as $,Hb as me}from"./chunk-xe04sf1b.js";import{Kb as m,Lb as Ae,fc as Tt}from"./chunk-x0j2dg1x.js";import{lc as we,pc as er,qc as Sr}from"./chunk-3gg1gwg5.js";import{uc as Mr,vc as $r}from"./chunk-aydc3pns.js";import{Gc as le}from"./chunk-wchdk5rr.js";import{Kc as W,Mc as ue}from"./chunk-v07vvpcr.js";import{Wc as Ut}from"./chunk-xv24dwhq.js";import{Yc as O,bd as Br}from"./chunk-g1f16je5.js";function Hr(e){return e}var Lt=(e)=>(t)=>async(r)=>{if(!m.isInstance(r.request))return t(r);let{request:o}=r,{handlerProtocol:n=""}=e.requestHandler.metadata||{};if(n.indexOf("h2")>=0&&!o.headers[":authority"])delete o.headers.host,o.headers[":authority"]=o.hostname+(o.port?":"+o.port:"");else if(!o.headers.host){let s=o.hostname;if(o.port!=null)s+=`:${o.port}`;o.headers.host=s}return t(r)},Ft={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},qr=(e)=>({applyToStack:(t)=>{t.add(Lt(e),Ft)}});var kt=()=>(e,t)=>async(r)=>{try{let o=await e(r),{clientName:n,commandName:s,logger:i,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:p}=a,u=c??t.inputFilterSensitiveLog,x=p??t.outputFilterSensitiveLog,{$metadata:l,...d}=o.output;return i?.info?.({clientName:n,commandName:s,input:u(r.input),output:x(d),metadata:l}),o}catch(o){let{clientName:n,commandName:s,logger:i,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c}=a,p=c??t.inputFilterSensitiveLog;throw i?.error?.({clientName:n,commandName:s,input:p(r.input),error:o,metadata:o.$metadata}),o}},Gt={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Jr=(e)=>({applyToStack:(t)=>{t.add(kt(),Gt)}});var re="X-Amzn-Trace-Id",Vt="AWS_LAMBDA_FUNCTION_NAME",Wt="_X_AMZN_TRACE_ID",Bt=(e)=>(t)=>async(r)=>{let{request:o}=r;if(!m.isInstance(o)||e.runtime!=="node")return t(r);let n=Object.keys(o.headers??{}).find((c)=>c.toLowerCase()===re.toLowerCase())??re;if(o.headers.hasOwnProperty(n))return t(r);let s=process.env[Vt],i=process.env[Wt],a=(c)=>typeof c==="string"&&c.length>0;if(a(s)&&a(i))o.headers[re]=i;return t({...r,request:o})},Yt={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},ro=(e)=>({applyToStack:(t)=>{t.add(Bt(e),Yt)}});var ye=O(we(),1),oe=void 0;function zt(e){if(e===void 0)return!0;return typeof e==="string"&&e.length<=50}function no(e){let t=ye.normalizeProvider(e.userAgentAppId??oe),{customUserAgent:r}=e;return Object.assign(e,{customUserAgent:typeof r==="string"?[[r]]:r,userAgentAppId:async()=>{let o=await t();if(!zt(o)){let n=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console:e.logger;if(typeof o!=="string")n?.warn("userAgentAppId must be a string or undefined.");else if(o.length>50)n?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return o}})}class jt{constructor({size:e,params:t}){if(this.data=new Map,this.parameters=[],this.capacity=e??50,t)this.parameters=t}get(e,t){let r=this.hash(e);if(r===!1)return t();if(!this.data.has(r)){if(this.data.size>this.capacity+10){let o=this.data.keys(),n=0;while(!0){let{value:s,done:i}=o.next();if(this.data.delete(s),i||++n>10)break}}this.data.set(r,t())}return this.data.get(r)}size(){return this.data.size}hash(e){let t="",{parameters:r}=this;if(r.length===0)return!1;for(let o of r){let n=String(e[o]??"");if(n.includes("|;"))return!1;t+=n+"|;"}return t}}var Xt=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),U=(e)=>Xt.test(e)||e.startsWith("[")&&e.endsWith("]");var Ht=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),v=(e,t=!1)=>{if(!t)return Ht.test(e);let r=e.split(".");for(let o of r)if(!v(o))return!1;return!0};var M={};var h="endpoints";function E(e){if(typeof e!=="object"||e==null)return e;if("ref"in e)return`$${E(e.ref)}`;if("fn"in e)return`${e.fn}(${(e.argv||[]).map(E).join(", ")})`;return JSON.stringify(e,null,2)}class f extends Error{constructor(e){super(e);this.name="EndpointError"}}var De=(e,t)=>e===t;var Ce=(e)=>{let t=e.split("."),r=[];for(let o of t){let n=o.indexOf("[");if(n!==-1){if(o.indexOf("]")!==o.length-1)throw new f(`Path: '${e}' does not end with ']'`);let s=o.slice(n+1,-1);if(Number.isNaN(parseInt(s)))throw new f(`Invalid array index: '${s}' in path: '${e}'`);if(n!==0)r.push(o.slice(0,n));r.push(s)}else r.push(o)}return r};var V=(e,t)=>Ce(t).reduce((r,o)=>{if(typeof r!=="object")throw new f(`Index '${o}' in '${t}' not found in '${JSON.stringify(e)}'`);else if(Array.isArray(r))return r[parseInt(o)];return r[o]},e);var Pe=(e)=>e!=null;var be=(e)=>!e;var ne={[W.HTTP]:80,[W.HTTPS]:443},Ue=(e)=>{let t=(()=>{try{if(e instanceof URL)return e;if(typeof e==="object"&&"hostname"in e){let{hostname:l,port:d,protocol:w="",path:G="",query:vt={}}=e,Ne=new URL(`${w}//${l}${d?`:${d}`:""}${G}`);return Ne.search=Object.entries(vt).map(([Mt,$t])=>`${Mt}=${$t}`).join("&"),Ne}return new URL(e)}catch(l){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;let r=t.href,{host:o,hostname:n,pathname:s,protocol:i,search:a}=t;if(a)return null;let c=i.slice(0,-1);if(!Object.values(W).includes(c))return null;let p=U(n),u=r.includes(`${o}:${ne[c]}`)||typeof e==="string"&&e.includes(`${o}:${ne[c]}`),x=`${o}${u?`:${ne[c]}`:""}`;return{scheme:c,authority:x,path:s,normalizedPath:s.endsWith("/")?s:`${s}/`,isIp:p}};var ve=(e,t)=>e===t;var Me=(e,t,r,o)=>{if(t>=r||e.length<r)return null;if(!o)return e.substring(t,r);return e.substring(e.length-r,e.length-t)};var $e=(e)=>encodeURIComponent(e).replace(/[!*'()]/g,(t)=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`);var Le={booleanEquals:De,getAttr:V,isSet:Pe,isValidHostLabel:v,not:be,parseURL:Ue,stringEquals:ve,substring:Me,uriEncode:$e};var B=(e,t)=>{let r=[],o={...t.endpointParams,...t.referenceRecord},n=0;while(n<e.length){let s=e.indexOf("{",n);if(s===-1){r.push(e.slice(n));break}r.push(e.slice(n,s));let i=e.indexOf("}",s);if(i===-1){r.push(e.slice(s));break}if(e[s+1]==="{"&&e[i+1]==="}")r.push(e.slice(s+1,i)),n=i+2;let a=e.substring(s+1,i);if(a.includes("#")){let[c,p]=a.split("#");r.push(V(o[c],p))}else r.push(o[a]);n=i+1}return r.join("")};var Fe=({ref:e},t)=>{return{...t.endpointParams,...t.referenceRecord}[e]};var A=(e,t,r)=>{if(typeof e==="string")return B(e,r);else if(e.fn)return Y(e,r);else if(e.ref)return Fe(e,r);throw new f(`'${t}': ${String(e)} is not a string, function or reference.`)};var Y=({fn:e,argv:t},r)=>{let o=t.map((s)=>["boolean","number"].includes(typeof s)?s:A(s,"arg",r)),n=e.split(".");if(n[0]in M&&n[1]!=null)return M[n[0]][n[1]](...o);return Le[e](...o)};var ke=({assign:e,...t},r)=>{if(e&&e in r.referenceRecord)throw new f(`'${e}' is already defined in Reference Record.`);let o=Y(t,r);return r.logger?.debug?.(`${h} evaluateCondition: ${E(t)} = ${E(o)}`),{result:o===""?!0:!!o,...e!=null&&{toAssign:{name:e,value:o}}}};var y=(e=[],t)=>{let r={};for(let o of e){let{result:n,toAssign:s}=ke(o,{...t,referenceRecord:{...t.referenceRecord,...r}});if(!n)return{result:n};if(s)r[s.name]=s.value,t.logger?.debug?.(`${h} assign: ${s.name} := ${E(s.value)}`)}return{result:!0,referenceRecord:r}};var Ge=(e,t)=>Object.entries(e).reduce((r,[o,n])=>({...r,[o]:n.map((s)=>{let i=A(s,"Header value entry",t);if(typeof i!=="string")throw new f(`Header '${o}' value '${i}' is not a string`);return i})}),{});var se=(e,t)=>{if(Array.isArray(e))return e.map((r)=>se(r,t));switch(typeof e){case"string":return B(e,t);case"object":if(e===null)throw new f(`Unexpected endpoint property: ${e}`);return z(e,t);case"boolean":return e;default:throw new f(`Unexpected endpoint property type: ${typeof e}`)}};var z=(e,t)=>Object.entries(e).reduce((r,[o,n])=>({...r,[o]:se(n,t)}),{});var Ve=(e,t)=>{let r=A(e,"Endpoint URL",t);if(typeof r==="string")try{return new URL(r)}catch(o){throw console.error(`Failed to construct URL with ${r}`,o),o}throw new f(`Endpoint URL must be a string, got ${typeof r}`)};var We=(e,t)=>{let{conditions:r,endpoint:o}=e,{result:n,referenceRecord:s}=y(r,t);if(!n)return;let i={...t,referenceRecord:{...t.referenceRecord,...s}},{url:a,properties:c,headers:p}=o;return t.logger?.debug?.(`${h} Resolving endpoint from template: ${E(o)}`),{...p!=null&&{headers:Ge(p,i)},...c!=null&&{properties:z(c,i)},url:Ve(a,i)}};var Be=(e,t)=>{let{conditions:r,error:o}=e,{result:n,referenceRecord:s}=y(r,t);if(!n)return;throw new f(A(o,"Error",{...t,referenceRecord:{...t.referenceRecord,...s}}))};var Ye=(e,t)=>{let{conditions:r,rules:o}=e,{result:n,referenceRecord:s}=y(r,t);if(!n)return;return j(o,{...t,referenceRecord:{...t.referenceRecord,...s}})};var j=(e,t)=>{for(let r of e)if(r.type==="endpoint"){let o=We(r,t);if(o)return o}else if(r.type==="error")Be(r,t);else if(r.type==="tree"){let o=Ye(r,t);if(o)return o}else throw new f(`Unknown endpoint rule: ${r}`);throw new f("Rules evaluation failed")};var qt=(e,t)=>{let{endpointParams:r,logger:o}=t,{parameters:n,rules:s}=e;t.logger?.debug?.(`${h} Initial EndpointParams: ${E(r)}`);let i=Object.entries(n).filter(([,p])=>p.default!=null).map(([p,u])=>[p,u.default]);if(i.length>0)for(let[p,u]of i)r[p]=r[p]??u;let a=Object.entries(n).filter(([,p])=>p.required).map(([p])=>p);for(let p of a)if(r[p]==null)throw new f(`Missing required parameter: '${p}'`);let c=j(s,{endpointParams:r,logger:o,referenceRecord:{}});return t.logger?.debug?.(`${h} Resolved endpoint: ${E(c)}`),c};var ie=(e,t=!1)=>{if(t){for(let r of e.split("."))if(!ie(r))return!1;return!0}if(!v(e))return!1;if(e.length<3||e.length>63)return!1;if(e!==e.toLowerCase())return!1;if(U(e))return!1;return!0};var ze=(e)=>{let t=e.split(":");if(t.length<6)return null;let[r,o,n,s,i,...a]=t;if(r!=="arn"||o===""||n===""||a.join(":")==="")return null;let c=a.map((p)=>p.split("/")).flat();return{partition:o,service:n,region:s,accountId:i,resourceId:c}};var je={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"AWS ISOF global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}}],version:"1.1"};var Jt=je,Kt="",Xe=(e)=>{let{partitions:t}=Jt;for(let o of t){let{regions:n,outputs:s}=o;for(let[i,a]of Object.entries(n))if(i===e)return{...s,...a}}for(let o of t){let{regionRegex:n,outputs:s}=o;if(new RegExp(n).test(e))return{...s}}let r=t.find((o)=>o.id==="aws");if(!r)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...r.outputs}};var He=()=>Kt;var Qt={isVirtualHostableS3Bucket:ie,parseArn:ze,partition:Xe};M.aws=Qt;var R=O(er(),1),tr=/\d{12}\.ddb/;async function qe(e,t,r){if(r.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor")R.setFeature(e,"PROTOCOL_RPC_V2_CBOR","M");if(typeof t.retryStrategy==="function"){let s=await t.retryStrategy();if(typeof s.acquireInitialRetryToken==="function")if(s.constructor?.name?.includes("Adaptive"))R.setFeature(e,"RETRY_MODE_ADAPTIVE","F");else R.setFeature(e,"RETRY_MODE_STANDARD","E");else R.setFeature(e,"RETRY_MODE_LEGACY","D")}if(typeof t.accountIdEndpointMode==="function"){let s=e.endpointV2;if(String(s?.url?.hostname).match(tr))R.setFeature(e,"ACCOUNT_ID_ENDPOINT","O");switch(await t.accountIdEndpointMode?.()){case"disabled":R.setFeature(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":R.setFeature(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":R.setFeature(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}let n=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(n?.$source){let s=n;if(s.accountId)R.setFeature(e,"RESOLVED_ACCOUNT_ID","T");for(let[i,a]of Object.entries(s.$source??{}))R.setFeature(e,i,a)}}var ae="user-agent",X="x-amz-user-agent",ce=" ",H="/",Ze=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Je=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,pe="-";function Ke(e){let t="";for(let r in e){let o=e[r];if(t.length+o.length+1<=1024){if(t.length)t+=","+o;else t+=o;continue}break}return t}var rr=(e)=>(t,r)=>async(o)=>{let{request:n}=o;if(!m.isInstance(n))return t(o);let{headers:s}=n,i=r?.userAgent?.map(q)||[],a=(await e.defaultUserAgentProvider()).map(q);await qe(r,e,o);let c=r;a.push(`m/${Ke(Object.assign({},r.__smithy_context?.features,c.__aws_sdk_context?.features))}`);let p=e?.customUserAgent?.map(q)||[],u=await e.userAgentAppId();if(u)a.push(q([`app/${u}`]));let x=He(),l=(x?[x]:[]).concat([...a,...i,...p]).join(ce),d=[...a.filter((w)=>w.startsWith("aws-sdk-")),...p].join(ce);if(e.runtime!=="browser"){if(d)s[X]=s[X]?`${s[ae]} ${d}`:d;s[ae]=l}else s[X]=l;return t({...o,request:n})},q=(e)=>{let t=e[0].split(H).map((i)=>i.replace(Ze,pe)).join(H),r=e[1]?.replace(Je,pe),o=t.indexOf(H),n=t.substring(0,o),s=t.substring(o+1);if(n==="api")s=s.toLowerCase();return[n,s,r].filter((i)=>i&&i.length>0).reduce((i,a,c)=>{switch(c){case 0:return a;case 1:return`${i}/${a}`;default:return`${i}#${a}`}},"")},or={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},js=(e)=>({applyToStack:(t)=>{t.add(rr(e),or)}});var Z=(e)=>typeof e==="string"&&(e.startsWith("fips-")||e.endsWith("-fips"));var fe=(e)=>Z(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e;var ri=(e)=>{let{region:t,useFipsEndpoint:r}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{if(typeof t==="string")return fe(t);let o=await t();return fe(o)},useFipsEndpoint:async()=>{let o=typeof t==="string"?t:await t();if(Z(o))return!0;return typeof r!=="function"?Promise.resolve(!!r):r()}})};var D=(e,t,r)=>{if(!(t in e))return;if(e[t]==="true")return!0;if(e[t]==="false")return!1;throw new Error(`Cannot load ${r} "${t}". Expected "true" or "false", got ${e[t]}.`)};var T;(function(e){e.ENV="env",e.CONFIG="shared config entry"})(T||(T={}));var nr="AWS_USE_DUALSTACK_ENDPOINT",sr="use_dualstack_endpoint";var di={environmentVariableSelector:(e)=>D(e,nr,T.ENV),configFileSelector:(e)=>D(e,sr,T.CONFIG),default:!1};var ir="AWS_USE_FIPS_ENDPOINT",ar="use_fips_endpoint";var Ei={environmentVariableSelector:(e)=>D(e,ir,T.ENV),configFileSelector:(e)=>D(e,ar,T.CONFIG),default:!1};var Qe=(e)=>e[ue]||(e[ue]={});var S=(e)=>{if(typeof e==="function")return e;let t=Promise.resolve(e);return()=>t};var et={environmentVariableSelector:(e)=>e.AWS_REGION,configFileSelector:(e)=>e.region,default:()=>{throw new Error("Region is missing")}},Mi={preferredFile:"credentials"};var tt="content-length";function cr(e){return(t)=>async(r)=>{let o=r.request;if(m.isInstance(o)){let{body:n,headers:s}=o;if(n&&Object.keys(s).map((i)=>i.toLowerCase()).indexOf(tt)===-1)try{let i=e(n);o.headers={...o.headers,[tt]:String(i)}}catch(i){}}return t({...r,request:o})}}var pr={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},ca=(e)=>({applyToStack:(t)=>{t.add(cr(e.bodyLengthChecker),pr)}});var rt=(e,t)=>(r,o)=>async(n)=>{let{response:s}=await r(n);try{let i=await t(s,e);return{response:s,output:i}}catch(i){if(Object.defineProperty(i,"$response",{value:s}),!("$metadata"in i)){try{i.message+=`
|
|
2
|
+
Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`}catch(c){if(!o.logger||o.logger?.constructor?.name==="NoOpLogger")console.warn("Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.");else o.logger?.warn?.("Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.")}if(typeof i.$responseBodyText!=="undefined"){if(i.$response)i.$response.body=i.$responseBodyText}}throw i}};var ot=(e,t)=>(r,o)=>async(n)=>{let s=o.endpointV2?.url&&e.urlParser?async()=>e.urlParser(o.endpointV2.url):e.endpoint;if(!s)throw new Error("No valid endpoint provider available.");let i=await t(n.input,{...e,endpoint:s});return r({...n,request:i})};var fr={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},de={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function ma(e,t,r){return{applyToStack:(o)=>{o.add(rt(e,r),fr),o.add(ot(e,t),de)}}}var ft=O(we(),1);var nt=async(e)=>{let t=e?.Bucket||"";if(typeof e.Bucket==="string")e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(Er(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!mr(t)||t.indexOf(".")!==-1&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)e.ForcePathStyle=!0;if(e.DisableMultiRegionAccessPoints)e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0;return e},ur=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,dr=/(\d+\.){3}\d+/,lr=/\.\./;var mr=(e)=>ur.test(e)&&!dr.test(e)&&!lr.test(e),Er=(e)=>{let[t,r,o,,,n]=e.split(":"),s=t==="arn"&&e.split(":").length>=6,i=Boolean(s&&r&&o&&n);if(s&&!i)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return i};var st=(e,t,r)=>{let o=async()=>{let n=r[e]??r[t];if(typeof n==="function")return n();return n};if(e==="credentialScope"||t==="CredentialScope")return async()=>{let n=typeof r.credentials==="function"?await r.credentials():r.credentials;return n?.credentialScope??n?.CredentialScope};if(e==="accountId"||t==="AccountId")return async()=>{let n=typeof r.credentials==="function"?await r.credentials():r.credentials;return n?.accountId??n?.AccountId};if(e==="endpoint"||t==="endpoint")return async()=>{let n=await o();if(n&&typeof n==="object"){if("url"in n)return n.url.href;if("hostname"in n){let{protocol:s,hostname:i,port:a,path:c}=n;return`${s}//${i}${a?":"+a:""}${c}`}}return n};return o};var it="AWS_ENDPOINT_URL",at="endpoint_url",ct=(e)=>({environmentVariableSelector:(t)=>{let r=e.split(" ").map((s)=>s.toUpperCase()),o=t[[it,...r].join("_")];if(o)return o;let n=t[it];if(n)return n;return},configFileSelector:(t,r)=>{if(r&&t.services){let n=r[["services",t.services].join(le)];if(n){let s=e.split(" ").map((a)=>a.toLowerCase()),i=n[[s.join("_"),at].join(le)];if(i)return i}}let o=t[at];if(o)return o;return},default:void 0});var J=async(e)=>$(ct(e??""))();var K=(e)=>{if(typeof e==="object"){if("url"in e)return me(e.url);return e}return me(e)};var pt=async(e,t,r,o)=>{if(!r.endpoint){let i;if(r.serviceConfiguredEndpoint)i=await r.serviceConfiguredEndpoint();else i=await J(r.serviceId);if(i)r.endpoint=()=>Promise.resolve(K(i))}let n=await gr(e,t,r);if(typeof r.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return r.endpointProvider(n,o)},gr=async(e,t,r)=>{let o={},n=t?.getEndpointParameterInstructions?.()||{};for(let[s,i]of Object.entries(n))switch(i.type){case"staticContextParams":o[s]=i.value;break;case"contextParams":o[s]=e[i.name];break;case"clientContextParams":case"builtInParams":o[s]=await st(i.name,s,r)();break;case"operationContextParams":o[s]=i.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(i))}if(Object.keys(n).length===0)Object.assign(o,r);if(String(r.serviceId).toLowerCase()==="s3")await nt(o);return o};var ut=({config:e,instructions:t})=>{return(r,o)=>async(n)=>{if(e.endpoint)ft.setFeature(o,"ENDPOINT_OVERRIDE","N");let s=await pt(n.input,{getEndpointParameterInstructions(){return t}},{...e},o);o.endpointV2=s,o.authSchemes=s.properties?.authSchemes;let i=o.authSchemes?.[0];if(i){o.signing_region=i.signingRegion,o.signing_service=i.signingName;let c=Qe(o)?.selectedHttpAuthScheme?.httpAuthOption;if(c)c.signingProperties=Object.assign(c.signingProperties||{},{signing_region:i.signingRegion,signingRegion:i.signingRegion,signing_service:i.signingName,signingName:i.signingName,signingRegionSet:i.signingRegionSet},i.properties)}return r({...n})}};var Rr={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:de.name},Va=(e,t)=>({applyToStack:(r)=>{r.addRelativeTo(ut({config:e,instructions:t}),Rr)}});var ja=(e)=>{let t=e.tls??!0,{endpoint:r,useDualstackEndpoint:o,useFipsEndpoint:n}=e,s=r!=null?async()=>K(await S(r)()):void 0,a=Object.assign(e,{endpoint:s,tls:t,isCustomEndpoint:!!r,useDualstackEndpoint:S(o??!1),useFipsEndpoint:S(n??!1)}),c=void 0;return a.serviceConfiguredEndpoint=async()=>{if(e.serviceId&&!c)c=J(e.serviceId);return c},a};var g;(function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"})(g||(g={}));var I=3,dt=g.STANDARD;var lt=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],mt=["TimeoutError","RequestTimeout","RequestTimeoutException"],Et=[500,502,503,504],gt=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"];var xr=(e)=>e.$metadata?.clockSkewCorrected,C=(e)=>e.$metadata?.httpStatusCode===429||lt.includes(e.name)||e.$retryable?.throttling==!0,L=(e,t=0)=>xr(e)||mt.includes(e.name)||gt.includes(e?.code||"")||Et.includes(e.$metadata?.httpStatusCode||0)||e.cause!==void 0&&t<=10&&L(e.cause,t+1),Rt=(e)=>{if(e.$metadata?.httpStatusCode!==void 0){let t=e.$metadata.httpStatusCode;if(500<=t&&t<=599&&!L(e))return!0;return!1}return!1};class P{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=e?.beta??0.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??0.5,this.scaleConstant=e?.scaleConstant??0.4,this.smooth=e?.smooth??0.8;let t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(!this.enabled)return;if(this.refillTokenBucket(),e>this.currentCapacity){let t=(e-this.currentCapacity)/this.fillRate*1000;await new Promise((r)=>P.setTimeoutFn(r,t))}this.currentCapacity=this.currentCapacity-e}refillTokenBucket(){let e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=e;return}let t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),C(e)){let o=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=o,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(o),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());let r=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(r)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){let e=this.getCurrentTimeInSeconds(),t=Math.floor(e*2)/2;if(this.requestCount++,t>this.lastTxRateBucket){let r=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(r*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}P.setTimeoutFn=setTimeout;var N=100,F=20000,Ee=500,Q=500,ge=5,Re=10,xe=1,ee="amz-sdk-invocation-id",te="amz-sdk-request";var xt=()=>{let e=N;return{computeNextBackoffDelay:(o)=>{return Math.floor(Math.min(F,Math.random()*2**o*e))},setDelayBase:(o)=>{e=o}}};var _e=({retryDelay:e,retryCount:t,retryCost:r})=>{return{getRetryCount:()=>t,getRetryDelay:()=>Math.min(F,e),getRetryCost:()=>r}};class b{constructor(e){this.maxAttempts=e,this.mode=g.STANDARD,this.capacity=Q,this.retryBackoffStrategy=xt(),this.maxAttemptsProvider=typeof e==="function"?e:async()=>e}async acquireInitialRetryToken(e){return _e({retryDelay:N,retryCount:0})}async refreshRetryTokenForRetry(e,t){let r=await this.getMaxAttempts();if(this.shouldRetry(e,t,r)){let o=t.errorType;this.retryBackoffStrategy.setDelayBase(o==="THROTTLING"?Ee:N);let n=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),s=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,n):n,i=this.getCapacityCost(o);return this.capacity-=i,_e({retryDelay:s,retryCount:e.getRetryCount()+1,retryCost:i})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(Q,this.capacity+(e.getRetryCost()??xe))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn(`Max attempts provider could not resolve. Using default of ${I}`),I}}shouldRetry(e,t,r){return e.getRetryCount()+1<r&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return e==="TRANSIENT"?Re:ge}isRetryableError(e){return e==="THROTTLING"||e==="TRANSIENT"}}class he{constructor(e,t){this.maxAttemptsProvider=e,this.mode=g.ADAPTIVE;let{rateLimiter:r}=t??{};this.rateLimiter=r??new P,this.standardRetryStrategy=new b(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}var _t="AWS_MAX_ATTEMPTS",ht="max_attempts",Lc={environmentVariableSelector:(e)=>{let t=e[_t];if(!t)return;let r=parseInt(t);if(Number.isNaN(r))throw new Error(`Environment variable ${_t} mast be a number, got "${t}"`);return r},configFileSelector:(e)=>{let t=e[ht];if(!t)return;let r=parseInt(t);if(Number.isNaN(r))throw new Error(`Shared config file entry ${ht} mast be a number, got "${t}"`);return r},default:I},Fc=(e)=>{let{retryStrategy:t,retryMode:r,maxAttempts:o}=e,n=S(o??I);return Object.assign(e,{maxAttempts:n,retryStrategy:async()=>{if(t)return t;if(await S(r)()===g.ADAPTIVE)return new he(n);return new b(n)}})},_r="AWS_RETRY_MODE",hr="retry_mode",kc={environmentVariableSelector:(e)=>e[_r],configFileSelector:(e)=>e[hr],default:dt};var _=O(Sr(),1),Vc=_.default.v1,Wc=_.default.v3,St=_.default.v4,Bc=_.default.v5,Yc=_.default.NIL,zc=_.default.version,jc=_.default.validate,Xc=_.default.stringify,Hc=_.default.parse;import{Readable as Ar}from"node:stream";var At=(e)=>e?.body instanceof Ar||typeof ReadableStream!=="undefined"&&e?.body instanceof ReadableStream;var Se=(e)=>{if(e instanceof Error)return e;if(e instanceof Object)return Object.assign(new Error,e);if(typeof e==="string")return new Error(e);return new Error(`AWS SDK error wrapper for ${e}`)};var Tr=(e)=>(t,r)=>async(o)=>{let n=await e.retryStrategy(),s=await e.maxAttempts();if(Or(n)){n=n;let i=await n.acquireInitialRetryToken(r.partition_id),a=new Error,c=0,p=0,{request:u}=o,x=m.isInstance(u);if(x)u.headers[ee]=St();while(!0)try{if(x)u.headers[te]=`attempt=${c+1}; max=${s}`;let{response:l,output:d}=await t(o);return n.recordSuccess(i),d.$metadata.attempts=c+1,d.$metadata.totalRetryDelay=p,{response:l,output:d}}catch(l){let d=Ir(l);if(a=Se(l),x&&At(u))throw(r.logger instanceof Tt?console:r.logger)?.warn("An error was encountered in a non-retryable streaming request."),a;try{i=await n.refreshRetryTokenForRetry(i,d)}catch(G){if(!a.$metadata)a.$metadata={};throw a.$metadata.attempts=c+1,a.$metadata.totalRetryDelay=p,a}c=i.getRetryCount();let w=i.getRetryDelay();p+=w,await new Promise((G)=>setTimeout(G,w))}}else{if(n=n,n?.mode)r.userAgent=[...r.userAgent||[],["cfg/retry-mode",n.mode]];return n.retry(t,o)}},Or=(e)=>typeof e.acquireInitialRetryToken!=="undefined"&&typeof e.refreshRetryTokenForRetry!=="undefined"&&typeof e.recordSuccess!=="undefined",Ir=(e)=>{let t={error:e,errorType:Nr(e)},r=yr(e.$response);if(r)t.retryAfterHint=r;return t},Nr=(e)=>{if(C(e))return"THROTTLING";if(L(e))return"TRANSIENT";if(Rt(e))return"SERVER_ERROR";return"CLIENT_ERROR"},wr={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},ip=(e)=>({applyToStack:(t)=>{t.add(Tr(e),wr)}}),yr=(e)=>{if(!Ae.isInstance(e))return;let t=Object.keys(e.headers).find((s)=>s.toLowerCase()==="retry-after");if(!t)return;let r=e.headers[t],o=Number(r);if(!Number.isNaN(o))return new Date(o*1000);return new Date(r)};import{platform as Dr,release as Cr}from"node:os";import{env as It,versions as Pr}from"node:process";var Te={isCrtAvailable:!1};var Ot=()=>{if(Te.isCrtAvailable)return["md/crt-avail"];return null};var Hp=({serviceId:e,clientVersion:t})=>{return async(r)=>{let o=[["aws-sdk-js",t],["ua","2.1"],[`os/${Dr()}`,Cr()],["lang/js"],["md/nodejs",`${Pr.node}`]],n=Ot();if(n)o.push(n);if(e)o.push([`api/${e}`,t]);if(It.AWS_EXECUTION_ENV)o.push([`exec-env/${It.AWS_EXECUTION_ENV}`]);let s=await r?.userAgentAppId?.();return s?[...o,[`app/${s}`]]:[...o]}};var br="AWS_SDK_UA_APP_ID",Ur="sdk_ua_app_id",vr="sdk-ua-app-id",Kp={environmentVariableSelector:(e)=>e[br],configFileSelector:(e)=>e[Ur]??e[vr],default:oe};var k=O(Mr(),1),wt=O($r(),1);import{Buffer as Lr}from"node:buffer";import{createHash as Fr,createHmac as kr}from"node:crypto";class Gr{constructor(e,t){this.algorithmIdentifier=e,this.secret=t,this.reset()}update(e,t){this.hash.update(wt.toUint8Array(Nt(e,t)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?kr(this.algorithmIdentifier,Nt(this.secret)):Fr(this.algorithmIdentifier)}}function Nt(e,t){if(Lr.isBuffer(e))return e;if(typeof e==="string")return k.fromString(e,t);if(ArrayBuffer.isView(e))return k.fromArrayBuffer(e.buffer,e.byteOffset,e.byteLength);return k.fromArrayBuffer(e)}import{fstatSync as Vr,lstatSync as Wr}from"node:fs";var cf=(e)=>{if(!e)return 0;if(typeof e==="string")return Buffer.byteLength(e);else if(typeof e.byteLength==="number")return e.byteLength;else if(typeof e.size==="number")return e.size;else if(typeof e.start==="number"&&typeof e.end==="number")return e.end+1-e.start;else if(typeof e.path==="string"||Buffer.isBuffer(e.path))return Wr(e.path).size;else if(typeof e.fd==="number")return Vr(e.fd).size;throw new Error(`Body Length computation failed for ${e}`)};var yt="AWS_EXECUTION_ENV",Oe="AWS_REGION",Ie="AWS_DEFAULT_REGION",Dt="AWS_EC2_METADATA_DISABLED",Ct=["in-region","cross-region","mobile","standard","legacy"],Pt="/latest/meta-data/placement/region";var bt={environmentVariableSelector:(e)=>{return e.AWS_DEFAULTS_MODE},configFileSelector:(e)=>{return e.defaults_mode},default:"legacy"};var _f=({region:e=$(et),defaultsMode:t=$(bt)}={})=>Ut(async()=>{let r=typeof t==="function"?await t():t;switch(r?.toLowerCase()){case"auto":return Yr(e);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(r?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${Ct.join(", ")}, got ${r}`)}}),Yr=async(e)=>{if(e){let t=typeof e==="function"?await e():e,r=await zr();if(!r)return"standard";if(t===r)return"in-region";else return"cross-region"}return"standard"},zr=async()=>{if(process.env[yt]&&(process.env[Oe]||process.env[Ie]))return process.env[Oe]??process.env[Ie];if(!process.env[Dt])try{let{getInstanceMetadataEndpoint:e,httpRequest:t}=await import("./chunk-2qmcf9vp.js"),r=await e();return(await t({...r,path:Pt})).toString()}catch(e){}};var Tf=(e)=>{return{setRegion(t){e.region=t},region(){return e.region}}},Of=(e)=>{return{region:e.region()}};export{Hr as $a,qr as ab,Jr as bb,ro as cb,no as db,jt as eb,M as fb,qt as gb,Qt as hb,js as ib,di as jb,Ei as kb,Qe as lb,S as mb,et as nb,Mi as ob,ri as pb,ca as qb,ma as rb,Va as sb,ja as tb,dt as ub,Lc as vb,Fc as wb,kc as xb,ip as yb,Hp as zb,Kp as Ab,Gr as Bb,cf as Cb,_f as Db,Tf as Eb,Of as Fb};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ea as r,Fa as s}from"./chunk-cqrmkpzz.js";import"./chunk-6v69415e.js";import"./chunk-
|
|
2
|
+
import{Ea as r,Fa as s}from"./chunk-cqrmkpzz.js";import"./chunk-6v69415e.js";import"./chunk-g1f16je5.js";export{s as stringifyJSONC,r as parseJSONC};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{$a as Ie,Ab as be,Bb as xe,Cb as ve,Db as ke,Eb as Ue,Fb as $e,ab as Pe,bb as _e,cb as Le,db as Me,eb as N,fb as g,gb as f,hb as ee,ib as We,jb as oe,kb as ce,lb as $,mb as J,nb as ie,ob as le,pb as Ae,qb as Ke,rb as ss,sb as ts,tb as Qe,ub as pe,vb as ye,wb as Xe,xb as me,yb as Ze,zb as we}from"./chunk-kxq03s4j.js";import{Gb as l,Hb as te}from"./chunk-xe04sf1b.js";import{$b as he,Ib as ze,Jb as De,Mb as Ye,Nb as as,Ob as E,Rb as B,Sb as Ge,Tb as h,Yb as je,Zb as u,_b as Oe,ac as ue,bc as Be,cc as Fe,ec as Ve,fc as ae,gc as i,hc as y,ic as Ne}from"./chunk-x0j2dg1x.js";import{lc as U,pc as x}from"./chunk-3gg1gwg5.js";import{vc as ms,wc as hs,yc as us}from"./chunk-aydc3pns.js";import"./chunk-wchdk5rr.js";import"./chunk-v07vvpcr.js";import"./chunk-xv24dwhq.js";import"./chunk-zs3ndhp8.js";import{Yc as o}from"./chunk-g1f16je5.js";var p=o(U(),1);var I=o(x(),1);var P=async(e,s,t)=>{return{operation:$(s).operation,region:await J(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function is(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:(s,t)=>({signingProperties:{config:s,context:t}})}}function b(e){return{schemeId:"smithy.api#noAuth"}}var _=(e)=>{let s=[];switch(e.operation){case"GetRoleCredentials":{s.push(b(e));break}case"ListAccountRoles":{s.push(b(e));break}case"ListAccounts":{s.push(b(e));break}case"Logout":{s.push(b(e));break}default:s.push(is(e))}return s},L=(e)=>{let s=I.resolveAwsSdkSigV4Config(e);return Object.assign(s,{})};var M=(e)=>{return Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"})},W={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var A={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",version:"3.777.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.775.0","@aws-sdk/middleware-host-header":"3.775.0","@aws-sdk/middleware-logger":"3.775.0","@aws-sdk/middleware-recursion-detection":"3.775.0","@aws-sdk/middleware-user-agent":"3.775.0","@aws-sdk/region-config-resolver":"3.775.0","@aws-sdk/types":"3.775.0","@aws-sdk/util-endpoints":"3.775.0","@aws-sdk/util-user-agent-browser":"3.775.0","@aws-sdk/util-user-agent-node":"3.775.0","@smithy/config-resolver":"^4.1.0","@smithy/core":"^3.2.0","@smithy/fetch-http-handler":"^5.0.2","@smithy/hash-node":"^4.0.2","@smithy/invalid-dependency":"^4.0.2","@smithy/middleware-content-length":"^4.0.2","@smithy/middleware-endpoint":"^4.1.0","@smithy/middleware-retry":"^4.1.0","@smithy/middleware-serde":"^4.0.3","@smithy/middleware-stack":"^4.0.2","@smithy/node-config-provider":"^4.0.2","@smithy/node-http-handler":"^4.0.4","@smithy/protocol-http":"^5.1.0","@smithy/smithy-client":"^4.2.0","@smithy/types":"^4.2.0","@smithy/url-parser":"^4.0.2","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.8","@smithy/util-defaults-mode-node":"^4.0.8","@smithy/util-endpoints":"^3.0.2","@smithy/util-middleware":"^4.0.2","@smithy/util-retry":"^4.0.2","@smithy/util-utf8":"^4.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.2.2"},engines:{node:">=18.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso"}};var Re=o(x(),1);var R=o(us(),1);var re=o(x(),1),de=o(U(),1);var v=o(hs(),1),k=o(ms(),1);var K={["required"]:!1,type:"String"},Q={["required"]:!0,default:!1,type:"Boolean"},X={["ref"]:"Endpoint"},H={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},G={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},n={},Y={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},O={["ref"]:"PartitionResult"},Z={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[O,"supportsDualStack"]}]},C=[H],j=[G],T=[{["ref"]:"Region"}],ps={version:"1.0",parameters:{Region:K,UseDualStack:Q,UseFIPS:Q,Endpoint:K},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[X]}],rules:[{conditions:C,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:j,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:X,properties:n,headers:n},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:T}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:T,assign:"PartitionResult"}],rules:[{conditions:[H,G],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,Y]},Z],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:C,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[Y,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[O,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:n,headers:n},type:"endpoint"},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:j,rules:[{conditions:[Z],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},V=ps;var ys=new N({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),se=(e,s={})=>{return ys.get(e,()=>f(V,{endpointParams:e,logger:s.logger}))};g.aws=ee;var ne=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??v.fromBase64,base64Encoder:e?.base64Encoder??v.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??se,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??_,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new re.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new de.NoAuthSigner}],logger:e?.logger??new ae,serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??te,utf8Decoder:e?.utf8Decoder??k.fromUtf8,utf8Encoder:e?.utf8Encoder??k.toUtf8}};var Ee=(e)=>{ue(process.version);let s=ke(e),t=()=>s().then(he),r=ne(e);Re.emitWarningIfUnsupportedVersion(process.version);let a={profile:e?.profile};return{...r,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??ve,defaultUserAgentProvider:e?.defaultUserAgentProvider??we({serviceId:r.serviceId,clientVersion:A.version}),maxAttempts:e?.maxAttempts??l(ye,e),region:e?.region??l(ie,{...le,...a}),requestHandler:R.NodeHttpHandler.create(e?.requestHandler??t),retryMode:e?.retryMode??l({...me,default:async()=>(await t()).retryMode||pe},e),sha256:e?.sha256??xe.bind(null,"sha256"),streamCollector:e?.streamCollector??R.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??l(oe,a),useFipsEndpoint:e?.useFipsEndpoint??l(ce,a),userAgentAppId:e?.userAgentAppId??l(be,a)}};var qe=(e)=>{let{httpAuthSchemes:s,httpAuthSchemeProvider:t,credentials:r}=e;return{setHttpAuthScheme(a){let d=s.findIndex((F)=>F.schemeId===a.schemeId);if(d===-1)s.push(a);else s.splice(d,1,a)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(a){t=a},httpAuthSchemeProvider(){return t},setCredentials(a){r=a},credentials(){return r}}},Se=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var Je=(e,s)=>{let t=Object.assign(Ue(e),Be(e),ze(e),qe(e));return s.forEach((r)=>r.configure(t)),Object.assign(e,$e(t),Fe(t),De(t),Se(t))};class Ce extends Ye{config;constructor(...[e]){let s=Ee(e||{});super(s);this.initConfig=s;let t=M(s),r=Me(t),a=Xe(r),d=Ae(a),F=Ie(d),ds=Qe(F),ns=L(ds),os=Je(ns,e?.extensions||[]);this.config=os,this.middlewareStack.use(We(this.config)),this.middlewareStack.use(Ze(this.config)),this.middlewareStack.use(Ke(this.config)),this.middlewareStack.use(Pe(this.config)),this.middlewareStack.use(_e(this.config)),this.middlewareStack.use(Le(this.config)),this.middlewareStack.use(p.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:P,identityProviderConfigProvider:async(cs)=>new p.DefaultIdentityProviderConfig({"aws.auth#sigv4":cs.credentials})})),this.middlewareStack.use(p.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class c extends je{constructor(e){super(e);Object.setPrototypeOf(this,c.prototype)}}class q extends c{name="InvalidRequestException";$fault="client";constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});Object.setPrototypeOf(this,q.prototype)}}class S extends c{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,S.prototype)}}class z extends c{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e});Object.setPrototypeOf(this,z.prototype)}}class D extends c{name="UnauthorizedException";$fault="client";constructor(e){super({name:"UnauthorizedException",$fault:"client",...e});Object.setPrototypeOf(this,D.prototype)}}var Te=(e)=>({...e,...e.accessToken&&{accessToken:E}}),ws=(e)=>({...e,...e.secretAccessKey&&{secretAccessKey:E},...e.sessionToken&&{sessionToken:E}}),He=(e)=>({...e,...e.roleCredentials&&{roleCredentials:ws(e.roleCredentials)}});var m=o(x(),1),ge=o(U(),1);var fe=async(e,s)=>{let t=ge.requestBuilder(e,s),r=i({},Ve,{[Fs]:e[Ss]});t.bp("/federation/credentials");let a=i({[Bs]:[,B(e[Ds],"roleName")],[zs]:[,B(e[qs],"accountId")]}),d;return t.m("GET").h(r).q(a).b(d),t.build()};var es=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return bs(e,s);let t=i({$metadata:w(e)}),r=B(Ge(await m.parseJsonBody(e.body,s)),"body"),a=y(r,{roleCredentials:Ne});return Object.assign(t,a),t};var bs=async(e,s)=>{let t={...e,body:await m.parseJsonErrorBody(e.body,s)},r=m.loadRestJsonErrorCode(e,t.body);switch(r){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await vs(t,s);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await ks(t,s);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await Rs(t,s);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await Es(t,s);default:let a=t.body;return xs({output:e,parsedBody:a,errorCode:r})}},xs=Oe(c),vs=async(e,s)=>{let t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);let d=new q({$metadata:w(e),...t});return u(d,e.body)},ks=async(e,s)=>{let t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);let d=new S({$metadata:w(e),...t});return u(d,e.body)},Rs=async(e,s)=>{let t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);let d=new z({$metadata:w(e),...t});return u(d,e.body)},Es=async(e,s)=>{let t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);let d=new D({$metadata:w(e),...t});return u(d,e.body)},w=(e)=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]});var qs="accountId",Ss="accessToken",zs="account_id";var Ds="roleName",Bs="role_name",Fs="x-amz-sso_bearer_token";class rs extends as.classBuilder().ep(W).m(function(e,s,t,r){return[ss(t,this.serialize,this.deserialize),ts(t,e.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(Te,He).ser(fe).de(es).build(){}export{Ce as SSOClient,rs as GetRoleCredentialsCommand};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Yc as sJ,_c as X,bd as Q}from"./chunk-g1f16je5.js";var u=X((SE)=>{SE.fromCallback=function(q){return Object.defineProperty(function(...n){if(typeof n[n.length-1]==="function")q.apply(this,n);else return new Promise((E,y)=>{n.push((J,O)=>J!=null?y(J):E(O)),q.apply(this,n)})},"name",{value:q.name})};SE.fromPromise=function(q){return Object.defineProperty(function(...n){let E=n[n.length-1];if(typeof E!=="function")return q.apply(this,n);else n.pop(),q.apply(this,n).then((y)=>E(null,y),E)},"name",{value:q.name})}});var hq=X((UO,iq)=>{var f=Q("node:constants"),iE=process.cwd,Pq=null,hE=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!Pq)Pq=iE.call(process);return Pq};try{process.cwd()}catch(q){}if(typeof process.chdir==="function"){if(Aq=process.chdir,process.chdir=function(q){Pq=null,Aq.call(process,q)},Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,Aq)}var Aq;iq.exports=lE;function lE(q){if(f.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./))n(q);if(!q.lutimes)E(q);if(q.chown=O(q.chown),q.fchown=O(q.fchown),q.lchown=O(q.lchown),q.chmod=y(q.chmod),q.fchmod=y(q.fchmod),q.lchmod=y(q.lchmod),q.chownSync=_(q.chownSync),q.fchownSync=_(q.fchownSync),q.lchownSync=_(q.lchownSync),q.chmodSync=J(q.chmodSync),q.fchmodSync=J(q.fchmodSync),q.lchmodSync=J(q.lchmodSync),q.stat=U(q.stat),q.fstat=U(q.fstat),q.lstat=U(q.lstat),q.statSync=j(q.statSync),q.fstatSync=j(q.fstatSync),q.lstatSync=j(q.lstatSync),q.chmod&&!q.lchmod)q.lchmod=function(V,A,L){if(L)process.nextTick(L)},q.lchmodSync=function(){};if(q.chown&&!q.lchown)q.lchown=function(V,A,L,K){if(K)process.nextTick(K)},q.lchownSync=function(){};if(hE==="win32")q.rename=typeof q.rename!=="function"?q.rename:function(V){function A(L,K,P){var N=Date.now(),C=0;V(L,K,function R(h){if(h&&(h.code==="EACCES"||h.code==="EPERM"||h.code==="EBUSY")&&Date.now()-N<60000){if(setTimeout(function(){q.stat(K,function(m,Jq){if(m&&m.code==="ENOENT")V(L,K,R);else P(h)})},C),C<100)C+=10;return}if(P)P(h)})}if(Object.setPrototypeOf)Object.setPrototypeOf(A,V);return A}(q.rename);q.read=typeof q.read!=="function"?q.read:function(V){function A(L,K,P,N,C,R){var h;if(R&&typeof R==="function"){var m=0;h=function(Jq,gq,bq){if(Jq&&Jq.code==="EAGAIN"&&m<10)return m++,V.call(q,L,K,P,N,C,h);R.apply(this,arguments)}}return V.call(q,L,K,P,N,C,h)}if(Object.setPrototypeOf)Object.setPrototypeOf(A,V);return A}(q.read),q.readSync=typeof q.readSync!=="function"?q.readSync:function(V){return function(A,L,K,P,N){var C=0;while(!0)try{return V.call(q,A,L,K,P,N)}catch(R){if(R.code==="EAGAIN"&&C<10){C++;continue}throw R}}}(q.readSync);function n(V){V.lchmod=function(A,L,K){V.open(A,f.O_WRONLY|f.O_SYMLINK,L,function(P,N){if(P){if(K)K(P);return}V.fchmod(N,L,function(C){V.close(N,function(R){if(K)K(C||R)})})})},V.lchmodSync=function(A,L){var K=V.openSync(A,f.O_WRONLY|f.O_SYMLINK,L),P=!0,N;try{N=V.fchmodSync(K,L),P=!1}finally{if(P)try{V.closeSync(K)}catch(C){}else V.closeSync(K)}return N}}function E(V){if(f.hasOwnProperty("O_SYMLINK")&&V.futimes)V.lutimes=function(A,L,K,P){V.open(A,f.O_SYMLINK,function(N,C){if(N){if(P)P(N);return}V.futimes(C,L,K,function(R){V.close(C,function(h){if(P)P(R||h)})})})},V.lutimesSync=function(A,L,K){var P=V.openSync(A,f.O_SYMLINK),N,C=!0;try{N=V.futimesSync(P,L,K),C=!1}finally{if(C)try{V.closeSync(P)}catch(R){}else V.closeSync(P)}return N};else if(V.futimes)V.lutimes=function(A,L,K,P){if(P)process.nextTick(P)},V.lutimesSync=function(){}}function y(V){if(!V)return V;return function(A,L,K){return V.call(q,A,L,function(P){if($(P))P=null;if(K)K.apply(this,arguments)})}}function J(V){if(!V)return V;return function(A,L){try{return V.call(q,A,L)}catch(K){if(!$(K))throw K}}}function O(V){if(!V)return V;return function(A,L,K,P){return V.call(q,A,L,K,function(N){if($(N))N=null;if(P)P.apply(this,arguments)})}}function _(V){if(!V)return V;return function(A,L,K){try{return V.call(q,A,L,K)}catch(P){if(!$(P))throw P}}}function U(V){if(!V)return V;return function(A,L,K){if(typeof L==="function")K=L,L=null;function P(N,C){if(C){if(C.uid<0)C.uid+=4294967296;if(C.gid<0)C.gid+=4294967296}if(K)K.apply(this,arguments)}return L?V.call(q,A,L,P):V.call(q,A,P)}}function j(V){if(!V)return V;return function(A,L){var K=L?V.call(q,A,L):V.call(q,A);if(K){if(K.uid<0)K.uid+=4294967296;if(K.gid<0)K.gid+=4294967296}return K}}function $(V){if(!V)return!0;if(V.code==="ENOSYS")return!0;var A=!process.getuid||process.getuid()!==0;if(A){if(V.code==="EINVAL"||V.code==="EPERM")return!0}return!1}}});var cq=X((zO,pq)=>{var lq=Q("node:stream").Stream;pq.exports=pE;function pE(q){return{ReadStream:n,WriteStream:E};function n(y,J){if(!(this instanceof n))return new n(y,J);lq.call(this);var O=this;this.path=y,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,J=J||{};var _=Object.keys(J);for(var U=0,j=_.length;U<j;U++){var $=_[U];this[$]=J[$]}if(this.encoding)this.setEncoding(this.encoding);if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!=="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){O._read()});return}q.open(this.path,this.flags,this.mode,function(V,A){if(V){O.emit("error",V),O.readable=!1;return}O.fd=A,O.emit("open",A),O._read()})}function E(y,J){if(!(this instanceof E))return new E(y,J);lq.call(this),this.path=y,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,J=J||{};var O=Object.keys(J);for(var _=0,U=O.length;_<U;_++){var j=O[_];this[j]=J[j]}if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}if(this.busy=!1,this._queue=[],this.fd===null)this._open=q.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush()}}});var fq=X((LO,oq)=>{oq.exports=oE;var cE=Object.getPrototypeOf||function(q){return q.__proto__};function oE(q){if(q===null||typeof q!=="object")return q;if(q instanceof Object)var n={__proto__:cE(q)};else var n=Object.create(null);return Object.getOwnPropertyNames(q).forEach(function(E){Object.defineProperty(n,E,Object.getOwnPropertyDescriptor(q,E))}),n}});var qq=X((PO,Iq)=>{var B=Q("node:fs"),fE=hq(),dE=cq(),rE=fq(),Gq=Q("node:util"),F,Yq;if(typeof Symbol==="function"&&typeof Symbol.for==="function")F=Symbol.for("graceful-fs.queue"),Yq=Symbol.for("graceful-fs.previous");else F="___graceful-fs.queue",Yq="___graceful-fs.previous";function aE(){}function rq(q,n){Object.defineProperty(q,F,{get:function(){return n}})}var e=aE;if(Gq.debuglog)e=Gq.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))e=function(){var q=Gq.format.apply(Gq,arguments);q="GFS4: "+q.split(/\n/).join(`
|
|
3
3
|
GFS4: `),console.error(q)};if(!B[F]){if(wq=global[F]||[],rq(B,wq),B.close=function(q){function n(E,y){return q.call(B,E,function(J){if(!J)dq();if(typeof y==="function")y.apply(this,arguments)})}return Object.defineProperty(n,Yq,{value:q}),n}(B.close),B.closeSync=function(q){function n(E){q.apply(B,arguments),dq()}return Object.defineProperty(n,Yq,{value:q}),n}(B.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){e(B[F]),Q("node:assert").equal(B[F].length,0)})}var wq;if(!global[F])rq(global,B[F]);Iq.exports=Bq(rE(B));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!B.__patched)Iq.exports=Bq(B),B.__patched=!0;function Bq(q){fE(q),q.gracefulify=Bq,q.createReadStream=gq,q.createWriteStream=bq;var n=q.readFile;q.readFile=E;function E(z,Z,Y){if(typeof Z==="function")Y=Z,Z=null;return M(z,Z,Y);function M(T,I,w,D){return n(T,I,function(H){if(H&&(H.code==="EMFILE"||H.code==="ENFILE"))s([M,[T,I,w],H,D||Date.now(),Date.now()]);else if(typeof w==="function")w.apply(this,arguments)})}}var y=q.writeFile;q.writeFile=J;function J(z,Z,Y,M){if(typeof Y==="function")M=Y,Y=null;return T(z,Z,Y,M);function T(I,w,D,H,k){return y(I,w,D,function(x){if(x&&(x.code==="EMFILE"||x.code==="ENFILE"))s([T,[I,w,D,H],x,k||Date.now(),Date.now()]);else if(typeof H==="function")H.apply(this,arguments)})}}var O=q.appendFile;if(O)q.appendFile=_;function _(z,Z,Y,M){if(typeof Y==="function")M=Y,Y=null;return T(z,Z,Y,M);function T(I,w,D,H,k){return O(I,w,D,function(x){if(x&&(x.code==="EMFILE"||x.code==="ENFILE"))s([T,[I,w,D,H],x,k||Date.now(),Date.now()]);else if(typeof H==="function")H.apply(this,arguments)})}}var U=q.copyFile;if(U)q.copyFile=j;function j(z,Z,Y,M){if(typeof Y==="function")M=Y,Y=0;return T(z,Z,Y,M);function T(I,w,D,H,k){return U(I,w,D,function(x){if(x&&(x.code==="EMFILE"||x.code==="ENFILE"))s([T,[I,w,D,H],x,k||Date.now(),Date.now()]);else if(typeof H==="function")H.apply(this,arguments)})}}var $=q.readdir;q.readdir=A;var V=/^v[0-5]\./;function A(z,Z,Y){if(typeof Z==="function")Y=Z,Z=null;var M=V.test(process.version)?function I(w,D,H,k){return $(w,T(w,D,H,k))}:function I(w,D,H,k){return $(w,D,T(w,D,H,k))};return M(z,Z,Y);function T(I,w,D,H){return function(k,x){if(k&&(k.code==="EMFILE"||k.code==="ENFILE"))s([M,[I,w,D],k,H||Date.now(),Date.now()]);else{if(x&&x.sort)x.sort();if(typeof D==="function")D.call(this,k,x)}}}}if(process.version.substr(0,4)==="v0.8"){var L=dE(q);R=L.ReadStream,m=L.WriteStream}var K=q.ReadStream;if(K)R.prototype=Object.create(K.prototype),R.prototype.open=h;var P=q.WriteStream;if(P)m.prototype=Object.create(P.prototype),m.prototype.open=Jq;Object.defineProperty(q,"ReadStream",{get:function(){return R},set:function(z){R=z},enumerable:!0,configurable:!0}),Object.defineProperty(q,"WriteStream",{get:function(){return m},set:function(z){m=z},enumerable:!0,configurable:!0});var N=R;Object.defineProperty(q,"FileReadStream",{get:function(){return N},set:function(z){N=z},enumerable:!0,configurable:!0});var C=m;Object.defineProperty(q,"FileWriteStream",{get:function(){return C},set:function(z){C=z},enumerable:!0,configurable:!0});function R(z,Z){if(this instanceof R)return K.apply(this,arguments),this;else return R.apply(Object.create(R.prototype),arguments)}function h(){var z=this;Rq(z.path,z.flags,z.mode,function(Z,Y){if(Z){if(z.autoClose)z.destroy();z.emit("error",Z)}else z.fd=Y,z.emit("open",Y),z.read()})}function m(z,Z){if(this instanceof m)return P.apply(this,arguments),this;else return m.apply(Object.create(m.prototype),arguments)}function Jq(){var z=this;Rq(z.path,z.flags,z.mode,function(Z,Y){if(Z)z.destroy(),z.emit("error",Z);else z.fd=Y,z.emit("open",Y)})}function gq(z,Z){return new q.ReadStream(z,Z)}function bq(z,Z){return new q.WriteStream(z,Z)}var mE=q.open;q.open=Rq;function Rq(z,Z,Y,M){if(typeof Y==="function")M=Y,Y=null;return T(z,Z,Y,M);function T(I,w,D,H,k){return mE(I,w,D,function(x,VO){if(x&&(x.code==="EMFILE"||x.code==="ENFILE"))s([T,[I,w,D,H],x,k||Date.now(),Date.now()]);else if(typeof H==="function")H.apply(this,arguments)})}}return q}function s(q){e("ENQUEUE",q[0].name,q[1]),B[F].push(q),Dq()}var Xq;function dq(){var q=Date.now();for(var n=0;n<B[F].length;++n)if(B[F][n].length>2)B[F][n][3]=q,B[F][n][4]=q;Dq()}function Dq(){if(clearTimeout(Xq),Xq=void 0,B[F].length===0)return;var q=B[F].shift(),n=q[0],E=q[1],y=q[2],J=q[3],O=q[4];if(J===void 0)e("RETRY",n.name,E),n.apply(null,E);else if(Date.now()-J>=60000){e("TIMEOUT",n.name,E);var _=E.pop();if(typeof _==="function")_.call(null,y)}else{var U=Date.now()-O,j=Math.max(O-J,1),$=Math.min(j*1.2,100);if(U>=$)e("RETRY",n.name,E),n.apply(null,E.concat([J]));else B[F].push(q)}if(Xq===void 0)Xq=setTimeout(Dq,0)}});var g=X((uq)=>{var aq=u().fromCallback,S=qq(),eE=["access","appendFile","chmod","chown","close","copyFile","cp","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","glob","lchmod","lchown","lutimes","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","statfs","symlink","truncate","unlink","utimes","writeFile"].filter((q)=>{return typeof S[q]==="function"});Object.assign(uq,S);eE.forEach((q)=>{uq[q]=aq(S[q])});uq.exists=function(q,n){if(typeof n==="function")return S.exists(q,n);return new Promise((E)=>{return S.exists(q,E)})};uq.read=function(q,n,E,y,J,O){if(typeof O==="function")return S.read(q,n,E,y,J,O);return new Promise((_,U)=>{S.read(q,n,E,y,J,(j,$,V)=>{if(j)return U(j);_({bytesRead:$,buffer:V})})})};uq.write=function(q,n,...E){if(typeof E[E.length-1]==="function")return S.write(q,n,...E);return new Promise((y,J)=>{S.write(q,n,...E,(O,_,U)=>{if(O)return J(O);y({bytesWritten:_,buffer:U})})})};uq.readv=function(q,n,...E){if(typeof E[E.length-1]==="function")return S.readv(q,n,...E);return new Promise((y,J)=>{S.readv(q,n,...E,(O,_,U)=>{if(O)return J(O);y({bytesRead:_,buffers:U})})})};uq.writev=function(q,n,...E){if(typeof E[E.length-1]==="function")return S.writev(q,n,...E);return new Promise((y,J)=>{S.writev(q,n,...E,(O,_,U)=>{if(O)return J(O);y({bytesWritten:_,buffers:U})})})};if(typeof S.realpath.native==="function")uq.realpath.native=aq(S.realpath.native);else process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")});var tq=X((Jy,eq)=>{var yy=Q("node:path");Jy.checkPath=function q(n){if(process.platform==="win32"){if(/[<>:"|?*]/.test(n.replace(yy.parse(n).root,""))){let y=new Error(`Path contains invalid characters: ${n}`);throw y.code="EINVAL",y}}}});var En=X((_y,Qq)=>{var sq=g(),{checkPath:qn}=tq(),nn=(q)=>{let n={mode:511};if(typeof q==="number")return q;return{...n,...q}.mode};_y.makeDir=async(q,n)=>{return qn(q),sq.mkdir(q,{mode:nn(n),recursive:!0})};_y.makeDirSync=(q,n)=>{return qn(q),sq.mkdirSync(q,{mode:nn(n),recursive:!0})}});var l=X((XO,yn)=>{var Uy=u().fromPromise,{makeDir:zy,makeDirSync:Wq}=En(),Mq=Uy(zy);yn.exports={mkdirs:Mq,mkdirsSync:Wq,mkdirp:Mq,mkdirpSync:Wq,ensureDir:Mq,ensureDirSync:Wq}});var d=X((YO,On)=>{var Ly=u().fromPromise,Jn=g();function Py(q){return Jn.access(q).then(()=>!0).catch(()=>!1)}On.exports={pathExists:Ly(Py),pathExistsSync:Jn.existsSync}});var Tq=X((ZO,_n)=>{var nq=g(),Ay=u().fromPromise;async function Gy(q,n,E){let y=await nq.open(q,"r+"),J=null;try{await nq.futimes(y,n,E)}finally{try{await nq.close(y)}catch(O){J=O}}if(J)throw J}function Xy(q,n,E){let y=nq.openSync(q,"r+");return nq.futimesSync(y,n,E),nq.closeSync(y)}_n.exports={utimesMillis:Ay(Gy),utimesMillisSync:Xy}});var t=X((CO,zn)=>{var Eq=g(),W=Q("node:path"),Vn=u().fromPromise;function Yy(q,n,E){let y=E.dereference?(J)=>Eq.stat(J,{bigint:!0}):(J)=>Eq.lstat(J,{bigint:!0});return Promise.all([y(q),y(n).catch((J)=>{if(J.code==="ENOENT")return null;throw J})]).then(([J,O])=>({srcStat:J,destStat:O}))}function Zy(q,n,E){let y,J=E.dereference?(_)=>Eq.statSync(_,{bigint:!0}):(_)=>Eq.lstatSync(_,{bigint:!0}),O=J(q);try{y=J(n)}catch(_){if(_.code==="ENOENT")return{srcStat:O,destStat:null};throw _}return{srcStat:O,destStat:y}}async function Cy(q,n,E,y){let{srcStat:J,destStat:O}=await Yy(q,n,y);if(O){if(Oq(J,O)){let _=W.basename(q),U=W.basename(n);if(E==="move"&&_!==U&&_.toLowerCase()===U.toLowerCase())return{srcStat:J,destStat:O,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(J.isDirectory()&&!O.isDirectory())throw new Error(`Cannot overwrite non-directory '${n}' with directory '${q}'.`);if(!J.isDirectory()&&O.isDirectory())throw new Error(`Cannot overwrite directory '${n}' with non-directory '${q}'.`)}if(J.isDirectory()&&kq(q,n))throw new Error(Zq(q,n,E));return{srcStat:J,destStat:O}}function Hy(q,n,E,y){let{srcStat:J,destStat:O}=Zy(q,n,y);if(O){if(Oq(J,O)){let _=W.basename(q),U=W.basename(n);if(E==="move"&&_!==U&&_.toLowerCase()===U.toLowerCase())return{srcStat:J,destStat:O,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(J.isDirectory()&&!O.isDirectory())throw new Error(`Cannot overwrite non-directory '${n}' with directory '${q}'.`);if(!J.isDirectory()&&O.isDirectory())throw new Error(`Cannot overwrite directory '${n}' with non-directory '${q}'.`)}if(J.isDirectory()&&kq(q,n))throw new Error(Zq(q,n,E));return{srcStat:J,destStat:O}}async function Kn(q,n,E,y){let J=W.resolve(W.dirname(q)),O=W.resolve(W.dirname(E));if(O===J||O===W.parse(O).root)return;let _;try{_=await Eq.stat(O,{bigint:!0})}catch(U){if(U.code==="ENOENT")return;throw U}if(Oq(n,_))throw new Error(Zq(q,E,y));return Kn(q,n,O,y)}function Un(q,n,E,y){let J=W.resolve(W.dirname(q)),O=W.resolve(W.dirname(E));if(O===J||O===W.parse(O).root)return;let _;try{_=Eq.statSync(O,{bigint:!0})}catch(U){if(U.code==="ENOENT")return;throw U}if(Oq(n,_))throw new Error(Zq(q,E,y));return Un(q,n,O,y)}function Oq(q,n){return n.ino&&n.dev&&n.ino===q.ino&&n.dev===q.dev}function kq(q,n){let E=W.resolve(q).split(W.sep).filter((J)=>J),y=W.resolve(n).split(W.sep).filter((J)=>J);return E.every((J,O)=>y[O]===J)}function Zq(q,n,E){return`Cannot ${E} '${q}' to a subdirectory of itself, '${n}'.`}zn.exports={checkPaths:Vn(Cy),checkPathsSync:Hy,checkParentPaths:Vn(Kn),checkParentPathsSync:Un,isSrcSubdir:kq,areIdentical:Oq}});var Xn=X((HO,Gn)=>{var v=g(),_q=Q("node:path"),{mkdirs:Ny}=l(),{pathExists:xy}=d(),{utimesMillis:jy}=Tq(),Vq=t();async function Ry(q,n,E={}){if(typeof E==="function")E={filter:E};if(E.clobber="clobber"in E?!!E.clobber:!0,E.overwrite="overwrite"in E?!!E.overwrite:E.clobber,E.preserveTimestamps&&process.arch==="ia32")process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
|
|
4
4
|
|
|
5
5
|
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001");let{srcStat:y,destStat:J}=await Vq.checkPaths(q,n,"copy",E);if(await Vq.checkParentPaths(q,y,n,"copy"),!await Pn(q,n,E))return;let _=_q.dirname(n);if(!await xy(_))await Ny(_);await An(J,q,n,E)}async function Pn(q,n,E){if(!E.filter)return!0;return E.filter(q,n)}async function An(q,n,E,y){let O=await(y.dereference?v.stat:v.lstat)(n);if(O.isDirectory())return Iy(O,q,n,E,y);if(O.isFile()||O.isCharacterDevice()||O.isBlockDevice())return wy(O,q,n,E,y);if(O.isSymbolicLink())return uy(q,n,E,y);if(O.isSocket())throw new Error(`Cannot copy a socket file: ${n}`);if(O.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${n}`);throw new Error(`Unknown file: ${n}`)}async function wy(q,n,E,y,J){if(!n)return Ln(q,E,y,J);if(J.overwrite)return await v.unlink(y),Ln(q,E,y,J);if(J.errorOnExist)throw new Error(`'${y}' already exists`)}async function Ln(q,n,E,y){if(await v.copyFile(n,E),y.preserveTimestamps){if(By(q.mode))await Dy(E,q.mode);let J=await v.stat(n);await jy(E,J.atime,J.mtime)}return v.chmod(E,q.mode)}function By(q){return(q&128)===0}function Dy(q,n){return v.chmod(q,n|128)}async function Iy(q,n,E,y,J){if(!n)await v.mkdir(y);let O=[];for await(let _ of await v.opendir(E)){let U=_q.join(E,_.name),j=_q.join(y,_.name);O.push(Pn(U,j,J).then(($)=>{if($)return Vq.checkPaths(U,j,"copy",J).then(({destStat:V})=>{return An(V,U,j,J)})}))}if(await Promise.all(O),!n)await v.chmod(y,q.mode)}async function uy(q,n,E,y){let J=await v.readlink(n);if(y.dereference)J=_q.resolve(process.cwd(),J);if(!q)return v.symlink(J,E);let O=null;try{O=await v.readlink(E)}catch(_){if(_.code==="EINVAL"||_.code==="UNKNOWN")return v.symlink(J,E);throw _}if(y.dereference)O=_q.resolve(process.cwd(),O);if(Vq.isSrcSubdir(J,O))throw new Error(`Cannot copy '${J}' to a subdirectory of itself, '${O}'.`);if(Vq.isSrcSubdir(O,J))throw new Error(`Cannot overwrite '${O}' with '${J}'.`);return await v.unlink(E),v.symlink(J,E)}Gn.exports=Ry});var Nn=X((NO,Hn)=>{var b=qq(),Kq=Q("node:path"),Qy=l().mkdirsSync,Wy=Tq().utimesMillisSync,Uq=t();function My(q,n,E){if(typeof E==="function")E={filter:E};if(E=E||{},E.clobber="clobber"in E?!!E.clobber:!0,E.overwrite="overwrite"in E?!!E.overwrite:E.clobber,E.preserveTimestamps&&process.arch==="ia32")process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Sc as c}from"./chunk-xv24dwhq.js";import{Xc as T}from"./chunk-zs3ndhp8.js";import{Yc as E,bd as p}from"./chunk-g1f16je5.js";var N=E(T(),1);import{readFileSync as f}from"node:fs";var i=(e)=>async(o)=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");let{roleArn:r,roleSessionName:s,webIdentityToken:n,providerId:S,policyArns:d,policy:l,durationSeconds:m}=e,{roleAssumerWithWebIdentity:t}=e;if(!t){let{getDefaultRoleAssumerWithWebIdentity:a}=await import("./chunk-0g26g7ka.js");t=a({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:{...o?.callerClientConfig,...e.parentClientConfig}},e.clientPlugins)}return t({RoleArn:r,RoleSessionName:s??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:n,ProviderId:S,PolicyArns:d,Policy:l,DurationSeconds:m})};var _="AWS_WEB_IDENTITY_TOKEN_FILE",A="AWS_ROLE_ARN",I="AWS_ROLE_SESSION_NAME",k=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");let o=e?.webIdentityTokenFile??process.env[_],r=e?.roleArn??process.env[A],s=e?.roleSessionName??process.env[I];if(!o||!r)throw new c("Web identity configuration not specified",{logger:e.logger});let n=await i({...e,webIdentityToken:f(o,{encoding:"ascii"}),roleArn:r,roleSessionName:s})();if(o===process.env[_])N.setCredentialFeature(n,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h");return n};export{i as fromWebToken,k as fromTokenFile};
|