@thunderclient/cli 1.20.0 → 1.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thunderclient/cli",
3
- "version": "1.20.0",
3
+ "version": "1.21.0",
4
4
  "description": "Thunder Client CLI",
5
5
  "author": "Ranga Vadhineni",
6
6
  "homepage": "https://www.thunderclient.com",
package/dist/97.index.js DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- exports.id=97,exports.ids=[97],exports.modules={792:(t,e,n)=>{"use strict";n.d(e,{getDefaultRoleAssumer:()=>xn,getDefaultRoleAssumerWithWebIdentity:()=>bn});var i=n(32),s=n(35),r=n(36),o=n(37),a=n(53),c=n(38),u=n(54),l=n(55),d=n(60),f=n(64),h=n(65),p=n(39);const g=async(t,e,n)=>({operation:(0,p.u)(e).operation,region:await(0,p.t)(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const m=t=>{const e=[];if("AssumeRoleWithWebIdentity"===t.operation)e.push({schemeId:"smithy.api#noAuth"});else e.push(function(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:t.region},propertiesExtractor:(t,e)=>({signingProperties:{config:t,context:e}})}}(t));return e},v=t=>{const e=(n=t,{...n,stsClientCtor:Et});var n;return{...(0,h.h)(e)}},w={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var x=n(791),b=n(74),y=n(72),E=n(68),I=n(70),P=n(56),A=n(47),S=n(71),T=n(61),$=n(59),R=n(43),D=n(46),C=n(51),O=n(52);const N="required",k="type",j="fn",F="argv",_="ref",U=!1,L=!0,W="booleanEquals",V="stringEquals",M="sigv4",q="us-east-1",z="endpoint",B="https://sts.{Region}.{PartitionResult#dnsSuffix}",K="tree",X="error",G="getAttr",H={[N]:!1,[k]:"String"},Y={[N]:!0,default:!1,[k]:"Boolean"},Z={[_]:"Endpoint"},J={[j]:"isSet",[F]:[{[_]:"Region"}]},Q={[_]:"Region"},tt={[j]:"aws.partition",[F]:[Q],assign:"PartitionResult"},et={[_]:"UseFIPS"},nt={[_]:"UseDualStack"},it={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:M,signingName:"sts",signingRegion:q}]},headers:{}},st={},rt={conditions:[{[j]:V,[F]:[Q,"aws-global"]}],[z]:it,[k]:z},ot={[j]:W,[F]:[et,!0]},at={[j]:W,[F]:[nt,!0]},ct={[j]:G,[F]:[{[_]:"PartitionResult"},"supportsFIPS"]},ut={[_]:"PartitionResult"},lt={[j]:W,[F]:[!0,{[j]:G,[F]:[ut,"supportsDualStack"]}]},dt=[{[j]:"isSet",[F]:[Z]}],ft=[ot],ht=[at],pt={version:"1.0",parameters:{Region:H,UseDualStack:Y,UseFIPS:Y,Endpoint:H,UseGlobalEndpoint:Y},rules:[{conditions:[{[j]:W,[F]:[{[_]:"UseGlobalEndpoint"},L]},{[j]:"not",[F]:dt},J,tt,{[j]:W,[F]:[et,U]},{[j]:W,[F]:[nt,U]}],rules:[{conditions:[{[j]:V,[F]:[Q,"ap-northeast-1"]}],endpoint:it,[k]:z},{conditions:[{[j]:V,[F]:[Q,"ap-south-1"]}],endpoint:it,[k]:z},{conditions:[{[j]:V,[F]:[Q,"ap-southeast-1"]}],endpoint:it,[k]:z},{conditions:[{[j]:V,[F]:[Q,"ap-southeast-2"]}],endpoint:it,[k]:z},rt,{conditions:[{[j]:V,[F]:[Q,"ca-central-1"]}],endpoint:it,[k]:z},{conditions:[{[j]:V,[F]:[Q,"eu-central-1"]}],endpoint:it,[k]:z},{conditions:[{[j]:V,[F]:[Q,"eu-north-1"]}],endpoint:it,[k]:z},{conditions:[{[j]:V,[F]:[Q,"eu-west-1"]}],endpoint:it,[k]:z},{conditions:[{[j]:V,[F]:[Q,"eu-west-2"]}],endpoint:it,[k]:z},{conditions:[{[j]:V,[F]:[Q,"eu-west-3"]}],endpoint:it,[k]:z},{conditions:[{[j]:V,[F]:[Q,"sa-east-1"]}],endpoint:it,[k]:z},{conditions:[{[j]:V,[F]:[Q,q]}],endpoint:it,[k]:z},{conditions:[{[j]:V,[F]:[Q,"us-east-2"]}],endpoint:it,[k]:z},{conditions:[{[j]:V,[F]:[Q,"us-west-1"]}],endpoint:it,[k]:z},{conditions:[{[j]:V,[F]:[Q,"us-west-2"]}],endpoint:it,[k]:z},{endpoint:{url:B,properties:{authSchemes:[{name:M,signingName:"sts",signingRegion:"{Region}"}]},headers:st},[k]:z}],[k]:K},{conditions:dt,rules:[{conditions:ft,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[k]:X},{conditions:ht,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[k]:X},{endpoint:{url:Z,properties:st,headers:st},[k]:z}],[k]:K},{conditions:[J],rules:[{conditions:[tt],rules:[{conditions:[ot,at],rules:[{conditions:[{[j]:W,[F]:[L,ct]},lt],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:st,headers:st},[k]:z}],[k]:K},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[k]:X}],[k]:K},{conditions:ft,rules:[{conditions:[{[j]:W,[F]:[ct,L]}],rules:[{conditions:[{[j]:V,[F]:[{[j]:G,[F]:[ut,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:st,headers:st},[k]:z},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:st,headers:st},[k]:z}],[k]:K},{error:"FIPS is enabled but this partition does not support FIPS",[k]:X}],[k]:K},{conditions:ht,rules:[{conditions:[lt],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:st,headers:st},[k]:z}],[k]:K},{error:"DualStack is enabled but this partition does not support DualStack",[k]:X}],[k]:K},rt,{endpoint:{url:B,properties:st,headers:st},[k]:z}],[k]:K}],[k]:K},{error:"Invalid Configuration: Missing Region",[k]:X}]},gt=new O.kS({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),mt=(t,e={})=>gt.get(t,(()=>(0,O.sO)(pt,{endpointParams:t,logger:e.logger})));O.mw.aws=C.UF;var vt=n(73);const wt=t=>{(0,f.I9)(process.version);const e=(0,vt.I)(t),n=()=>e().then(f.lT),i=(t=>({apiVersion:"2011-06-15",base64Decoder:t?.base64Decoder??R.E,base64Encoder:t?.base64Encoder??R.n,disableHostPrefix:t?.disableHostPrefix??!1,endpointProvider:t?.endpointProvider??mt,extensions:t?.extensions??[],httpAuthSchemeProvider:t?.httpAuthSchemeProvider??m,httpAuthSchemes:t?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new y.f2},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new c.mR}],logger:t?.logger??new f.N4,serviceId:t?.serviceId??"STS",urlParser:t?.urlParser??$.D,utf8Decoder:t?.utf8Decoder??D.ar,utf8Encoder:t?.utf8Encoder??D.Pq}))(t);(0,b.I)(process.version);const s={profile:t?.profile};return{...i,...t,runtime:"node",defaultsMode:e,bodyLengthChecker:t?.bodyLengthChecker??S.n,defaultUserAgentProvider:t?.defaultUserAgentProvider??(0,E.pf)({serviceId:i.serviceId,clientVersion:x.rE}),httpAuthSchemes:t?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4")||(async e=>await t.credentialDefaultProvider(e?.o||{})()),signer:new y.f2},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new c.mR}],maxAttempts:t?.maxAttempts??(0,P.Z)(d.qs,t),region:t?.region??(0,P.Z)(a.GG,{...a.zH,...s}),requestHandler:A.$c.create(t?.requestHandler??n),retryMode:t?.retryMode??(0,P.Z)({...d.kN,default:async()=>(await n()).retryMode||T.L0},t),sha256:t?.sha256??I.V.bind(null,"sha256"),streamCollector:t?.streamCollector??A.kv,useDualstackEndpoint:t?.useDualstackEndpoint??(0,P.Z)(a.e$,s),useFipsEndpoint:t?.useFipsEndpoint??(0,P.Z)(a.Ko,s),userAgentAppId:t?.userAgentAppId??(0,P.Z)(E.hV,s)}};var xt=n(75),bt=n(33);const yt=t=>{const e=t.httpAuthSchemes;let n=t.httpAuthSchemeProvider,i=t.credentials;return{setHttpAuthScheme(t){const n=e.findIndex((e=>e.schemeId===t.schemeId));-1===n?e.push(t):e.splice(n,1,t)},httpAuthSchemes:()=>e,setHttpAuthSchemeProvider(t){n=t},httpAuthSchemeProvider:()=>n,setCredentials(t){i=t},credentials:()=>i}};class Et extends f.Kj{config;constructor(...[t]){const e=wt(t||{}),n=(h=e,{...h,useDualstackEndpoint:h.useDualstackEndpoint??!1,useFipsEndpoint:h.useFipsEndpoint??!1,useGlobalEndpoint:h.useGlobalEndpoint??!1,defaultSigningName:"sts"});var h;const p=(0,o.Dc)(n),m=(0,d.$z)(p),w=(0,a.TD)(m),x=(0,i.OV)(w),b=(0,l.Co)(x),y=((t,e)=>{const n={...(0,xt.Rq)(t),...(0,f.xA)(t),...(0,bt.eS)(t),...yt(t)};return e.forEach((t=>t.configure(n))),{...t,...(0,xt.$3)(n),...(0,f.uv)(n),...(0,bt.jt)(n),...(i=n,{httpAuthSchemes:i.httpAuthSchemes(),httpAuthSchemeProvider:i.httpAuthSchemeProvider(),credentials:i.credentials()})};var i})(v(b),t?.extensions||[]);super(y),this.config=y,this.middlewareStack.use((0,o.sM)(this.config)),this.middlewareStack.use((0,d.ey)(this.config)),this.middlewareStack.use((0,u.vK)(this.config)),this.middlewareStack.use((0,i.TC)(this.config)),this.middlewareStack.use((0,s.Y7)(this.config)),this.middlewareStack.use((0,r.n4)(this.config)),this.middlewareStack.use((0,c.wB)(this.config,{httpAuthSchemeParametersProvider:g,identityProviderConfigProvider:async t=>new c.h$({"aws.auth#sigv4":t.credentials})})),this.middlewareStack.use((0,c.lW)(this.config))}destroy(){super.destroy()}}var It=n(40);class Pt extends f.TJ{constructor(t){super(t),Object.setPrototypeOf(this,Pt.prototype)}}const At=t=>({...t,...t.SecretAccessKey&&{SecretAccessKey:f.$H}}),St=t=>({...t,...t.Credentials&&{Credentials:At(t.Credentials)}});class Tt extends Pt{name="ExpiredTokenException";$fault="client";constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,Tt.prototype)}}class $t extends Pt{name="MalformedPolicyDocumentException";$fault="client";constructor(t){super({name:"MalformedPolicyDocumentException",$fault:"client",...t}),Object.setPrototypeOf(this,$t.prototype)}}class Rt extends Pt{name="PackedPolicyTooLargeException";$fault="client";constructor(t){super({name:"PackedPolicyTooLargeException",$fault:"client",...t}),Object.setPrototypeOf(this,Rt.prototype)}}class Dt extends Pt{name="RegionDisabledException";$fault="client";constructor(t){super({name:"RegionDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,Dt.prototype)}}class Ct extends Pt{name="IDPRejectedClaimException";$fault="client";constructor(t){super({name:"IDPRejectedClaimException",$fault:"client",...t}),Object.setPrototypeOf(this,Ct.prototype)}}class Ot extends Pt{name="InvalidIdentityTokenException";$fault="client";constructor(t){super({name:"InvalidIdentityTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,Ot.prototype)}}const Nt=t=>({...t,...t.WebIdentityToken&&{WebIdentityToken:f.$H}}),kt=t=>({...t,...t.Credentials&&{Credentials:At(t.Credentials)}});class jt extends Pt{name="IDPCommunicationErrorException";$fault="client";constructor(t){super({name:"IDPCommunicationErrorException",$fault:"client",...t}),Object.setPrototypeOf(this,jt.prototype)}}var Ft=n(793),_t=n(77);const Ut=(t,e)=>(0,_t.w)(t,e).then((t=>{if(t.length){const e=new Ft.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(t,e)=>""===e.trim()&&e.includes("\n")?"":void 0});let n;e.addEntity("#xD","\r"),e.addEntity("#10","\n");try{n=e.parse(t,!0)}catch(e){throw e&&"object"==typeof e&&Object.defineProperty(e,"$responseBodyText",{value:t}),e}const i="#text",s=Object.keys(n)[0],r=n[s];return r[i]&&(r[s]=r[i],delete r[i]),(0,f.rm)(r)}return{}})),Lt=async(t,e)=>{const n=await Ut(t,e);return n.Error&&(n.Error.message=n.Error.message??n.Error.Message),n},Wt=async(t,e)=>{const n=ye;let i;return i=on({...Jt(t,e),[Ie]:Ae,[tn]:Ee}),be(e,n,"/",void 0,i)},Vt=async(t,e)=>{const n=ye;let i;return i=on({...Qt(t,e),[Ie]:$e,[tn]:Ee}),be(e,n,"/",void 0,i)},Mt=async(t,e)=>{if(t.statusCode>=300)return zt(t,e);const n=await Ut(t.body,e);let i={};i=ce(n.AssumeRoleResult,e);return{$metadata:we(t),...i}},qt=async(t,e)=>{if(t.statusCode>=300)return zt(t,e);const n=await Ut(t.body,e);let i={};i=ue(n.AssumeRoleWithWebIdentityResult,e);return{$metadata:we(t),...i}},zt=async(t,e)=>{const n={...t,body:await Lt(t.body,e)},i=an(t,n.body);switch(i){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await Bt(n,e);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await Ht(n,e);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await Yt(n,e);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await Zt(n,e);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await Kt(n,e);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await Xt(n,e);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await Gt(n,e);default:const s=n.body;return xe({output:t,parsedBody:s.Error,errorCode:i})}},Bt=async(t,e)=>{const n=t.body,i=de(n.Error,e),s=new Tt({$metadata:we(t),...i});return(0,f.Mw)(s,n)},Kt=async(t,e)=>{const n=t.body,i=fe(n.Error,e),s=new jt({$metadata:we(t),...i});return(0,f.Mw)(s,n)},Xt=async(t,e)=>{const n=t.body,i=he(n.Error,e),s=new Ct({$metadata:we(t),...i});return(0,f.Mw)(s,n)},Gt=async(t,e)=>{const n=t.body,i=pe(n.Error,e),s=new Ot({$metadata:we(t),...i});return(0,f.Mw)(s,n)},Ht=async(t,e)=>{const n=t.body,i=ge(n.Error,e),s=new $t({$metadata:we(t),...i});return(0,f.Mw)(s,n)},Yt=async(t,e)=>{const n=t.body,i=me(n.Error,e),s=new Rt({$metadata:we(t),...i});return(0,f.Mw)(s,n)},Zt=async(t,e)=>{const n=t.body,i=ve(n.Error,e),s=new Dt({$metadata:we(t),...i});return(0,f.Mw)(s,n)},Jt=(t,e)=>{const n={};if(null!=t[ze]&&(n[ze]=t[ze]),null!=t[Be]&&(n[Be]=t[Be]),null!=t[Ue]){const i=te(t[Ue],e);0===t[Ue]?.length&&(n.PolicyArns=[]),Object.entries(i).forEach((([t,e])=>{n[`PolicyArns.${t}`]=e}))}if(null!=t[_e]&&(n[_e]=t[_e]),null!=t[Ne]&&(n[Ne]=t[Ne]),null!=t[Ze]){const i=oe(t[Ze],e);0===t[Ze]?.length&&(n.Tags=[]),Object.entries(i).forEach((([t,e])=>{n[`Tags.${t}`]=e}))}if(null!=t[Qe]){const i=re(t[Qe],e);0===t[Qe]?.length&&(n.TransitiveTagKeys=[]),Object.entries(i).forEach((([t,e])=>{n[`TransitiveTagKeys.${t}`]=e}))}if(null!=t[je]&&(n[je]=t[je]),null!=t[He]&&(n[He]=t[He]),null!=t[Je]&&(n[Je]=t[Je]),null!=t[Ge]&&(n[Ge]=t[Ge]),null!=t[We]){const i=ie(t[We],e);0===t[We]?.length&&(n.ProvidedContexts=[]),Object.entries(i).forEach((([t,e])=>{n[`ProvidedContexts.${t}`]=e}))}return n},Qt=(t,e)=>{const n={};if(null!=t[ze]&&(n[ze]=t[ze]),null!=t[Be]&&(n[Be]=t[Be]),null!=t[nn]&&(n[nn]=t[nn]),null!=t[Ve]&&(n[Ve]=t[Ve]),null!=t[Ue]){const i=te(t[Ue],e);0===t[Ue]?.length&&(n.PolicyArns=[]),Object.entries(i).forEach((([t,e])=>{n[`PolicyArns.${t}`]=e}))}return null!=t[_e]&&(n[_e]=t[_e]),null!=t[Ne]&&(n[Ne]=t[Ne]),n},te=(t,e)=>{const n={};let i=1;for(const s of t){if(null===s)continue;const t=ee(s,e);Object.entries(t).forEach((([t,e])=>{n[`member.${i}.${t}`]=e})),i++}return n},ee=(t,e)=>{const n={};return null!=t[sn]&&(n[sn]=t[sn]),n},ne=(t,e)=>{const n={};return null!=t[Le]&&(n[Le]=t[Le]),null!=t[Oe]&&(n[Oe]=t[Oe]),n},ie=(t,e)=>{const n={};let i=1;for(const e of t){if(null===e)continue;const t=ne(e);Object.entries(t).forEach((([t,e])=>{n[`member.${i}.${t}`]=e})),i++}return n},se=(t,e)=>{const n={};return null!=t[Fe]&&(n[Fe]=t[Fe]),null!=t[en]&&(n[en]=t[en]),n},re=(t,e)=>{const n={};let i=1;for(const e of t)null!==e&&(n[`member.${i}`]=e,i++);return n},oe=(t,e)=>{const n={};let i=1;for(const e of t){if(null===e)continue;const t=se(e);Object.entries(t).forEach((([t,e])=>{n[`member.${i}.${t}`]=e})),i++}return n},ae=(t,e)=>{const n={};return null!=t[Se]&&(n[Se]=(0,f.lK)(t[Se])),null!=t[Re]&&(n[Re]=(0,f.lK)(t[Re])),n},ce=(t,e)=>{const n={};return null!=t[Ce]&&(n[Ce]=le(t[Ce],e)),null!=t[Te]&&(n[Te]=ae(t[Te])),null!=t[Me]&&(n[Me]=(0,f.xW)(t[Me])),null!=t[Ge]&&(n[Ge]=(0,f.lK)(t[Ge])),n},ue=(t,e)=>{const n={};return null!=t[Ce]&&(n[Ce]=le(t[Ce],e)),null!=t[Xe]&&(n[Xe]=(0,f.lK)(t[Xe])),null!=t[Te]&&(n[Te]=ae(t[Te])),null!=t[Me]&&(n[Me]=(0,f.xW)(t[Me])),null!=t[qe]&&(n[qe]=(0,f.lK)(t[qe])),null!=t[De]&&(n[De]=(0,f.lK)(t[De])),null!=t[Ge]&&(n[Ge]=(0,f.lK)(t[Ge])),n},le=(t,e)=>{const n={};return null!=t[Pe]&&(n[Pe]=(0,f.lK)(t[Pe])),null!=t[Ke]&&(n[Ke]=(0,f.lK)(t[Ke])),null!=t[Ye]&&(n[Ye]=(0,f.lK)(t[Ye])),null!=t[ke]&&(n[ke]=(0,f.Y0)((0,f.t_)(t[ke]))),n},de=(t,e)=>{const n={};return null!=t[rn]&&(n[rn]=(0,f.lK)(t[rn])),n},fe=(t,e)=>{const n={};return null!=t[rn]&&(n[rn]=(0,f.lK)(t[rn])),n},he=(t,e)=>{const n={};return null!=t[rn]&&(n[rn]=(0,f.lK)(t[rn])),n},pe=(t,e)=>{const n={};return null!=t[rn]&&(n[rn]=(0,f.lK)(t[rn])),n},ge=(t,e)=>{const n={};return null!=t[rn]&&(n[rn]=(0,f.lK)(t[rn])),n},me=(t,e)=>{const n={};return null!=t[rn]&&(n[rn]=(0,f.lK)(t[rn])),n},ve=(t,e)=>{const n={};return null!=t[rn]&&(n[rn]=(0,f.lK)(t[rn])),n},we=t=>({httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]}),xe=(0,f.jr)(Pt),be=async(t,e,n,i,s)=>{const{hostname:r,protocol:o="https",port:a,path:c}=await t.endpoint(),u={protocol:o,hostname:r,port:a,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+n:c+n,headers:e};return void 0!==i&&(u.hostname=i),void 0!==s&&(u.body=s),new bt.Kd(u)},ye={"content-type":"application/x-www-form-urlencoded"},Ee="2011-06-15",Ie="Action",Pe="AccessKeyId",Ae="AssumeRole",Se="AssumedRoleId",Te="AssumedRoleUser",$e="AssumeRoleWithWebIdentity",Re="Arn",De="Audience",Ce="Credentials",Oe="ContextAssertion",Ne="DurationSeconds",ke="Expiration",je="ExternalId",Fe="Key",_e="Policy",Ue="PolicyArns",Le="ProviderArn",We="ProvidedContexts",Ve="ProviderId",Me="PackedPolicySize",qe="Provider",ze="RoleArn",Be="RoleSessionName",Ke="SecretAccessKey",Xe="SubjectFromWebIdentityToken",Ge="SourceIdentity",He="SerialNumber",Ye="SessionToken",Ze="Tags",Je="TokenCode",Qe="TransitiveTagKeys",tn="Version",en="Value",nn="WebIdentityToken",sn="arn",rn="message",on=t=>Object.entries(t).map((([t,e])=>(0,f.$6)(t)+"="+(0,f.$6)(e))).join("&"),an=(t,e)=>void 0!==e.Error?.Code?e.Error.Code:404==t.statusCode?"NotFound":void 0;class cn extends(f.uB.classBuilder().ep(w).m((function(t,e,n,i){return[(0,It.TM)(n,this.serialize,this.deserialize),(0,l.rD)(n,t.getEndpointParameterInstructions())]})).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,St).ser(Wt).de(Mt).build()){}class un extends(f.uB.classBuilder().ep(w).m((function(t,e,n,i){return[(0,It.TM)(n,this.serialize,this.deserialize),(0,l.rD)(n,t.getEndpointParameterInstructions())]})).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(Nt,kt).ser(Vt).de(qt).build()){}const ln={AssumeRoleCommand:cn,AssumeRoleWithWebIdentityCommand:un};(0,f.J1)(ln,class extends Et{});var dn=n(66);const fn="us-east-1",hn=t=>{if("string"==typeof t?.Arn){const e=t.Arn.split(":");if(e.length>4&&""!==e[4])return e[4]}},pn=async(t,e,n)=>{const i="function"==typeof t?await t():t,s="function"==typeof e?await e():e;return n?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${i} (provider)`,`${s} (parent client)`,`${fn} (STS default)`),i??s??fn},gn=(t,e)=>{let n,i;return async(s,r)=>{if(i=s,!n){const{logger:s=t?.parentClientConfig?.logger,region:r,requestHandler:o=t?.parentClientConfig?.requestHandler,credentialProviderLogger:a}=t,c=await pn(r,t?.parentClientConfig?.region,a),u=!vn(o);n=new e({profile:t?.parentClientConfig?.profile,credentialDefaultProvider:()=>async()=>i,region:c,requestHandler:u?o:void 0,logger:s})}const{Credentials:o,AssumedRoleUser:a}=await n.send(new cn(r));if(!o||!o.AccessKeyId||!o.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${r.RoleArn}`);const c=hn(a),u={accessKeyId:o.AccessKeyId,secretAccessKey:o.SecretAccessKey,sessionToken:o.SessionToken,expiration:o.Expiration,...o.CredentialScope&&{credentialScope:o.CredentialScope},...c&&{accountId:c}};return(0,dn.g)(u,"CREDENTIALS_STS_ASSUME_ROLE","i"),u}},mn=(t,e)=>{let n;return async i=>{if(!n){const{logger:i=t?.parentClientConfig?.logger,region:s,requestHandler:r=t?.parentClientConfig?.requestHandler,credentialProviderLogger:o}=t,a=await pn(s,t?.parentClientConfig?.region,o),c=!vn(r);n=new e({profile:t?.parentClientConfig?.profile,region:a,requestHandler:c?r:void 0,logger:i})}const{Credentials:s,AssumedRoleUser:r}=await n.send(new un(i));if(!s||!s.AccessKeyId||!s.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${i.RoleArn}`);const o=hn(r),a={accessKeyId:s.AccessKeyId,secretAccessKey:s.SecretAccessKey,sessionToken:s.SessionToken,expiration:s.Expiration,...s.CredentialScope&&{credentialScope:s.CredentialScope},...o&&{accountId:o}};return o&&(0,dn.g)(a,"RESOLVED_ACCOUNT_ID","T"),(0,dn.g)(a,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),a}},vn=t=>"h2"===t?.metadata?.handlerProtocol,wn=(t,e)=>e?class extends t{constructor(t){super(t);for(const t of e)this.middlewareStack.use(t)}}:t,xn=(t={},e)=>gn(t,wn(Et,e)),bn=(t={},e)=>mn(t,wn(Et,e))},793:(t,e,n)=>{"use strict";const i=n(794),s=n(796),r=n(803);t.exports={XMLParser:s,XMLValidator:i,XMLBuilder:r}},795:(t,e)=>{"use strict";const n=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",i="["+n+"]["+(n+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040")+"]*",s=new RegExp("^"+i+"$");e.isExist=function(t){return void 0!==t},e.isEmptyObject=function(t){return 0===Object.keys(t).length},e.merge=function(t,e,n){if(e){const i=Object.keys(e),s=i.length;for(let r=0;r<s;r++)t[i[r]]="strict"===n?[e[i[r]]]:e[i[r]]}},e.getValue=function(t){return e.isExist(t)?t:""},e.isName=function(t){const e=s.exec(t);return!(null==e)},e.getAllMatches=function(t,e){const n=[];let i=e.exec(t);for(;i;){const s=[];s.startIndex=e.lastIndex-i[0].length;const r=i.length;for(let t=0;t<r;t++)s.push(i[t]);n.push(s),i=e.exec(t)}return n},e.nameRegexp=i},794:(t,e,n)=>{"use strict";const i=n(795),s={allowBooleanAttributes:!1,unpairedTags:[]};function r(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function o(t,e){const n=e;for(;e<t.length;e++)if("?"!=t[e]&&" "!=t[e]);else{const i=t.substr(n,e-n);if(e>5&&"xml"===i)return p("InvalidXml","XML declaration allowed only at the start of the document.",m(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}}return e}function a(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e<t.length;e++)if("-"===t[e]&&"-"===t[e+1]&&">"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let n=1;for(e+=8;e<t.length;e++)if("<"===t[e])n++;else if(">"===t[e]&&(n--,0===n))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e<t.length;e++)if("]"===t[e]&&"]"===t[e+1]&&">"===t[e+2]){e+=2;break}return e}e.validate=function(t,e){e=Object.assign({},s,e);const n=[];let c=!1,u=!1;"\ufeff"===t[0]&&(t=t.substr(1));for(let s=0;s<t.length;s++)if("<"===t[s]&&"?"===t[s+1]){if(s+=2,s=o(t,s),s.err)return s}else{if("<"!==t[s]){if(r(t[s]))continue;return p("InvalidChar","char '"+t[s]+"' is not expected.",m(t,s))}{let g=s;if(s++,"!"===t[s]){s=a(t,s);continue}{let v=!1;"/"===t[s]&&(v=!0,s++);let w="";for(;s<t.length&&">"!==t[s]&&" "!==t[s]&&"\t"!==t[s]&&"\n"!==t[s]&&"\r"!==t[s];s++)w+=t[s];if(w=w.trim(),"/"===w[w.length-1]&&(w=w.substring(0,w.length-1),s--),d=w,!i.isName(d)){let e;return e=0===w.trim().length?"Invalid space after '<'.":"Tag '"+w+"' is an invalid name.",p("InvalidTag",e,m(t,s))}const x=l(t,s);if(!1===x)return p("InvalidAttr","Attributes for '"+w+"' have open quote.",m(t,s));let b=x.value;if(s=x.index,"/"===b[b.length-1]){const n=s-b.length;b=b.substring(0,b.length-1);const i=f(b,e);if(!0!==i)return p(i.err.code,i.err.msg,m(t,n+i.err.line));c=!0}else if(v){if(!x.tagClosed)return p("InvalidTag","Closing tag '"+w+"' doesn't have proper closing.",m(t,s));if(b.trim().length>0)return p("InvalidTag","Closing tag '"+w+"' can't have attributes or invalid starting.",m(t,g));if(0===n.length)return p("InvalidTag","Closing tag '"+w+"' has not been opened.",m(t,g));{const e=n.pop();if(w!==e.tagName){let n=m(t,e.tagStartPos);return p("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+w+"'.",m(t,g))}0==n.length&&(u=!0)}}else{const i=f(b,e);if(!0!==i)return p(i.err.code,i.err.msg,m(t,s-b.length+i.err.line));if(!0===u)return p("InvalidXml","Multiple possible root nodes found.",m(t,s));-1!==e.unpairedTags.indexOf(w)||n.push({tagName:w,tagStartPos:g}),c=!0}for(s++;s<t.length;s++)if("<"===t[s]){if("!"===t[s+1]){s++,s=a(t,s);continue}if("?"!==t[s+1])break;if(s=o(t,++s),s.err)return s}else if("&"===t[s]){const e=h(t,s);if(-1==e)return p("InvalidChar","char '&' is not expected.",m(t,s));s=e}else if(!0===u&&!r(t[s]))return p("InvalidXml","Extra text at the end",m(t,s));"<"===t[s]&&s--}}}var d;return c?1==n.length?p("InvalidTag","Unclosed tag '"+n[0].tagName+"'.",m(t,n[0].tagStartPos)):!(n.length>0)||p("InvalidXml","Invalid '"+JSON.stringify(n.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):p("InvalidXml","Start tag expected.",1)};const c='"',u="'";function l(t,e){let n="",i="",s=!1;for(;e<t.length;e++){if(t[e]===c||t[e]===u)""===i?i=t[e]:i!==t[e]||(i="");else if(">"===t[e]&&""===i){s=!0;break}n+=t[e]}return""===i&&{value:n,index:e,tagClosed:s}}const d=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function f(t,e){const n=i.getAllMatches(t,d),s={};for(let t=0;t<n.length;t++){if(0===n[t][1].length)return p("InvalidAttr","Attribute '"+n[t][2]+"' has no space in starting.",v(n[t]));if(void 0!==n[t][3]&&void 0===n[t][4])return p("InvalidAttr","Attribute '"+n[t][2]+"' is without value.",v(n[t]));if(void 0===n[t][3]&&!e.allowBooleanAttributes)return p("InvalidAttr","boolean attribute '"+n[t][2]+"' is not allowed.",v(n[t]));const i=n[t][2];if(!g(i))return p("InvalidAttr","Attribute '"+i+"' is an invalid name.",v(n[t]));if(s.hasOwnProperty(i))return p("InvalidAttr","Attribute '"+i+"' is repeated.",v(n[t]));s[i]=1}return!0}function h(t,e){if(";"===t[++e])return-1;if("#"===t[e])return function(t,e){let n=/\d/;for("x"===t[e]&&(e++,n=/[\da-fA-F]/);e<t.length;e++){if(";"===t[e])return e;if(!t[e].match(n))break}return-1}(t,++e);let n=0;for(;e<t.length;e++,n++)if(!(t[e].match(/\w/)&&n<20)){if(";"===t[e])break;return-1}return e}function p(t,e,n){return{err:{code:t,msg:e,line:n.line||n,col:n.col}}}function g(t){return i.isName(t)}function m(t,e){const n=t.substring(0,e).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function v(t){return t.startIndex+t[1].length}},803:(t,e,n)=>{"use strict";const i=n(804),s={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function r(t){this.options=Object.assign({},s,t),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=c),this.processTextOrObjNode=o,this.options.format?(this.indentate=a,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function o(t,e,n){const i=this.j2x(t,n+1);return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,i.attrStr,n):this.buildObjectNode(i.val,e,i.attrStr,n)}function a(t){return this.options.indentBy.repeat(t)}function c(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}r.prototype.build=function(t){return this.options.preserveOrder?i(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0).val)},r.prototype.j2x=function(t,e){let n="",i="";for(let s in t)if(Object.prototype.hasOwnProperty.call(t,s))if(void 0===t[s])this.isAttribute(s)&&(i+="");else if(null===t[s])this.isAttribute(s)?i+="":"?"===s[0]?i+=this.indentate(e)+"<"+s+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+s+"/"+this.tagEndChar;else if(t[s]instanceof Date)i+=this.buildTextValNode(t[s],s,"",e);else if("object"!=typeof t[s]){const r=this.isAttribute(s);if(r)n+=this.buildAttrPairStr(r,""+t[s]);else if(s===this.options.textNodeName){let e=this.options.tagValueProcessor(s,""+t[s]);i+=this.replaceEntitiesValue(e)}else i+=this.buildTextValNode(t[s],s,"",e)}else if(Array.isArray(t[s])){const n=t[s].length;let r="",o="";for(let a=0;a<n;a++){const n=t[s][a];if(void 0===n);else if(null===n)"?"===s[0]?i+=this.indentate(e)+"<"+s+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+s+"/"+this.tagEndChar;else if("object"==typeof n)if(this.options.oneListGroup){const t=this.j2x(n,e+1);r+=t.val,this.options.attributesGroupName&&n.hasOwnProperty(this.options.attributesGroupName)&&(o+=t.attrStr)}else r+=this.processTextOrObjNode(n,s,e);else if(this.options.oneListGroup){let t=this.options.tagValueProcessor(s,n);t=this.replaceEntitiesValue(t),r+=t}else r+=this.buildTextValNode(n,s,"",e)}this.options.oneListGroup&&(r=this.buildObjectNode(r,s,o,e)),i+=r}else if(this.options.attributesGroupName&&s===this.options.attributesGroupName){const e=Object.keys(t[s]),i=e.length;for(let r=0;r<i;r++)n+=this.buildAttrPairStr(e[r],""+t[s][e[r]])}else i+=this.processTextOrObjNode(t[s],s,e);return{attrStr:n,val:i}},r.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&"true"===e?" "+t:" "+t+'="'+e+'"'},r.prototype.buildObjectNode=function(t,e,n,i){if(""===t)return"?"===e[0]?this.indentate(i)+"<"+e+n+"?"+this.tagEndChar:this.indentate(i)+"<"+e+n+this.closeTag(e)+this.tagEndChar;{let s="</"+e+this.tagEndChar,r="";return"?"===e[0]&&(r="?",s=""),!n&&""!==n||-1!==t.indexOf("<")?!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===r.length?this.indentate(i)+`\x3c!--${t}--\x3e`+this.newLine:this.indentate(i)+"<"+e+n+r+this.tagEndChar+t+this.indentate(i)+s:this.indentate(i)+"<"+e+n+r+">"+t+s}},r.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`></${t}`,e},r.prototype.buildTextValNode=function(t,e,n,i){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName)return this.indentate(i)+`<![CDATA[${t}]]>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(i)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(i)+"<"+e+n+"?"+this.tagEndChar;{let s=this.options.tagValueProcessor(e,t);return s=this.replaceEntitiesValue(s),""===s?this.indentate(i)+"<"+e+n+this.closeTag(e)+this.tagEndChar:this.indentate(i)+"<"+e+n+">"+s+"</"+e+this.tagEndChar}},r.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const n=this.options.entities[e];t=t.replace(n.regex,n.val)}return t},t.exports=r},804:t=>{function e(t,o,a,c){let u="",l=!1;for(let d=0;d<t.length;d++){const f=t[d],h=n(f);if(void 0===h)continue;let p="";if(p=0===a.length?h:`${a}.${h}`,h===o.textNodeName){let t=f[h];s(p,o)||(t=o.tagValueProcessor(h,t),t=r(t,o)),l&&(u+=c),u+=t,l=!1;continue}if(h===o.cdataPropName){l&&(u+=c),u+=`<![CDATA[${f[h][0][o.textNodeName]}]]>`,l=!1;continue}if(h===o.commentPropName){u+=c+`\x3c!--${f[h][0][o.textNodeName]}--\x3e`,l=!0;continue}if("?"===h[0]){const t=i(f[":@"],o),e="?xml"===h?"":c;let n=f[h][0][o.textNodeName];n=0!==n.length?" "+n:"",u+=e+`<${h}${n}${t}?>`,l=!0;continue}let g=c;""!==g&&(g+=o.indentBy);const m=c+`<${h}${i(f[":@"],o)}`,v=e(f[h],o,p,g);-1!==o.unpairedTags.indexOf(h)?o.suppressUnpairedNode?u+=m+">":u+=m+"/>":v&&0!==v.length||!o.suppressEmptyNode?v&&v.endsWith(">")?u+=m+`>${v}${c}</${h}>`:(u+=m+">",v&&""!==c&&(v.includes("/>")||v.includes("</"))?u+=c+o.indentBy+v+c:u+=v,u+=`</${h}>`):u+=m+"/>",l=!0}return u}function n(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const i=e[n];if(t.hasOwnProperty(i)&&":@"!==i)return i}}function i(t,e){let n="";if(t&&!e.ignoreAttributes)for(let i in t){if(!t.hasOwnProperty(i))continue;let s=e.attributeValueProcessor(i,t[i]);s=r(s,e),!0===s&&e.suppressBooleanAttributes?n+=` ${i.substr(e.attributeNamePrefix.length)}`:n+=` ${i.substr(e.attributeNamePrefix.length)}="${s}"`}return n}function s(t,e){let n=(t=t.substr(0,t.length-e.textNodeName.length-1)).substr(t.lastIndexOf(".")+1);for(let i in e.stopNodes)if(e.stopNodes[i]===t||e.stopNodes[i]==="*."+n)return!0;return!1}function r(t,e){if(t&&t.length>0&&e.processEntities)for(let n=0;n<e.entities.length;n++){const i=e.entities[n];t=t.replace(i.regex,i.val)}return t}t.exports=function(t,n){let i="";return n.format&&n.indentBy.length>0&&(i="\n"),e(t,n,"",i)}},800:(t,e,n)=>{const i=n(795);function s(t,e){let n="";for(;e<t.length&&"'"!==t[e]&&'"'!==t[e];e++)n+=t[e];if(n=n.trim(),-1!==n.indexOf(" "))throw new Error("External entites are not supported");const i=t[e++];let s="";for(;e<t.length&&t[e]!==i;e++)s+=t[e];return[n,s,e]}function r(t,e){return"!"===t[e+1]&&"-"===t[e+2]&&"-"===t[e+3]}function o(t,e){return"!"===t[e+1]&&"E"===t[e+2]&&"N"===t[e+3]&&"T"===t[e+4]&&"I"===t[e+5]&&"T"===t[e+6]&&"Y"===t[e+7]}function a(t,e){return"!"===t[e+1]&&"E"===t[e+2]&&"L"===t[e+3]&&"E"===t[e+4]&&"M"===t[e+5]&&"E"===t[e+6]&&"N"===t[e+7]&&"T"===t[e+8]}function c(t,e){return"!"===t[e+1]&&"A"===t[e+2]&&"T"===t[e+3]&&"T"===t[e+4]&&"L"===t[e+5]&&"I"===t[e+6]&&"S"===t[e+7]&&"T"===t[e+8]}function u(t,e){return"!"===t[e+1]&&"N"===t[e+2]&&"O"===t[e+3]&&"T"===t[e+4]&&"A"===t[e+5]&&"T"===t[e+6]&&"I"===t[e+7]&&"O"===t[e+8]&&"N"===t[e+9]}function l(t){if(i.isName(t))return t;throw new Error(`Invalid entity name ${t}`)}t.exports=function(t,e){const n={};if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let i=1,d=!1,f=!1,h="";for(;e<t.length;e++)if("<"!==t[e]||f)if(">"===t[e]){if(f?"-"===t[e-1]&&"-"===t[e-2]&&(f=!1,i--):i--,0===i)break}else"["===t[e]?d=!0:h+=t[e];else{if(d&&o(t,e))e+=7,[entityName,val,e]=s(t,e+1),-1===val.indexOf("&")&&(n[l(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(d&&a(t,e))e+=8;else if(d&&c(t,e))e+=8;else if(d&&u(t,e))e+=9;else{if(!r)throw new Error("Invalid DOCTYPE");f=!0}i++,h=""}if(0!==i)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:e}}},797:(t,e)=>{const n={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,n){return t}};e.buildOptions=function(t){return Object.assign({},n,t)},e.defaultOptions=n},798:(t,e,n)=>{"use strict";const i=n(795),s=n(799),r=n(800),o=n(801);function a(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const i=e[n];this.lastEntities[i]={regex:new RegExp("&"+i+";","g"),val:t[i]}}}function c(t,e,n,i,s,r,o){if(void 0!==t&&(this.options.trimValues&&!i&&(t=t.trim()),t.length>0)){o||(t=this.replaceEntitiesValue(t));const i=this.options.tagValueProcessor(e,t,n,s,r);if(null==i)return t;if(typeof i!=typeof t||i!==t)return i;if(this.options.trimValues)return b(t,this.options.parseTagValue,this.options.numberParseOptions);return t.trim()===t?b(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function u(t){if(this.options.removeNSPrefix){const e=t.split(":"),n="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=n+e[1])}return t}const l=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function d(t,e,n){if(!this.options.ignoreAttributes&&"string"==typeof t){const n=i.getAllMatches(t,l),s=n.length,r={};for(let t=0;t<s;t++){const i=this.resolveNameSpace(n[t][1]);let s=n[t][4],o=this.options.attributeNamePrefix+i;if(i.length)if(this.options.transformAttributeName&&(o=this.options.transformAttributeName(o)),"__proto__"===o&&(o="#__proto__"),void 0!==s){this.options.trimValues&&(s=s.trim()),s=this.replaceEntitiesValue(s);const t=this.options.attributeValueProcessor(i,s,e);r[o]=null==t?s:typeof t!=typeof s||t!==s?t:b(s,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(r[o]=!0)}if(!Object.keys(r).length)return;if(this.options.attributesGroupName){const t={};return t[this.options.attributesGroupName]=r,t}return r}}const f=function(t){t=t.replace(/\r\n?/g,"\n");const e=new s("!xml");let n=e,i="",o="";for(let a=0;a<t.length;a++){if("<"===t[a])if("/"===t[a+1]){const e=v(t,">",a,"Closing Tag is not closed.");let s=t.substring(a+2,e).trim();if(this.options.removeNSPrefix){const t=s.indexOf(":");-1!==t&&(s=s.substr(t+1))}this.options.transformTagName&&(s=this.options.transformTagName(s)),n&&(i=this.saveTextToParentTag(i,n,o));const r=o.substring(o.lastIndexOf(".")+1);if(s&&-1!==this.options.unpairedTags.indexOf(s))throw new Error(`Unpaired tag can not be used as closing tag: </${s}>`);let c=0;r&&-1!==this.options.unpairedTags.indexOf(r)?(c=o.lastIndexOf(".",o.lastIndexOf(".")-1),this.tagsNodeStack.pop()):c=o.lastIndexOf("."),o=o.substring(0,c),n=this.tagsNodeStack.pop(),i="",a=e}else if("?"===t[a+1]){let e=w(t,a,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,n,o),this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags);else{const t=new s(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,o,e.tagName)),this.addChild(n,t,o)}a=e.closeIndex+1}else if("!--"===t.substr(a+1,3)){const e=v(t,"--\x3e",a+4,"Comment is not closed.");if(this.options.commentPropName){const s=t.substring(a+4,e-2);i=this.saveTextToParentTag(i,n,o),n.add(this.options.commentPropName,[{[this.options.textNodeName]:s}])}a=e}else if("!D"===t.substr(a+1,2)){const e=r(t,a);this.docTypeEntities=e.entities,a=e.i}else if("!["===t.substr(a+1,2)){const e=v(t,"]]>",a,"CDATA is not closed.")-2,s=t.substring(a+9,e);i=this.saveTextToParentTag(i,n,o);let r=this.parseTextData(s,n.tagname,o,!0,!1,!0,!0);null==r&&(r=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:s}]):n.add(this.options.textNodeName,r),a=e+2}else{let r=w(t,a,this.options.removeNSPrefix),c=r.tagName;const u=r.rawTagName;let l=r.tagExp,d=r.attrExpPresent,f=r.closeIndex;this.options.transformTagName&&(c=this.options.transformTagName(c)),n&&i&&"!xml"!==n.tagname&&(i=this.saveTextToParentTag(i,n,o,!1));const h=n;if(h&&-1!==this.options.unpairedTags.indexOf(h.tagname)&&(n=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf("."))),c!==e.tagname&&(o+=o?"."+c:c),this.isItStopNode(this.options.stopNodes,o,c)){let e="";if(l.length>0&&l.lastIndexOf("/")===l.length-1)"/"===c[c.length-1]?(c=c.substr(0,c.length-1),o=o.substr(0,o.length-1),l=c):l=l.substr(0,l.length-1),a=r.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(c))a=r.closeIndex;else{const n=this.readStopNodeData(t,u,f+1);if(!n)throw new Error(`Unexpected end of ${u}`);a=n.i,e=n.tagContent}const i=new s(c);c!==l&&d&&(i[":@"]=this.buildAttributesMap(l,o,c)),e&&(e=this.parseTextData(e,c,o,!0,d,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),i.add(this.options.textNodeName,e),this.addChild(n,i,o)}else{if(l.length>0&&l.lastIndexOf("/")===l.length-1){"/"===c[c.length-1]?(c=c.substr(0,c.length-1),o=o.substr(0,o.length-1),l=c):l=l.substr(0,l.length-1),this.options.transformTagName&&(c=this.options.transformTagName(c));const t=new s(c);c!==l&&d&&(t[":@"]=this.buildAttributesMap(l,o,c)),this.addChild(n,t,o),o=o.substr(0,o.lastIndexOf("."))}else{const t=new s(c);this.tagsNodeStack.push(n),c!==l&&d&&(t[":@"]=this.buildAttributesMap(l,o,c)),this.addChild(n,t,o),n=t}i="",a=f}}else i+=t[a]}return e.child};function h(t,e,n){const i=this.options.updateTag(e.tagname,n,e[":@"]);!1===i||("string"==typeof i?(e.tagname=i,t.addChild(e)):t.addChild(e))}const p=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const n=this.docTypeEntities[e];t=t.replace(n.regx,n.val)}for(let e in this.lastEntities){const n=this.lastEntities[e];t=t.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const n=this.htmlEntities[e];t=t.replace(n.regex,n.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function g(t,e,n,i){return t&&(void 0===i&&(i=0===Object.keys(e.child).length),void 0!==(t=this.parseTextData(t,e.tagname,n,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,i))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function m(t,e,n){const i="*."+n;for(const n in t){const s=t[n];if(i===s||e===s)return!0}return!1}function v(t,e,n,i){const s=t.indexOf(e,n);if(-1===s)throw new Error(i);return s+e.length-1}function w(t,e,n,i=">"){const s=function(t,e,n=">"){let i,s="";for(let r=e;r<t.length;r++){let e=t[r];if(i)e===i&&(i="");else if('"'===e||"'"===e)i=e;else if(e===n[0]){if(!n[1])return{data:s,index:r};if(t[r+1]===n[1])return{data:s,index:r}}else"\t"===e&&(e=" ");s+=e}}(t,e+1,i);if(!s)return;let r=s.data;const o=s.index,a=r.search(/\s/);let c=r,u=!0;-1!==a&&(c=r.substring(0,a),r=r.substring(a+1).trimStart());const l=c;if(n){const t=c.indexOf(":");-1!==t&&(c=c.substr(t+1),u=c!==s.data.substr(t+1))}return{tagName:c,tagExp:r,closeIndex:o,attrExpPresent:u,rawTagName:l}}function x(t,e,n){const i=n;let s=1;for(;n<t.length;n++)if("<"===t[n])if("/"===t[n+1]){const r=v(t,">",n,`${e} is not closed`);if(t.substring(n+2,r).trim()===e&&(s--,0===s))return{tagContent:t.substring(i,n),i:r};n=r}else if("?"===t[n+1]){n=v(t,"?>",n+1,"StopNode is not closed.")}else if("!--"===t.substr(n+1,3)){n=v(t,"--\x3e",n+3,"StopNode is not closed.")}else if("!["===t.substr(n+1,2)){n=v(t,"]]>",n,"StopNode is not closed.")-2}else{const i=w(t,n,">");if(i){(i&&i.tagName)===e&&"/"!==i.tagExp[i.tagExp.length-1]&&s++,n=i.closeIndex}}}function b(t,e,n){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&o(t,n)}return i.isExist(t)?t:""}t.exports=class{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,16))}},this.addExternalEntities=a,this.parseXml=f,this.parseTextData=c,this.resolveNameSpace=u,this.buildAttributesMap=d,this.isItStopNode=m,this.replaceEntitiesValue=p,this.readStopNodeData=x,this.saveTextToParentTag=g,this.addChild=h}}},796:(t,e,n)=>{const{buildOptions:i}=n(797),s=n(798),{prettify:r}=n(802),o=n(794);t.exports=class{constructor(t){this.externalEntities={},this.options=i(t)}parse(t,e){if("string"==typeof t);else{if(!t.toString)throw new Error("XML data is accepted in String or Bytes[] form.");t=t.toString()}if(e){!0===e&&(e={});const n=o.validate(t,e);if(!0!==n)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}const n=new s(this.options);n.addExternalEntities(this.externalEntities);const i=n.parseXml(t);return this.options.preserveOrder||void 0===i?i:r(i,this.options)}addEntity(t,e){if(-1!==e.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==t.indexOf("&")||-1!==t.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===e)throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}}},802:(t,e)=>{"use strict";function n(t,e,o){let a;const c={};for(let u=0;u<t.length;u++){const l=t[u],d=i(l);let f="";if(f=void 0===o?d:o+"."+d,d===e.textNodeName)void 0===a?a=l[d]:a+=""+l[d];else{if(void 0===d)continue;if(l[d]){let t=n(l[d],e,f);const i=r(t,e);l[":@"]?s(t,l[":@"],f,e):1!==Object.keys(t).length||void 0===t[e.textNodeName]||e.alwaysCreateTextNode?0===Object.keys(t).length&&(e.alwaysCreateTextNode?t[e.textNodeName]="":t=""):t=t[e.textNodeName],void 0!==c[d]&&c.hasOwnProperty(d)?(Array.isArray(c[d])||(c[d]=[c[d]]),c[d].push(t)):e.isArray(d,f,i)?c[d]=[t]:c[d]=t}}}return"string"==typeof a?a.length>0&&(c[e.textNodeName]=a):void 0!==a&&(c[e.textNodeName]=a),c}function i(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const n=e[t];if(":@"!==n)return n}}function s(t,e,n,i){if(e){const s=Object.keys(e),r=s.length;for(let o=0;o<r;o++){const r=s[o];i.isArray(r,n+"."+r,!0,!0)?t[r]=[e[r]]:t[r]=e[r]}}}function r(t,e){const{textNodeName:n}=e,i=Object.keys(t).length;return 0===i||!(1!==i||!t[n]&&"boolean"!=typeof t[n]&&0!==t[n])}e.prettify=function(t,e){return n(t,e)}},799:t=>{"use strict";t.exports=class{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}}},801:t=>{const e=/^[-+]?0x[a-fA-F0-9]+$/,n=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,i={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};t.exports=function(t,s={}){if(s=Object.assign({},i,s),!t||"string"!=typeof t)return t;if("0"===t)return 0;let r=t.trim();if(void 0!==s.skipLike&&s.skipLike.test(r))return t;if(s.hex&&e.test(r))return function(t,e){if(parseInt)return parseInt(t,e);if(Number.parseInt)return Number.parseInt(t,e);if(window&&window.parseInt)return window.parseInt(t,e);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}(r,16);if(-1!==r.search(/[eE]/)){const e=r.match(/^([-\+])?(0*)([0-9]*(\.[0-9]*)?[eE][-\+]?[0-9]+)$/);if(e){if(s.leadingZeros)r=(e[1]||"")+e[3];else if("0"!==e[2]||"."!==e[3][0])return t;return s.eNotation?Number(r):t}return t}{const e=n.exec(r);if(e){const n=e[1],i=e[2];let o=function(t){if(t&&-1!==t.indexOf("."))return"."===(t=t.replace(/0+$/,""))?t="0":"."===t[0]?t="0"+t:"."===t[t.length-1]&&(t=t.substr(0,t.length-1)),t;return t}(e[3]);if(!s.leadingZeros&&i.length>0&&n&&"."!==r[2])return t;if(!s.leadingZeros&&i.length>0&&!n&&"."!==r[1])return t;if(s.leadingZeros&&i===t)return 0;{const e=Number(r),a=""+e;return-1!==a.search(/[eE]/)?s.eNotation?e:t:-1!==r.indexOf(".")?"0"===a&&""===o||a===o||n&&a==="-"+o?e:t:i?o===a||n+o===a?e:t:r===a||r===n+a?e:t}}return t}}},791:t=>{"use strict";t.exports={rE:"3.750.0"}}};
3
- //# sourceMappingURL=97.index.js.map