@activepieces/piece-microsoft-outlook 0.5.2 → 0.5.3
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 +1 -1
- package/src/index.js +6 -6
package/src/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";var sd=Object.create;var qt=Object.defineProperty;var ud=Object.getOwnPropertyDescriptor;var cd=Object.getOwnPropertyNames;var ld=Object.getPrototypeOf,pd=Object.prototype.hasOwnProperty;var a=(e,t)=>qt(e,"name",{value:t,configurable:!0});var dd=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(t=e(e=0)),t}catch(n){throw r=[n],n}};var b=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},uo=(e,t)=>{for(var r in t)qt(e,r,{get:t[r],enumerable:!0})},qi=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of cd(t))!pd.call(e,o)&&o!==r&&qt(e,o,{get:()=>t[o],enumerable:!(n=ud(t,o))||n.enumerable});return e};var Re=(e,t,r)=>(r=e!=null?sd(ld(e)):{},qi(t||!e||!e.__esModule?qt(r,"default",{value:e,enumerable:!0}):r,e)),ie=e=>qi(qt({},"__esModule",{value:!0}),e);var gs=b((fs,Zr)=>{(function(e){"use strict";let t="(0?\\d+|0x[a-f0-9]+)",r={fourOctet:new RegExp(`^${t}\\.${t}\\.${t}\\.${t}$`,"i"),threeOctet:new RegExp(`^${t}\\.${t}\\.${t}$`,"i"),twoOctet:new RegExp(`^${t}\\.${t}$`,"i"),longValue:new RegExp(`^${t}$`,"i")},n=new RegExp("^0[0-7]+$","i"),o=new RegExp("^0x[a-f0-9]+$","i"),i="%[0-9a-z]{1,}",s="(?:[0-9a-f]+::?)+",u={zoneIndex:new RegExp(i,"i"),native:new RegExp(`^(::)?(${s})?([0-9a-f]+)?(::)?(${i})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${i})?)$`,"i"),transitional:new RegExp(`^((?:${s})|(?:::)(?:${s})?)${t}\\.${t}\\.${t}\\.${t}(${i})?$`,"i")};function p(l,f){if(l.indexOf("::")!==l.lastIndexOf("::"))return null;let _=0,h=-1,x=(l.match(u.zoneIndex)||[])[0],E,V;for(x&&(x=x.substring(1),l=l.replace(/%.+$/,""));(h=l.indexOf(":",h+1))>=0;)_++;if(l.substr(0,2)==="::"&&_--,l.substr(-2,2)==="::"&&_--,_>f)return null;for(V=f-_,E=":";V--;)E+="0:";return l=l.replace("::",E),l[0]===":"&&(l=l.slice(1)),l[l.length-1]===":"&&(l=l.slice(0,-1)),f=(function(){let me=l.split(":"),Pe=[];for(let ke=0;ke<me.length;ke++)Pe.push(parseInt(me[ke],16));return Pe})(),{parts:f,zoneId:x}}a(p,"expandIPv6");function d(l,f,_,h){if(l.length!==f.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let x=0,E;for(;h>0;){if(E=_-h,E<0&&(E=0),l[x]>>E!==f[x]>>E)return!1;h-=_,x+=1}return!0}a(d,"matchCIDR");function m(l){if(o.test(l))return parseInt(l,16);if(l[0]==="0"&&!isNaN(parseInt(l[1],10))){if(n.test(l))return parseInt(l,8);throw new Error(`ipaddr: cannot parse ${l} as octal`)}return parseInt(l,10)}a(m,"parseIntAuto");function y(l,f){for(;l.length<f;)l=`0${l}`;return l}a(y,"padPart");let v={};v.IPv4=(function(){function l(f){if(f.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let _,h;for(_=0;_<f.length;_++)if(h=f[_],!(0<=h&&h<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=f}return a(l,"IPv4"),l.prototype.SpecialRanges={unspecified:[[new l([0,0,0,0]),8]],broadcast:[[new l([255,255,255,255]),32]],multicast:[[new l([224,0,0,0]),4]],linkLocal:[[new l([169,254,0,0]),16]],loopback:[[new l([127,0,0,0]),8]],carrierGradeNat:[[new l([100,64,0,0]),10]],private:[[new l([10,0,0,0]),8],[new l([172,16,0,0]),12],[new l([192,168,0,0]),16]],reserved:[[new l([192,0,0,0]),24],[new l([192,0,2,0]),24],[new l([192,88,99,0]),24],[new l([198,18,0,0]),15],[new l([198,51,100,0]),24],[new l([203,0,113,0]),24],[new l([240,0,0,0]),4]],as112:[[new l([192,175,48,0]),24],[new l([192,31,196,0]),24]],amt:[[new l([192,52,193,0]),24]]},l.prototype.kind=function(){return"ipv4"},l.prototype.match=function(f,_){let h;if(_===void 0&&(h=f,f=h[0],_=h[1]),f.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return d(this.octets,f.octets,8,_)},l.prototype.prefixLengthFromSubnetMask=function(){let f=0,_=!1,h={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},x,E,V;for(x=3;x>=0;x-=1)if(E=this.octets[x],E in h){if(V=h[E],_&&V!==0)return null;V!==8&&(_=!0),f+=V}else return null;return 32-f},l.prototype.range=function(){return v.subnetMatch(this,this.SpecialRanges)},l.prototype.toByteArray=function(){return this.octets.slice(0)},l.prototype.toIPv4MappedAddress=function(){return v.IPv6.parse(`::ffff:${this.toString()}`)},l.prototype.toNormalizedString=function(){return this.toString()},l.prototype.toString=function(){return this.octets.join(".")},l})(),v.IPv4.broadcastAddressFromCIDR=function(l){try{let f=this.parseCIDR(l),_=f[0].toByteArray(),h=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),x=[],E=0;for(;E<4;)x.push(parseInt(_[E],10)|parseInt(h[E],10)^255),E++;return new this(x)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},v.IPv4.isIPv4=function(l){return this.parser(l)!==null},v.IPv4.isValid=function(l){try{return new this(this.parser(l)),!0}catch{return!1}},v.IPv4.isValidCIDR=function(l){try{return this.parseCIDR(l),!0}catch{return!1}},v.IPv4.isValidFourPartDecimal=function(l){return!!(v.IPv4.isValid(l)&&l.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},v.IPv4.isValidCIDRFourPartDecimal=function(l){let f=l.match(/^(.+)\/(\d+)$/);return!v.IPv4.isValidCIDR(l)||!f?!1:v.IPv4.isValidFourPartDecimal(f[1])},v.IPv4.networkAddressFromCIDR=function(l){let f,_,h,x,E;try{for(f=this.parseCIDR(l),h=f[0].toByteArray(),E=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),x=[],_=0;_<4;)x.push(parseInt(h[_],10)&parseInt(E[_],10)),_++;return new this(x)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},v.IPv4.parse=function(l){let f=this.parser(l);if(f===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(f)},v.IPv4.parseCIDR=function(l){let f;if(f=l.match(/^(.+)\/(\d+)$/)){let _=parseInt(f[2]);if(_>=0&&_<=32){let h=[this.parse(f[1]),_];return Object.defineProperty(h,"toString",{value:a(function(){return this.join("/")},"value")}),h}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},v.IPv4.parser=function(l){let f,_,h;if(f=l.match(r.fourOctet))return(function(){let x=f.slice(1,6),E=[];for(let V=0;V<x.length;V++)_=x[V],E.push(m(_));return E})();if(f=l.match(r.longValue)){if(h=m(f[1]),h>4294967295||h<0)throw new Error("ipaddr: address outside defined range");return(function(){let x=[],E;for(E=0;E<=24;E+=8)x.push(h>>E&255);return x})().reverse()}else return(f=l.match(r.twoOctet))?(function(){let x=f.slice(1,4),E=[];if(h=m(x[1]),h>16777215||h<0)throw new Error("ipaddr: address outside defined range");return E.push(m(x[0])),E.push(h>>16&255),E.push(h>>8&255),E.push(h&255),E})():(f=l.match(r.threeOctet))?(function(){let x=f.slice(1,5),E=[];if(h=m(x[2]),h>65535||h<0)throw new Error("ipaddr: address outside defined range");return E.push(m(x[0])),E.push(m(x[1])),E.push(h>>8&255),E.push(h&255),E})():null},v.IPv4.subnetMaskFromPrefixLength=function(l){if(l=parseInt(l),l<0||l>32)throw new Error("ipaddr: invalid IPv4 prefix length");let f=[0,0,0,0],_=0,h=Math.floor(l/8);for(;_<h;)f[_]=255,_++;return h<4&&(f[h]=Math.pow(2,l%8)-1<<8-l%8),new this(f)},v.IPv6=(function(){function l(f,_){let h,x;if(f.length===16)for(this.parts=[],h=0;h<=14;h+=2)this.parts.push(f[h]<<8|f[h+1]);else if(f.length===8)this.parts=f;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(h=0;h<this.parts.length;h++)if(x=this.parts[h],!(0<=x&&x<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");_&&(this.zoneId=_)}return a(l,"IPv6"),l.prototype.SpecialRanges={unspecified:[new l([0,0,0,0,0,0,0,0]),128],linkLocal:[new l([65152,0,0,0,0,0,0,0]),10],multicast:[new l([65280,0,0,0,0,0,0,0]),8],loopback:[new l([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new l([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new l([0,0,0,0,0,65535,0,0]),96],discard:[new l([256,0,0,0,0,0,0,0]),64],rfc6145:[new l([0,0,0,0,65535,0,0,0]),96],rfc6052:[new l([100,65435,0,0,0,0,0,0]),96],"6to4":[new l([8194,0,0,0,0,0,0,0]),16],teredo:[new l([8193,0,0,0,0,0,0,0]),32],benchmarking:[new l([8193,2,0,0,0,0,0,0]),48],amt:[new l([8193,3,0,0,0,0,0,0]),32],as112v6:[[new l([8193,4,274,0,0,0,0,0]),48],[new l([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new l([8193,16,0,0,0,0,0,0]),28],orchid2:[new l([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new l([8193,48,0,0,0,0,0,0]),28],reserved:[[new l([8193,0,0,0,0,0,0,0]),23],[new l([8193,3512,0,0,0,0,0,0]),32]]},l.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},l.prototype.kind=function(){return"ipv6"},l.prototype.match=function(f,_){let h;if(_===void 0&&(h=f,f=h[0],_=h[1]),f.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return d(this.parts,f.parts,16,_)},l.prototype.prefixLengthFromSubnetMask=function(){let f=0,_=!1,h={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},x,E;for(let V=7;V>=0;V-=1)if(x=this.parts[V],x in h){if(E=h[x],_&&E!==0)return null;E!==16&&(_=!0),f+=E}else return null;return 128-f},l.prototype.range=function(){return v.subnetMatch(this,this.SpecialRanges)},l.prototype.toByteArray=function(){let f,_=[],h=this.parts;for(let x=0;x<h.length;x++)f=h[x],_.push(f>>8),_.push(f&255);return _},l.prototype.toFixedLengthString=function(){let f=(function(){let h=[];for(let x=0;x<this.parts.length;x++)h.push(y(this.parts[x].toString(16),4));return h}).call(this).join(":"),_="";return this.zoneId&&(_=`%${this.zoneId}`),f+_},l.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let f=this.parts.slice(-2),_=f[0],h=f[1];return new v.IPv4([_>>8,_&255,h>>8,h&255])},l.prototype.toNormalizedString=function(){let f=(function(){let h=[];for(let x=0;x<this.parts.length;x++)h.push(this.parts[x].toString(16));return h}).call(this).join(":"),_="";return this.zoneId&&(_=`%${this.zoneId}`),f+_},l.prototype.toRFC5952String=function(){let f=/((^|:)(0(:|$)){2,})/g,_=this.toNormalizedString(),h=0,x=-1,E;for(;E=f.exec(_);)E[0].length>x&&(h=E.index,x=E[0].length);return x<0?_:`${_.substring(0,h)}::${_.substring(h+x)}`},l.prototype.toString=function(){return this.toRFC5952String()},l})(),v.IPv6.broadcastAddressFromCIDR=function(l){try{let f=this.parseCIDR(l),_=f[0].toByteArray(),h=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),x=[],E=0;for(;E<16;)x.push(parseInt(_[E],10)|parseInt(h[E],10)^255),E++;return new this(x)}catch(f){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${f})`)}},v.IPv6.isIPv6=function(l){return this.parser(l)!==null},v.IPv6.isValid=function(l){if(typeof l=="string"&&l.indexOf(":")===-1)return!1;try{let f=this.parser(l);return new this(f.parts,f.zoneId),!0}catch{return!1}},v.IPv6.isValidCIDR=function(l){if(typeof l=="string"&&l.indexOf(":")===-1)return!1;try{return this.parseCIDR(l),!0}catch{return!1}},v.IPv6.networkAddressFromCIDR=function(l){let f,_,h,x,E;try{for(f=this.parseCIDR(l),h=f[0].toByteArray(),E=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),x=[],_=0;_<16;)x.push(parseInt(h[_],10)&parseInt(E[_],10)),_++;return new this(x)}catch(V){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${V})`)}},v.IPv6.parse=function(l){let f=this.parser(l);if(f.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(f.parts,f.zoneId)},v.IPv6.parseCIDR=function(l){let f,_,h;if((_=l.match(/^(.+)\/(\d+)$/))&&(f=parseInt(_[2]),f>=0&&f<=128))return h=[this.parse(_[1]),f],Object.defineProperty(h,"toString",{value:a(function(){return this.join("/")},"value")}),h;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},v.IPv6.parser=function(l){let f,_,h,x,E,V;if(h=l.match(u.deprecatedTransitional))return this.parser(`::ffff:${h[1]}`);if(u.native.test(l))return p(l,8);if((h=l.match(u.transitional))&&(V=h[6]||"",f=h[1],h[1].endsWith("::")||(f=f.slice(0,-1)),f=p(f+V,6),f.parts)){for(E=[parseInt(h[2]),parseInt(h[3]),parseInt(h[4]),parseInt(h[5])],_=0;_<E.length;_++)if(x=E[_],!(0<=x&&x<=255))return null;return f.parts.push(E[0]<<8|E[1]),f.parts.push(E[2]<<8|E[3]),{parts:f.parts,zoneId:f.zoneId}}return null},v.IPv6.subnetMaskFromPrefixLength=function(l){if(l=parseInt(l),l<0||l>128)throw new Error("ipaddr: invalid IPv6 prefix length");let f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],_=0,h=Math.floor(l/8);for(;_<h;)f[_]=255,_++;return h<16&&(f[h]=Math.pow(2,l%8)-1<<8-l%8),new this(f)},v.fromByteArray=function(l){let f=l.length;if(f===4)return new v.IPv4(l);if(f===16)return new v.IPv6(l);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},v.isValid=function(l){return v.IPv6.isValid(l)||v.IPv4.isValid(l)},v.isValidCIDR=function(l){return v.IPv6.isValidCIDR(l)||v.IPv4.isValidCIDR(l)},v.parse=function(l){if(v.IPv6.isValid(l))return v.IPv6.parse(l);if(v.IPv4.isValid(l))return v.IPv4.parse(l);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},v.parseCIDR=function(l){try{return v.IPv6.parseCIDR(l)}catch{try{return v.IPv4.parseCIDR(l)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},v.process=function(l){let f=this.parse(l);return f.kind()==="ipv6"&&f.isIPv4MappedAddress()?f.toIPv4Address():f},v.subnetMatch=function(l,f,_){let h,x,E,V;_==null&&(_="unicast");for(x in f)if(Object.prototype.hasOwnProperty.call(f,x)){for(E=f[x],E[0]&&!(E[0]instanceof Array)&&(E=[E]),h=0;h<E.length;h++)if(V=E[h],l.kind()===V[0].kind()&&l.match.apply(l,V))return x}return _},typeof Zr<"u"&&Zr.exports?Zr.exports=v:e.ipaddr=v})(fs)});var yu=b((Qk,hu)=>{var gu=require("stream").Stream,Jf=require("util");hu.exports=Ce;function Ce(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}a(Ce,"DelayedStream");Jf.inherits(Ce,gu);Ce.create=function(e,t){var r=new this;t=t||{};for(var n in t)r[n]=t[n];r.source=e;var o=e.emit;return e.emit=function(){return r._handleEmit(arguments),o.apply(e,arguments)},e.on("error",function(){}),r.pauseStream&&e.pause(),r};Object.defineProperty(Ce.prototype,"readable",{configurable:!0,enumerable:!0,get:a(function(){return this.source.readable},"get")});Ce.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};Ce.prototype.resume=function(){this._released||this.release(),this.source.resume()};Ce.prototype.pause=function(){this.source.pause()};Ce.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};Ce.prototype.pipe=function(){var e=gu.prototype.pipe.apply(this,arguments);return this.resume(),e};Ce.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]==="data"&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)};Ce.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}});var xu=b((tD,Pu)=>{var Xf=require("util"),_u=require("stream").Stream,vu=yu();Pu.exports=de;function de(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}a(de,"CombinedStream");Xf.inherits(de,_u);de.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};de.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};de.prototype.append=function(e){var t=de.isStreamLike(e);if(t){if(!(e instanceof vu)){var r=vu.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=r}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};de.prototype.pipe=function(e,t){return _u.prototype.pipe.call(this,e,t),this.resume(),e};de.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};de.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var t=e;t(function(r){var n=de.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};de.prototype._pipeNext=function(e){this._currentStream=e;var t=de.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var r=e;this.write(r),this._getNext()};de.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};de.prototype.write=function(e){this.emit("data",e)};de.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};de.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};de.prototype.end=function(){this._reset(),this.emit("end")};de.prototype.destroy=function(){this._reset(),this.emit("close")};de.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};de.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};de.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};de.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var Eu=b((nD,bu)=>{"use strict";bu.exports={"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dat"]},"application/msword":{source:"iana",extensions:["doc"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",extensions:["docx"]},"application/vnd.ms-excel":{source:"iana",extensions:["xls"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",extensions:["xlsx"]},"application/vnd.ms-powerpoint":{source:"iana",extensions:["ppt"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",extensions:["pptx"]},"application/csv":{compressible:!0,extensions:["csv"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"text/plain":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["txt","text","log"]},"text/html":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["html","htm"]},"text/css":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["css"]},"text/csv":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["csv"]},"text/markdown":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["md","markdown"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/webp":{source:"apache",compressible:!1,extensions:["webp"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tiff","tif"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/heic":{source:"iana",compressible:!1,extensions:["heic"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mp3","mpga"]},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/ogg":{source:"iana",compressible:!1,extensions:["ogg","oga"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","m4v"]},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg"]},"video/webm":{source:"iana",compressible:!1,extensions:["webm"]},"video/quicktime":{source:"iana",compressible:!1,extensions:["mov","qt"]},"video/x-msvideo":{source:"iana",compressible:!1,extensions:["avi"]},"font/woff":{source:"iana",compressible:!1,extensions:["woff"]},"font/woff2":{source:"iana",compressible:!1,extensions:["woff2"]},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"multipart/form-data":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/ics":{compressible:!0,extensions:["ics"]},"text/calendar":{source:"iana",compressible:!0,extensions:["ics","ifb"]},"application/x-ndjson":{compressible:!0,extensions:["ndjson"]}}});var Au=b(Ee=>{"use strict";var Jr=Eu(),Yf=require("path").extname,Tu=/^\s*([^;\s]*)(?:;|\s|$)/,Qf=/^text\//i;Ee.charset=Iu;Ee.charsets={lookup:Iu};Ee.contentType=eg;Ee.extension=tg;Ee.extensions=Object.create(null);Ee.lookup=rg;Ee.types=Object.create(null);ng(Ee.extensions,Ee.types);function Iu(e){if(!e||typeof e!="string")return!1;var t=Tu.exec(e),r=t&&Jr[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&Qf.test(t[1])?"UTF-8":!1}a(Iu,"charset");function eg(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?Ee.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=Ee.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}a(eg,"contentType");function tg(e){if(!e||typeof e!="string")return!1;var t=Tu.exec(e),r=t&&Ee.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}a(tg,"extension");function rg(e){if(!e||typeof e!="string")return!1;var t=Yf("x."+e).toLowerCase().substr(1);return t&&Ee.types[t]||!1}a(rg,"lookup");function ng(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Jr).forEach(a(function(o){var i=Jr[o],s=i.extensions;if(!(!s||!s.length)){e[o]=s;for(var u=0;u<s.length;u++){var p=s[u];if(t[p]){var d=r.indexOf(Jr[t[p]].source),m=r.indexOf(i.source);if(t[p]!=="application/octet-stream"&&(d>m||d===m&&t[p].substr(0,12)==="application/"))continue}t[p]=o}}},"forEachMimeType"))}a(ng,"populateMaps")});var $u=b((aD,Su)=>{Su.exports=og;function og(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}a(og,"defer")});var Xo=b((uD,Ou)=>{var wu=$u();Ou.exports=ig;function ig(e){var t=!1;return wu(function(){t=!0}),a(function(n,o){t?e(n,o):wu(a(function(){e(n,o)},"nextTick_callback"))},"async_callback")}a(ig,"async")});var Yo=b((lD,Ru)=>{Ru.exports=ag;function ag(e){Object.keys(e.jobs).forEach(sg.bind(e)),e.jobs={}}a(ag,"abort");function sg(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}a(sg,"clean")});var Qo=b((dD,Cu)=>{var zu=Xo(),ug=Yo();Cu.exports=cg;function cg(e,t,r,n){var o=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[o]=lg(t,o,e[o],function(i,s){o in r.jobs&&(delete r.jobs[o],i?ug(r):r.results[o]=s,n(i,r.results))})}a(cg,"iterate");function lg(e,t,r,n){var o;return e.length==2?o=e(r,zu(n)):o=e(r,t,zu(n)),o}a(lg,"runJob")});var ei=b((fD,ku)=>{ku.exports=pg;function pg(e,t){var r=!Array.isArray(e),n={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};return t&&n.keyedList.sort(r?t:function(o,i){return t(e[o],e[i])}),n}a(pg,"state")});var ti=b((hD,Du)=>{var dg=Yo(),mg=Xo();Du.exports=fg;function fg(e){Object.keys(this.jobs).length&&(this.index=this.size,dg(this),mg(e)(null,this.results))}a(fg,"terminator")});var Mu=b((vD,Nu)=>{var gg=Qo(),hg=ei(),yg=ti();Nu.exports=vg;function vg(e,t,r){for(var n=hg(e);n.index<(n.keyedList||e).length;)gg(e,t,n,function(o,i){if(o){r(o,i);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return yg.bind(n,r)}a(vg,"parallel")});var ri=b((PD,Xr)=>{var Uu=Qo(),_g=ei(),Pg=ti();Xr.exports=xg;Xr.exports.ascending=Lu;Xr.exports.descending=bg;function xg(e,t,r,n){var o=_g(e,r);return Uu(e,t,o,a(function i(s,u){if(s){n(s,u);return}if(o.index++,o.index<(o.keyedList||e).length){Uu(e,t,o,i);return}n(null,o.results)},"iteratorHandler")),Pg.bind(o,n)}a(xg,"serialOrdered");function Lu(e,t){return e<t?-1:e>t?1:0}a(Lu,"ascending");function bg(e,t){return-1*Lu(e,t)}a(bg,"descending")});var Fu=b((bD,ju)=>{var Eg=ri();ju.exports=Tg;function Tg(e,t,r){return Eg(e,t,null,r)}a(Tg,"serial")});var Vu=b((TD,Bu)=>{Bu.exports={parallel:Mu(),serial:Fu(),serialOrdered:ri()}});var ni=b((ID,Hu)=>{"use strict";Hu.exports=Object});var qu=b((AD,Zu)=>{"use strict";Zu.exports=Error});var Wu=b((SD,Gu)=>{"use strict";Gu.exports=EvalError});var Ju=b(($D,Ku)=>{"use strict";Ku.exports=RangeError});var Yu=b((wD,Xu)=>{"use strict";Xu.exports=ReferenceError});var ec=b((OD,Qu)=>{"use strict";Qu.exports=SyntaxError});var Yr=b((RD,tc)=>{"use strict";tc.exports=TypeError});var nc=b((zD,rc)=>{"use strict";rc.exports=URIError});var ic=b((CD,oc)=>{"use strict";oc.exports=Math.abs});var sc=b((kD,ac)=>{"use strict";ac.exports=Math.floor});var cc=b((DD,uc)=>{"use strict";uc.exports=Math.max});var pc=b((ND,lc)=>{"use strict";lc.exports=Math.min});var mc=b((MD,dc)=>{"use strict";dc.exports=Math.pow});var gc=b((UD,fc)=>{"use strict";fc.exports=Math.round});var yc=b((LD,hc)=>{"use strict";hc.exports=Number.isNaN||a(function(t){return t!==t},"isNaN")});var _c=b((FD,vc)=>{"use strict";var Ig=yc();vc.exports=a(function(t){return Ig(t)||t===0?t:t<0?-1:1},"sign")});var xc=b((VD,Pc)=>{"use strict";Pc.exports=Object.getOwnPropertyDescriptor});var oi=b((HD,bc)=>{"use strict";var Qr=xc();if(Qr)try{Qr([],"length")}catch{Qr=null}bc.exports=Qr});var Tc=b((ZD,Ec)=>{"use strict";var en=Object.defineProperty||!1;if(en)try{en({},"a",{value:1})}catch{en=!1}Ec.exports=en});var ii=b((qD,Ic)=>{"use strict";Ic.exports=a(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;t[r]=o;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(t,r);if(u.value!==o||u.enumerable!==!0)return!1}return!0},"hasSymbols")});var $c=b((WD,Sc)=>{"use strict";var Ac=typeof Symbol<"u"&&Symbol,Ag=ii();Sc.exports=a(function(){return typeof Ac!="function"||typeof Symbol!="function"||typeof Ac("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Ag()},"hasNativeSymbols")});var ai=b((JD,wc)=>{"use strict";wc.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var si=b((XD,Oc)=>{"use strict";var Sg=ni();Oc.exports=Sg.getPrototypeOf||null});var Cc=b((YD,zc)=>{"use strict";var $g="Function.prototype.bind called on incompatible ",wg=Object.prototype.toString,Og=Math.max,Rg="[object Function]",Rc=a(function(t,r){for(var n=[],o=0;o<t.length;o+=1)n[o]=t[o];for(var i=0;i<r.length;i+=1)n[i+t.length]=r[i];return n},"concatty"),zg=a(function(t,r){for(var n=[],o=r||0,i=0;o<t.length;o+=1,i+=1)n[i]=t[o];return n},"slicy"),Cg=a(function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r},"joiny");zc.exports=a(function(t){var r=this;if(typeof r!="function"||wg.apply(r)!==Rg)throw new TypeError($g+r);for(var n=zg(arguments,1),o,i=a(function(){if(this instanceof o){var m=r.apply(this,Rc(n,arguments));return Object(m)===m?m:this}return r.apply(t,Rc(n,arguments))},"binder"),s=Og(0,r.length-n.length),u=[],p=0;p<s;p++)u[p]="$"+p;if(o=Function("binder","return function ("+Cg(u,",")+"){ return binder.apply(this,arguments); }")(i),r.prototype){var d=a(function(){},"Empty");d.prototype=r.prototype,o.prototype=new d,d.prototype=null}return o},"bind")});var wt=b((eN,kc)=>{"use strict";var kg=Cc();kc.exports=Function.prototype.bind||kg});var tn=b((tN,Dc)=>{"use strict";Dc.exports=Function.prototype.call});var ui=b((rN,Nc)=>{"use strict";Nc.exports=Function.prototype.apply});var Uc=b((nN,Mc)=>{"use strict";Mc.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var jc=b((oN,Lc)=>{"use strict";var Dg=wt(),Ng=ui(),Mg=tn(),Ug=Uc();Lc.exports=Ug||Dg.call(Mg,Ng)});var Bc=b((iN,Fc)=>{"use strict";var Lg=wt(),jg=Yr(),Fg=tn(),Bg=jc();Fc.exports=a(function(t){if(t.length<1||typeof t[0]!="function")throw new jg("a function is required");return Bg(Lg,Fg,t)},"callBindBasic")});var Wc=b((sN,Gc)=>{"use strict";var Vg=Bc(),Vc=oi(),Zc;try{Zc=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var ci=!!Zc&&Vc&&Vc(Object.prototype,"__proto__"),qc=Object,Hc=qc.getPrototypeOf;Gc.exports=ci&&typeof ci.get=="function"?Vg([ci.get]):typeof Hc=="function"?a(function(t){return Hc(t==null?t:qc(t))},"getDunder"):!1});var Qc=b((cN,Yc)=>{"use strict";var Kc=ai(),Jc=si(),Xc=Wc();Yc.exports=Kc?a(function(t){return Kc(t)},"getProto"):Jc?a(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return Jc(t)},"getProto"):Xc?a(function(t){return Xc(t)},"getProto"):null});var li=b((pN,el)=>{"use strict";var Hg=Function.prototype.call,Zg=Object.prototype.hasOwnProperty,qg=wt();el.exports=qg.call(Hg,Zg)});var sl=b((dN,al)=>{"use strict";var K,Gg=ni(),Wg=qu(),Kg=Wu(),Jg=Ju(),Xg=Yu(),Ct=ec(),zt=Yr(),Yg=nc(),Qg=ic(),eh=sc(),th=cc(),rh=pc(),nh=mc(),oh=gc(),ih=_c(),ol=Function,pi=a(function(e){try{return ol('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),fr=oi(),ah=Tc(),di=a(function(){throw new zt},"throwTypeError"),sh=fr?(function(){try{return arguments.callee,di}catch{try{return fr(arguments,"callee").get}catch{return di}}})():di,Ot=$c()(),ve=Qc(),uh=si(),ch=ai(),il=ui(),gr=tn(),Rt={},lh=typeof Uint8Array>"u"||!ve?K:ve(Uint8Array),gt={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?K:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?K:ArrayBuffer,"%ArrayIteratorPrototype%":Ot&&ve?ve([][Symbol.iterator]()):K,"%AsyncFromSyncIteratorPrototype%":K,"%AsyncFunction%":Rt,"%AsyncGenerator%":Rt,"%AsyncGeneratorFunction%":Rt,"%AsyncIteratorPrototype%":Rt,"%Atomics%":typeof Atomics>"u"?K:Atomics,"%BigInt%":typeof BigInt>"u"?K:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?K:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?K:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?K:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Wg,"%eval%":eval,"%EvalError%":Kg,"%Float16Array%":typeof Float16Array>"u"?K:Float16Array,"%Float32Array%":typeof Float32Array>"u"?K:Float32Array,"%Float64Array%":typeof Float64Array>"u"?K:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?K:FinalizationRegistry,"%Function%":ol,"%GeneratorFunction%":Rt,"%Int8Array%":typeof Int8Array>"u"?K:Int8Array,"%Int16Array%":typeof Int16Array>"u"?K:Int16Array,"%Int32Array%":typeof Int32Array>"u"?K:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ot&&ve?ve(ve([][Symbol.iterator]())):K,"%JSON%":typeof JSON=="object"?JSON:K,"%Map%":typeof Map>"u"?K:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ot||!ve?K:ve(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Gg,"%Object.getOwnPropertyDescriptor%":fr,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?K:Promise,"%Proxy%":typeof Proxy>"u"?K:Proxy,"%RangeError%":Jg,"%ReferenceError%":Xg,"%Reflect%":typeof Reflect>"u"?K:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?K:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ot||!ve?K:ve(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?K:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ot&&ve?ve(""[Symbol.iterator]()):K,"%Symbol%":Ot?Symbol:K,"%SyntaxError%":Ct,"%ThrowTypeError%":sh,"%TypedArray%":lh,"%TypeError%":zt,"%Uint8Array%":typeof Uint8Array>"u"?K:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?K:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?K:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?K:Uint32Array,"%URIError%":Yg,"%WeakMap%":typeof WeakMap>"u"?K:WeakMap,"%WeakRef%":typeof WeakRef>"u"?K:WeakRef,"%WeakSet%":typeof WeakSet>"u"?K:WeakSet,"%Function.prototype.call%":gr,"%Function.prototype.apply%":il,"%Object.defineProperty%":ah,"%Object.getPrototypeOf%":uh,"%Math.abs%":Qg,"%Math.floor%":eh,"%Math.max%":th,"%Math.min%":rh,"%Math.pow%":nh,"%Math.round%":oh,"%Math.sign%":ih,"%Reflect.getPrototypeOf%":ch};if(ve)try{null.error}catch(e){tl=ve(ve(e)),gt["%Error.prototype%"]=tl}var tl,ph=a(function e(t){var r;if(t==="%AsyncFunction%")r=pi("async function () {}");else if(t==="%GeneratorFunction%")r=pi("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=pi("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&ve&&(r=ve(o.prototype))}return gt[t]=r,r},"doEval"),rl={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},hr=wt(),rn=li(),dh=hr.call(gr,Array.prototype.concat),mh=hr.call(il,Array.prototype.splice),nl=hr.call(gr,String.prototype.replace),nn=hr.call(gr,String.prototype.slice),fh=hr.call(gr,RegExp.prototype.exec),gh=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,hh=/\\(\\)?/g,yh=a(function(t){var r=nn(t,0,1),n=nn(t,-1);if(r==="%"&&n!=="%")throw new Ct("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Ct("invalid intrinsic syntax, expected opening `%`");var o=[];return nl(t,gh,function(i,s,u,p){o[o.length]=u?nl(p,hh,"$1"):s||i}),o},"stringToPath"),vh=a(function(t,r){var n=t,o;if(rn(rl,n)&&(o=rl[n],n="%"+o[0]+"%"),rn(gt,n)){var i=gt[n];if(i===Rt&&(i=ph(n)),typeof i>"u"&&!r)throw new zt("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new Ct("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");al.exports=a(function(t,r){if(typeof t!="string"||t.length===0)throw new zt("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new zt('"allowMissing" argument must be a boolean');if(fh(/^%?[^%]*%?$/,t)===null)throw new Ct("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=yh(t),o=n.length>0?n[0]:"",i=vh("%"+o+"%",r),s=i.name,u=i.value,p=!1,d=i.alias;d&&(o=d[0],mh(n,dh([0,1],d)));for(var m=1,y=!0;m<n.length;m+=1){var v=n[m],l=nn(v,0,1),f=nn(v,-1);if((l==='"'||l==="'"||l==="`"||f==='"'||f==="'"||f==="`")&&l!==f)throw new Ct("property names with quotes must have matching quotes");if((v==="constructor"||!y)&&(p=!0),o+="."+v,s="%"+o+"%",rn(gt,s))u=gt[s];else if(u!=null){if(!(v in u)){if(!r)throw new zt("base intrinsic for "+t+" exists, but the property is not available.");return}if(fr&&m+1>=n.length){var _=fr(u,v);y=!!_,y&&"get"in _&&!("originalValue"in _.get)?u=_.get:u=u[v]}else y=rn(u,v),u=u[v];y&&!p&&(gt[s]=u)}}return u},"GetIntrinsic")});var cl=b((fN,ul)=>{"use strict";var _h=ii();ul.exports=a(function(){return _h()&&!!Symbol.toStringTag},"hasToStringTagShams")});var dl=b((hN,pl)=>{"use strict";var Ph=sl(),ll=Ph("%Object.defineProperty%",!0),xh=cl()(),bh=li(),Eh=Yr(),on=xh?Symbol.toStringTag:null;pl.exports=a(function(t,r){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,o=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof n<"u"&&typeof n!="boolean"||typeof o<"u"&&typeof o!="boolean")throw new Eh("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");on&&(n||!bh(t,on))&&(ll?ll(t,on,{configurable:!o,enumerable:!1,value:r,writable:!1}):t[on]=r)},"setToStringTag")});var fl=b((vN,ml)=>{"use strict";var Th=Function.prototype.call,Ih=Object.prototype.hasOwnProperty,Ah=wt();ml.exports=Ah.call(Th,Ih)});var hl=b((_N,gl)=>{"use strict";gl.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var _l=b((PN,vl)=>{"use strict";var hi=xu(),Sh=require("util"),mi=require("path"),$h=require("http"),wh=require("https"),Oh=require("url").parse,Rh=require("fs"),zh=require("stream").Stream,Ch=require("crypto"),fi=Au(),kh=Vu(),Dh=dl(),ot=fl(),gi=hl();function yl(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}a(yl,"escapeHeaderParam");function X(e){if(!(this instanceof X))return new X(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],hi.call(this),e=e||{};for(var t in e)this[t]=e[t]}a(X,"FormData");Sh.inherits(X,hi);X.LINE_BREAK=`\r
|
|
2
|
-
`;X.DEFAULT_CONTENT_TYPE="application/octet-stream";X.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=hi.prototype.append.bind(this);if((typeof t=="number"||t==null)&&(t=String(t)),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var o=this._multiPartHeader(e,t,r),i=this._multiPartFooter();n(o),n(t),n(i),this._trackLength(o,t,r)};X.prototype._trackLength=function(e,t,r){var n=0;r.knownLength!=null?n+=Number(r.knownLength):Buffer.isBuffer(t)?n=t.length:typeof t=="string"&&(n=Buffer.byteLength(t)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+X.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&ot(t,"httpVersion"))&&!(t instanceof zh))&&(r.knownLength||this._valuesToMeasure.push(t))};X.prototype._lengthRetriever=function(e,t){ot(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):Rh.stat(e.path,function(r,n){if(r){t(r);return}var o=n.size-(e.start?e.start:0);t(null,o)}):ot(e,"httpVersion")?t(null,Number(e.headers["content-length"])):ot(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};X.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(t,r),o=this._getContentType(t,r),i="",s={"Content-Disposition":["form-data",'name="'+yl(e)+'"'].concat(n||[]),"Content-Type":[].concat(o||[])};typeof r.header=="object"&&gi(s,r.header);var u;for(var p in s)if(ot(s,p)){if(u=s[p],u==null)continue;Array.isArray(u)||(u=[u]),u.length&&(i+=p+": "+u.join("; ")+X.LINE_BREAK)}return"--"+this.getBoundary()+X.LINE_BREAK+i+X.LINE_BREAK};X.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=mi.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=mi.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&ot(e,"httpVersion")&&(r=mi.basename(e.client._httpMessage.path||"")),r)return'filename="'+yl(r)+'"'};X.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=fi.lookup(e.name)),!r&&e&&e.path&&(r=fi.lookup(e.path)),!r&&e&&e.readable&&ot(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=fi.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=X.DEFAULT_CONTENT_TYPE),r};X.prototype._multiPartFooter=function(){return function(e){var t=X.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};X.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+X.LINE_BREAK};X.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)ot(e,t)&&(r[t.toLowerCase()]=e[t]);return r};X.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};X.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};X.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?e=Buffer.concat([e,this._streams[r]]):e=Buffer.concat([e,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(X.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};X.prototype._generateBoundary=function(){this._boundary="--------------------------"+Ch.randomBytes(12).toString("hex")};X.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e};X.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};X.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}kh.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(o){t+=o}),e(null,t)})};X.prototype.submit=function(e,t){var r,n,o={method:"post"};return typeof e=="string"?(e=Oh(e),n=gi({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},o)):(n=gi(e,o),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=wh.request(n):r=$h.request(n),this.getLength(function(i,s){if(i&&i!=="Unknown stream"){this._error(i);return}if(s&&r.setHeader("Content-Length",s),this.pipe(r),t){var u,p=a(function(d,m){return r.removeListener("error",p),r.removeListener("response",u),t.call(this,d,m)},"callback");u=p.bind(this,null),r.on("error",p),r.on("response",u)}}.bind(this)),r};X.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};X.prototype.toString=function(){return"[object FormData]"};Dh(X.prototype,"FormData");vl.exports=X});var ue={};uo(ue,{__addDisposableResource:()=>Ql,__assign:()=>sn,__asyncDelegator:()=>Zl,__asyncGenerator:()=>Hl,__asyncValues:()=>ql,__await:()=>kt,__awaiter:()=>Ul,__classPrivateFieldGet:()=>Jl,__classPrivateFieldIn:()=>Yl,__classPrivateFieldSet:()=>Xl,__createBinding:()=>cn,__decorate:()=>Rl,__disposeResources:()=>ep,__esDecorate:()=>Cl,__exportStar:()=>jl,__extends:()=>wl,__generator:()=>Ll,__importDefault:()=>Kl,__importStar:()=>Wl,__makeTemplateObject:()=>Gl,__metadata:()=>Ml,__param:()=>zl,__propKey:()=>Dl,__read:()=>_i,__rest:()=>Ol,__rewriteRelativeImportExtension:()=>tp,__runInitializers:()=>kl,__setFunctionName:()=>Nl,__spread:()=>Fl,__spreadArray:()=>Vl,__spreadArrays:()=>Bl,__values:()=>un,default:()=>Wh});function wl(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");yi(e,t);function r(){this.constructor=e}a(r,"__"),e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function Ol(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Rl(e,t,r,n){var o=arguments.length,i=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(s=e[u])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}function zl(e,t){return function(r,n){t(r,n,e)}}function Cl(e,t,r,n,o,i){function s(x){if(x!==void 0&&typeof x!="function")throw new TypeError("Function expected");return x}a(s,"accept");for(var u=n.kind,p=u==="getter"?"get":u==="setter"?"set":"value",d=!t&&e?n.static?e:e.prototype:null,m=t||(d?Object.getOwnPropertyDescriptor(d,n.name):{}),y,v=!1,l=r.length-1;l>=0;l--){var f={};for(var _ in n)f[_]=_==="access"?{}:n[_];for(var _ in n.access)f.access[_]=n.access[_];f.addInitializer=function(x){if(v)throw new TypeError("Cannot add initializers after decoration has completed");i.push(s(x||null))};var h=(0,r[l])(u==="accessor"?{get:m.get,set:m.set}:m[p],f);if(u==="accessor"){if(h===void 0)continue;if(h===null||typeof h!="object")throw new TypeError("Object expected");(y=s(h.get))&&(m.get=y),(y=s(h.set))&&(m.set=y),(y=s(h.init))&&o.unshift(y)}else(y=s(h))&&(u==="field"?o.unshift(y):m[p]=y)}d&&Object.defineProperty(d,n.name,m),v=!0}function kl(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function Dl(e){return typeof e=="symbol"?e:"".concat(e)}function Nl(e,t,r){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function Ml(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function Ul(e,t,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return a(o,"adopt"),new(r||(r=Promise))(function(i,s){function u(m){try{d(n.next(m))}catch(y){s(y)}}a(u,"fulfilled");function p(m){try{d(n.throw(m))}catch(y){s(y)}}a(p,"rejected");function d(m){m.done?i(m.value):o(m.value).then(u,p)}a(d,"step"),d((n=n.apply(e,t||[])).next())})}function Ll(e,t){var r={label:0,sent:a(function(){if(i[0]&1)throw i[1];return i[1]},"sent"),trys:[],ops:[]},n,o,i,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=u(0),s.throw=u(1),s.return=u(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(d){return function(m){return p([d,m])}}function p(d){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,d[0]&&(r=0)),r;)try{if(n=1,o&&(i=d[0]&2?o.return:d[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,d[1])).done)return i;switch(o=0,i&&(d=[d[0]&2,i.value]),d[0]){case 0:case 1:i=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,o=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!i||d[1]>i[0]&&d[1]<i[3])){r.label=d[1];break}if(d[0]===6&&r.label<i[1]){r.label=i[1],i=d;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(d);break}i[2]&&r.ops.pop(),r.trys.pop();continue}d=t.call(e,r)}catch(m){d=[6,m],o=0}finally{n=i=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function jl(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&cn(t,e,r)}function un(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:a(function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}},"next")};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function _i(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i}function Fl(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(_i(arguments[t]));return e}function Bl(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),o=0,t=0;t<r;t++)for(var i=arguments[t],s=0,u=i.length;s<u;s++,o++)n[o]=i[s];return n}function Vl(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}function kt(e){return this instanceof kt?(this.v=e,this):new kt(e)}function Hl(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),o,i=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),u("next"),u("throw"),u("return",s),o[Symbol.asyncIterator]=function(){return this},o;function s(l){return function(f){return Promise.resolve(f).then(l,y)}}function u(l,f){n[l]&&(o[l]=function(_){return new Promise(function(h,x){i.push([l,_,h,x])>1||p(l,_)})},f&&(o[l]=f(o[l])))}function p(l,f){try{d(n[l](f))}catch(_){v(i[0][3],_)}}function d(l){l.value instanceof kt?Promise.resolve(l.value.v).then(m,y):v(i[0][2],l)}function m(l){p("next",l)}function y(l){p("throw",l)}function v(l,f){l(f),i.shift(),i.length&&p(i[0][0],i[0][1])}}function Zl(e){var t,r;return t={},n("next"),n("throw",function(o){throw o}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(o,i){t[o]=e[o]?function(s){return(r=!r)?{value:kt(e[o](s)),done:!1}:i?i(s):s}:i}}function ql(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof un=="function"?un(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=e[i]&&function(s){return new Promise(function(u,p){s=e[i](s),o(u,p,s.done,s.value)})}}function o(i,s,u,p){Promise.resolve(p).then(function(d){i({value:d,done:u})},s)}}function Gl(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function Wl(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=vi(e),n=0;n<r.length;n++)r[n]!=="default"&&cn(t,e,r[n]);return qh(t,e),t}function Kl(e){return e&&e.__esModule?e:{default:e}}function Jl(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function Xl(e,t,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(e,r):o?o.value=r:t.set(e,r),r}function Yl(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function Ql(e,t,r){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var n,o;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(o=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");o&&(n=a(function(){try{o.call(this)}catch(i){return Promise.reject(i)}},"dispose")),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}function ep(e){function t(i){e.error=e.hasError?new Gh(i,e.error,"An error was suppressed during disposal."):i,e.hasError=!0}a(t,"fail");var r,n=0;function o(){for(;r=e.stack.pop();)try{if(!r.async&&n===1)return n=0,e.stack.push(r),Promise.resolve().then(o);if(r.dispose){var i=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(i).then(o,function(s){return t(s),o()})}else n|=1}catch(s){t(s)}if(n===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return a(o,"next"),o()}function tp(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(r,n,o,i,s){return n?t?".jsx":".js":o&&(!i||!s)?r:o+i+"."+s.toLowerCase()+"js"}):e}var yi,sn,cn,qh,vi,Gh,Wh,ce=dd(()=>{yi=a(function(e,t){return yi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},yi(e,t)},"extendStatics");a(wl,"__extends");sn=a(function(){return sn=Object.assign||a(function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},"__assign"),sn.apply(this,arguments)},"__assign");a(Ol,"__rest");a(Rl,"__decorate");a(zl,"__param");a(Cl,"__esDecorate");a(kl,"__runInitializers");a(Dl,"__propKey");a(Nl,"__setFunctionName");a(Ml,"__metadata");a(Ul,"__awaiter");a(Ll,"__generator");cn=Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return t[r]},"get")}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]});a(jl,"__exportStar");a(un,"__values");a(_i,"__read");a(Fl,"__spread");a(Bl,"__spreadArrays");a(Vl,"__spreadArray");a(kt,"__await");a(Hl,"__asyncGenerator");a(Zl,"__asyncDelegator");a(ql,"__asyncValues");a(Gl,"__makeTemplateObject");qh=Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t},vi=a(function(e){return vi=Object.getOwnPropertyNames||function(t){var r=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[r.length]=n);return r},vi(e)},"ownKeys");a(Wl,"__importStar");a(Kl,"__importDefault");a(Jl,"__classPrivateFieldGet");a(Xl,"__classPrivateFieldSet");a(Yl,"__classPrivateFieldIn");a(Ql,"__addDisposableResource");Gh=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};a(ep,"__disposeResources");a(tp,"__rewriteRelativeImportExtension");Wh={__extends:wl,__assign:sn,__rest:Ol,__decorate:Rl,__param:zl,__esDecorate:Cl,__runInitializers:kl,__propKey:Dl,__setFunctionName:Nl,__metadata:Ml,__awaiter:Ul,__generator:Ll,__createBinding:cn,__exportStar:jl,__values:un,__read:_i,__spread:Fl,__spreadArrays:Bl,__spreadArray:Vl,__await:kt,__asyncGenerator:Hl,__asyncDelegator:Zl,__asyncValues:ql,__makeTemplateObject:Gl,__importStar:Wl,__importDefault:Kl,__classPrivateFieldGet:Jl,__classPrivateFieldSet:Xl,__classPrivateFieldIn:Yl,__addDisposableResource:Ql,__disposeResources:ep,__rewriteRelativeImportExtension:tp}});var vr=b(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.RequestMethod=void 0;var rp;(function(e){e.GET="GET",e.PATCH="PATCH",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE"})(rp||(ln.RequestMethod=rp={}))});var np=b(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.BatchRequestContent=void 0;var Dt=(ce(),ie(ue)),Pi=vr(),Kh=(function(){function e(t){if(this.requests=new Map,typeof t<"u"){var r=e.requestLimit;if(t.length>r){var n=new Error("Maximum requests limit exceeded, Max allowed number of requests are ".concat(r));throw n.name="Limit Exceeded Error",n}for(var o=0,i=t;o<i.length;o++){var s=i[o];this.addRequest(s)}}}return a(e,"BatchRequestContent"),e.validateDependencies=function(t){var r=a(function(s){for(var u=s.entries(),p=u.next();!p.done;){var d=p.value[1];if(d.dependsOn!==void 0&&d.dependsOn.length>0)return!1;p=u.next()}return!0},"isParallel"),n=a(function(s){var u=s.entries(),p=u.next(),d=p.value[1];if(d.dependsOn!==void 0&&d.dependsOn.length>0)return!1;var m=p;for(p=u.next();!p.done;){var y=p.value[1];if(y.dependsOn===void 0||y.dependsOn.length!==1||y.dependsOn[0]!==m.value[1].id)return!1;m=p,p=u.next()}return!0},"isSerial"),o=a(function(s){var u=s.entries(),p=u.next(),d=p.value[1],m;if(d.dependsOn===void 0||d.dependsOn.length===0)m=d.id;else if(d.dependsOn.length===1){var y=d.dependsOn[0];if(y!==d.id&&s.has(y))m=y;else return!1}else return!1;for(p=u.next();!p.done;){var v=p.value[1];if((v.dependsOn===void 0||v.dependsOn.length===0)&&m!==v.id||v.dependsOn!==void 0&&v.dependsOn.length!==0&&(v.dependsOn.length===1&&(v.id===m||v.dependsOn[0]!==m)||v.dependsOn.length>1))return!1;p=u.next()}return!0},"isSame");if(t.size===0){var i=new Error("Empty requests map, Please provide at least one request.");throw i.name="Empty Requests Error",i}return r(t)||n(t)||o(t)},e.getRequestData=function(t){return Dt.__awaiter(this,void 0,void 0,function(){var r,n,o,i;return Dt.__generator(this,function(s){switch(s.label){case 0:return r={url:""},n=new RegExp("^https?://"),r.url=n.test(t.url)?"/"+t.url.split(/.*?\/\/.*?\//)[1]:t.url,r.method=t.method,o={},t.headers.forEach(function(u,p){o[p]=u}),Object.keys(o).length&&(r.headers=o),t.method===Pi.RequestMethod.PATCH||t.method===Pi.RequestMethod.POST||t.method===Pi.RequestMethod.PUT?(i=r,[4,e.getRequestBody(t)]):[3,2];case 1:i.body=s.sent(),s.label=2;case 2:return[2,r]}})})},e.getRequestBody=function(t){return Dt.__awaiter(this,void 0,void 0,function(){var r,n,o,i,s,u,p,d;return Dt.__generator(this,function(m){switch(m.label){case 0:r=!1,m.label=1;case 1:return m.trys.push([1,3,,4]),o=t.clone(),[4,o.json()];case 2:return n=m.sent(),r=!0,[3,4];case 3:return i=m.sent(),[3,4];case 4:if(r)return[3,12];m.label=5;case 5:return m.trys.push([5,11,,12]),typeof Blob<"u"?[4,t.blob()]:[3,8];case 6:return s=m.sent(),u=new FileReader,[4,new Promise(function(y){u.addEventListener("load",function(){var v=u.result,l=new RegExp("^s*data:(.+?/.+?(;.+?=.+?)*)?(;base64)?,(.*)s*$"),f=l.exec(v);y(f[4])},!1),u.readAsDataURL(s)})];case 7:return n=m.sent(),[3,10];case 8:return typeof Buffer<"u"?[4,t.buffer()]:[3,10];case 9:p=m.sent(),n=p.toString("base64"),m.label=10;case 10:return r=!0,[3,12];case 11:return d=m.sent(),[3,12];case 12:return[2,n]}})})},e.prototype.addRequest=function(t){var r=e.requestLimit;if(t.id===""){var n=new Error("Id for a request is empty, Please provide an unique id");throw n.name="Empty Id For Request",n}if(this.requests.size===r){var n=new Error("Maximum requests limit exceeded, Max allowed number of requests are ".concat(r));throw n.name="Limit Exceeded Error",n}if(this.requests.has(t.id)){var n=new Error("Adding request with duplicate id ".concat(t.id,", Make the id of the requests unique"));throw n.name="Duplicate RequestId Error",n}return this.requests.set(t.id,t),t.id},e.prototype.removeRequest=function(t){for(var r=this.requests.delete(t),n=this.requests.entries(),o=n.next();!o.done;){var i=o.value[1].dependsOn;if(typeof i<"u"){var s=i.indexOf(t);s!==-1&&i.splice(s,1),i.length===0&&delete o.value[1].dependsOn}o=n.next()}return r},e.prototype.getContent=function(){return Dt.__awaiter(this,void 0,void 0,function(){var t,r,n,o,u,u,i,s,u;return Dt.__generator(this,function(p){switch(p.label){case 0:if(t=[],r={requests:t},n=this.requests.entries(),o=n.next(),o.done)throw u=new Error("No requests added yet, Please add at least one request."),u.name="Empty Payload",u;if(!e.validateDependencies(this.requests))throw u=new Error(`Invalid dependency found, Dependency should be:
|
|
1
|
+
"use strict";var md=Object.create;var qt=Object.defineProperty;var gd=Object.getOwnPropertyDescriptor;var hd=Object.getOwnPropertyNames;var yd=Object.getPrototypeOf,vd=Object.prototype.hasOwnProperty;var i=(e,t)=>qt(e,"name",{value:t,configurable:!0});var _d=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(t=e(e=0)),t}catch(n){throw r=[n],n}};var b=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},co=(e,t)=>{for(var r in t)qt(e,r,{get:t[r],enumerable:!0})},Ki=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of hd(t))!vd.call(e,o)&&o!==r&&qt(e,o,{get:()=>t[o],enumerable:!(n=gd(t,o))||n.enumerable});return e};var Ce=(e,t,r)=>(r=e!=null?md(yd(e)):{},Ki(t||!e||!e.__esModule?qt(r,"default",{value:e,enumerable:!0}):r,e)),ie=e=>Ki(qt({},"__esModule",{value:!0}),e);var Ps=b((_s,qr)=>{(function(e){"use strict";let t="(0?\\d+|0x[a-f0-9]+)",r={fourOctet:new RegExp(`^${t}\\.${t}\\.${t}\\.${t}$`,"i"),threeOctet:new RegExp(`^${t}\\.${t}\\.${t}$`,"i"),twoOctet:new RegExp(`^${t}\\.${t}$`,"i"),longValue:new RegExp(`^${t}$`,"i")},n=new RegExp("^0[0-7]+$","i"),o=new RegExp("^0x[a-f0-9]+$","i"),a="%[0-9a-z]{1,}",s="(?:[0-9a-f]+::?)+",u={zoneIndex:new RegExp(a,"i"),native:new RegExp(`^(::)?(${s})?([0-9a-f]+)?(::)?(${a})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${a})?)$`,"i"),transitional:new RegExp(`^((?:${s})|(?:::)(?:${s})?)${t}\\.${t}\\.${t}\\.${t}(${a})?$`,"i")};function p(l,m){if(l.indexOf("::")!==l.lastIndexOf("::"))return null;let P=0,h=-1,x=(l.match(u.zoneIndex)||[])[0],E,H;for(x&&(x=x.substring(1),l=l.replace(/%.+$/,""));(h=l.indexOf(":",h+1))>=0;)P++;if(l.substr(0,2)==="::"&&P--,l.substr(-2,2)==="::"&&P--,P>m)return null;for(H=m-P,E=":";H--;)E+="0:";return l=l.replace("::",E),l[0]===":"&&(l=l.slice(1)),l[l.length-1]===":"&&(l=l.slice(0,-1)),m=(function(){let de=l.split(":"),xe=[];for(let Ie=0;Ie<de.length;Ie++)xe.push(parseInt(de[Ie],16));return xe})(),{parts:m,zoneId:x}}i(p,"expandIPv6");function d(l,m,P,h){if(l.length!==m.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let x=0,E;for(;h>0;){if(E=P-h,E<0&&(E=0),l[x]>>E!==m[x]>>E)return!1;h-=P,x+=1}return!0}i(d,"matchCIDR");function f(l){if(o.test(l))return parseInt(l,16);if(l[0]==="0"&&!isNaN(parseInt(l[1],10))){if(n.test(l))return parseInt(l,8);throw new Error(`ipaddr: cannot parse ${l} as octal`)}return parseInt(l,10)}i(f,"parseIntAuto");function _(l,m){for(;l.length<m;)l=`0${l}`;return l}i(_,"padPart");let y={};y.IPv4=(function(){function l(m){if(m.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let P,h;for(P=0;P<m.length;P++)if(h=m[P],!(0<=h&&h<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=m}return i(l,"IPv4"),l.prototype.SpecialRanges={unspecified:[[new l([0,0,0,0]),8]],broadcast:[[new l([255,255,255,255]),32]],multicast:[[new l([224,0,0,0]),4]],linkLocal:[[new l([169,254,0,0]),16]],loopback:[[new l([127,0,0,0]),8]],carrierGradeNat:[[new l([100,64,0,0]),10]],private:[[new l([10,0,0,0]),8],[new l([172,16,0,0]),12],[new l([192,168,0,0]),16]],reserved:[[new l([192,0,0,0]),24],[new l([192,0,2,0]),24],[new l([192,88,99,0]),24],[new l([198,18,0,0]),15],[new l([198,51,100,0]),24],[new l([203,0,113,0]),24],[new l([240,0,0,0]),4]],as112:[[new l([192,175,48,0]),24],[new l([192,31,196,0]),24]],amt:[[new l([192,52,193,0]),24]]},l.prototype.kind=function(){return"ipv4"},l.prototype.match=function(m,P){let h;if(P===void 0&&(h=m,m=h[0],P=h[1]),m.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return d(this.octets,m.octets,8,P)},l.prototype.prefixLengthFromSubnetMask=function(){let m=0,P=!1,h={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},x,E,H;for(x=3;x>=0;x-=1)if(E=this.octets[x],E in h){if(H=h[E],P&&H!==0)return null;H!==8&&(P=!0),m+=H}else return null;return 32-m},l.prototype.range=function(){return y.subnetMatch(this,this.SpecialRanges)},l.prototype.toByteArray=function(){return this.octets.slice(0)},l.prototype.toIPv4MappedAddress=function(){return y.IPv6.parse(`::ffff:${this.toString()}`)},l.prototype.toNormalizedString=function(){return this.toString()},l.prototype.toString=function(){return this.octets.join(".")},l})(),y.IPv4.broadcastAddressFromCIDR=function(l){try{let m=this.parseCIDR(l),P=m[0].toByteArray(),h=this.subnetMaskFromPrefixLength(m[1]).toByteArray(),x=[],E=0;for(;E<4;)x.push(parseInt(P[E],10)|parseInt(h[E],10)^255),E++;return new this(x)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},y.IPv4.isIPv4=function(l){return this.parser(l)!==null},y.IPv4.isValid=function(l){try{return new this(this.parser(l)),!0}catch{return!1}},y.IPv4.isValidCIDR=function(l){try{return this.parseCIDR(l),!0}catch{return!1}},y.IPv4.isValidFourPartDecimal=function(l){return!!(y.IPv4.isValid(l)&&l.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},y.IPv4.isValidCIDRFourPartDecimal=function(l){let m=l.match(/^(.+)\/(\d+)$/);return!y.IPv4.isValidCIDR(l)||!m?!1:y.IPv4.isValidFourPartDecimal(m[1])},y.IPv4.networkAddressFromCIDR=function(l){let m,P,h,x,E;try{for(m=this.parseCIDR(l),h=m[0].toByteArray(),E=this.subnetMaskFromPrefixLength(m[1]).toByteArray(),x=[],P=0;P<4;)x.push(parseInt(h[P],10)&parseInt(E[P],10)),P++;return new this(x)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},y.IPv4.parse=function(l){let m=this.parser(l);if(m===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(m)},y.IPv4.parseCIDR=function(l){let m;if(m=l.match(/^(.+)\/(\d+)$/)){let P=parseInt(m[2]);if(P>=0&&P<=32){let h=[this.parse(m[1]),P];return Object.defineProperty(h,"toString",{value:i(function(){return this.join("/")},"value")}),h}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},y.IPv4.parser=function(l){let m,P,h;if(m=l.match(r.fourOctet))return(function(){let x=m.slice(1,6),E=[];for(let H=0;H<x.length;H++)P=x[H],E.push(f(P));return E})();if(m=l.match(r.longValue)){if(h=f(m[1]),h>4294967295||h<0)throw new Error("ipaddr: address outside defined range");return(function(){let x=[],E;for(E=0;E<=24;E+=8)x.push(h>>E&255);return x})().reverse()}else return(m=l.match(r.twoOctet))?(function(){let x=m.slice(1,4),E=[];if(h=f(x[1]),h>16777215||h<0)throw new Error("ipaddr: address outside defined range");return E.push(f(x[0])),E.push(h>>16&255),E.push(h>>8&255),E.push(h&255),E})():(m=l.match(r.threeOctet))?(function(){let x=m.slice(1,5),E=[];if(h=f(x[2]),h>65535||h<0)throw new Error("ipaddr: address outside defined range");return E.push(f(x[0])),E.push(f(x[1])),E.push(h>>8&255),E.push(h&255),E})():null},y.IPv4.subnetMaskFromPrefixLength=function(l){if(l=parseInt(l),l<0||l>32)throw new Error("ipaddr: invalid IPv4 prefix length");let m=[0,0,0,0],P=0,h=Math.floor(l/8);for(;P<h;)m[P]=255,P++;return h<4&&(m[h]=Math.pow(2,l%8)-1<<8-l%8),new this(m)},y.IPv6=(function(){function l(m,P){let h,x;if(m.length===16)for(this.parts=[],h=0;h<=14;h+=2)this.parts.push(m[h]<<8|m[h+1]);else if(m.length===8)this.parts=m;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(h=0;h<this.parts.length;h++)if(x=this.parts[h],!(0<=x&&x<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");P&&(this.zoneId=P)}return i(l,"IPv6"),l.prototype.SpecialRanges={unspecified:[new l([0,0,0,0,0,0,0,0]),128],linkLocal:[new l([65152,0,0,0,0,0,0,0]),10],multicast:[new l([65280,0,0,0,0,0,0,0]),8],loopback:[new l([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new l([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new l([0,0,0,0,0,65535,0,0]),96],discard:[new l([256,0,0,0,0,0,0,0]),64],rfc6145:[new l([0,0,0,0,65535,0,0,0]),96],rfc6052:[new l([100,65435,0,0,0,0,0,0]),96],"6to4":[new l([8194,0,0,0,0,0,0,0]),16],teredo:[new l([8193,0,0,0,0,0,0,0]),32],benchmarking:[new l([8193,2,0,0,0,0,0,0]),48],amt:[new l([8193,3,0,0,0,0,0,0]),32],as112v6:[[new l([8193,4,274,0,0,0,0,0]),48],[new l([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new l([8193,16,0,0,0,0,0,0]),28],orchid2:[new l([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new l([8193,48,0,0,0,0,0,0]),28],reserved:[[new l([8193,0,0,0,0,0,0,0]),23],[new l([8193,3512,0,0,0,0,0,0]),32]]},l.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},l.prototype.kind=function(){return"ipv6"},l.prototype.match=function(m,P){let h;if(P===void 0&&(h=m,m=h[0],P=h[1]),m.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return d(this.parts,m.parts,16,P)},l.prototype.prefixLengthFromSubnetMask=function(){let m=0,P=!1,h={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},x,E;for(let H=7;H>=0;H-=1)if(x=this.parts[H],x in h){if(E=h[x],P&&E!==0)return null;E!==16&&(P=!0),m+=E}else return null;return 128-m},l.prototype.range=function(){return y.subnetMatch(this,this.SpecialRanges)},l.prototype.toByteArray=function(){let m,P=[],h=this.parts;for(let x=0;x<h.length;x++)m=h[x],P.push(m>>8),P.push(m&255);return P},l.prototype.toFixedLengthString=function(){let m=(function(){let h=[];for(let x=0;x<this.parts.length;x++)h.push(_(this.parts[x].toString(16),4));return h}).call(this).join(":"),P="";return this.zoneId&&(P=`%${this.zoneId}`),m+P},l.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let m=this.parts.slice(-2),P=m[0],h=m[1];return new y.IPv4([P>>8,P&255,h>>8,h&255])},l.prototype.toNormalizedString=function(){let m=(function(){let h=[];for(let x=0;x<this.parts.length;x++)h.push(this.parts[x].toString(16));return h}).call(this).join(":"),P="";return this.zoneId&&(P=`%${this.zoneId}`),m+P},l.prototype.toRFC5952String=function(){let m=/((^|:)(0(:|$)){2,})/g,P=this.toNormalizedString(),h=0,x=-1,E;for(;E=m.exec(P);)E[0].length>x&&(h=E.index,x=E[0].length);return x<0?P:`${P.substring(0,h)}::${P.substring(h+x)}`},l.prototype.toString=function(){return this.toRFC5952String()},l})(),y.IPv6.broadcastAddressFromCIDR=function(l){try{let m=this.parseCIDR(l),P=m[0].toByteArray(),h=this.subnetMaskFromPrefixLength(m[1]).toByteArray(),x=[],E=0;for(;E<16;)x.push(parseInt(P[E],10)|parseInt(h[E],10)^255),E++;return new this(x)}catch(m){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${m})`)}},y.IPv6.isIPv6=function(l){return this.parser(l)!==null},y.IPv6.isValid=function(l){if(typeof l=="string"&&l.indexOf(":")===-1)return!1;try{let m=this.parser(l);return new this(m.parts,m.zoneId),!0}catch{return!1}},y.IPv6.isValidCIDR=function(l){if(typeof l=="string"&&l.indexOf(":")===-1)return!1;try{return this.parseCIDR(l),!0}catch{return!1}},y.IPv6.networkAddressFromCIDR=function(l){let m,P,h,x,E;try{for(m=this.parseCIDR(l),h=m[0].toByteArray(),E=this.subnetMaskFromPrefixLength(m[1]).toByteArray(),x=[],P=0;P<16;)x.push(parseInt(h[P],10)&parseInt(E[P],10)),P++;return new this(x)}catch(H){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${H})`)}},y.IPv6.parse=function(l){let m=this.parser(l);if(m.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(m.parts,m.zoneId)},y.IPv6.parseCIDR=function(l){let m,P,h;if((P=l.match(/^(.+)\/(\d+)$/))&&(m=parseInt(P[2]),m>=0&&m<=128))return h=[this.parse(P[1]),m],Object.defineProperty(h,"toString",{value:i(function(){return this.join("/")},"value")}),h;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},y.IPv6.parser=function(l){let m,P,h,x,E,H;if(h=l.match(u.deprecatedTransitional))return this.parser(`::ffff:${h[1]}`);if(u.native.test(l))return p(l,8);if((h=l.match(u.transitional))&&(H=h[6]||"",m=h[1],h[1].endsWith("::")||(m=m.slice(0,-1)),m=p(m+H,6),m.parts)){for(E=[parseInt(h[2]),parseInt(h[3]),parseInt(h[4]),parseInt(h[5])],P=0;P<E.length;P++)if(x=E[P],!(0<=x&&x<=255))return null;return m.parts.push(E[0]<<8|E[1]),m.parts.push(E[2]<<8|E[3]),{parts:m.parts,zoneId:m.zoneId}}return null},y.IPv6.subnetMaskFromPrefixLength=function(l){if(l=parseInt(l),l<0||l>128)throw new Error("ipaddr: invalid IPv6 prefix length");let m=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],P=0,h=Math.floor(l/8);for(;P<h;)m[P]=255,P++;return h<16&&(m[h]=Math.pow(2,l%8)-1<<8-l%8),new this(m)},y.fromByteArray=function(l){let m=l.length;if(m===4)return new y.IPv4(l);if(m===16)return new y.IPv6(l);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},y.isValid=function(l){return y.IPv6.isValid(l)||y.IPv4.isValid(l)},y.isValidCIDR=function(l){return y.IPv6.isValidCIDR(l)||y.IPv4.isValidCIDR(l)},y.parse=function(l){if(y.IPv6.isValid(l))return y.IPv6.parse(l);if(y.IPv4.isValid(l))return y.IPv4.parse(l);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},y.parseCIDR=function(l){try{return y.IPv6.parseCIDR(l)}catch{try{return y.IPv4.parseCIDR(l)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},y.process=function(l){let m=this.parse(l);return m.kind()==="ipv6"&&m.isIPv4MappedAddress()?m.toIPv4Address():m},y.subnetMatch=function(l,m,P){let h,x,E,H;P==null&&(P="unicast");for(x in m)if(Object.prototype.hasOwnProperty.call(m,x)){for(E=m[x],E[0]&&!(E[0]instanceof Array)&&(E=[E]),h=0;h<E.length;h++)if(H=E[h],l.kind()===H[0].kind()&&l.match.apply(l,H))return x}return P},typeof qr<"u"&&qr.exports?qr.exports=y:e.ipaddr=y})(_s)});var Tu=b((Pk,Eu)=>{var bu=require("stream").Stream,og=require("util");Eu.exports=ke;function ke(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}i(ke,"DelayedStream");og.inherits(ke,bu);ke.create=function(e,t){var r=new this;t=t||{};for(var n in t)r[n]=t[n];r.source=e;var o=e.emit;return e.emit=function(){return r._handleEmit(arguments),o.apply(e,arguments)},e.on("error",function(){}),r.pauseStream&&e.pause(),r};Object.defineProperty(ke.prototype,"readable",{configurable:!0,enumerable:!0,get:i(function(){return this.source.readable},"get")});ke.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};ke.prototype.resume=function(){this._released||this.release(),this.source.resume()};ke.prototype.pause=function(){this.source.pause()};ke.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};ke.prototype.pipe=function(){var e=bu.prototype.pipe.apply(this,arguments);return this.resume(),e};ke.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]==="data"&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)};ke.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}});var $u=b((bk,Su)=>{var ig=require("util"),Iu=require("stream").Stream,Au=Tu();Su.exports=pe;function pe(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}i(pe,"CombinedStream");ig.inherits(pe,Iu);pe.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};pe.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};pe.prototype.append=function(e){var t=pe.isStreamLike(e);if(t){if(!(e instanceof Au)){var r=Au.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=r}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};pe.prototype.pipe=function(e,t){return Iu.prototype.pipe.call(this,e,t),this.resume(),e};pe.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};pe.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var t=e;t(function(r){var n=pe.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};pe.prototype._pipeNext=function(e){this._currentStream=e;var t=pe.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var r=e;this.write(r),this._getNext()};pe.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};pe.prototype.write=function(e){this.emit("data",e)};pe.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};pe.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};pe.prototype.end=function(){this._reset(),this.emit("end")};pe.prototype.destroy=function(){this._reset(),this.emit("close")};pe.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};pe.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};pe.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};pe.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var Ou=b((Tk,wu)=>{"use strict";wu.exports={"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dat"]},"application/msword":{source:"iana",extensions:["doc"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",extensions:["docx"]},"application/vnd.ms-excel":{source:"iana",extensions:["xls"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",extensions:["xlsx"]},"application/vnd.ms-powerpoint":{source:"iana",extensions:["ppt"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",extensions:["pptx"]},"application/csv":{compressible:!0,extensions:["csv"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"text/plain":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["txt","text","log"]},"text/html":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["html","htm"]},"text/css":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["css"]},"text/csv":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["csv"]},"text/markdown":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["md","markdown"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/webp":{source:"apache",compressible:!1,extensions:["webp"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tiff","tif"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/heic":{source:"iana",compressible:!1,extensions:["heic"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mp3","mpga"]},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/ogg":{source:"iana",compressible:!1,extensions:["ogg","oga"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","m4v"]},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg"]},"video/webm":{source:"iana",compressible:!1,extensions:["webm"]},"video/quicktime":{source:"iana",compressible:!1,extensions:["mov","qt"]},"video/x-msvideo":{source:"iana",compressible:!1,extensions:["avi"]},"font/woff":{source:"iana",compressible:!1,extensions:["woff"]},"font/woff2":{source:"iana",compressible:!1,extensions:["woff2"]},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"multipart/form-data":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/ics":{compressible:!0,extensions:["ics"]},"text/calendar":{source:"iana",compressible:!0,extensions:["ics","ifb"]},"application/x-ndjson":{compressible:!0,extensions:["ndjson"]}}});var Cu=b(Te=>{"use strict";var Xr=Ou(),ag=require("path").extname,Ru=/^\s*([^;\s]*)(?:;|\s|$)/,sg=/^text\//i;Te.charset=zu;Te.charsets={lookup:zu};Te.contentType=ug;Te.extension=cg;Te.extensions=Object.create(null);Te.lookup=lg;Te.types=Object.create(null);pg(Te.extensions,Te.types);function zu(e){if(!e||typeof e!="string")return!1;var t=Ru.exec(e),r=t&&Xr[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&sg.test(t[1])?"UTF-8":!1}i(zu,"charset");function ug(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?Te.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=Te.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}i(ug,"contentType");function cg(e){if(!e||typeof e!="string")return!1;var t=Ru.exec(e),r=t&&Te.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}i(cg,"extension");function lg(e){if(!e||typeof e!="string")return!1;var t=ag("x."+e).toLowerCase().substr(1);return t&&Te.types[t]||!1}i(lg,"lookup");function pg(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Xr).forEach(i(function(o){var a=Xr[o],s=a.extensions;if(!(!s||!s.length)){e[o]=s;for(var u=0;u<s.length;u++){var p=s[u];if(t[p]){var d=r.indexOf(Xr[t[p]].source),f=r.indexOf(a.source);if(t[p]!=="application/octet-stream"&&(d>f||d===f&&t[p].substr(0,12)==="application/"))continue}t[p]=o}}},"forEachMimeType"))}i(pg,"populateMaps")});var ku=b((Sk,Du)=>{Du.exports=dg;function dg(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}i(dg,"defer")});var ei=b((wk,Mu)=>{var Nu=ku();Mu.exports=fg;function fg(e){var t=!1;return Nu(function(){t=!0}),i(function(n,o){t?e(n,o):Nu(i(function(){e(n,o)},"nextTick_callback"))},"async_callback")}i(fg,"async")});var ti=b((Rk,Uu)=>{Uu.exports=mg;function mg(e){Object.keys(e.jobs).forEach(gg.bind(e)),e.jobs={}}i(mg,"abort");function gg(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}i(gg,"clean")});var ri=b((Ck,ju)=>{var Lu=ei(),hg=ti();ju.exports=yg;function yg(e,t,r,n){var o=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[o]=vg(t,o,e[o],function(a,s){o in r.jobs&&(delete r.jobs[o],a?hg(r):r.results[o]=s,n(a,r.results))})}i(yg,"iterate");function vg(e,t,r,n){var o;return e.length==2?o=e(r,Lu(n)):o=e(r,t,Lu(n)),o}i(vg,"runJob")});var ni=b((kk,Fu)=>{Fu.exports=_g;function _g(e,t){var r=!Array.isArray(e),n={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};return t&&n.keyedList.sort(r?t:function(o,a){return t(e[o],e[a])}),n}i(_g,"state")});var oi=b((Mk,Bu)=>{var Pg=ti(),xg=ei();Bu.exports=bg;function bg(e){Object.keys(this.jobs).length&&(this.index=this.size,Pg(this),xg(e)(null,this.results))}i(bg,"terminator")});var Hu=b((Lk,Vu)=>{var Eg=ri(),Tg=ni(),Ag=oi();Vu.exports=Ig;function Ig(e,t,r){for(var n=Tg(e);n.index<(n.keyedList||e).length;)Eg(e,t,n,function(o,a){if(o){r(o,a);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return Ag.bind(n,r)}i(Ig,"parallel")});var ii=b((Fk,Yr)=>{var Zu=ri(),Sg=ni(),$g=oi();Yr.exports=wg;Yr.exports.ascending=qu;Yr.exports.descending=Og;function wg(e,t,r,n){var o=Sg(e,r);return Zu(e,t,o,i(function a(s,u){if(s){n(s,u);return}if(o.index++,o.index<(o.keyedList||e).length){Zu(e,t,o,a);return}n(null,o.results)},"iteratorHandler")),$g.bind(o,n)}i(wg,"serialOrdered");function qu(e,t){return e<t?-1:e>t?1:0}i(qu,"ascending");function Og(e,t){return-1*qu(e,t)}i(Og,"descending")});var Wu=b((Vk,Gu)=>{var Rg=ii();Gu.exports=zg;function zg(e,t,r){return Rg(e,t,null,r)}i(zg,"serial")});var Ju=b((Zk,Ku)=>{Ku.exports={parallel:Hu(),serial:Wu(),serialOrdered:ii()}});var ai=b((qk,Xu)=>{"use strict";Xu.exports=Object});var Qu=b((Gk,Yu)=>{"use strict";Yu.exports=Error});var tc=b((Wk,ec)=>{"use strict";ec.exports=EvalError});var nc=b((Kk,rc)=>{"use strict";rc.exports=RangeError});var ic=b((Jk,oc)=>{"use strict";oc.exports=ReferenceError});var sc=b((Xk,ac)=>{"use strict";ac.exports=SyntaxError});var Qr=b((Yk,uc)=>{"use strict";uc.exports=TypeError});var lc=b((Qk,cc)=>{"use strict";cc.exports=URIError});var dc=b((eN,pc)=>{"use strict";pc.exports=Math.abs});var mc=b((tN,fc)=>{"use strict";fc.exports=Math.floor});var hc=b((rN,gc)=>{"use strict";gc.exports=Math.max});var vc=b((nN,yc)=>{"use strict";yc.exports=Math.min});var Pc=b((oN,_c)=>{"use strict";_c.exports=Math.pow});var bc=b((iN,xc)=>{"use strict";xc.exports=Math.round});var Tc=b((aN,Ec)=>{"use strict";Ec.exports=Number.isNaN||i(function(t){return t!==t},"isNaN")});var Ic=b((uN,Ac)=>{"use strict";var Cg=Tc();Ac.exports=i(function(t){return Cg(t)||t===0?t:t<0?-1:1},"sign")});var $c=b((lN,Sc)=>{"use strict";Sc.exports=Object.getOwnPropertyDescriptor});var si=b((pN,wc)=>{"use strict";var en=$c();if(en)try{en([],"length")}catch{en=null}wc.exports=en});var Rc=b((dN,Oc)=>{"use strict";var tn=Object.defineProperty||!1;if(tn)try{tn({},"a",{value:1})}catch{tn=!1}Oc.exports=tn});var ui=b((fN,zc)=>{"use strict";zc.exports=i(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;t[r]=o;for(var a in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(t,r);if(u.value!==o||u.enumerable!==!0)return!1}return!0},"hasSymbols")});var kc=b((gN,Dc)=>{"use strict";var Cc=typeof Symbol<"u"&&Symbol,Dg=ui();Dc.exports=i(function(){return typeof Cc!="function"||typeof Symbol!="function"||typeof Cc("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Dg()},"hasNativeSymbols")});var ci=b((yN,Nc)=>{"use strict";Nc.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var li=b((vN,Mc)=>{"use strict";var kg=ai();Mc.exports=kg.getPrototypeOf||null});var jc=b((_N,Lc)=>{"use strict";var Ng="Function.prototype.bind called on incompatible ",Mg=Object.prototype.toString,Ug=Math.max,Lg="[object Function]",Uc=i(function(t,r){for(var n=[],o=0;o<t.length;o+=1)n[o]=t[o];for(var a=0;a<r.length;a+=1)n[a+t.length]=r[a];return n},"concatty"),jg=i(function(t,r){for(var n=[],o=r||0,a=0;o<t.length;o+=1,a+=1)n[a]=t[o];return n},"slicy"),Fg=i(function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r},"joiny");Lc.exports=i(function(t){var r=this;if(typeof r!="function"||Mg.apply(r)!==Lg)throw new TypeError(Ng+r);for(var n=jg(arguments,1),o,a=i(function(){if(this instanceof o){var f=r.apply(this,Uc(n,arguments));return Object(f)===f?f:this}return r.apply(t,Uc(n,arguments))},"binder"),s=Ug(0,r.length-n.length),u=[],p=0;p<s;p++)u[p]="$"+p;if(o=Function("binder","return function ("+Fg(u,",")+"){ return binder.apply(this,arguments); }")(a),r.prototype){var d=i(function(){},"Empty");d.prototype=r.prototype,o.prototype=new d,d.prototype=null}return o},"bind")});var wt=b((xN,Fc)=>{"use strict";var Bg=jc();Fc.exports=Function.prototype.bind||Bg});var rn=b((bN,Bc)=>{"use strict";Bc.exports=Function.prototype.call});var pi=b((EN,Vc)=>{"use strict";Vc.exports=Function.prototype.apply});var Zc=b((TN,Hc)=>{"use strict";Hc.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Gc=b((AN,qc)=>{"use strict";var Vg=wt(),Hg=pi(),Zg=rn(),qg=Zc();qc.exports=qg||Vg.call(Zg,Hg)});var Kc=b((IN,Wc)=>{"use strict";var Gg=wt(),Wg=Qr(),Kg=rn(),Jg=Gc();Wc.exports=i(function(t){if(t.length<1||typeof t[0]!="function")throw new Wg("a function is required");return Jg(Gg,Kg,t)},"callBindBasic")});var tl=b(($N,el)=>{"use strict";var Xg=Kc(),Jc=si(),Yc;try{Yc=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var di=!!Yc&&Jc&&Jc(Object.prototype,"__proto__"),Qc=Object,Xc=Qc.getPrototypeOf;el.exports=di&&typeof di.get=="function"?Xg([di.get]):typeof Xc=="function"?i(function(t){return Xc(t==null?t:Qc(t))},"getDunder"):!1});var al=b((ON,il)=>{"use strict";var rl=ci(),nl=li(),ol=tl();il.exports=rl?i(function(t){return rl(t)},"getProto"):nl?i(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return nl(t)},"getProto"):ol?i(function(t){return ol(t)},"getProto"):null});var fi=b((zN,sl)=>{"use strict";var Yg=Function.prototype.call,Qg=Object.prototype.hasOwnProperty,eh=wt();sl.exports=eh.call(Yg,Qg)});var ml=b((CN,fl)=>{"use strict";var K,th=ai(),rh=Qu(),nh=tc(),oh=nc(),ih=ic(),Ct=sc(),zt=Qr(),ah=lc(),sh=dc(),uh=mc(),ch=hc(),lh=vc(),ph=Pc(),dh=bc(),fh=Ic(),pl=Function,mi=i(function(e){try{return pl('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),mr=si(),mh=Rc(),gi=i(function(){throw new zt},"throwTypeError"),gh=mr?(function(){try{return arguments.callee,gi}catch{try{return mr(arguments,"callee").get}catch{return gi}}})():gi,Ot=kc()(),_e=al(),hh=li(),yh=ci(),dl=pi(),gr=rn(),Rt={},vh=typeof Uint8Array>"u"||!_e?K:_e(Uint8Array),gt={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?K:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?K:ArrayBuffer,"%ArrayIteratorPrototype%":Ot&&_e?_e([][Symbol.iterator]()):K,"%AsyncFromSyncIteratorPrototype%":K,"%AsyncFunction%":Rt,"%AsyncGenerator%":Rt,"%AsyncGeneratorFunction%":Rt,"%AsyncIteratorPrototype%":Rt,"%Atomics%":typeof Atomics>"u"?K:Atomics,"%BigInt%":typeof BigInt>"u"?K:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?K:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?K:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?K:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":rh,"%eval%":eval,"%EvalError%":nh,"%Float16Array%":typeof Float16Array>"u"?K:Float16Array,"%Float32Array%":typeof Float32Array>"u"?K:Float32Array,"%Float64Array%":typeof Float64Array>"u"?K:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?K:FinalizationRegistry,"%Function%":pl,"%GeneratorFunction%":Rt,"%Int8Array%":typeof Int8Array>"u"?K:Int8Array,"%Int16Array%":typeof Int16Array>"u"?K:Int16Array,"%Int32Array%":typeof Int32Array>"u"?K:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ot&&_e?_e(_e([][Symbol.iterator]())):K,"%JSON%":typeof JSON=="object"?JSON:K,"%Map%":typeof Map>"u"?K:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ot||!_e?K:_e(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":th,"%Object.getOwnPropertyDescriptor%":mr,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?K:Promise,"%Proxy%":typeof Proxy>"u"?K:Proxy,"%RangeError%":oh,"%ReferenceError%":ih,"%Reflect%":typeof Reflect>"u"?K:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?K:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ot||!_e?K:_e(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?K:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ot&&_e?_e(""[Symbol.iterator]()):K,"%Symbol%":Ot?Symbol:K,"%SyntaxError%":Ct,"%ThrowTypeError%":gh,"%TypedArray%":vh,"%TypeError%":zt,"%Uint8Array%":typeof Uint8Array>"u"?K:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?K:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?K:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?K:Uint32Array,"%URIError%":ah,"%WeakMap%":typeof WeakMap>"u"?K:WeakMap,"%WeakRef%":typeof WeakRef>"u"?K:WeakRef,"%WeakSet%":typeof WeakSet>"u"?K:WeakSet,"%Function.prototype.call%":gr,"%Function.prototype.apply%":dl,"%Object.defineProperty%":mh,"%Object.getPrototypeOf%":hh,"%Math.abs%":sh,"%Math.floor%":uh,"%Math.max%":ch,"%Math.min%":lh,"%Math.pow%":ph,"%Math.round%":dh,"%Math.sign%":fh,"%Reflect.getPrototypeOf%":yh};if(_e)try{null.error}catch(e){ul=_e(_e(e)),gt["%Error.prototype%"]=ul}var ul,_h=i(function e(t){var r;if(t==="%AsyncFunction%")r=mi("async function () {}");else if(t==="%GeneratorFunction%")r=mi("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=mi("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&_e&&(r=_e(o.prototype))}return gt[t]=r,r},"doEval"),cl={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},hr=wt(),nn=fi(),Ph=hr.call(gr,Array.prototype.concat),xh=hr.call(dl,Array.prototype.splice),ll=hr.call(gr,String.prototype.replace),on=hr.call(gr,String.prototype.slice),bh=hr.call(gr,RegExp.prototype.exec),Eh=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Th=/\\(\\)?/g,Ah=i(function(t){var r=on(t,0,1),n=on(t,-1);if(r==="%"&&n!=="%")throw new Ct("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Ct("invalid intrinsic syntax, expected opening `%`");var o=[];return ll(t,Eh,function(a,s,u,p){o[o.length]=u?ll(p,Th,"$1"):s||a}),o},"stringToPath"),Ih=i(function(t,r){var n=t,o;if(nn(cl,n)&&(o=cl[n],n="%"+o[0]+"%"),nn(gt,n)){var a=gt[n];if(a===Rt&&(a=_h(n)),typeof a>"u"&&!r)throw new zt("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:a}}throw new Ct("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");fl.exports=i(function(t,r){if(typeof t!="string"||t.length===0)throw new zt("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new zt('"allowMissing" argument must be a boolean');if(bh(/^%?[^%]*%?$/,t)===null)throw new Ct("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Ah(t),o=n.length>0?n[0]:"",a=Ih("%"+o+"%",r),s=a.name,u=a.value,p=!1,d=a.alias;d&&(o=d[0],xh(n,Ph([0,1],d)));for(var f=1,_=!0;f<n.length;f+=1){var y=n[f],l=on(y,0,1),m=on(y,-1);if((l==='"'||l==="'"||l==="`"||m==='"'||m==="'"||m==="`")&&l!==m)throw new Ct("property names with quotes must have matching quotes");if((y==="constructor"||!_)&&(p=!0),o+="."+y,s="%"+o+"%",nn(gt,s))u=gt[s];else if(u!=null){if(!(y in u)){if(!r)throw new zt("base intrinsic for "+t+" exists, but the property is not available.");return}if(mr&&f+1>=n.length){var P=mr(u,y);_=!!P,_&&"get"in P&&!("originalValue"in P.get)?u=P.get:u=u[y]}else _=nn(u,y),u=u[y];_&&!p&&(gt[s]=u)}}return u},"GetIntrinsic")});var hl=b((kN,gl)=>{"use strict";var Sh=ui();gl.exports=i(function(){return Sh()&&!!Symbol.toStringTag},"hasToStringTagShams")});var _l=b((MN,vl)=>{"use strict";var $h=ml(),yl=$h("%Object.defineProperty%",!0),wh=hl()(),Oh=fi(),Rh=Qr(),an=wh?Symbol.toStringTag:null;vl.exports=i(function(t,r){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,o=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof n<"u"&&typeof n!="boolean"||typeof o<"u"&&typeof o!="boolean")throw new Rh("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");an&&(n||!Oh(t,an))&&(yl?yl(t,an,{configurable:!o,enumerable:!1,value:r,writable:!1}):t[an]=r)},"setToStringTag")});var xl=b((LN,Pl)=>{"use strict";var zh=Function.prototype.call,Ch=Object.prototype.hasOwnProperty,Dh=wt();Pl.exports=Dh.call(zh,Ch)});var El=b((jN,bl)=>{"use strict";bl.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var Il=b((FN,Al)=>{"use strict";var _i=$u(),kh=require("util"),hi=require("path"),Nh=require("http"),Mh=require("https"),Uh=require("url").parse,Lh=require("fs"),jh=require("stream").Stream,Fh=require("crypto"),yi=Cu(),Bh=Ju(),Vh=_l(),at=xl(),vi=El();function Tl(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}i(Tl,"escapeHeaderParam");function Q(e){if(!(this instanceof Q))return new Q(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],_i.call(this),e=e||{};for(var t in e)this[t]=e[t]}i(Q,"FormData");kh.inherits(Q,_i);Q.LINE_BREAK=`\r
|
|
2
|
+
`;Q.DEFAULT_CONTENT_TYPE="application/octet-stream";Q.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=_i.prototype.append.bind(this);if((typeof t=="number"||t==null)&&(t=String(t)),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var o=this._multiPartHeader(e,t,r),a=this._multiPartFooter();n(o),n(t),n(a),this._trackLength(o,t,r)};Q.prototype._trackLength=function(e,t,r){var n=0;r.knownLength!=null?n+=Number(r.knownLength):Buffer.isBuffer(t)?n=t.length:typeof t=="string"&&(n=Buffer.byteLength(t)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+Q.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&at(t,"httpVersion"))&&!(t instanceof jh))&&(r.knownLength||this._valuesToMeasure.push(t))};Q.prototype._lengthRetriever=function(e,t){at(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):Lh.stat(e.path,function(r,n){if(r){t(r);return}var o=n.size-(e.start?e.start:0);t(null,o)}):at(e,"httpVersion")?t(null,Number(e.headers["content-length"])):at(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};Q.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(t,r),o=this._getContentType(t,r),a="",s={"Content-Disposition":["form-data",'name="'+Tl(e)+'"'].concat(n||[]),"Content-Type":[].concat(o||[])};typeof r.header=="object"&&vi(s,r.header);var u;for(var p in s)if(at(s,p)){if(u=s[p],u==null)continue;Array.isArray(u)||(u=[u]),u.length&&(a+=p+": "+u.join("; ")+Q.LINE_BREAK)}return"--"+this.getBoundary()+Q.LINE_BREAK+a+Q.LINE_BREAK};Q.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=hi.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=hi.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&at(e,"httpVersion")&&(r=hi.basename(e.client._httpMessage.path||"")),r)return'filename="'+Tl(r)+'"'};Q.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=yi.lookup(e.name)),!r&&e&&e.path&&(r=yi.lookup(e.path)),!r&&e&&e.readable&&at(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=yi.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=Q.DEFAULT_CONTENT_TYPE),r};Q.prototype._multiPartFooter=function(){return function(e){var t=Q.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};Q.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Q.LINE_BREAK};Q.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)at(e,t)&&(r[t.toLowerCase()]=e[t]);return r};Q.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};Q.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Q.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?e=Buffer.concat([e,this._streams[r]]):e=Buffer.concat([e,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(Q.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};Q.prototype._generateBoundary=function(){this._boundary="--------------------------"+Fh.randomBytes(12).toString("hex")};Q.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e};Q.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};Q.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}Bh.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(o){t+=o}),e(null,t)})};Q.prototype.submit=function(e,t){var r,n,o={method:"post"};return typeof e=="string"?(e=Uh(e),n=vi({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},o)):(n=vi(e,o),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=Mh.request(n):r=Nh.request(n),this.getLength(function(a,s){if(a&&a!=="Unknown stream"){this._error(a);return}if(s&&r.setHeader("Content-Length",s),this.pipe(r),t){var u,p=i(function(d,f){return r.removeListener("error",p),r.removeListener("response",u),t.call(this,d,f)},"callback");u=p.bind(this,null),r.on("error",p),r.on("response",u)}}.bind(this)),r};Q.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};Q.prototype.toString=function(){return"[object FormData]"};Vh(Q.prototype,"FormData");Al.exports=Q});var ue={};co(ue,{__addDisposableResource:()=>ap,__assign:()=>un,__asyncDelegator:()=>Yl,__asyncGenerator:()=>Xl,__asyncValues:()=>Ql,__await:()=>Dt,__awaiter:()=>Zl,__classPrivateFieldGet:()=>np,__classPrivateFieldIn:()=>ip,__classPrivateFieldSet:()=>op,__createBinding:()=>ln,__decorate:()=>Ul,__disposeResources:()=>sp,__esDecorate:()=>jl,__exportStar:()=>Gl,__extends:()=>Nl,__generator:()=>ql,__importDefault:()=>rp,__importStar:()=>tp,__makeTemplateObject:()=>ep,__metadata:()=>Hl,__param:()=>Ll,__propKey:()=>Bl,__read:()=>bi,__rest:()=>Ml,__rewriteRelativeImportExtension:()=>up,__runInitializers:()=>Fl,__setFunctionName:()=>Vl,__spread:()=>Wl,__spreadArray:()=>Jl,__spreadArrays:()=>Kl,__values:()=>cn,default:()=>ry});function Nl(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Pi(e,t);function r(){this.constructor=e}i(r,"__"),e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function Ml(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Ul(e,t,r,n){var o=arguments.length,a=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(s=e[u])&&(a=(o<3?s(a):o>3?s(t,r,a):s(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function Ll(e,t){return function(r,n){t(r,n,e)}}function jl(e,t,r,n,o,a){function s(x){if(x!==void 0&&typeof x!="function")throw new TypeError("Function expected");return x}i(s,"accept");for(var u=n.kind,p=u==="getter"?"get":u==="setter"?"set":"value",d=!t&&e?n.static?e:e.prototype:null,f=t||(d?Object.getOwnPropertyDescriptor(d,n.name):{}),_,y=!1,l=r.length-1;l>=0;l--){var m={};for(var P in n)m[P]=P==="access"?{}:n[P];for(var P in n.access)m.access[P]=n.access[P];m.addInitializer=function(x){if(y)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(x||null))};var h=(0,r[l])(u==="accessor"?{get:f.get,set:f.set}:f[p],m);if(u==="accessor"){if(h===void 0)continue;if(h===null||typeof h!="object")throw new TypeError("Object expected");(_=s(h.get))&&(f.get=_),(_=s(h.set))&&(f.set=_),(_=s(h.init))&&o.unshift(_)}else(_=s(h))&&(u==="field"?o.unshift(_):f[p]=_)}d&&Object.defineProperty(d,n.name,f),y=!0}function Fl(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function Bl(e){return typeof e=="symbol"?e:"".concat(e)}function Vl(e,t,r){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function Hl(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function Zl(e,t,r,n){function o(a){return a instanceof r?a:new r(function(s){s(a)})}return i(o,"adopt"),new(r||(r=Promise))(function(a,s){function u(f){try{d(n.next(f))}catch(_){s(_)}}i(u,"fulfilled");function p(f){try{d(n.throw(f))}catch(_){s(_)}}i(p,"rejected");function d(f){f.done?a(f.value):o(f.value).then(u,p)}i(d,"step"),d((n=n.apply(e,t||[])).next())})}function ql(e,t){var r={label:0,sent:i(function(){if(a[0]&1)throw a[1];return a[1]},"sent"),trys:[],ops:[]},n,o,a,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=u(0),s.throw=u(1),s.return=u(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(d){return function(f){return p([d,f])}}function p(d){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,d[0]&&(r=0)),r;)try{if(n=1,o&&(a=d[0]&2?o.return:d[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,d[1])).done)return a;switch(o=0,a&&(d=[d[0]&2,a.value]),d[0]){case 0:case 1:a=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,o=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]<a[3])){r.label=d[1];break}if(d[0]===6&&r.label<a[1]){r.label=a[1],a=d;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(d);break}a[2]&&r.ops.pop(),r.trys.pop();continue}d=t.call(e,r)}catch(f){d=[6,f],o=0}finally{n=a=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function Gl(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&ln(t,e,r)}function cn(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:i(function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}},"next")};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function bi(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,a=[],s;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return a}function Wl(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(bi(arguments[t]));return e}function Kl(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),o=0,t=0;t<r;t++)for(var a=arguments[t],s=0,u=a.length;s<u;s++,o++)n[o]=a[s];return n}function Jl(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}function Dt(e){return this instanceof Dt?(this.v=e,this):new Dt(e)}function Xl(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),o,a=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),u("next"),u("throw"),u("return",s),o[Symbol.asyncIterator]=function(){return this},o;function s(l){return function(m){return Promise.resolve(m).then(l,_)}}function u(l,m){n[l]&&(o[l]=function(P){return new Promise(function(h,x){a.push([l,P,h,x])>1||p(l,P)})},m&&(o[l]=m(o[l])))}function p(l,m){try{d(n[l](m))}catch(P){y(a[0][3],P)}}function d(l){l.value instanceof Dt?Promise.resolve(l.value.v).then(f,_):y(a[0][2],l)}function f(l){p("next",l)}function _(l){p("throw",l)}function y(l,m){l(m),a.shift(),a.length&&p(a[0][0],a[0][1])}}function Yl(e){var t,r;return t={},n("next"),n("throw",function(o){throw o}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(o,a){t[o]=e[o]?function(s){return(r=!r)?{value:Dt(e[o](s)),done:!1}:a?a(s):s}:a}}function Ql(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof cn=="function"?cn(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(a){r[a]=e[a]&&function(s){return new Promise(function(u,p){s=e[a](s),o(u,p,s.done,s.value)})}}function o(a,s,u,p){Promise.resolve(p).then(function(d){a({value:d,done:u})},s)}}function ep(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function tp(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=xi(e),n=0;n<r.length;n++)r[n]!=="default"&&ln(t,e,r[n]);return ey(t,e),t}function rp(e){return e&&e.__esModule?e:{default:e}}function np(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function op(e,t,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(e,r):o?o.value=r:t.set(e,r),r}function ip(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function ap(e,t,r){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var n,o;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(o=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");o&&(n=i(function(){try{o.call(this)}catch(a){return Promise.reject(a)}},"dispose")),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}function sp(e){function t(a){e.error=e.hasError?new ty(a,e.error,"An error was suppressed during disposal."):a,e.hasError=!0}i(t,"fail");var r,n=0;function o(){for(;r=e.stack.pop();)try{if(!r.async&&n===1)return n=0,e.stack.push(r),Promise.resolve().then(o);if(r.dispose){var a=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(a).then(o,function(s){return t(s),o()})}else n|=1}catch(s){t(s)}if(n===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return i(o,"next"),o()}function up(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(r,n,o,a,s){return n?t?".jsx":".js":o&&(!a||!s)?r:o+a+"."+s.toLowerCase()+"js"}):e}var Pi,un,ln,ey,xi,ty,ry,ce=_d(()=>{Pi=i(function(e,t){return Pi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},Pi(e,t)},"extendStatics");i(Nl,"__extends");un=i(function(){return un=Object.assign||i(function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},"__assign"),un.apply(this,arguments)},"__assign");i(Ml,"__rest");i(Ul,"__decorate");i(Ll,"__param");i(jl,"__esDecorate");i(Fl,"__runInitializers");i(Bl,"__propKey");i(Vl,"__setFunctionName");i(Hl,"__metadata");i(Zl,"__awaiter");i(ql,"__generator");ln=Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:i(function(){return t[r]},"get")}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]});i(Gl,"__exportStar");i(cn,"__values");i(bi,"__read");i(Wl,"__spread");i(Kl,"__spreadArrays");i(Jl,"__spreadArray");i(Dt,"__await");i(Xl,"__asyncGenerator");i(Yl,"__asyncDelegator");i(Ql,"__asyncValues");i(ep,"__makeTemplateObject");ey=Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t},xi=i(function(e){return xi=Object.getOwnPropertyNames||function(t){var r=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[r.length]=n);return r},xi(e)},"ownKeys");i(tp,"__importStar");i(rp,"__importDefault");i(np,"__classPrivateFieldGet");i(op,"__classPrivateFieldSet");i(ip,"__classPrivateFieldIn");i(ap,"__addDisposableResource");ty=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};i(sp,"__disposeResources");i(up,"__rewriteRelativeImportExtension");ry={__extends:Nl,__assign:un,__rest:Ml,__decorate:Ul,__param:Ll,__esDecorate:jl,__runInitializers:Fl,__propKey:Bl,__setFunctionName:Vl,__metadata:Hl,__awaiter:Zl,__generator:ql,__createBinding:ln,__exportStar:Gl,__values:cn,__read:bi,__spread:Wl,__spreadArrays:Kl,__spreadArray:Jl,__await:Dt,__asyncGenerator:Xl,__asyncDelegator:Yl,__asyncValues:Ql,__makeTemplateObject:ep,__importStar:tp,__importDefault:rp,__classPrivateFieldGet:np,__classPrivateFieldSet:op,__classPrivateFieldIn:ip,__addDisposableResource:ap,__disposeResources:sp,__rewriteRelativeImportExtension:up}});var vr=b(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.RequestMethod=void 0;var cp;(function(e){e.GET="GET",e.PATCH="PATCH",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE"})(cp||(pn.RequestMethod=cp={}))});var lp=b(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.BatchRequestContent=void 0;var kt=(ce(),ie(ue)),Ei=vr(),ny=(function(){function e(t){if(this.requests=new Map,typeof t<"u"){var r=e.requestLimit;if(t.length>r){var n=new Error("Maximum requests limit exceeded, Max allowed number of requests are ".concat(r));throw n.name="Limit Exceeded Error",n}for(var o=0,a=t;o<a.length;o++){var s=a[o];this.addRequest(s)}}}return i(e,"BatchRequestContent"),e.validateDependencies=function(t){var r=i(function(s){for(var u=s.entries(),p=u.next();!p.done;){var d=p.value[1];if(d.dependsOn!==void 0&&d.dependsOn.length>0)return!1;p=u.next()}return!0},"isParallel"),n=i(function(s){var u=s.entries(),p=u.next(),d=p.value[1];if(d.dependsOn!==void 0&&d.dependsOn.length>0)return!1;var f=p;for(p=u.next();!p.done;){var _=p.value[1];if(_.dependsOn===void 0||_.dependsOn.length!==1||_.dependsOn[0]!==f.value[1].id)return!1;f=p,p=u.next()}return!0},"isSerial"),o=i(function(s){var u=s.entries(),p=u.next(),d=p.value[1],f;if(d.dependsOn===void 0||d.dependsOn.length===0)f=d.id;else if(d.dependsOn.length===1){var _=d.dependsOn[0];if(_!==d.id&&s.has(_))f=_;else return!1}else return!1;for(p=u.next();!p.done;){var y=p.value[1];if((y.dependsOn===void 0||y.dependsOn.length===0)&&f!==y.id||y.dependsOn!==void 0&&y.dependsOn.length!==0&&(y.dependsOn.length===1&&(y.id===f||y.dependsOn[0]!==f)||y.dependsOn.length>1))return!1;p=u.next()}return!0},"isSame");if(t.size===0){var a=new Error("Empty requests map, Please provide at least one request.");throw a.name="Empty Requests Error",a}return r(t)||n(t)||o(t)},e.getRequestData=function(t){return kt.__awaiter(this,void 0,void 0,function(){var r,n,o,a;return kt.__generator(this,function(s){switch(s.label){case 0:return r={url:""},n=new RegExp("^https?://"),r.url=n.test(t.url)?"/"+t.url.split(/.*?\/\/.*?\//)[1]:t.url,r.method=t.method,o={},t.headers.forEach(function(u,p){o[p]=u}),Object.keys(o).length&&(r.headers=o),t.method===Ei.RequestMethod.PATCH||t.method===Ei.RequestMethod.POST||t.method===Ei.RequestMethod.PUT?(a=r,[4,e.getRequestBody(t)]):[3,2];case 1:a.body=s.sent(),s.label=2;case 2:return[2,r]}})})},e.getRequestBody=function(t){return kt.__awaiter(this,void 0,void 0,function(){var r,n,o,a,s,u,p,d;return kt.__generator(this,function(f){switch(f.label){case 0:r=!1,f.label=1;case 1:return f.trys.push([1,3,,4]),o=t.clone(),[4,o.json()];case 2:return n=f.sent(),r=!0,[3,4];case 3:return a=f.sent(),[3,4];case 4:if(r)return[3,12];f.label=5;case 5:return f.trys.push([5,11,,12]),typeof Blob<"u"?[4,t.blob()]:[3,8];case 6:return s=f.sent(),u=new FileReader,[4,new Promise(function(_){u.addEventListener("load",function(){var y=u.result,l=new RegExp("^s*data:(.+?/.+?(;.+?=.+?)*)?(;base64)?,(.*)s*$"),m=l.exec(y);_(m[4])},!1),u.readAsDataURL(s)})];case 7:return n=f.sent(),[3,10];case 8:return typeof Buffer<"u"?[4,t.buffer()]:[3,10];case 9:p=f.sent(),n=p.toString("base64"),f.label=10;case 10:return r=!0,[3,12];case 11:return d=f.sent(),[3,12];case 12:return[2,n]}})})},e.prototype.addRequest=function(t){var r=e.requestLimit;if(t.id===""){var n=new Error("Id for a request is empty, Please provide an unique id");throw n.name="Empty Id For Request",n}if(this.requests.size===r){var n=new Error("Maximum requests limit exceeded, Max allowed number of requests are ".concat(r));throw n.name="Limit Exceeded Error",n}if(this.requests.has(t.id)){var n=new Error("Adding request with duplicate id ".concat(t.id,", Make the id of the requests unique"));throw n.name="Duplicate RequestId Error",n}return this.requests.set(t.id,t),t.id},e.prototype.removeRequest=function(t){for(var r=this.requests.delete(t),n=this.requests.entries(),o=n.next();!o.done;){var a=o.value[1].dependsOn;if(typeof a<"u"){var s=a.indexOf(t);s!==-1&&a.splice(s,1),a.length===0&&delete o.value[1].dependsOn}o=n.next()}return r},e.prototype.getContent=function(){return kt.__awaiter(this,void 0,void 0,function(){var t,r,n,o,u,u,a,s,u;return kt.__generator(this,function(p){switch(p.label){case 0:if(t=[],r={requests:t},n=this.requests.entries(),o=n.next(),o.done)throw u=new Error("No requests added yet, Please add at least one request."),u.name="Empty Payload",u;if(!e.validateDependencies(this.requests))throw u=new Error(`Invalid dependency found, Dependency should be:
|
|
3
3
|
1. Parallel - no individual request states a dependency in the dependsOn property.
|
|
4
4
|
2. Serial - all individual requests depend on the previous individual request.
|
|
5
|
-
3. Same - all individual requests that state a dependency in the dependsOn property, state the same dependency.`),u.name="Invalid Dependency",u;p.label=1;case 1:return o.done?[3,3]:(i=o.value[1],[4,e.getRequestData(i.request)]);case 2:if(s=p.sent(),s.body!==void 0&&(s.headers===void 0||s.headers["content-type"]===void 0))throw u=new Error("Content-type header is not mentioned for request #".concat(i.id,", For request having body, Content-type header should be mentioned")),u.name="Invalid Content-type header",u;return s.id=i.id,i.dependsOn!==void 0&&i.dependsOn.length>0&&(s.dependsOn=i.dependsOn),t.push(s),o=n.next(),[3,1];case 3:return r.requests=t,[2,r]}})})},e.prototype.addDependency=function(t,r){if(!this.requests.has(t)){var n=new Error("Dependent ".concat(t," does not exists, Please check the id"));throw n.name="Invalid Dependent",n}if(typeof r<"u"&&!this.requests.has(r)){var n=new Error("Dependency ".concat(r," does not exists, Please check the id"));throw n.name="Invalid Dependency",n}if(typeof r<"u"){var o=this.requests.get(t);if(o.dependsOn===void 0&&(o.dependsOn=[]),o.dependsOn.indexOf(r)!==-1){var n=new Error("Dependency ".concat(r," is already added for the request ").concat(t));throw n.name="Duplicate Dependency",n}o.dependsOn.push(r)}else{for(var i=this.requests.entries(),s=void 0,u=i.next();!u.done&&u.value[1].id!==t;)s=u,u=i.next();if(typeof s<"u"){var p=s.value[0];if(u.value[1].dependsOn===void 0&&(u.value[1].dependsOn=[]),u.value[1].dependsOn.indexOf(p)!==-1){var n=new Error("Dependency ".concat(p," is already added for the request ").concat(t));throw n.name="Duplicate Dependency",n}u.value[1].dependsOn.push(p)}else{var n=new Error("Can't add dependency ".concat(r,", There is only a dependent request in the batch"));throw n.name="Invalid Dependency Addition",n}}},e.prototype.removeDependency=function(t,r){var n=this.requests.get(t);if(typeof n>"u"||n.dependsOn===void 0||n.dependsOn.length===0)return!1;if(typeof r<"u"){var o=n.dependsOn.indexOf(r);return o===-1?!1:(n.dependsOn.splice(o,1),!0)}else return delete n.dependsOn,!0},e.requestLimit=20,e})();pn.BatchRequestContent=Kh});var op=b(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.BatchResponseContent=void 0;var Jh=(ce(),ie(ue)),Xh=(function(){function e(t){this.responses=new Map,this.update(t)}return a(e,"BatchResponseContent"),e.prototype.createResponseObject=function(t){var r=t.body,n={};if(n.status=t.status,t.statusText!==void 0&&(n.statusText=t.statusText),n.headers=t.headers,n.headers!==void 0&&n.headers["Content-Type"]!==void 0&&n.headers["Content-Type"].split(";")[0]==="application/json"){var o=JSON.stringify(r);return new Response(o,n)}return new Response(r,n)},e.prototype.update=function(t){this.nextLink=t["@odata.nextLink"];for(var r=t.responses,n=0,o=r.length;n<o;n++)this.responses.set(r[n].id,this.createResponseObject(r[n]))},e.prototype.getResponseById=function(t){return this.responses.get(t)},e.prototype.getResponses=function(){return this.responses},e.prototype.getResponsesIterator=function(){var t,r;return Jh.__generator(this,function(n){switch(n.label){case 0:t=this.responses.entries(),r=t.next(),n.label=1;case 1:return r.done?[3,3]:[4,r.value];case 2:return n.sent(),r=t.next(),[3,1];case 3:return[2]}})},e})();dn.BatchResponseContent=Xh});var xi=b(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.GRAPH_URLS=it.GRAPH_BASE_URL=it.GRAPH_API_VERSION=void 0;it.GRAPH_API_VERSION="v1.0";it.GRAPH_BASE_URL="https://graph.microsoft.com/";it.GRAPH_URLS=new Set(["graph.microsoft.com","graph.microsoft.us","dod-graph.microsoft.us","graph.microsoft.de","microsoftgraph.chinacloudapi.cn","canary.graph.microsoft.com"])});var Ge=b(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.GraphClientError=void 0;var Yh=(ce(),ie(ue)),Qh=(function(e){Yh.__extends(t,e);function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return a(t,"GraphClientError"),t.setGraphClientError=function(r){var n;return r instanceof Error?n=r:(n=new t,n.customError=r),n},t})(Error);mn.GraphClientError=Qh});var fn=b(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.isCustomHost=we.isGraphURL=we.serializeContent=we.urlJoin=we.oDataQueryNames=void 0;var ey=xi(),ty=Ge();we.oDataQueryNames=["$select","$expand","$orderby","$filter","$top","$skip","$skipToken","$count"];var ry=a(function(e){var t=a(function(i){return i.replace(/\/+$/,"")},"removePostSlash"),r=a(function(i){return i.replace(/^\/+/,"")},"removePreSlash"),n=a(function(i,s){return[t(i),r(s)].join("/")},"joiner"),o=Array.prototype.slice.call(e);return o.reduce(n)},"urlJoin");we.urlJoin=ry;var ny=a(function(e){var t=e&&e.constructor&&e.constructor.name;if(t==="Buffer"||t==="Blob"||t==="File"||t==="FormData"||typeof e=="string")return e;if(t==="ArrayBuffer")e=Buffer.from(e);else if(t==="Int8Array"||t==="Int16Array"||t==="Int32Array"||t==="Uint8Array"||t==="Uint16Array"||t==="Uint32Array"||t==="Uint8ClampedArray"||t==="Float32Array"||t==="Float64Array"||t==="DataView")e=Buffer.from(e.buffer);else try{e=JSON.stringify(e)}catch{throw new Error("Unable to stringify the content")}return e},"serializeContent");we.serializeContent=ny;var oy=a(function(e){return ip(e)},"isGraphURL");we.isGraphURL=oy;var iy=a(function(e,t){return t.forEach(function(r){return ay(r)}),ip(e,t)},"isCustomHost");we.isCustomHost=iy;var ip=a(function(e,t){if(t===void 0&&(t=ey.GRAPH_URLS),e=e.toLowerCase(),e.indexOf("https://")!==-1){e=e.replace("https://","");var r=e.indexOf(":"),n=e.indexOf("/"),o="";if(n!==-1)return r!==-1&&r<n?(o=e.substring(0,r),t.has(o)):(o=e.substring(0,n),t.has(o))}return!1},"isValidEndpoint"),ay=a(function(e){if(e.indexOf("/")!==-1)throw new ty.GraphClientError("Please add only hosts or hostnames to the CustomHosts config. If the url is `http://example.com:3000/`, host is `example:3000`")},"isCustomHostValid")});var at=b(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.MiddlewareControl=void 0;var sy=(function(){function e(t){t===void 0&&(t=[]),this.middlewareOptions=new Map;for(var r=0,n=t;r<n.length;r++){var o=n[r],i=o.constructor;this.middlewareOptions.set(i,o)}}return a(e,"MiddlewareControl"),e.prototype.getMiddlewareOptions=function(t){return this.middlewareOptions.get(t)},e.prototype.setMiddlewareOptions=function(t,r){this.middlewareOptions.set(t,r)},e})();gn.MiddlewareControl=sy});var Nt=b(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.cloneRequestWithNewUrl=Oe.appendRequestHeader=Oe.setRequestHeader=Oe.getRequestHeader=Oe.generateUUID=void 0;var ap=(ce(),ie(ue)),uy=a(function(){for(var e="",t=0;t<32;t++)(t===8||t===12||t===16||t===20)&&(e+="-"),e+=Math.floor(Math.random()*16).toString(16);return e},"generateUUID");Oe.generateUUID=uy;var cy=a(function(e,t,r){var n=null;if(typeof Request<"u"&&e instanceof Request)n=e.headers.get(r);else if(typeof t<"u"&&t.headers!==void 0)if(typeof Headers<"u"&&t.headers instanceof Headers)n=t.headers.get(r);else if(t.headers instanceof Array){for(var o=t.headers,i=0,s=o.length;i<s;i++)if(o[i][0]===r){n=o[i][1];break}}else t.headers[r]!==void 0&&(n=t.headers[r]);return n},"getRequestHeader");Oe.getRequestHeader=cy;var ly=a(function(e,t,r,n){var o,i;if(typeof Request<"u"&&e instanceof Request)e.headers.set(r,n);else if(typeof t<"u")if(t.headers===void 0)t.headers=new Headers((o={},o[r]=n,o));else if(typeof Headers<"u"&&t.headers instanceof Headers)t.headers.set(r,n);else if(t.headers instanceof Array){for(var s=0,u=t.headers.length;s<u;s++){var p=t.headers[s];if(p[0]===r){p[1]=n;break}}s===u&&t.headers.push([r,n])}else Object.assign(t.headers,(i={},i[r]=n,i))},"setRequestHeader");Oe.setRequestHeader=ly;var py=a(function(e,t,r,n){var o,i;typeof Request<"u"&&e instanceof Request?e.headers.append(r,n):typeof t<"u"&&(t.headers===void 0?t.headers=new Headers((o={},o[r]=n,o)):typeof Headers<"u"&&t.headers instanceof Headers?t.headers.append(r,n):t.headers instanceof Array?t.headers.push([r,n]):t.headers===void 0?t.headers=(i={},i[r]=n,i):t.headers[r]===void 0?t.headers[r]=n:t.headers[r]+=", ".concat(n))},"appendRequestHeader");Oe.appendRequestHeader=py;var dy=a(function(e,t){return ap.__awaiter(void 0,void 0,void 0,function(){var r,n,o,i,s,u,p,d,m,y,v,l,f;return ap.__generator(this,function(_){switch(_.label){case 0:return t.headers.get("Content-Type")?[4,t.blob()]:[3,2];case 1:return n=_.sent(),[3,4];case 2:return[4,Promise.resolve(void 0)];case 3:n=_.sent(),_.label=4;case 4:return r=n,o=t.method,i=t.headers,s=t.referrer,u=t.referrerPolicy,p=t.mode,d=t.credentials,m=t.cache,y=t.redirect,v=t.integrity,l=t.keepalive,f=t.signal,[2,new Request(e,{method:o,headers:i,body:r,referrer:s,referrerPolicy:u,mode:p,credentials:d,cache:m,redirect:y,integrity:v,keepalive:l,signal:f})]}})})},"cloneRequestWithNewUrl");Oe.cloneRequestWithNewUrl=dy});var bi=b(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.AuthenticationHandlerOptions=void 0;var my=(function(){function e(t,r){this.authenticationProvider=t,this.authenticationProviderOptions=r}return a(e,"AuthenticationHandlerOptions"),e})();hn.AuthenticationHandlerOptions=my});var Ut=b(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.TelemetryHandlerOptions=Mt.FeatureUsageFlag=void 0;var sp=at(),Ei;(function(e){e[e.NONE=0]="NONE",e[e.REDIRECT_HANDLER_ENABLED=1]="REDIRECT_HANDLER_ENABLED",e[e.RETRY_HANDLER_ENABLED=2]="RETRY_HANDLER_ENABLED",e[e.AUTHENTICATION_HANDLER_ENABLED=4]="AUTHENTICATION_HANDLER_ENABLED"})(Ei||(Mt.FeatureUsageFlag=Ei={}));var fy=(function(){function e(){this.featureUsage=Ei.NONE}return a(e,"TelemetryHandlerOptions"),e.updateFeatureUsageFlag=function(t,r){var n;t.middlewareControl instanceof sp.MiddlewareControl?n=t.middlewareControl.getMiddlewareOptions(e):t.middlewareControl=new sp.MiddlewareControl,typeof n>"u"&&(n=new e,t.middlewareControl.setMiddlewareOptions(e,n)),n.setFeatureUsage(r)},e.prototype.setFeatureUsage=function(t){this.featureUsage=this.featureUsage|t},e.prototype.getFeatureUsage=function(){return this.featureUsage.toString(16)},e})();Mt.TelemetryHandlerOptions=fy});var vn=b(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.AuthenticationHandler=void 0;var up=(ce(),ie(ue)),cp=fn(),gy=at(),hy=Nt(),yy=bi(),lp=Ut(),vy=(function(){function e(t){this.authenticationProvider=t}return a(e,"AuthenticationHandler"),e.prototype.execute=function(t){return up.__awaiter(this,void 0,void 0,function(){var r,n,o,i,s,u;return up.__generator(this,function(p){switch(p.label){case 0:return r=typeof t.request=="string"?t.request:t.request.url,(0,cp.isGraphURL)(r)||t.customHosts&&(0,cp.isCustomHost)(r,t.customHosts)?(n=void 0,t.middlewareControl instanceof gy.MiddlewareControl&&(n=t.middlewareControl.getMiddlewareOptions(yy.AuthenticationHandlerOptions)),o=void 0,i=void 0,n&&(o=n.authenticationProvider,i=n.authenticationProviderOptions),o||(o=this.authenticationProvider),[4,o.getAccessToken(i)]):[3,2];case 1:return s=p.sent(),u="Bearer ".concat(s),(0,hy.appendRequestHeader)(t.request,t.options,e.AUTHORIZATION_HEADER,u),lp.TelemetryHandlerOptions.updateFeatureUsageFlag(t,lp.FeatureUsageFlag.AUTHENTICATION_HANDLER_ENABLED),[3,3];case 2:t.options.headers&&delete t.options.headers[e.AUTHORIZATION_HEADER],p.label=3;case 3:return[4,this.nextMiddleware.execute(t)];case 4:return[2,p.sent()]}})})},e.prototype.setNext=function(t){this.nextMiddleware=t},e.AUTHORIZATION_HEADER="Authorization",e})();yn.AuthenticationHandler=vy});var Pn=b(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.HTTPMessageHandler=void 0;var pp=(ce(),ie(ue)),_y=(function(){function e(){}return a(e,"HTTPMessageHandler"),e.prototype.execute=function(t){return pp.__awaiter(this,void 0,void 0,function(){var r;return pp.__generator(this,function(n){switch(n.label){case 0:return r=t,[4,fetch(t.request,t.options)];case 1:return r.response=n.sent(),[2]}})})},e})();_n.HTTPMessageHandler=_y});var _r=b(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.RetryHandlerOptions=void 0;var Py=(function(){function e(t,r,n){if(t===void 0&&(t=e.DEFAULT_DELAY),r===void 0&&(r=e.DEFAULT_MAX_RETRIES),n===void 0&&(n=e.defaultShouldRetry),t>e.MAX_DELAY&&r>e.MAX_MAX_RETRIES){var o=new Error("Delay and MaxRetries should not be more than ".concat(e.MAX_DELAY," and ").concat(e.MAX_MAX_RETRIES));throw o.name="MaxLimitExceeded",o}else if(t>e.MAX_DELAY){var o=new Error("Delay should not be more than ".concat(e.MAX_DELAY));throw o.name="MaxLimitExceeded",o}else if(r>e.MAX_MAX_RETRIES){var o=new Error("MaxRetries should not be more than ".concat(e.MAX_MAX_RETRIES));throw o.name="MaxLimitExceeded",o}else if(t<0&&r<0){var o=new Error("Delay and MaxRetries should not be negative");throw o.name="MinExpectationNotMet",o}else if(t<0){var o=new Error("Delay should not be negative");throw o.name="MinExpectationNotMet",o}else if(r<0){var o=new Error("MaxRetries should not be negative");throw o.name="MinExpectationNotMet",o}this.delay=Math.min(t,e.MAX_DELAY),this.maxRetries=Math.min(r,e.MAX_MAX_RETRIES),this.shouldRetry=n}return a(e,"RetryHandlerOptions"),e.prototype.getMaxDelay=function(){return e.MAX_DELAY},e.DEFAULT_DELAY=3,e.DEFAULT_MAX_RETRIES=3,e.MAX_DELAY=180,e.MAX_MAX_RETRIES=10,e.defaultShouldRetry=function(){return!0},e})();xn.RetryHandlerOptions=Py});var En=b(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.RetryHandler=void 0;var Lt=(ce(),ie(ue)),Ti=vr(),xy=at(),dp=Nt(),mp=_r(),fp=Ut(),by=(function(){function e(t){t===void 0&&(t=new mp.RetryHandlerOptions),this.options=t}return a(e,"RetryHandler"),e.prototype.isRetry=function(t){return e.RETRY_STATUS_CODES.indexOf(t.status)!==-1},e.prototype.isBuffered=function(t,r){var n=typeof t=="string"?r.method:t.method,o=n===Ti.RequestMethod.PUT||n===Ti.RequestMethod.PATCH||n===Ti.RequestMethod.POST;if(o){var i=(0,dp.getRequestHeader)(t,r,"Content-Type")==="application/octet-stream";if(i)return!1}return!0},e.prototype.getDelay=function(t,r,n){var o=a(function(){return Number(Math.random().toFixed(3))},"getRandomness"),i=t.headers!==void 0?t.headers.get(e.RETRY_AFTER_HEADER):null,s;return i!==null?Number.isNaN(Number(i))?s=Math.round((new Date(i).getTime()-Date.now())/1e3):s=Number(i):s=r>=2?this.getExponentialBackOffTime(r)+n+o():n+o(),Math.min(s,this.options.getMaxDelay()+o())},e.prototype.getExponentialBackOffTime=function(t){return Math.round(1/2*(Math.pow(2,t)-1))},e.prototype.sleep=function(t){return Lt.__awaiter(this,void 0,void 0,function(){var r;return Lt.__generator(this,function(n){return r=t*1e3,[2,new Promise(function(o){return setTimeout(o,r)})]})})},e.prototype.getOptions=function(t){var r;return t.middlewareControl instanceof xy.MiddlewareControl&&(r=t.middlewareControl.getMiddlewareOptions(this.options.constructor)),typeof r>"u"&&(r=Object.assign(new mp.RetryHandlerOptions,this.options)),r},e.prototype.executeWithRetry=function(t,r,n){return Lt.__awaiter(this,void 0,void 0,function(){var o;return Lt.__generator(this,function(i){switch(i.label){case 0:return[4,this.nextMiddleware.execute(t)];case 1:return i.sent(),r<n.maxRetries&&this.isRetry(t.response)&&this.isBuffered(t.request,t.options)&&n.shouldRetry(n.delay,r,t.request,t.options,t.response)?(++r,(0,dp.setRequestHeader)(t.request,t.options,e.RETRY_ATTEMPT_HEADER,r.toString()),o=this.getDelay(t.response,r,n.delay),[4,this.sleep(o)]):[3,4];case 2:return i.sent(),[4,this.executeWithRetry(t,r,n)];case 3:return[2,i.sent()];case 4:return[2]}})})},e.prototype.execute=function(t){return Lt.__awaiter(this,void 0,void 0,function(){var r,n;return Lt.__generator(this,function(o){switch(o.label){case 0:return r=0,n=this.getOptions(t),fp.TelemetryHandlerOptions.updateFeatureUsageFlag(t,fp.FeatureUsageFlag.RETRY_HANDLER_ENABLED),[4,this.executeWithRetry(t,r,n)];case 1:return[2,o.sent()]}})})},e.prototype.setNext=function(t){this.nextMiddleware=t},e.RETRY_STATUS_CODES=[429,503,504],e.RETRY_ATTEMPT_HEADER="Retry-Attempt",e.RETRY_AFTER_HEADER="Retry-After",e})();bn.RetryHandler=by});var Pr=b(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.RedirectHandlerOptions=void 0;var Ey=(function(){function e(t,r){if(t===void 0&&(t=e.DEFAULT_MAX_REDIRECTS),r===void 0&&(r=e.defaultShouldRedirect),t>e.MAX_MAX_REDIRECTS){var n=new Error("MaxRedirects should not be more than ".concat(e.MAX_MAX_REDIRECTS));throw n.name="MaxLimitExceeded",n}if(t<0){var n=new Error("MaxRedirects should not be negative");throw n.name="MinExpectationNotMet",n}this.maxRedirects=t,this.shouldRedirect=r}return a(e,"RedirectHandlerOptions"),e.DEFAULT_MAX_REDIRECTS=5,e.MAX_MAX_REDIRECTS=20,e.defaultShouldRedirect=function(){return!0},e})();Tn.RedirectHandlerOptions=Ey});var An=b(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.RedirectHandler=void 0;var jt=(ce(),ie(ue)),Ty=vr(),Iy=at(),Ay=Nt(),Ii=Pr(),gp=Ut(),Sy=(function(){function e(t){t===void 0&&(t=new Ii.RedirectHandlerOptions),this.options=t}return a(e,"RedirectHandler"),e.prototype.isRedirect=function(t){return e.REDIRECT_STATUS_CODES.indexOf(t.status)!==-1},e.prototype.hasLocationHeader=function(t){return t.headers.has(e.LOCATION_HEADER)},e.prototype.getLocationHeader=function(t){return t.headers.get(e.LOCATION_HEADER)},e.prototype.isRelativeURL=function(t){return t.indexOf("://")===-1},e.prototype.shouldDropAuthorizationHeader=function(t,r){var n=/^[A-Za-z].+?:\/\/.+?(?=\/|$)/,o=n.exec(t),i,s;o!==null&&(i=o[0]);var u=n.exec(r);return u!==null&&(s=u[0]),typeof i<"u"&&typeof s<"u"&&i!==s},e.prototype.updateRequestUrl=function(t,r){return jt.__awaiter(this,void 0,void 0,function(){var n,o;return jt.__generator(this,function(i){switch(i.label){case 0:return n=r,typeof r.request!="string"?[3,1]:(o=t,[3,3]);case 1:return[4,(0,Ay.cloneRequestWithNewUrl)(t,r.request)];case 2:o=i.sent(),i.label=3;case 3:return n.request=o,[2]}})})},e.prototype.getOptions=function(t){var r;return t.middlewareControl instanceof Iy.MiddlewareControl&&(r=t.middlewareControl.getMiddlewareOptions(Ii.RedirectHandlerOptions)),typeof r>"u"&&(r=Object.assign(new Ii.RedirectHandlerOptions,this.options)),r},e.prototype.executeWithRedirect=function(t,r,n){return jt.__awaiter(this,void 0,void 0,function(){var o,i;return jt.__generator(this,function(s){switch(s.label){case 0:return[4,this.nextMiddleware.execute(t)];case 1:return s.sent(),o=t.response,r<n.maxRedirects&&this.isRedirect(o)&&this.hasLocationHeader(o)&&n.shouldRedirect(o)?(++r,o.status!==e.STATUS_CODE_SEE_OTHER?[3,2]:(t.options.method=Ty.RequestMethod.GET,delete t.options.body,[3,4])):[3,6];case 2:return i=this.getLocationHeader(o),!this.isRelativeURL(i)&&this.shouldDropAuthorizationHeader(o.url,i)&&delete t.options.headers[e.AUTHORIZATION_HEADER],[4,this.updateRequestUrl(i,t)];case 3:s.sent(),s.label=4;case 4:return[4,this.executeWithRedirect(t,r,n)];case 5:return s.sent(),[3,7];case 6:return[2];case 7:return[2]}})})},e.prototype.execute=function(t){return jt.__awaiter(this,void 0,void 0,function(){var r,n;return jt.__generator(this,function(o){switch(o.label){case 0:return r=0,n=this.getOptions(t),t.options.redirect=e.MANUAL_REDIRECT,gp.TelemetryHandlerOptions.updateFeatureUsageFlag(t,gp.FeatureUsageFlag.REDIRECT_HANDLER_ENABLED),[4,this.executeWithRedirect(t,r,n)];case 1:return[2,o.sent()]}})})},e.prototype.setNext=function(t){this.nextMiddleware=t},e.REDIRECT_STATUS_CODES=[301,302,303,307,308],e.STATUS_CODE_SEE_OTHER=303,e.LOCATION_HEADER="Location",e.AUTHORIZATION_HEADER="Authorization",e.MANUAL_REDIRECT="manual",e})();In.RedirectHandler=Sy});var hp=b(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.PACKAGE_VERSION=void 0;Sn.PACKAGE_VERSION="3.0.7"});var On=b(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.TelemetryHandler=void 0;var yp=(ce(),ie(ue)),vp=fn(),$y=hp(),wy=at(),$n=Nt(),Oy=Ut(),Ry=(function(){function e(){}return a(e,"TelemetryHandler"),e.prototype.execute=function(t){return yp.__awaiter(this,void 0,void 0,function(){var r,n,o,i,s;return yp.__generator(this,function(u){switch(u.label){case 0:return r=typeof t.request=="string"?t.request:t.request.url,(0,vp.isGraphURL)(r)||t.customHosts&&(0,vp.isCustomHost)(r,t.customHosts)?(n=(0,$n.getRequestHeader)(t.request,t.options,e.CLIENT_REQUEST_ID_HEADER),n||(n=(0,$n.generateUUID)(),(0,$n.setRequestHeader)(t.request,t.options,e.CLIENT_REQUEST_ID_HEADER,n)),o="".concat(e.PRODUCT_NAME,"/").concat($y.PACKAGE_VERSION),i=void 0,t.middlewareControl instanceof wy.MiddlewareControl&&(i=t.middlewareControl.getMiddlewareOptions(Oy.TelemetryHandlerOptions)),i&&(s=i.getFeatureUsage(),o+=" (".concat(e.FEATURE_USAGE_STRING,"=").concat(s,")")),(0,$n.appendRequestHeader)(t.request,t.options,e.SDK_VERSION_HEADER,o)):(delete t.options.headers[e.CLIENT_REQUEST_ID_HEADER],delete t.options.headers[e.SDK_VERSION_HEADER]),[4,this.nextMiddleware.execute(t)];case 1:return[2,u.sent()]}})})},e.prototype.setNext=function(t){this.nextMiddleware=t},e.CLIENT_REQUEST_ID_HEADER="client-request-id",e.SDK_VERSION_HEADER="SdkVersion",e.PRODUCT_NAME="graph-js",e.FEATURE_USAGE_STRING="featureUsage",e})();wn.TelemetryHandler=Ry});var _p=b(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.MiddlewareFactory=void 0;var zy=vn(),Cy=Pn(),ky=Pr(),Dy=_r(),Ny=An(),My=En(),Uy=On(),Ly=a(function(){return typeof process=="object"&&typeof require=="function"},"isNodeEnvironment"),jy=(function(){function e(){}return a(e,"MiddlewareFactory"),e.getDefaultMiddlewareChain=function(t){var r=[],n=new zy.AuthenticationHandler(t),o=new My.RetryHandler(new Dy.RetryHandlerOptions),i=new Uy.TelemetryHandler,s=new Cy.HTTPMessageHandler;if(r.push(n),r.push(o),Ly()){var u=new Ny.RedirectHandler(new ky.RedirectHandlerOptions);r.push(u)}return r.push(i),r.push(s),r},e})();Rn.MiddlewareFactory=jy});var Cn=b(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.ChaosStrategy=void 0;var Pp;(function(e){e[e.MANUAL=0]="MANUAL",e[e.RANDOM=1]="RANDOM"})(Pp||(zn.ChaosStrategy=Pp={}))});var Ai=b(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.ChaosHandlerOptions=void 0;var Fy=Cn(),By=(function(){function e(t,r,n,o,i,s){if(t===void 0&&(t=Fy.ChaosStrategy.RANDOM),r===void 0&&(r="Some error Happened"),this.chaosStrategy=t,this.statusCode=n,this.statusMessage=r,this.chaosPercentage=o!==void 0?o:10,this.responseBody=i,this.headers=s,this.chaosPercentage>100)throw new Error("Error Pecentage can not be more than 100")}return a(e,"ChaosHandlerOptions"),e})();kn.ChaosHandlerOptions=By});var xp=b(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.httpStatusCode=Ft.methodStatusCode=void 0;Ft.methodStatusCode={GET:[429,500,502,503,504],POST:[429,500,502,503,504,507],PUT:[429,500,502,503,504,507],PATCH:[429,500,502,503,504],DELETE:[429,500,502,503,504,507]};Ft.httpStatusCode={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"}});var Tp=b(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.ChaosHandler=void 0;var Dn=(ce(),ie(ue)),Vy=at(),Hy=Nt(),bp=xp(),Si=Ai(),Ep=Cn(),Zy=(function(){function e(t,r){t===void 0&&(t=new Si.ChaosHandlerOptions),this.options=t,this.manualMap=r}return a(e,"ChaosHandler"),e.prototype.createResponseHeaders=function(t,r,n){var o=t.headers?new Headers(t.headers):new Headers;return o.append("Cache-Control","no-store"),o.append("request-id",r),o.append("client-request-id",r),o.append("x-ms-ags-diagnostic",""),o.append("Date",n),o.append("Strict-Transport-Security",""),t.statusCode===429&&o.append("retry-after","3"),o},e.prototype.createResponseBody=function(t,r,n){if(t.responseBody)return t.responseBody;var o;if(t.statusCode>=400){var i=bp.httpStatusCode[t.statusCode],s=t.statusMessage;o={error:{code:i,message:s,innerError:{"request-id":r,date:n}}}}else o={};return o},e.prototype.createResponse=function(t,r){var n=r.request,o=(0,Hy.generateUUID)(),i=new Date,s=this.createResponseHeaders(t,o,i.toString()),u=this.createResponseBody(t,o,i.toString()),p={url:n,status:t.statusCode,statusText:t.statusMessage,headers:s};r.response=new Response(typeof u=="string"?u:JSON.stringify(u),p)},e.prototype.sendRequest=function(t,r){return Dn.__awaiter(this,void 0,void 0,function(){return Dn.__generator(this,function(n){switch(n.label){case 0:return this.setStatusCode(t,r.request,r.options.method),t.chaosStrategy===Ep.ChaosStrategy.MANUAL&&!this.nextMiddleware||Math.floor(Math.random()*100)<t.chaosPercentage?(this.createResponse(t,r),[3,3]):[3,1];case 1:return this.nextMiddleware?[4,this.nextMiddleware.execute(r)]:[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}})})},e.prototype.getRandomStatusCode=function(t){var r=bp.methodStatusCode[t];return r[Math.floor(Math.random()*r.length)]},e.prototype.getRelativeURL=function(t){var r=/https?:\/\/graph\.microsoft\.com\/[^/]+(.+?)(\?|$)/,n;return r.exec(t)!==null&&(n=r.exec(t)[1]),n},e.prototype.setStatusCode=function(t,r,n){var o=this;if(t.chaosStrategy===Ep.ChaosStrategy.MANUAL){if(t.statusCode===void 0){var i=this.getRelativeURL(r);this.manualMap.get(i)!==void 0?this.manualMap.get(i).get(n)!==void 0&&(t.statusCode=this.manualMap.get(i).get(n)):this.manualMap.forEach(function(s,u){var p=new RegExp(u+"$");p.test(i)&&o.manualMap.get(u).get(n)!==void 0&&(t.statusCode=o.manualMap.get(u).get(n))})}}else t.statusCode=this.getRandomStatusCode(n)},e.prototype.getOptions=function(t){var r;return t.middlewareControl instanceof Vy.MiddlewareControl&&(r=t.middlewareControl.getMiddlewareOptions(Si.ChaosHandlerOptions)),typeof r>"u"&&(r=Object.assign(new Si.ChaosHandlerOptions,this.options)),r},e.prototype.execute=function(t){return Dn.__awaiter(this,void 0,void 0,function(){var r;return Dn.__generator(this,function(n){switch(n.label){case 0:return r=this.getOptions(t),[4,this.sendRequest(r,t)];case 1:return[2,n.sent()]}})})},e.prototype.setNext=function(t){this.nextMiddleware=t},e})();Nn.ChaosHandler=Zy});var xr=b(Mn=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});Mn.ResponseType=void 0;var Ip;(function(e){e.ARRAYBUFFER="arraybuffer",e.BLOB="blob",e.DOCUMENT="document",e.JSON="json",e.RAW="raw",e.STREAM="stream",e.TEXT="text"})(Ip||(Mn.ResponseType=Ip={}))});var wi=b(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.GraphResponseHandler=Bt.DocumentType=void 0;var Un=(ce(),ie(ue)),ht=xr(),$i;(function(e){e.TEXT_HTML="text/html",e.TEXT_XML="text/xml",e.APPLICATION_XML="application/xml",e.APPLICATION_XHTML="application/xhtml+xml"})($i||(Bt.DocumentType=$i={}));var Ln;(function(e){e.TEXT_PLAIN="text/plain",e.APPLICATION_JSON="application/json"})(Ln||(Ln={}));var jn;(function(e){e.DOCUMENT="^(text\\/(html|xml))|(application\\/(xml|xhtml\\+xml))$",e.IMAGE="^image\\/.+"})(jn||(jn={}));var qy=(function(){function e(){}return a(e,"GraphResponseHandler"),e.parseDocumentResponse=function(t,r){return typeof DOMParser<"u"?new Promise(function(n,o){t.text().then(function(i){try{var s=new DOMParser,u=s.parseFromString(i,r);n(u)}catch(p){o(p)}})}):Promise.resolve(t.body)},e.convertResponse=function(t,r){return Un.__awaiter(this,void 0,void 0,function(){var n,o,i,s;return Un.__generator(this,function(u){switch(u.label){case 0:if(t.status===204)return[2,Promise.resolve()];switch(o=t.headers.get("Content-type"),i=r,i){case ht.ResponseType.ARRAYBUFFER:return[3,1];case ht.ResponseType.BLOB:return[3,3];case ht.ResponseType.DOCUMENT:return[3,5];case ht.ResponseType.JSON:return[3,7];case ht.ResponseType.STREAM:return[3,9];case ht.ResponseType.TEXT:return[3,11]}return[3,13];case 1:return[4,t.arrayBuffer()];case 2:return n=u.sent(),[3,24];case 3:return[4,t.blob()];case 4:return n=u.sent(),[3,24];case 5:return[4,e.parseDocumentResponse(t,$i.TEXT_XML)];case 6:return n=u.sent(),[3,24];case 7:return[4,t.json()];case 8:return n=u.sent(),[3,24];case 9:return[4,Promise.resolve(t.body)];case 10:return n=u.sent(),[3,24];case 11:return[4,t.text()];case 12:return n=u.sent(),[3,24];case 13:return o===null?[3,22]:(s=o.split(";")[0],new RegExp(jn.DOCUMENT).test(s)?[4,e.parseDocumentResponse(t,s)]:[3,15]);case 14:return n=u.sent(),[3,21];case 15:return new RegExp(jn.IMAGE).test(s)?(n=t.blob(),[3,21]):[3,16];case 16:return s!==Ln.TEXT_PLAIN?[3,18]:[4,t.text()];case 17:return n=u.sent(),[3,21];case 18:return s!==Ln.APPLICATION_JSON?[3,20]:[4,t.json()];case 19:return n=u.sent(),[3,21];case 20:n=Promise.resolve(t.body),u.label=21;case 21:return[3,23];case 22:n=Promise.resolve(t.body),u.label=23;case 23:return[3,24];case 24:return[2,n]}})})},e.getResponse=function(t,r,n){return Un.__awaiter(this,void 0,void 0,function(){var o;return Un.__generator(this,function(i){switch(i.label){case 0:return r!==ht.ResponseType.RAW?[3,1]:[2,Promise.resolve(t)];case 1:return[4,e.convertResponse(t,r)];case 2:if(o=i.sent(),t.ok)if(typeof n=="function")n(null,o);else return[2,o];else throw o;i.label=3;case 3:return[2]}})})},e})();Bt.GraphResponseHandler=qy});var Oi=b(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.Range=void 0;var Gy=(function(){function e(t,r){t===void 0&&(t=-1),r===void 0&&(r=-1),this.minValue=t,this.maxValue=r}return a(e,"Range"),e})();Fn.Range=Gy});var Ri=b(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.UploadResult=void 0;var Wy=(function(){function e(t,r){this._location=r,this._responseBody=t}return a(e,"UploadResult"),Object.defineProperty(e.prototype,"location",{get:a(function(){return this._location},"get"),set:a(function(t){this._location=t},"set"),enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"responseBody",{get:a(function(){return this._responseBody},"get"),set:a(function(t){this._responseBody=t},"set"),enumerable:!1,configurable:!0}),e.CreateUploadResult=function(t,r){return new e(t,r.get("location"))},e})();Bn.UploadResult=Wy});var Ci=b(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.LargeFileUploadTask=void 0;var Te=(ce(),ie(ue)),zi=Ge(),Ky=wi(),Ap=xr(),Vn=Oi(),Jy=Ri(),Xy=(function(){function e(t,r,n,o){if(o===void 0&&(o={}),this.DEFAULT_FILE_SIZE=5*1024*1024,this.client=t,r.sliceFile)this.file=r;else throw new zi.GraphClientError("Please pass the FileUpload object, StreamUpload object or any custom implementation of the FileObject interface");this.file=r,o.rangeSize||(o.rangeSize=this.DEFAULT_FILE_SIZE),this.options=o,this.uploadSession=n,this.nextRange=new Vn.Range(0,this.options.rangeSize-1)}return a(e,"LargeFileUploadTask"),e.createUploadSession=function(t,r,n,o){return o===void 0&&(o={}),Te.__awaiter(this,void 0,void 0,function(){var i,s;return Te.__generator(this,function(u){switch(u.label){case 0:return[4,t.api(r).headers(o).post(n)];case 1:return i=u.sent(),s={url:i.uploadUrl,expiry:new Date(i.expirationDateTime),isCancelled:!1},[2,s]}})})},e.prototype.parseRange=function(t){var r=t[0];if(typeof r>"u"||r==="")return new Vn.Range;var n=r.split("-"),o=parseInt(n[0],10),i=parseInt(n[1],10);return Number.isNaN(i)&&(i=this.file.size-1),new Vn.Range(o,i)},e.prototype.updateTaskStatus=function(t){this.uploadSession.expiry=new Date(t.expirationDateTime),this.nextRange=this.parseRange(t.nextExpectedRanges)},e.prototype.getNextRange=function(){if(this.nextRange.minValue===-1)return this.nextRange;var t=this.nextRange.minValue,r=t+this.options.rangeSize-1;return r>=this.file.size&&(r=this.file.size-1),new Vn.Range(t,r)},e.prototype.sliceFile=function(t){if(console.warn("The LargeFileUploadTask.sliceFile() function has been deprecated and moved into the FileObject interface."),this.file.content instanceof ArrayBuffer||this.file.content instanceof Blob||this.file.content instanceof Uint8Array)return this.file.content.slice(t.minValue,t.maxValue+1);throw new zi.GraphClientError("The LargeFileUploadTask.sliceFile() function expects only Blob, ArrayBuffer or Uint8Array file content. Please note that the sliceFile() function is deprecated.")},e.prototype.upload=function(){return Te.__awaiter(this,void 0,void 0,function(){var t,r,n,o,i,s,u;return Te.__generator(this,function(p){switch(p.label){case 0:t=this.options&&this.options.uploadEventHandlers,p.label=1;case 1:if(this.uploadSession.isCancelled)return[3,5];if(r=this.getNextRange(),r.maxValue===-1)throw n=new Error("Task with which you are trying to upload is already completed, Please check for your uploaded file"),n.name="Invalid Session",n;return[4,this.file.sliceFile(r)];case 2:return o=p.sent(),[4,this.uploadSliceGetRawResponse(o,r,this.file.size)];case 3:if(i=p.sent(),!i)throw new zi.GraphClientError("Something went wrong! Large file upload slice response is null.");return[4,Ky.GraphResponseHandler.getResponse(i)];case 4:return s=p.sent(),i.status===201||i.status===200&&s.id?(this.reportProgress(t,r),[2,Jy.UploadResult.CreateUploadResult(s,i.headers)]):(u={expirationDateTime:s.expirationDateTime||s.ExpirationDateTime,nextExpectedRanges:s.NextExpectedRanges||s.nextExpectedRanges},this.updateTaskStatus(u),this.reportProgress(t,r),[3,1]);case 5:return[2]}})})},e.prototype.reportProgress=function(t,r){t&&t.progress&&t.progress(r,t.extraCallbackParam)},e.prototype.uploadSlice=function(t,r,n){return Te.__awaiter(this,void 0,void 0,function(){return Te.__generator(this,function(o){switch(o.label){case 0:return[4,this.client.api(this.uploadSession.url).headers({"Content-Length":"".concat(r.maxValue-r.minValue+1),"Content-Range":"bytes ".concat(r.minValue,"-").concat(r.maxValue,"/").concat(n),"Content-Type":"application/octet-stream"}).put(t)];case 1:return[2,o.sent()]}})})},e.prototype.uploadSliceGetRawResponse=function(t,r,n){return Te.__awaiter(this,void 0,void 0,function(){return Te.__generator(this,function(o){switch(o.label){case 0:return[4,this.client.api(this.uploadSession.url).headers({"Content-Length":"".concat(r.maxValue-r.minValue+1),"Content-Range":"bytes ".concat(r.minValue,"-").concat(r.maxValue,"/").concat(n),"Content-Type":"application/octet-stream"}).responseType(Ap.ResponseType.RAW).put(t)];case 1:return[2,o.sent()]}})})},e.prototype.cancel=function(){return Te.__awaiter(this,void 0,void 0,function(){var t;return Te.__generator(this,function(r){switch(r.label){case 0:return[4,this.client.api(this.uploadSession.url).responseType(Ap.ResponseType.RAW).delete()];case 1:return t=r.sent(),t.status===204&&(this.uploadSession.isCancelled=!0),[2,t]}})})},e.prototype.getStatus=function(){return Te.__awaiter(this,void 0,void 0,function(){var t;return Te.__generator(this,function(r){switch(r.label){case 0:return[4,this.client.api(this.uploadSession.url).get()];case 1:return t=r.sent(),this.updateTaskStatus(t),[2,t]}})})},e.prototype.resume=function(){return Te.__awaiter(this,void 0,void 0,function(){return Te.__generator(this,function(t){switch(t.label){case 0:return[4,this.getStatus()];case 1:return t.sent(),[4,this.upload()];case 2:return[2,t.sent()]}})})},e.prototype.getUploadSession=function(){return this.uploadSession},e})();Hn.LargeFileUploadTask=Xy});var ki=b(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.FileUpload=void 0;var Yy=Ge(),Qy=(function(){function e(t,r,n){if(this.content=t,this.name=r,this.size=n,!t||!r||!n)throw new Yy.GraphClientError("Please provide the upload content, name of the file and size of the file")}return a(e,"FileUpload"),e.prototype.sliceFile=function(t){return this.content.slice(t.minValue,t.maxValue+1)},e})();Zn.FileUpload=Qy});var Di=b(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.getValidRangeSize=void 0;var ev=5*1024*1024,tv=a(function(e){return e>320*1024&&(e=Math.floor(e/(320*1024))*320*1024),e},"roundTo320KB"),rv=a(function(e){e===void 0&&(e=ev);var t=60*1024*1024;return e>t&&(e=t),tv(e)},"getValidRangeSize");qn.getValidRangeSize=rv});var $p=b(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.OneDriveLargeFileUploadTask=void 0;var We=(ce(),ie(ue)),Sp=Ge(),nv=ki(),ov=Ci(),iv=Di(),av=(function(e){We.__extends(t,e);function t(r,n,o,i){return e.call(this,r,n,o,i)||this}return a(t,"OneDriveLargeFileUploadTask"),t.constructCreateSessionUrl=function(r,n){return n===void 0&&(n=t.DEFAULT_UPLOAD_PATH),r=r.trim(),n=n.trim(),n===""&&(n="/"),n[0]!=="/"&&(n="/".concat(n)),n[n.length-1]!=="/"&&(n="".concat(n,"/")),"/me/drive/root:".concat(n.split("/").map(function(o){return encodeURIComponent(o)}).join("/")).concat(encodeURIComponent(r),":/createUploadSession")},t.getFileInfo=function(r,n){var o,i;if(typeof Blob<"u"&&r instanceof Blob)o=new File([r],n),i=o.size;else if(typeof File<"u"&&r instanceof File)o=r,i=o.size;else if(typeof Uint8Array<"u"&&r instanceof Uint8Array){var s=r;i=s.byteLength,o=s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength)}return{content:o,size:i}},t.create=function(r,n,o){return We.__awaiter(this,void 0,void 0,function(){var i,s,u;return We.__generator(this,function(p){if(!r||!n||!o)throw new Sp.GraphClientError("Please provide the Graph client instance, file object and OneDriveLargeFileUploadOptions value");return i=o.fileName,s=t.getFileInfo(n,i),u=new nv.FileUpload(s.content,i,s.size),[2,this.createTaskWithFileObject(r,u,o)]})})},t.createTaskWithFileObject=function(r,n,o){return We.__awaiter(this,void 0,void 0,function(){var i,s,u,p;return We.__generator(this,function(d){switch(d.label){case 0:if(!r||!n||!o)throw new Sp.GraphClientError("Please provide the Graph client instance, FileObject interface implementation and OneDriveLargeFileUploadOptions value");return i=o.uploadSessionURL?o.uploadSessionURL:t.constructCreateSessionUrl(o.fileName,o.path),s={fileName:o.fileName,fileDescription:o.fileDescription,conflictBehavior:o.conflictBehavior},[4,t.createUploadSession(r,i,s)];case 1:return u=d.sent(),p=(0,iv.getValidRangeSize)(o.rangeSize),[2,new t(r,n,u,{rangeSize:p,uploadEventHandlers:o.uploadEventHandlers})]}})})},t.createUploadSession=function(r,n,o){return We.__awaiter(this,void 0,void 0,function(){var i;return We.__generator(this,function(s){return i={item:{"@microsoft.graph.conflictBehavior":o?.conflictBehavior||"rename",name:o?.fileName,description:o?.fileDescription}},[2,e.createUploadSession.call(this,r,n,i)]})})},t.prototype.commit=function(r,n){return n===void 0&&(n="rename"),We.__awaiter(this,void 0,void 0,function(){var o;return We.__generator(this,function(i){switch(i.label){case 0:return o={name:this.file.name,"@microsoft.graph.conflictBehavior":n,"@microsoft.graph.sourceUrl":this.uploadSession.url},[4,this.client.api(r).put(o)];case 1:return[2,i.sent()]}})})},t.DEFAULT_UPLOAD_PATH="/",t})(ov.LargeFileUploadTask);Gn.OneDriveLargeFileUploadTask=av});var Op=b(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.StreamUpload=void 0;var wp=(ce(),ie(ue)),br=Ge(),sv=(function(){function e(t,r,n){if(this.content=t,this.name=r,this.size=n,!t||!r||!n)throw new br.GraphClientError("Please provide the Readable Stream content, name of the file and size of the file")}return a(e,"StreamUpload"),e.prototype.sliceFile=function(t){return wp.__awaiter(this,void 0,void 0,function(){var r,n,o,i,s,u,p;return wp.__generator(this,function(d){switch(d.label){case 0:if(r=t.maxValue-t.minValue+1,n=[],this.previousSlice){if(t.minValue<this.previousSlice.range.minValue)throw new br.GraphClientError("An error occurred while uploading the stream. Please restart the stream upload from the first byte of the file.");if(t.minValue<this.previousSlice.range.maxValue){if(o=this.previousSlice.range.minValue,i=this.previousSlice.range.maxValue,t.minValue===o&&t.maxValue===i)return[2,this.previousSlice.fileSlice];if(t.maxValue===i)return[2,this.previousSlice.fileSlice.slice(t.minValue,t.maxValue+1)];n.push(this.previousSlice.fileSlice.slice(t.minValue,i+1)),r=t.maxValue-i}}return this.content&&this.content.readable?this.content.readableLength>=r?(n.push(this.content.read(r)),[3,3]):[3,1]:[3,4];case 1:return u=(s=n).push,[4,this.readNBytesFromStream(r)];case 2:u.apply(s,[d.sent()]),d.label=3;case 3:return[3,5];case 4:throw new br.GraphClientError("Stream is not readable.");case 5:return p=Buffer.concat(n),this.previousSlice={fileSlice:p,range:t},[2,p]}})})},e.prototype.readNBytesFromStream=function(t){var r=this;return new Promise(function(n,o){var i=[],s=t,u=0;r.content.on("end",function(){if(s>0)return o(new br.GraphClientError("Stream ended before reading required range size"))}),r.content.on("readable",function(){for(var p;u<t&&(p=r.content.read(s))!==null;)u+=p.length,i.push(p),s>0&&(s=t-u);if(u===t)return n(Buffer.concat(i));if(!r.content||!r.content.readable)return o(new br.GraphClientError("Error encountered while reading the stream during the upload"))})})},e})();Wn.StreamUpload=sv});var Rp=b(Kn=>{"use strict";Object.defineProperty(Kn,"__esModule",{value:!0});Kn.PageIterator=void 0;var Vt=(ce(),ie(ue)),uv=(function(){function e(t,r,n,o){this.client=t,this.collection=r.value,this.nextLink=r["@odata.nextLink"],this.deltaLink=r["@odata.deltaLink"],this.callback=n,this.cursor=0,this.complete=!1,this.requestOptions=o}return a(e,"PageIterator"),e.prototype.iterationHelper=function(){if(this.collection===void 0)return!1;for(var t=!0;t&&this.cursor<this.collection.length;){var r=this.collection[this.cursor];t=this.callback(r),this.cursor++}return t},e.prototype.fetchAndUpdateNextPageData=function(){return Vt.__awaiter(this,void 0,void 0,function(){var t,r;return Vt.__generator(this,function(n){switch(n.label){case 0:return t=this.client.api(this.nextLink),this.requestOptions&&(this.requestOptions.headers&&(t=t.headers(this.requestOptions.headers)),this.requestOptions.middlewareOptions&&(t=t.middlewareOptions(this.requestOptions.middlewareOptions)),this.requestOptions.options&&(t=t.options(this.requestOptions.options))),[4,t.get()];case 1:return r=n.sent(),this.collection=r.value,this.cursor=0,this.nextLink=r["@odata.nextLink"],this.deltaLink=r["@odata.deltaLink"],[2]}})})},e.prototype.getDeltaLink=function(){return this.deltaLink},e.prototype.iterate=function(){return Vt.__awaiter(this,void 0,void 0,function(){var t;return Vt.__generator(this,function(r){switch(r.label){case 0:t=this.iterationHelper(),r.label=1;case 1:return t?this.nextLink===void 0?[3,3]:[4,this.fetchAndUpdateNextPageData()]:[3,5];case 2:return r.sent(),t=this.iterationHelper(),[3,4];case 3:t=!1,r.label=4;case 4:return[3,1];case 5:return this.nextLink===void 0&&this.cursor>=this.collection.length&&(this.complete=!0),[2]}})})},e.prototype.resume=function(){return Vt.__awaiter(this,void 0,void 0,function(){return Vt.__generator(this,function(t){return[2,this.iterate()]})})},e.prototype.isComplete=function(){return this.complete},e})();Kn.PageIterator=uv});var Ni=b(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.CustomAuthenticationProvider=void 0;var Jn=(ce(),ie(ue)),zp=Ge(),cv=(function(){function e(t){this.provider=t}return a(e,"CustomAuthenticationProvider"),e.prototype.getAccessToken=function(){return Jn.__awaiter(this,void 0,void 0,function(){var t=this;return Jn.__generator(this,function(r){return[2,new Promise(function(n,o){t.provider(function(i,s){return Jn.__awaiter(t,void 0,void 0,function(){var u,p;return Jn.__generator(this,function(d){switch(d.label){case 0:return s?(n(s),[3,3]):[3,1];case 1:return i||(u="Access token is undefined or empty. Please provide a valid token. For more help - https://github.com/microsoftgraph/msgraph-sdk-javascript/blob/dev/docs/CustomAuthenticationProvider.md",i=new zp.GraphClientError(u)),[4,zp.GraphClientError.setGraphClientError(i)];case 2:p=d.sent(),o(p),d.label=3;case 3:return[2]}})})})})]})})},e})();Xn.CustomAuthenticationProvider=cv});var Mi=b(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.GraphError=void 0;var lv=(ce(),ie(ue)),pv=(function(e){lv.__extends(t,e);function t(r,n,o){r===void 0&&(r=-1);var i=e.call(this,n||o&&o.message)||this;return Object.setPrototypeOf(i,t.prototype),i.statusCode=r,i.code=null,i.requestId=null,i.date=new Date,i.body=null,i.stack=o?o.stack:i.stack,i}return a(t,"GraphError"),t})(Error);Yn.GraphError=pv});var kp=b(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.GraphErrorHandler=void 0;var Cp=(ce(),ie(ue)),Ui=Mi(),dv=(function(){function e(){}return a(e,"GraphErrorHandler"),e.constructError=function(t,r,n){var o=new Ui.GraphError(r,"",t);return t.name!==void 0&&(o.code=t.name),o.body=t.toString(),o.date=new Date,o.headers=n?.headers,o},e.constructErrorFromResponse=function(t,r,n){var o=t.error,i=new Ui.GraphError(r,o.message);return i.code=o.code,o.innerError!==void 0&&(i.requestId=o.innerError["request-id"],i.date=new Date(o.innerError.date)),i.body=JSON.stringify(o),i.headers=n?.headers,i},e.getError=function(t,r,n,o){return t===void 0&&(t=null),r===void 0&&(r=-1),Cp.__awaiter(this,void 0,void 0,function(){var i;return Cp.__generator(this,function(s){if(t&&t.error?i=e.constructErrorFromResponse(t,r,o):t instanceof Error?i=e.constructError(t,r,o):(i=new Ui.GraphError(r),i.body=t),typeof n=="function")n(i,null);else return[2,i];return[2]})})},e})();Qn.GraphErrorHandler=dv});var Li=b(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});eo.GraphRequest=void 0;var re=(ce(),ie(ue)),mv=Ge(),fv=kp(),Er=fn(),gv=wi(),hv=at(),yt=vr(),yv=xr(),vv=(function(){function e(t,r,n){var o=this;this.parsePath=function(i){if(i.indexOf("https://")!==-1){i=i.replace("https://","");var s=i.indexOf("/");s!==-1&&(o.urlComponents.host="https://"+i.substring(0,s),i=i.substring(s+1,i.length));var u=i.indexOf("/");u!==-1&&(o.urlComponents.version=i.substring(0,u),i=i.substring(u+1,i.length))}i.charAt(0)==="/"&&(i=i.substr(1));var p=i.indexOf("?");if(p===-1)o.urlComponents.path=i;else{o.urlComponents.path=i.substr(0,p);for(var d=i.substring(p+1,i.length).split("&"),m=0,y=d;m<y.length;m++){var v=y[m];o.parseQueryParameter(v)}}},this.httpClient=t,this.config=r,this.urlComponents={host:this.config.baseUrl,version:this.config.defaultVersion,oDataQueryParams:{},otherURLQueryParams:{},otherURLQueryOptions:[]},this._headers={},this._options={},this._middlewareOptions=[],this.parsePath(n)}return a(e,"GraphRequest"),e.prototype.addCsvQueryParameter=function(t,r,n){this.urlComponents.oDataQueryParams[t]=this.urlComponents.oDataQueryParams[t]?this.urlComponents.oDataQueryParams[t]+",":"";var o=[];n.length>1&&typeof r=="string"?o=Array.prototype.slice.call(n):typeof r=="string"?o.push(r):o=o.concat(r),this.urlComponents.oDataQueryParams[t]+=o.join(",")},e.prototype.buildFullUrl=function(){var t=(0,Er.urlJoin)([this.urlComponents.host,this.urlComponents.version,this.urlComponents.path])+this.createQueryString();return this.config.debugLogging&&console.log(t),t},e.prototype.createQueryString=function(){var t=this.urlComponents,r=[];if(Object.keys(t.oDataQueryParams).length!==0)for(var n in t.oDataQueryParams)Object.prototype.hasOwnProperty.call(t.oDataQueryParams,n)&&r.push(n+"="+t.oDataQueryParams[n]);if(Object.keys(t.otherURLQueryParams).length!==0)for(var n in t.otherURLQueryParams)Object.prototype.hasOwnProperty.call(t.otherURLQueryParams,n)&&r.push(n+"="+t.otherURLQueryParams[n]);if(t.otherURLQueryOptions.length!==0)for(var o=0,i=t.otherURLQueryOptions;o<i.length;o++){var s=i[o];r.push(s)}return r.length>0?"?"+r.join("&"):""},e.prototype.parseQueryParameter=function(t){if(typeof t=="string")if(t.charAt(0)==="?"&&(t=t.substring(1)),t.indexOf("&")!==-1)for(var r=t.split("&"),n=0,o=r;n<o.length;n++){var i=o[n];this.parseQueryParamenterString(i)}else this.parseQueryParamenterString(t);else if(t.constructor===Object)for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&this.setURLComponentsQueryParamater(s,t[s]);return this},e.prototype.parseQueryParamenterString=function(t){if(this.isValidQueryKeyValuePair(t)){var r=t.indexOf("="),n=t.substring(0,r),o=t.substring(r+1);this.setURLComponentsQueryParamater(n,o)}else this.urlComponents.otherURLQueryOptions.push(t)},e.prototype.setURLComponentsQueryParamater=function(t,r){if(Er.oDataQueryNames.indexOf(t)!==-1){var n=this.urlComponents.oDataQueryParams[t],o=n&&(t==="$expand"||t==="$select"||t==="$orderby");this.urlComponents.oDataQueryParams[t]=o?n+","+r:r}else this.urlComponents.otherURLQueryParams[t]=r},e.prototype.isValidQueryKeyValuePair=function(t){var r=t.indexOf("=");if(r===-1)return!1;var n=t.indexOf("(");return!(n!==-1&&t.indexOf("(")<r)},e.prototype.updateRequestOptions=function(t){var r=re.__assign({},t.headers);if(this.config.fetchOptions!==void 0){var n=re.__assign({},this.config.fetchOptions);Object.assign(t,n),typeof this.config.fetchOptions.headers!==void 0&&(t.headers=re.__assign({},this.config.fetchOptions.headers))}Object.assign(t,this._options),t.headers!==void 0&&Object.assign(r,t.headers),Object.assign(r,this._headers),t.headers=r},e.prototype.send=function(t,r,n){var o;return re.__awaiter(this,void 0,void 0,function(){var i,s,u,p,d,m,y,v;return re.__generator(this,function(l){switch(l.label){case 0:s=new hv.MiddlewareControl(this._middlewareOptions),this.updateRequestOptions(r),u=(o=this.config)===null||o===void 0?void 0:o.customHosts,l.label=1;case 1:return l.trys.push([1,4,,6]),[4,this.httpClient.sendRequest({request:t,options:r,middlewareControl:s,customHosts:u})];case 2:return p=l.sent(),i=p.response,[4,gv.GraphResponseHandler.getResponse(i,this._responseType,n)];case 3:return d=l.sent(),[2,d];case 4:if(m=l.sent(),m instanceof mv.GraphClientError)throw m;return y=void 0,i&&(y=i.status),[4,fv.GraphErrorHandler.getError(m,y,n,i)];case 5:throw v=l.sent(),v;case 6:return[2]}})})},e.prototype.setHeaderContentType=function(){if(!this._headers){this.header("Content-Type","application/json");return}for(var t=Object.keys(this._headers),r=0,n=t;r<n.length;r++){var o=n[r];if(o.toLowerCase()==="content-type")return}this.header("Content-Type","application/json")},e.prototype.header=function(t,r){return this._headers[t]=r,this},e.prototype.headers=function(t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this._headers[r]=t[r]);return this},e.prototype.option=function(t,r){return this._options[t]=r,this},e.prototype.options=function(t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this._options[r]=t[r]);return this},e.prototype.middlewareOptions=function(t){return this._middlewareOptions=t,this},e.prototype.version=function(t){return this.urlComponents.version=t,this},e.prototype.responseType=function(t){return this._responseType=t,this},e.prototype.select=function(t){return this.addCsvQueryParameter("$select",t,arguments),this},e.prototype.expand=function(t){return this.addCsvQueryParameter("$expand",t,arguments),this},e.prototype.orderby=function(t){return this.addCsvQueryParameter("$orderby",t,arguments),this},e.prototype.filter=function(t){return this.urlComponents.oDataQueryParams.$filter=t,this},e.prototype.search=function(t){return this.urlComponents.oDataQueryParams.$search=t,this},e.prototype.top=function(t){return this.urlComponents.oDataQueryParams.$top=t,this},e.prototype.skip=function(t){return this.urlComponents.oDataQueryParams.$skip=t,this},e.prototype.skipToken=function(t){return this.urlComponents.oDataQueryParams.$skipToken=t,this},e.prototype.count=function(t){return t===void 0&&(t=!0),this.urlComponents.oDataQueryParams.$count=t.toString(),this},e.prototype.query=function(t){return this.parseQueryParameter(t)},e.prototype.get=function(t){return re.__awaiter(this,void 0,void 0,function(){var r,n,o;return re.__generator(this,function(i){switch(i.label){case 0:return r=this.buildFullUrl(),n={method:yt.RequestMethod.GET},[4,this.send(r,n,t)];case 1:return o=i.sent(),[2,o]}})})},e.prototype.post=function(t,r){return re.__awaiter(this,void 0,void 0,function(){var n,o,i;return re.__generator(this,function(s){switch(s.label){case 0:return n=this.buildFullUrl(),o={method:yt.RequestMethod.POST,body:(0,Er.serializeContent)(t)},i=t&&t.constructor&&t.constructor.name,i==="FormData"?o.headers={}:(this.setHeaderContentType(),o.headers=this._headers),[4,this.send(n,o,r)];case 1:return[2,s.sent()]}})})},e.prototype.create=function(t,r){return re.__awaiter(this,void 0,void 0,function(){return re.__generator(this,function(n){switch(n.label){case 0:return[4,this.post(t,r)];case 1:return[2,n.sent()]}})})},e.prototype.put=function(t,r){return re.__awaiter(this,void 0,void 0,function(){var n,o;return re.__generator(this,function(i){switch(i.label){case 0:return n=this.buildFullUrl(),this.setHeaderContentType(),o={method:yt.RequestMethod.PUT,body:(0,Er.serializeContent)(t)},[4,this.send(n,o,r)];case 1:return[2,i.sent()]}})})},e.prototype.patch=function(t,r){return re.__awaiter(this,void 0,void 0,function(){var n,o;return re.__generator(this,function(i){switch(i.label){case 0:return n=this.buildFullUrl(),this.setHeaderContentType(),o={method:yt.RequestMethod.PATCH,body:(0,Er.serializeContent)(t)},[4,this.send(n,o,r)];case 1:return[2,i.sent()]}})})},e.prototype.update=function(t,r){return re.__awaiter(this,void 0,void 0,function(){return re.__generator(this,function(n){switch(n.label){case 0:return[4,this.patch(t,r)];case 1:return[2,n.sent()]}})})},e.prototype.delete=function(t){return re.__awaiter(this,void 0,void 0,function(){var r,n;return re.__generator(this,function(o){switch(o.label){case 0:return r=this.buildFullUrl(),n={method:yt.RequestMethod.DELETE},[4,this.send(r,n,t)];case 1:return[2,o.sent()]}})})},e.prototype.del=function(t){return re.__awaiter(this,void 0,void 0,function(){return re.__generator(this,function(r){switch(r.label){case 0:return[4,this.delete(t)];case 1:return[2,r.sent()]}})})},e.prototype.getStream=function(t){return re.__awaiter(this,void 0,void 0,function(){var r,n;return re.__generator(this,function(o){switch(o.label){case 0:return r=this.buildFullUrl(),n={method:yt.RequestMethod.GET},this.responseType(yv.ResponseType.STREAM),[4,this.send(r,n,t)];case 1:return[2,o.sent()]}})})},e.prototype.putStream=function(t,r){return re.__awaiter(this,void 0,void 0,function(){var n,o;return re.__generator(this,function(i){switch(i.label){case 0:return n=this.buildFullUrl(),o={method:yt.RequestMethod.PUT,headers:{"Content-Type":"application/octet-stream"},body:t},[4,this.send(n,o,r)];case 1:return[2,i.sent()]}})})},e})();eo.GraphRequest=vv});var ji=b(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});to.HTTPClient=void 0;var Dp=(ce(),ie(ue)),_v=(function(){function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(!t||!t.length){var n=new Error;throw n.name="InvalidMiddlewareChain",n.message="Please provide a default middleware chain or custom middleware chain",n}this.setMiddleware.apply(this,t)}return a(e,"HTTPClient"),e.prototype.setMiddleware=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];t.length>1?this.parseMiddleWareArray(t):this.middleware=t[0]},e.prototype.parseMiddleWareArray=function(t){t.forEach(function(r,n){n<t.length-1&&r.setNext(t[n+1])}),this.middleware=t[0]},e.prototype.sendRequest=function(t){return Dp.__awaiter(this,void 0,void 0,function(){var r;return Dp.__generator(this,function(n){switch(n.label){case 0:if(typeof t.request=="string"&&t.options===void 0)throw r=new Error,r.name="InvalidRequestOptions",r.message="Unable to execute the middleware, Please provide valid options for a request",r;return[4,this.middleware.execute(t)];case 1:return n.sent(),[2,t]}})})},e})();to.HTTPClient=_v});var Mp=b(ro=>{"use strict";Object.defineProperty(ro,"__esModule",{value:!0});ro.HTTPClientFactory=void 0;var Pv=(ce(),ie(ue)),Np=ji(),xv=vn(),bv=Pn(),Ev=Pr(),Tv=_r(),Iv=An(),Av=En(),Sv=On(),$v=a(function(){return typeof process=="object"&&typeof require=="function"},"isNodeEnvironment"),wv=(function(){function e(){}return a(e,"HTTPClientFactory"),e.createWithAuthenticationProvider=function(t){var r=new xv.AuthenticationHandler(t),n=new Av.RetryHandler(new Tv.RetryHandlerOptions),o=new Sv.TelemetryHandler,i=new bv.HTTPMessageHandler;if(r.setNext(n),$v()){var s=new Iv.RedirectHandler(new Ev.RedirectHandlerOptions);n.setNext(s),s.setNext(o)}else n.setNext(o);return o.setNext(i),e.createWithMiddleware(r)},e.createWithMiddleware=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new(Np.HTTPClient.bind.apply(Np.HTTPClient,Pv.__spreadArray([void 0],t,!1)))},e})();ro.HTTPClientFactory=wv});var Up=b(no=>{"use strict";Object.defineProperty(no,"__esModule",{value:!0});no.validatePolyFilling=void 0;var Ov=a(function(){if(typeof Promise>"u"&&typeof fetch>"u"){var e=new Error("Library cannot function without Promise and fetch. So, please provide polyfill for them.");throw e.name="PolyFillNotAvailable",e}else if(typeof Promise>"u"){var e=new Error("Library cannot function without Promise. So, please provide polyfill for it.");throw e.name="PolyFillNotAvailable",e}else if(typeof fetch>"u"){var e=new Error("Library cannot function without fetch. So, please provide polyfill for it.");throw e.name="PolyFillNotAvailable",e}return!0},"validatePolyFilling");no.validatePolyFilling=Ov});var Fp=b(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.Client=void 0;var Rv=(ce(),ie(ue)),Lp=xi(),zv=Ni(),Cv=Li(),jp=ji(),kv=Mp(),Dv=Up(),Nv=(function(){function e(t){this.config={baseUrl:Lp.GRAPH_BASE_URL,debugLogging:!1,defaultVersion:Lp.GRAPH_API_VERSION},(0,Dv.validatePolyFilling)();for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this.config[r]=t[r]);var n;if(t.authProvider!==void 0&&t.middleware!==void 0){var o=new Error;throw o.name="AmbiguityInInitialization",o.message="Unable to Create Client, Please provide either authentication provider for default middleware chain or custom middleware chain not both",o}else if(t.authProvider!==void 0)n=kv.HTTPClientFactory.createWithAuthenticationProvider(t.authProvider);else if(t.middleware!==void 0)n=new(jp.HTTPClient.bind.apply(jp.HTTPClient,Rv.__spreadArray([void 0],[].concat(t.middleware),!1)));else{var o=new Error;throw o.name="InvalidMiddlewareChain",o.message="Unable to Create Client, Please provide either authentication provider for default middleware chain or custom middleware chain",o}this.httpClient=n}return a(e,"Client"),e.init=function(t){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=n==="authProvider"?new zv.CustomAuthenticationProvider(t[n]):t[n]);return e.initWithMiddleware(r)},e.initWithMiddleware=function(t){return new e(t)},e.prototype.api=function(t){return new Cv.GraphRequest(this.httpClient,this.config,t)},e})();oo.Client=Nv});var Vp=b(w=>{"use strict";Object.defineProperty(w,"__esModule",{value:!0});w.ResponseType=w.GraphRequest=w.GraphClientError=w.GraphError=w.CustomAuthenticationProvider=w.Client=w.PageIterator=w.Range=w.UploadResult=w.FileUpload=w.StreamUpload=w.getValidRangeSize=w.OneDriveLargeFileUploadTask=w.LargeFileUploadTask=w.ChaosHandler=w.ChaosStrategy=w.ChaosHandlerOptions=w.TelemetryHandlerOptions=w.FeatureUsageFlag=w.RedirectHandlerOptions=w.RetryHandlerOptions=w.AuthenticationHandlerOptions=w.MiddlewareFactory=w.TelemetryHandler=w.RedirectHandler=w.RetryHandler=w.HTTPMessageHandler=w.AuthenticationHandler=w.BatchResponseContent=w.BatchRequestContent=void 0;var Mv=np();Object.defineProperty(w,"BatchRequestContent",{enumerable:!0,get:a(function(){return Mv.BatchRequestContent},"get")});var Uv=op();Object.defineProperty(w,"BatchResponseContent",{enumerable:!0,get:a(function(){return Uv.BatchResponseContent},"get")});var Lv=vn();Object.defineProperty(w,"AuthenticationHandler",{enumerable:!0,get:a(function(){return Lv.AuthenticationHandler},"get")});var jv=Pn();Object.defineProperty(w,"HTTPMessageHandler",{enumerable:!0,get:a(function(){return jv.HTTPMessageHandler},"get")});var Fv=En();Object.defineProperty(w,"RetryHandler",{enumerable:!0,get:a(function(){return Fv.RetryHandler},"get")});var Bv=An();Object.defineProperty(w,"RedirectHandler",{enumerable:!0,get:a(function(){return Bv.RedirectHandler},"get")});var Vv=On();Object.defineProperty(w,"TelemetryHandler",{enumerable:!0,get:a(function(){return Vv.TelemetryHandler},"get")});var Hv=_p();Object.defineProperty(w,"MiddlewareFactory",{enumerable:!0,get:a(function(){return Hv.MiddlewareFactory},"get")});var Zv=bi();Object.defineProperty(w,"AuthenticationHandlerOptions",{enumerable:!0,get:a(function(){return Zv.AuthenticationHandlerOptions},"get")});var qv=_r();Object.defineProperty(w,"RetryHandlerOptions",{enumerable:!0,get:a(function(){return qv.RetryHandlerOptions},"get")});var Gv=Pr();Object.defineProperty(w,"RedirectHandlerOptions",{enumerable:!0,get:a(function(){return Gv.RedirectHandlerOptions},"get")});var Bp=Ut();Object.defineProperty(w,"FeatureUsageFlag",{enumerable:!0,get:a(function(){return Bp.FeatureUsageFlag},"get")});Object.defineProperty(w,"TelemetryHandlerOptions",{enumerable:!0,get:a(function(){return Bp.TelemetryHandlerOptions},"get")});var Wv=Ai();Object.defineProperty(w,"ChaosHandlerOptions",{enumerable:!0,get:a(function(){return Wv.ChaosHandlerOptions},"get")});var Kv=Cn();Object.defineProperty(w,"ChaosStrategy",{enumerable:!0,get:a(function(){return Kv.ChaosStrategy},"get")});var Jv=Tp();Object.defineProperty(w,"ChaosHandler",{enumerable:!0,get:a(function(){return Jv.ChaosHandler},"get")});var Xv=Ci();Object.defineProperty(w,"LargeFileUploadTask",{enumerable:!0,get:a(function(){return Xv.LargeFileUploadTask},"get")});var Yv=$p();Object.defineProperty(w,"OneDriveLargeFileUploadTask",{enumerable:!0,get:a(function(){return Yv.OneDriveLargeFileUploadTask},"get")});var Qv=Di();Object.defineProperty(w,"getValidRangeSize",{enumerable:!0,get:a(function(){return Qv.getValidRangeSize},"get")});var e_=Op();Object.defineProperty(w,"StreamUpload",{enumerable:!0,get:a(function(){return e_.StreamUpload},"get")});var t_=ki();Object.defineProperty(w,"FileUpload",{enumerable:!0,get:a(function(){return t_.FileUpload},"get")});var r_=Ri();Object.defineProperty(w,"UploadResult",{enumerable:!0,get:a(function(){return r_.UploadResult},"get")});var n_=Oi();Object.defineProperty(w,"Range",{enumerable:!0,get:a(function(){return n_.Range},"get")});var o_=Rp();Object.defineProperty(w,"PageIterator",{enumerable:!0,get:a(function(){return o_.PageIterator},"get")});var i_=Fp();Object.defineProperty(w,"Client",{enumerable:!0,get:a(function(){return i_.Client},"get")});var a_=Ni();Object.defineProperty(w,"CustomAuthenticationProvider",{enumerable:!0,get:a(function(){return a_.CustomAuthenticationProvider},"get")});var s_=Mi();Object.defineProperty(w,"GraphError",{enumerable:!0,get:a(function(){return s_.GraphError},"get")});var u_=Ge();Object.defineProperty(w,"GraphClientError",{enumerable:!0,get:a(function(){return u_.GraphClientError},"get")});var c_=Li();Object.defineProperty(w,"GraphRequest",{enumerable:!0,get:a(function(){return c_.GraphRequest},"get")});var l_=xr();Object.defineProperty(w,"ResponseType",{enumerable:!0,get:a(function(){return l_.ResponseType},"get")})});var Tr=b((Fi,Bi)=>{(function(e,t){typeof Fi=="object"&&typeof Bi<"u"?Bi.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(Fi,(function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",i="minute",s="hour",u="day",p="week",d="month",m="quarter",y="year",v="date",l="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,_=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,h={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:a(function(j){var A=["th","st","nd","rd"],I=j%100;return"["+j+(A[(I-20)%10]||A[I]||A[0])+"]"},"ordinal")},x=a(function(j,A,I){var R=String(j);return!R||R.length>=A?j:""+Array(A+1-R.length).join(I)+j},"m"),E={s:x,z:a(function(j){var A=-j.utcOffset(),I=Math.abs(A),R=Math.floor(I/60),S=I%60;return(A<=0?"+":"-")+x(R,2,"0")+":"+x(S,2,"0")},"z"),m:a(function j(A,I){if(A.date()<I.date())return-j(I,A);var R=12*(I.year()-A.year())+(I.month()-A.month()),S=A.clone().add(R,d),H=I-S<0,Z=A.clone().add(R+(H?-1:1),d);return+(-(R+(I-S)/(H?S-Z:Z-S))||0)},"t"),a:a(function(j){return j<0?Math.ceil(j)||0:Math.floor(j)},"a"),p:a(function(j){return{M:d,y,w:p,d:u,D:v,h:s,m:i,s:o,ms:n,Q:m}[j]||String(j||"").toLowerCase().replace(/s$/,"")},"p"),u:a(function(j){return j===void 0},"u")},V="en",me={};me[V]=h;var Pe=a(function(j){return j instanceof vt},"p"),ke=a(function j(A,I,R){var S;if(!A)return V;if(typeof A=="string"){var H=A.toLowerCase();me[H]&&(S=H),I&&(me[H]=I,S=H);var Z=A.split("-");if(!S&&Z.length>1)return j(Z[0])}else{var te=A.name;me[te]=A,S=te}return!R&&S&&(V=S),S||!R&&V},"t"),ee=a(function(j,A){if(Pe(j))return j.clone();var I=typeof A=="object"?A:{};return I.date=j,I.args=arguments,new vt(I)},"w"),G=E;G.l=ke,G.i=Pe,G.w=function(j,A){return ee(j,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var vt=(function(){function j(I){this.$L=ke(I.locale,null,!0),this.parse(I)}a(j,"M");var A=j.prototype;return A.parse=function(I){this.$d=(function(R){var S=R.date,H=R.utc;if(S===null)return new Date(NaN);if(G.u(S))return new Date;if(S instanceof Date)return new Date(S);if(typeof S=="string"&&!/Z$/i.test(S)){var Z=S.match(f);if(Z){var te=Z[2]-1||0,fe=(Z[7]||"0").substring(0,3);return H?new Date(Date.UTC(Z[1],te,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,fe)):new Date(Z[1],te,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,fe)}}return new Date(S)})(I),this.$x=I.x||{},this.init()},A.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},A.$utils=function(){return G},A.isValid=function(){return this.$d.toString()!==l},A.isSame=function(I,R){var S=ee(I);return this.startOf(R)<=S&&S<=this.endOf(R)},A.isAfter=function(I,R){return ee(I)<this.startOf(R)},A.isBefore=function(I,R){return this.endOf(R)<ee(I)},A.$g=function(I,R,S){return G.u(I)?this[R]:this.set(S,I)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(I,R){var S=this,H=!!G.u(R)||R,Z=G.p(I),te=a(function(pt,be){var Ke=G.w(S.$u?Date.UTC(S.$y,be,pt):new Date(S.$y,be,pt),S);return H?Ke:Ke.endOf(u)},"l"),fe=a(function(pt,be){return G.w(S.toDate()[pt].apply(S.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(be)),S)},"$"),ye=this.$W,_e=this.$M,Se=this.$D,_t="set"+(this.$u?"UTC":"");switch(Z){case y:return H?te(1,0):te(31,11);case d:return H?te(1,_e):te(0,_e+1);case p:var lt=this.$locale().weekStart||0,Ht=(ye<lt?ye+7:ye)-lt;return te(H?Se-Ht:Se+(6-Ht),_e);case u:case v:return fe(_t+"Hours",0);case s:return fe(_t+"Minutes",1);case i:return fe(_t+"Seconds",2);case o:return fe(_t+"Milliseconds",3);default:return this.clone()}},A.endOf=function(I){return this.startOf(I,!1)},A.$set=function(I,R){var S,H=G.p(I),Z="set"+(this.$u?"UTC":""),te=(S={},S[u]=Z+"Date",S[v]=Z+"Date",S[d]=Z+"Month",S[y]=Z+"FullYear",S[s]=Z+"Hours",S[i]=Z+"Minutes",S[o]=Z+"Seconds",S[n]=Z+"Milliseconds",S)[H],fe=H===u?this.$D+(R-this.$W):R;if(H===d||H===y){var ye=this.clone().set(v,1);ye.$d[te](fe),ye.init(),this.$d=ye.set(v,Math.min(this.$D,ye.daysInMonth())).$d}else te&&this.$d[te](fe);return this.init(),this},A.set=function(I,R){return this.clone().$set(I,R)},A.get=function(I){return this[G.p(I)]()},A.add=function(I,R){var S,H=this;I=Number(I);var Z=G.p(R),te=a(function(_e){var Se=ee(H);return G.w(Se.date(Se.date()+Math.round(_e*I)),H)},"y");if(Z===d)return this.set(d,this.$M+I);if(Z===y)return this.set(y,this.$y+I);if(Z===u)return te(1);if(Z===p)return te(7);var fe=(S={},S[i]=t,S[s]=r,S[o]=e,S)[Z]||1,ye=this.$d.getTime()+I*fe;return G.w(ye,this)},A.subtract=function(I,R){return this.add(-1*I,R)},A.format=function(I){var R=this,S=this.$locale();if(!this.isValid())return S.invalidDate||l;var H=I||"YYYY-MM-DDTHH:mm:ssZ",Z=G.z(this),te=this.$H,fe=this.$m,ye=this.$M,_e=S.weekdays,Se=S.months,_t=S.meridiem,lt=a(function(be,Ke,Zt,Ir){return be&&(be[Ke]||be(R,H))||Zt[Ke].slice(0,Ir)},"h"),Ht=a(function(be){return G.s(te%12||12,be,"0")},"d"),pt=_t||function(be,Ke,Zt){var Ir=be<12?"AM":"PM";return Zt?Ir.toLowerCase():Ir};return H.replace(_,(function(be,Ke){return Ke||(function(Zt){switch(Zt){case"YY":return String(R.$y).slice(-2);case"YYYY":return G.s(R.$y,4,"0");case"M":return ye+1;case"MM":return G.s(ye+1,2,"0");case"MMM":return lt(S.monthsShort,ye,Se,3);case"MMMM":return lt(Se,ye);case"D":return R.$D;case"DD":return G.s(R.$D,2,"0");case"d":return String(R.$W);case"dd":return lt(S.weekdaysMin,R.$W,_e,2);case"ddd":return lt(S.weekdaysShort,R.$W,_e,3);case"dddd":return _e[R.$W];case"H":return String(te);case"HH":return G.s(te,2,"0");case"h":return Ht(1);case"hh":return Ht(2);case"a":return pt(te,fe,!0);case"A":return pt(te,fe,!1);case"m":return String(fe);case"mm":return G.s(fe,2,"0");case"s":return String(R.$s);case"ss":return G.s(R.$s,2,"0");case"SSS":return G.s(R.$ms,3,"0");case"Z":return Z}return null})(be)||Z.replace(":","")}))},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(I,R,S){var H,Z=this,te=G.p(R),fe=ee(I),ye=(fe.utcOffset()-this.utcOffset())*t,_e=this-fe,Se=a(function(){return G.m(Z,fe)},"D");switch(te){case y:H=Se()/12;break;case d:H=Se();break;case m:H=Se()/3;break;case p:H=(_e-ye)/6048e5;break;case u:H=(_e-ye)/864e5;break;case s:H=_e/r;break;case i:H=_e/t;break;case o:H=_e/e;break;default:H=_e}return S?H:G.a(H)},A.daysInMonth=function(){return this.endOf(d).$D},A.$locale=function(){return me[this.$L]},A.locale=function(I,R){if(!I)return this.$L;var S=this.clone(),H=ke(I,R,!0);return H&&(S.$L=H),S},A.clone=function(){return G.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},j})(),ct=vt.prototype;return ee.prototype=ct,[["$ms",n],["$s",o],["$m",i],["$H",s],["$W",u],["$M",d],["$y",y],["$D",v]].forEach((function(j){ct[j[1]]=function(A){return this.$g(A,j[0],j[1])}})),ee.extend=function(j,A){return j.$i||(j(A,vt,ee),j.$i=!0),ee},ee.locale=ke,ee.isDayjs=Pe,ee.unix=function(j){return ee(1e3*j)},ee.en=me[V],ee.Ls=me,ee.p={},ee}))});var y_={};uo(y_,{microsoftOutlook:()=>h_});module.exports=ie(y_);var md=Object.freeze({status:"aborted"});function O(e,t,r){function n(u,p){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:p,constr:s,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,p);let d=s.prototype,m=Object.keys(d);for(let y=0;y<m.length;y++){let v=m[y];v in u||(u[v]=d[v].bind(u))}}a(n,"init");let o=r?.Parent??Object;class i extends o{static{a(this,"Definition")}}Object.defineProperty(i,"name",{value:e});function s(u){var p;let d=r?.Parent?new i:this;n(d,u),(p=d._zod).deferred??(p.deferred=[]);for(let m of d._zod.deferred)m();return d}return a(s,"_"),Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:a(u=>r?.Parent&&u instanceof r.Parent?!0:u?._zod?.traits?.has(e),"value")}),Object.defineProperty(s,"name",{value:e}),s}a(O,"$constructor");var De=class extends Error{static{a(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ar=class extends Error{static{a(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},co={};function je(e){return e&&Object.assign(co,e),co}a(je,"config");function po(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}a(po,"getEnumValues");function Wi(e,t){return typeof t=="bigint"?t.toString():t}a(Wi,"jsonStringifyReplacer");function $r(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}a($r,"cached");function Ki(e){return e==null}a(Ki,"nullish");function wr(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}a(wr,"cleanRegex");var Gi=Symbol("evaluating");function ge(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Gi)return n===void 0&&(n=Gi,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}a(ge,"defineLazy");var mo="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Gt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}a(Gt,"isObject");var fd=$r(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Ji(e){if(Gt(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Gt(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}a(Ji,"isPlainObject");var Xi=new Set(["string","number","symbol"]);function Pt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}a(Pt,"escapeRegex");function Or(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}a(Or,"clone");function ne(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:a(()=>t,"error")};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:a(()=>t.error,"error")}:t}a(ne,"normalizeParams");function Yi(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}a(Yi,"optionalKeys");var Qi={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function xt(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}a(xt,"aborted");function Je(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}a(Je,"prefixIssues");function Sr(e){return typeof e=="string"?e:e?.message}a(Sr,"unwrapMessage");function Xe(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let o=Sr(e.inst?._zod.def?.error?.(e))??Sr(t?.error?.(e))??Sr(r.customError?.(e))??Sr(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}a(Xe,"finalizeIssue");function ea(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}a(ea,"getLengthableOrigin");function fo(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}a(fo,"issue");var ta=a((e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Wi,2),Object.defineProperty(e,"toString",{value:a(()=>e.message,"value"),enumerable:!1})},"initializer"),ra=O("$ZodError",ta),Wt=O("$ZodError",ta,{Parent:Error});var hd=a(e=>(t,r,n,o)=>{let i=n?Object.assign(n,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new De;if(s.issues.length){let u=new(o?.Err??e)(s.issues.map(p=>Xe(p,i,je())));throw mo(u,o?.callee),u}return s.value},"_parse"),Rr=hd(Wt),yd=a(e=>async(t,r,n,o)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let u=new(o?.Err??e)(s.issues.map(p=>Xe(p,i,je())));throw mo(u,o?.callee),u}return s.value},"_parseAsync"),zr=yd(Wt),vd=a(e=>(t,r,n)=>{let o=n?{...n,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new De;return i.issues.length?{success:!1,error:new(e??ra)(i.issues.map(s=>Xe(s,o,je())))}:{success:!0,data:i.value}},"_safeParse"),Kt=vd(Wt),_d=a(e=>async(t,r,n)=>{let o=n?Object.assign(n,{async:!0}):{async:!0},i=t._zod.run({value:r,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>Xe(s,o,je())))}:{success:!0,data:i.value}},"_safeParseAsync"),Jt=_d(Wt);var Pd="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",xd=new RegExp(`^${Pd}$`);var na=a(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),oa=/^-?\d+n?$/,ia=/^-?\d+$/,go=/^-?\d+(?:\.\d+)?$/,aa=/^(?:true|false)$/i;var Ye=O("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),bd={number:"number",bigint:"bigint",object:"date"};var sa=O("$ZodCheckGreaterThan",(e,t)=>{Ye.init(e,t);let r=bd[typeof t.value];e._zod.onattach.push(n=>{let o=n._zod.bag,i=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}});var ua=O("$ZodCheckNumberFormat",(e,t)=>{Ye.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[o,i]=Qi[t.format];e._zod.onattach.push(s=>{let u=s._zod.bag;u.format=t.format,u.minimum=o,u.maximum=i,r&&(u.pattern=ia)}),e._zod.check=s=>{let u=s.value;if(r){if(!Number.isInteger(u)){s.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?s.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):s.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}u<o&&s.issues.push({origin:"number",input:u,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),u>i&&s.issues.push({origin:"number",input:u,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}});var ca=O("$ZodCheckMinLength",(e,t)=>{var r;Ye.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!Ki(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let o=n.value;if(o.length>=t.minimum)return;let s=ea(o);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}});var ho=O("$ZodCheckStringFormat",(e,t)=>{var r,n;Ye.init(e,t),e._zod.onattach.push(o=>{let i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),la=O("$ZodCheckRegex",(e,t)=>{ho.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}});var da={major:4,minor:3,patch:6};var le=O("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=da;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let o of n)for(let i of o._zod.onattach)i(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let o=a((s,u,p)=>{let d=xt(s),m;for(let y of u){if(y._zod.def.when){if(!y._zod.def.when(s))continue}else if(d)continue;let v=s.issues.length,l=y._zod.check(s);if(l instanceof Promise&&p?.async===!1)throw new De;if(m||l instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await l,s.issues.length!==v&&(d||(d=xt(s,v)))});else{if(s.issues.length===v)continue;d||(d=xt(s,v))}}return m?m.then(()=>s):s},"runChecks"),i=a((s,u,p)=>{if(xt(s))return s.aborted=!0,s;let d=o(u,n,p);if(d instanceof Promise){if(p.async===!1)throw new De;return d.then(m=>e._zod.parse(m,p))}return e._zod.parse(d,p)},"handleCanaryResult");e._zod.run=(s,u)=>{if(u.skipChecks)return e._zod.parse(s,u);if(u.direction==="backward"){let d=e._zod.parse({value:s.value,issues:[]},{...u,skipChecks:!0});return d instanceof Promise?d.then(m=>i(m,s,u)):i(d,s,u)}let p=e._zod.parse(s,u);if(p instanceof Promise){if(u.async===!1)throw new De;return p.then(d=>o(d,n,u))}return o(p,n,u)}}ge(e,"~standard",()=>({validate:a(o=>{try{let i=Kt(e,o);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Jt(e,o).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Dr=O("$ZodString",(e,t)=>{le.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??na(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),yo=O("$ZodStringFormat",(e,t)=>{ho.init(e,t),Dr.init(e,t)});var ya=O("$ZodURL",(e,t)=>{yo.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),o=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=o.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}});var vo=O("$ZodNumber",(e,t)=>{le.init(e,t),e._zod.pattern=e._zod.bag.pattern??go,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),r}}),va=O("$ZodNumberFormat",(e,t)=>{ua.init(e,t),vo.init(e,t)}),_o=O("$ZodBoolean",(e,t)=>{le.init(e,t),e._zod.pattern=aa,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),_a=O("$ZodBigInt",(e,t)=>{le.init(e,t),e._zod.pattern=oa,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}});var Pa=O("$ZodAny",(e,t)=>{le.init(e,t),e._zod.parse=r=>r}),xa=O("$ZodUnknown",(e,t)=>{le.init(e,t),e._zod.parse=r=>r});var ba=O("$ZodVoid",(e,t)=>{le.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"void",code:"invalid_type",input:o,inst:e}),r}}),Ea=O("$ZodDate",(e,t)=>{le.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let o=r.value,i=o instanceof Date;return i&&!Number.isNaN(o.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:o,...i?{received:"Invalid Date"}:{},inst:e}),r}});function ma(e,t,r){e.issues.length&&t.issues.push(...Je(r,e.issues)),t.value[r]=e.value}a(ma,"handleArrayResult");var Ta=O("$ZodArray",(e,t)=>{le.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);let i=[];for(let s=0;s<o.length;s++){let u=o[s],p=t.element._zod.run({value:u,issues:[]},n);p instanceof Promise?i.push(p.then(d=>ma(d,r,s))):ma(p,r,s)}return i.length?Promise.all(i).then(()=>r):r}});function kr(e,t,r,n,o){if(e.issues.length){if(o&&!(r in n))return;t.issues.push(...Je(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}a(kr,"handlePropertyResult");function Ed(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=Yi(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}a(Ed,"normalizeDef");function Td(e,t,r,n,o,i){let s=[],u=o.keySet,p=o.catchall._zod,d=p.def.type,m=p.optout==="optional";for(let y in t){if(u.has(y))continue;if(d==="never"){s.push(y);continue}let v=p.run({value:t[y],issues:[]},n);v instanceof Promise?e.push(v.then(l=>kr(l,r,y,t,m))):kr(v,r,y,t,m)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}a(Td,"handleCatchall");var Ia=O("$ZodObject",(e,t)=>{if(le.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let u=t.shape;Object.defineProperty(t,"shape",{get:a(()=>{let p={...u};return Object.defineProperty(t,"shape",{value:p}),p},"get")})}let n=$r(()=>Ed(t));ge(e._zod,"propValues",()=>{let u=t.shape,p={};for(let d in u){let m=u[d]._zod;if(m.values){p[d]??(p[d]=new Set);for(let y of m.values)p[d].add(y)}}return p});let o=Gt,i=t.catchall,s;e._zod.parse=(u,p)=>{s??(s=n.value);let d=u.value;if(!o(d))return u.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),u;u.value={};let m=[],y=s.shape;for(let v of s.keys){let l=y[v],f=l._zod.optout==="optional",_=l._zod.run({value:d[v],issues:[]},p);_ instanceof Promise?m.push(_.then(h=>kr(h,u,v,d,f))):kr(_,u,v,d,f)}return i?Td(m,d,u,p,n.value,e):m.length?Promise.all(m).then(()=>u):u}});function fa(e,t,r,n){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let o=e.filter(i=>!xt(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>Xe(s,n,je())))}),t)}a(fa,"handleUnionResults");var Po=O("$ZodUnion",(e,t)=>{le.init(e,t),ge(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),ge(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),ge(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),ge(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){let o=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>wr(i.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(r)return n(o,i);let s=!1,u=[];for(let p of t.options){let d=p._zod.run({value:o.value,issues:[]},i);if(d instanceof Promise)u.push(d),s=!0;else{if(d.issues.length===0)return d;u.push(d)}}return s?Promise.all(u).then(p=>fa(p,o,e,i)):fa(u,o,e,i)}});var Aa=O("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Po.init(e,t);let r=e._zod.parse;ge(e._zod,"propValues",()=>{let o={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[u,p]of Object.entries(s)){o[u]||(o[u]=new Set);for(let d of p)o[u].add(d)}}return o});let n=$r(()=>{let o=t.options,i=new Map;for(let s of o){let u=s._zod.propValues?.[t.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let p of u){if(i.has(p))throw new Error(`Duplicate discriminator value "${String(p)}"`);i.set(p,s)}}return i});e._zod.parse=(o,i)=>{let s=o.value;if(!Gt(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),o;let u=n.value.get(s?.[t.discriminator]);return u?u._zod.run(o,i):t.unionFallback?r(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),o)}});var Sa=O("$ZodRecord",(e,t)=>{le.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!Ji(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),r;let i=[],s=t.keyType._zod.values;if(s){r.value={};let u=new Set;for(let d of s)if(typeof d=="string"||typeof d=="number"||typeof d=="symbol"){u.add(typeof d=="number"?d.toString():d);let m=t.valueType._zod.run({value:o[d],issues:[]},n);m instanceof Promise?i.push(m.then(y=>{y.issues.length&&r.issues.push(...Je(d,y.issues)),r.value[d]=y.value})):(m.issues.length&&r.issues.push(...Je(d,m.issues)),r.value[d]=m.value)}let p;for(let d in o)u.has(d)||(p=p??[],p.push(d));p&&p.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:p})}else{r.value={};for(let u of Reflect.ownKeys(o)){if(u==="__proto__")continue;let p=t.keyType._zod.run({value:u,issues:[]},n);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&go.test(u)&&p.issues.length){let y=t.keyType._zod.run({value:Number(u),issues:[]},n);if(y instanceof Promise)throw new Error("Async schemas not supported in object keys currently");y.issues.length===0&&(p=y)}if(p.issues.length){t.mode==="loose"?r.value[u]=o[u]:r.issues.push({code:"invalid_key",origin:"record",issues:p.issues.map(y=>Xe(y,n,je())),input:u,path:[u],inst:e});continue}let m=t.valueType._zod.run({value:o[u],issues:[]},n);m instanceof Promise?i.push(m.then(y=>{y.issues.length&&r.issues.push(...Je(u,y.issues)),r.value[p.value]=y.value})):(m.issues.length&&r.issues.push(...Je(u,m.issues)),r.value[p.value]=m.value)}}return i.length?Promise.all(i).then(()=>r):r}});var $a=O("$ZodEnum",(e,t)=>{le.init(e,t);let r=po(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>Xi.has(typeof o)).map(o=>typeof o=="string"?Pt(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{let s=o.value;return n.has(s)||o.issues.push({code:"invalid_value",values:r,input:s,inst:e}),o}}),wa=O("$ZodLiteral",(e,t)=>{if(le.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?Pt(n):n?Pt(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,o)=>{let i=n.value;return r.has(i)||n.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),n}});var Oa=O("$ZodTransform",(e,t)=>{le.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Ar(e.constructor.name);let o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(r.value=s,r));if(o instanceof Promise)throw new De;return r.value=o,r}});function ga(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}a(ga,"handleOptionalResult");var Ra=O("$ZodOptional",(e,t)=>{le.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ge(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ge(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${wr(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>ga(i,r.value)):ga(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var za=O("$ZodNullable",(e,t)=>{le.init(e,t),ge(e._zod,"optin",()=>t.innerType._zod.optin),ge(e._zod,"optout",()=>t.innerType._zod.optout),ge(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${wr(r.source)}|null)$`):void 0}),ge(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)});var Ca=O("$ZodPipe",(e,t)=>{le.init(e,t),ge(e._zod,"values",()=>t.in._zod.values),ge(e._zod,"optin",()=>t.in._zod.optin),ge(e._zod,"optout",()=>t.out._zod.optout),ge(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let i=t.out._zod.run(r,n);return i instanceof Promise?i.then(s=>Cr(s,t.in,n)):Cr(i,t.in,n)}let o=t.in._zod.run(r,n);return o instanceof Promise?o.then(i=>Cr(i,t.out,n)):Cr(o,t.out,n)}});function Cr(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}a(Cr,"handlePipeResult");var ka=O("$ZodCustom",(e,t)=>{Ye.init(e,t),le.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(i=>ha(i,r,n,e));ha(o,r,n,e)}});function ha(e,t,r,n){if(!e){let o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(fo(o))}}a(ha,"handleRefineResult");var Na;var xo=class{static{a(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function Ma(){return new xo}a(Ma,"registry");(Na=globalThis).__zod_globalRegistry??(Na.__zod_globalRegistry=Ma());var bo=globalThis.__zod_globalRegistry;function Ua(e,t){return new e({type:"string",...ne(t)})}a(Ua,"_string");function La(e,t){return new e({type:"string",coerce:!0,...ne(t)})}a(La,"_coercedString");function ja(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ne(t)})}a(ja,"_url");function Fa(e,t){return new e({type:"number",checks:[],...ne(t)})}a(Fa,"_number");function Ba(e,t){return new e({type:"number",coerce:!0,checks:[],...ne(t)})}a(Ba,"_coercedNumber");function Va(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ne(t)})}a(Va,"_int");function Ha(e,t){return new e({type:"boolean",...ne(t)})}a(Ha,"_boolean");function Za(e,t){return new e({type:"boolean",coerce:!0,...ne(t)})}a(Za,"_coercedBoolean");function qa(e,t){return new e({type:"bigint",coerce:!0,...ne(t)})}a(qa,"_coercedBigint");function Ga(e){return new e({type:"any"})}a(Ga,"_any");function Wa(e){return new e({type:"unknown"})}a(Wa,"_unknown");function Ka(e,t){return new e({type:"void",...ne(t)})}a(Ka,"_void");function Ja(e,t){return new e({type:"date",coerce:!0,...ne(t)})}a(Ja,"_coercedDate");function Nr(e,t){return new sa({check:"greater_than",...ne(t),value:e,inclusive:!0})}a(Nr,"_gte");function ze(e,t){return new ca({check:"min_length",...ne(t),minimum:e})}a(ze,"_minLength");function Qe(e,t){return new la({check:"string_format",format:"regex",...ne(t),pattern:e})}a(Qe,"_regex");function Xa(e,t,r){let n=ne(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}a(Xa,"_custom");var he=O("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");le.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>Rr(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>Kt(e,r,n),e.parseAsync=async(r,n)=>zr(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>Jt(e,r,n),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0}),e.with=e.check,e.clone=(r,n)=>Or(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.apply=r=>r(e)}),Ur=O("ZodMiniString",(e,t)=>{Dr.init(e,t),he.init(e,t)});function c(e){return Ua(Ur,e)}a(c,"string");var Ya=O("ZodMiniStringFormat",(e,t)=>{yo.init(e,t),Ur.init(e,t)});var Md=O("ZodMiniURL",(e,t)=>{ya.init(e,t),Ya.init(e,t)});function Qa(e){return ja(Md,e)}a(Qa,"url");var Lr=O("ZodMiniNumber",(e,t)=>{vo.init(e,t),he.init(e,t)});function xe(e){return Fa(Lr,e)}a(xe,"number");var Ud=O("ZodMiniNumberFormat",(e,t)=>{va.init(e,t),Lr.init(e,t)});function es(e){return Va(Ud,e)}a(es,"int");var Eo=O("ZodMiniBoolean",(e,t)=>{_o.init(e,t),he.init(e,t)});function Y(e){return Ha(Eo,e)}a(Y,"boolean");var ts=O("ZodMiniBigInt",(e,t)=>{_a.init(e,t),he.init(e,t)});var Ld=O("ZodMiniAny",(e,t)=>{Pa.init(e,t),he.init(e,t)});function Yt(){return Ga(Ld)}a(Yt,"any");var jd=O("ZodMiniUnknown",(e,t)=>{xa.init(e,t),he.init(e,t)});function M(){return Wa(jd)}a(M,"unknown");var Fd=O("ZodMiniVoid",(e,t)=>{ba.init(e,t),he.init(e,t)});function rs(e){return Ka(Fd,e)}a(rs,"_void");var ns=O("ZodMiniDate",(e,t)=>{Ea.init(e,t),he.init(e,t)});var Bd=O("ZodMiniArray",(e,t)=>{Ta.init(e,t),he.init(e,t)});function F(e,t){return new Bd({type:"array",element:e,...ne(t)})}a(F,"array");var Vd=O("ZodMiniObject",(e,t)=>{Ia.init(e,t),he.init(e,t),ge(e,"shape",()=>t.shape)});function g(e,t){let r={type:"object",shape:e??{},...ne(t)};return new Vd(r)}a(g,"object");var Hd=O("ZodMiniUnion",(e,t)=>{Po.init(e,t),he.init(e,t)});function B(e,t){return new Hd({type:"union",options:e,...ne(t)})}a(B,"union");var Zd=O("ZodMiniDiscriminatedUnion",(e,t)=>{Aa.init(e,t),he.init(e,t)});function et(e,t,r){return new Zd({type:"union",options:t,discriminator:e,...ne(r)})}a(et,"discriminatedUnion");var qd=O("ZodMiniRecord",(e,t)=>{Sa.init(e,t),he.init(e,t)});function U(e,t,r){return new qd({type:"record",keyType:e,valueType:t,...ne(r)})}a(U,"record");var Gd=O("ZodMiniEnum",(e,t)=>{$a.init(e,t),he.init(e,t),e.options=Object.values(t.entries)});function W(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Gd({type:"enum",entries:r,...ne(t)})}a(W,"_enum");var Wd=O("ZodMiniLiteral",(e,t)=>{wa.init(e,t),he.init(e,t)});function C(e,t){return new Wd({type:"literal",values:Array.isArray(e)?e:[e],...ne(t)})}a(C,"literal");var Kd=O("ZodMiniTransform",(e,t)=>{Oa.init(e,t),he.init(e,t)});function tt(e){return new Kd({type:"transform",transform:e})}a(tt,"transform");var Jd=O("ZodMiniOptional",(e,t)=>{Ra.init(e,t),he.init(e,t)});function P(e){return new Jd({type:"optional",innerType:e})}a(P,"optional");var Xd=O("ZodMiniNullable",(e,t)=>{za.init(e,t),he.init(e,t)});function Qt(e){return new Xd({type:"nullable",innerType:e})}a(Qt,"nullable");var Yd=O("ZodMiniPipe",(e,t)=>{Ca.init(e,t),he.init(e,t)});function rt(e,t){return new Yd({type:"pipe",in:e,out:t})}a(rt,"pipe");var Qd=O("ZodMiniCustom",(e,t)=>{ka.init(e,t),he.init(e,t)});function jr(e,t){return Xa(Qd,e??(()=>!0),t)}a(jr,"custom");var er={};uo(er,{bigint:()=>im,boolean:()=>om,date:()=>am,number:()=>nm,string:()=>rm});function rm(e){return La(Ur,e)}a(rm,"string");function nm(e){return Ba(Lr,e)}a(nm,"number");function om(e){return Za(Eo,e)}a(om,"boolean");function im(e){return qa(ts,e)}a(im,"bigint");function am(e){return Ja(ns,e)}a(am,"date");var Io=g({retryOnFailure:g({defaultValue:P(Y()),hide:P(Y())}),continueOnFailure:g({defaultValue:P(Y()),hide:P(Y())})}),To=class{constructor(t,r,n,o,i,s,u,p,d,m,y){this.name=t;this.displayName=r;this.description=n;this.props=o;this.run=i;this.test=s;this.requireAuth=u;this.errorHandlingOptions=p;this.outputSchema=d;this.audience=m;this.aiMetadata=y}static{a(this,"IAction")}},oe=a(e=>new To(e.name,e.displayName,e.description,e.props,e.run,e.test??e.run,e.requireAuth??!0,e.errorHandlingOptions??{continueOnFailure:{defaultValue:!1},retryOnFailure:{defaultValue:!1}},e.outputSchema,e.audience,e.aiMetadata),"createAction");var Q=g({displayName:c(),description:P(c())}),q=a((e,t)=>g({type:C(t),required:Y(),defaultValue:P(Yt())}),"TPropertyValue");var Ie=g({...Q.shape,...q(c(),"SHORT_TEXT").shape}),Fe=g({...Q.shape,...q(c(),"LONG_TEXT").shape});var is=g({label:c(),value:M()}),Fr=g({disabled:P(Y()),placeholder:P(c()),options:F(is)});var Ae=g({...Q.shape,options:Fr,...q(M(),"STATIC_DROPDOWN").shape}),Be=g({...Q.shape,options:Fr,...q(F(M()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var Ao=g({...Q.shape,...q(M(),"DROPDOWN").shape,refreshers:F(c())}),tr=g({...Q.shape,...q(F(M()),"MULTI_SELECT_DROPDOWN").shape,refreshers:F(c())});var Ve=g({...Q.shape,...q(Y(),"CHECKBOX").shape});var He=g({...Q.shape,...q(xe(),"NUMBER").shape});var rr=g({...Q.shape,streaming:P(Y()),...q(M(),"FILE").shape});var nr=g({...Q.shape,...q(c(),"DATE_TIME").shape});var as=U(c(),B([Ie,Fe,Ae,tr,Be,Ve,He,rr,nr])),or=g({...Q.shape,properties:as,...q(F(M()),"ARRAY").shape});var ir=g({...Q.shape,...q(B([U(c(),M())]),"JSON").shape});var ss=B([Ie,Ae,ir,or,Be]),um=U(c(),ss),So=g({refreshers:F(c()),...Q.shape,...q(M(),"DYNAMIC").shape});var Br=g({...Q.shape,...q(rs(),"MARKDOWN").shape});var ar=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(ar||{}),bt=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(bt||{}),Et=(x=>(x.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",x.COMMUNICATION="COMMUNICATION",x.COMMERCE="COMMERCE",x.CORE="CORE",x.UNIVERSAL_AI="UNIVERSAL_AI",x.FLOW_CONTROL="FLOW_CONTROL",x.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",x.ACCOUNTING="ACCOUNTING",x.PRODUCTIVITY="PRODUCTIVITY",x.CONTENT_AND_FILES="CONTENT_AND_FILES",x.DEVELOPER_TOOLS="DEVELOPER_TOOLS",x.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",x.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",x.HUMAN_RESOURCES="HUMAN_RESOURCES",x.PAYMENT_PROCESSING="PAYMENT_PROCESSING",x.MARKETING="MARKETING",x.SALES_AND_CRM="SALES_AND_CRM",x))(Et||{});var sr=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(sr||{}),$o="both_client_credentials_and_authorization_code";var Ne=(o=>(o.POLLING="POLLING",o.WEBHOOK="WEBHOOK",o.APP_WEBHOOK="APP_WEBHOOK",o.MANUAL="MANUAL",o))(Ne||{}),ur=(i=>(i.NONE="NONE",i.HEADER_PRESENT="HEADER_PRESENT",i.QUERY_PRESENT="QUERY_PRESENT",i.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",i.HEAD_REQUEST="HEAD_REQUEST",i))(ur||{}),cm=g({strategy:W(ur),paramName:P(c())}),cr=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(cr||{});var Vr=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Vr||{}),us=g({status:P(xe()),body:P(M()),headers:P(U(c(),c()))}),cs=g({type:C("DELAY"),resumeDateTime:c(),requestIdToReply:P(c()),handlerId:P(c()),streamStepProgress:P(W(Vr))}),ls=g({type:C("WEBHOOK"),requestId:c(),requestIdToReply:P(c()),response:us,handlerId:P(c()),streamStepProgress:P(W(Vr))}),lm=B([cs,ls]);var pm=g({body:M(),rawBody:P(M()),headers:U(c(),c()),queryParams:U(c(),c())});function ae(e){return e==null}a(ae,"isNil");function lr(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}a(lr,"isEmpty");function Ze(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}a(Ze,"assertNotNullOrUndefined");var wo=Re(require("crypto"),1);var dm=128,dt,Tt,mm=a(e=>{!dt||dt.length<e?(dt=Buffer.allocUnsafe(e*dm),wo.default.randomFillSync(dt),Tt=0):Tt+e>dt.length&&(wo.default.randomFillSync(dt),Tt=0),Tt+=e},"fillPool"),fm=a(e=>(mm(e|=0),dt.subarray(Tt-e,Tt)),"random"),gm=a((e,t,r)=>{let n=(2<<31-Math.clz32(e.length-1|1))-1,o=Math.ceil(1.6*n*t/e.length);return(i=t)=>{let s="";for(;;){let u=r(o),p=o;for(;p--;)if(s+=e[u[p]&n]||"",s.length===i)return s}}},"customRandom"),ds=a((e,t=21)=>gm(e,t,fm),"customAlphabet");var hm="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",ms=21,X$=c().check(Qe(new RegExp(`^[0-9a-zA-Z]{${ms}}$`))),ym=ds(hm,ms);var nt=rt(tt(e=>e instanceof Date?e.toISOString():e),c()),$e={id:c(),created:nt,updated:nt},se=a(e=>P(Qt(e)),"Nullable");function Oo(e){return P(Qt(W(e)))}a(Oo,"NullableEnum");var ew=rt(tt(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),P(Y())),Hr=a(e=>rt(tt(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),P(F(e))),"OptionalArrayFromQuery");var nw=U(c(),M());var pr=(m=>(m.OPENAI="openai",m.OPENROUTER="openrouter",m.ANTHROPIC="anthropic",m.AZURE="azure",m.GOOGLE="google",m.ACTIVEPIECES="activepieces",m.CLOUDFLARE_GATEWAY="cloudflare-gateway",m.CUSTOM="custom",m.BEDROCK="bedrock",m.MISTRAL="mistral",m))(pr||{});var gw=c().check(Qe(/^#[0-9A-Fa-f]{6}$/));var yw=g({filename:c(),data:M(),type:C("file"),mimetype:P(c())});var vm=Re(gs());var Tw=g({...$e,name:c(),permissions:F(c()),platformId:se(c()),type:c(),userCount:P(xe())});var hs=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(hs||{}),Ro=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(Ro||{}),zo=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(zo||{});var Co=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(Co||{});var ko=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(ko||{});var _m=g({mode:W(hs),value:M()}),Pm=g({auth:P(c()),fields:U(c(),_m)}),xm=g({pieceName:c(),pieceVersion:c(),actionName:c(),predefinedInput:P(Pm)}),bm=g({type:C("PIECE"),toolName:c().check(ze(1)),pieceMetadata:xm}),Em=g({type:C("none")}),Tm=g({type:C("access_token"),accessToken:c()}),Im=g({type:C("api_key"),apiKey:c(),apiKeyHeader:c()}),Am=g({type:C("headers"),headers:U(c(),c())}),Sm=et("type",[Em,Tm,Im,Am]),ys=g({type:C("FLOW"),toolName:c().check(ze(1)),externalFlowId:c(),flowDisplayName:P(c())}),vs=g({type:C("MCP"),toolName:c().check(ze(1)),serverUrl:Qa(),protocol:W(zo),auth:Sm}),_s=g({type:C("KNOWLEDGE_BASE"),toolName:c().check(ze(1)),sourceType:W(Ro),sourceId:c(),sourceName:c()}),$m=et("type",[bm,ys,vs,_s]),wm=g({displayName:c(),description:P(c()),type:W(Co)}),Ps=g({type:C("MARKDOWN"),markdown:c()}),It={type:C("TOOL_CALL"),input:se(U(c(),M())),output:P(M()),toolName:c(),status:W(ko),toolCallId:c(),startTime:c(),endTime:P(c())},tO=g(It),xs=et("toolCallType",[g({...It,toolCallType:C("PIECE"),pieceName:c(),pieceVersion:c(),actionName:c()}),g({...It,toolCallType:C("FLOW"),displayName:c(),externalFlowId:c()}),g({...It,toolCallType:C("MCP"),displayName:c(),serverUrl:c()}),g({...It,toolCallType:C("KNOWLEDGE_BASE"),displayName:c(),sourceType:c()}),g({...It,toolCallType:C("UNKNOWN"),displayName:c()})]),Om=B([Ps,xs]);var Do=(r=>(r.IMAGE="image",r.TEXT="text",r))(Do||{}),qe=g({apiKey:c()}),Rm=qe,zm=g({apiKey:c(),apiKeyHash:c()}),Cm=qe,km=qe,Dm=qe,Nm=qe,Mm=qe,Um=qe,Lm=qe,As=g({accessKeyId:c().check(ze(1)),secretAccessKey:c().check(ze(1))}),jm=g({}),Fm=g({}),Bm=g({}),Vm=g({}),Hm=g({}),Zm=g({}),Ss=g({modelId:c(),modelName:c(),modelType:W(Do)}),$s=g({apiKeyHeader:c(),baseUrl:c(),models:F(Ss),defaultHeaders:P(U(c(),c()))}),ws=g({accountId:c(),gatewayId:c(),models:F(Ss),vertexProject:P(c()),vertexRegion:P(c())}),Os=g({resourceName:c(),apiVersion:rt(tt(e=>typeof e=="string"&&e.trim().length===0?void 0:e),P(c()))}),Rs=g({region:c().check(ze(1))}),qm=B([Rm,Dm,Nm,Mm,Um,km,Cm,zm,As,Lm]),zs=B([$s,ws,Os,Rs,jm,Bm,Vm,Hm,Fm,Zm]),Gm=g({id:c(),name:c(),type:W(Do)}),Wm=g({id:c(),name:c(),provider:W(pr),config:zs,enabledForChat:Y()}),Km=g({provider:W(pr),config:zs,auth:qm,platformId:c()});var iO={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"},bs=["gpt-5.5","gpt-5.4-mini","gpt-5.4-nano","gpt-4.1","gpt-4.1-mini"],Jm=["claude-sonnet-4-6","claude-opus-4-7","claude-haiku-4-5"],Xm=["claude-sonnet-4.6","claude-opus-4.7","claude-haiku-4.5"],Es=["gemini-2.5-pro","gemini-2.5-flash","gemini-3.1-pro-preview","gemini-3-flash-preview"],Ym=["grok-4.20","grok-4.1-fast"],Qm={openai:bs,anthropic:Jm,google:Es,activepieces:[...Xm.map(e=>`anthropic/${e}`),...bs.map(e=>`openai/${e}`),...Es.map(e=>`google/${e}`),...Ym.map(e=>`x-ai/${e}`)]};var Ts=128e3,ef={openai:128e3,anthropic:2e5,google:1048576,bedrock:2e5,azure:128e3,openrouter:128e3,activepieces:2e5,mistral:128e3};function tf({provider:e}){return e?ef[e]??Ts:Ts}a(tf,"getMaxContextTokens");var Is={openai:"text-embedding-3-small",google:"text-embedding-004",azure:"text-embedding-3-small",activepieces:"text-embedding-3-small",openrouter:"openai/text-embedding-3-small"},rf={anthropic:"native",google:"native",openrouter:"plugin",activepieces:"plugin"},nf=new Set(["anthropic","mistral"]);function Me(e){return{chatModels:Qm[e],maxContextTokens:tf({provider:e}),defaultEmbeddingModel:Is[e],supportsEmbedding:Is[e]!==void 0,supportsImageGeneration:!nf.has(e),webSearch:rf[e]}}a(Me,"buildProviderCapabilities");var of={openai:Me("openai"),anthropic:Me("anthropic"),openrouter:Me("openrouter"),azure:Me("azure"),google:Me("google"),"cloudflare-gateway":Me("cloudflare-gateway"),custom:Me("custom"),bedrock:Me("bedrock"),mistral:Me("mistral"),activepieces:Me("activepieces")};var af=g({base64Url:c(),fileName:c(),extension:P(c())}),sf=g({mimeType:c(),url:c(),fileName:P(c())}),No=B([af,sf]);var uf=B([g({type:C("file"),value:No}),g({type:C("markdown"),value:c(),files:P(F(No))})]),cf=g({sessionId:c(),message:c(),files:P(F(c()))});var ks=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(ks||{}),Ds=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(Ds||{}),Mo=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(Mo||{});var lf=B([g({...$e,name:c(),externalId:c(),type:C("STATIC_DROPDOWN"),tableId:c(),projectId:c(),data:g({options:F(g({value:c()}))})}),g({...$e,name:c(),externalId:c(),type:B([C("TEXT"),C("NUMBER"),C("DATE")]),tableId:c(),projectId:c()})]),pf=g({...$e,name:c(),folderId:se(c()),projectId:c(),externalId:c(),status:Oo(Ds),trigger:Oo(ks)}),df=g({...$e,tableId:c(),projectId:c(),cells:U(c(),g({updated:c(),created:c(),value:M(),fieldName:c()}))}),mf=g({events:F(W(Mo)),webhookUrl:c(),flowId:c()}),ff=g({fields:F(g({id:c(),name:c()})),rows:F(U(c(),c())),name:c()}),gf=g({projectId:c(),limit:P(er.number()),cursor:P(c()),name:P(c()),externalIds:Hr(c()),folderId:P(c()),folderIds:Hr(c())}),hf=g({records:F(F(g({fieldId:c(),value:Ms()}))),tableId:c()}),yf=g({cells:P(F(g({fieldId:c(),value:Ms()}))),tableId:c(),agentUpdate:P(Y())}),Ns=et("operator",[mt("eq"),mt("neq"),mt("gt"),mt("gte"),mt("lt"),mt("lte"),mt("co"),Cs("exists"),Cs("not_exists")]),vf=g({tableId:c(),limit:P(er.number()),cursor:P(c()),filters:Hr(Ns)});function Ms(){return rt(tt(e=>e==null?e:String(e)),Qt(c()))}a(Ms,"coerceToString");function mt(e){return g({fieldId:c(),operator:C(e),value:c()})}a(mt,"valueFilter");function Cs(e){return g({fieldId:c(),operator:C(e)})}a(Cs,"existenceFilter");var _f=g({status:P(xe()),body:P(M()),headers:P(U(c(),c()))}),Pf=g({...$e,deleted:se(nt),ownerId:c(),displayName:c(),platformId:c(),externalId:se(c())});var Us=g({name:c(),description:P(c()),type:c(),required:Y()}),xf=g({pieceName:c(),triggerName:c(),input:g({toolName:c(),toolDescription:c(),inputSchema:F(Us),returnsResponse:Y()})});var Ls="^[0-9]+\\.[0-9]+\\.[0-9]+$",TO=new RegExp(Ls),Ef="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",IO=c().check(Qe(new RegExp(Ls))),AO=c().check(Qe(new RegExp(Ef))),Tf=g({packageType:C("ARCHIVE"),pieceType:W(bt),pieceName:c(),pieceVersion:c(),archiveId:c(),platformId:c()}),js=g({packageType:C("REGISTRY"),pieceType:C("OFFICIAL"),pieceName:c(),pieceVersion:c()}),Fs=g({packageType:C("REGISTRY"),pieceType:C("CUSTOM"),pieceName:c(),pieceVersion:c(),platformId:c()}),SO=B([js,Fs]),$O=B([Tf,js,Fs]);var If=et("type",[g({type:C("CRON_EXPRESSION"),cronExpression:c(),timezone:c()}),g({type:C("INTERVAL"),intervalMs:es().check(Nr(6e4))})]),wO=g({...$e,type:W(Ne),projectId:c(),flowId:c(),triggerName:c(),schedule:se(If),flowVersionId:c(),pieceName:c(),pieceVersion:c(),deleted:se(c()),simulate:Y()}),Bs=(h=>(h.UNKNOWN="UNKNOWN",h.FLOW_RUN_LOG="FLOW_RUN_LOG",h.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",h.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",h.FLOW_STEP_FILE="FLOW_STEP_FILE",h.SAMPLE_DATA="SAMPLE_DATA",h.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",h.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",h.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",h.PROJECT_RELEASE="PROJECT_RELEASE",h.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",h.PLATFORM_ASSET="PLATFORM_ASSET",h.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",h.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",h.KNOWLEDGE_BASE="KNOWLEDGE_BASE",h.FLOW_BUNDLE="FLOW_BUNDLE",h))(Bs||{}),Vs=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(Vs||{}),Hs=(r=>(r.S3="S3",r.DB="DB",r))(Hs||{}),OO=g({...$e,projectId:se(c()),platformId:se(c()),type:W(Bs),compression:W(Vs),data:P(M()),location:W(Hs),size:se(xe()),fileName:se(c()),s3Key:se(c()),metadata:se(U(c(),c()))}),Zs=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(Zs||{}),qs=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(qs||{}),RO=g({id:c(),email:c(),firstName:c(),status:W(qs),externalId:se(c()),platformId:se(c()),platformRole:W(Zs),lastName:c(),created:nt,updated:nt,lastActiveDate:se(nt),imageUrl:se(c())});var Lo=g({...Q.shape,...q(U(c(),M()),"OBJECT").shape});var Ks=g({...Q.shape,...q(c(),"COLOR").shape});var jo=B([Ie,Fe,Br,Ve,Ae,Be,Ao,tr,So,He,or,Lo,ir,nr,rr,Ks]),T={ShortText(e){return{...e,valueSchema:void 0,type:"SHORT_TEXT"}},Checkbox(e){return{...e,valueSchema:void 0,type:"CHECKBOX"}},LongText(e){return{...e,valueSchema:void 0,type:"LONG_TEXT"}},MarkDown(e){return{displayName:"Markdown",required:!1,description:e.value,type:"MARKDOWN",valueSchema:void 0,variant:e.variant??"INFO"}},Number(e){return{...e,valueSchema:void 0,type:"NUMBER"}},Json(e){return{...e,valueSchema:void 0,type:"JSON"}},Array(e){return{...e,valueSchema:void 0,type:"ARRAY"}},Object(e){return{...e,valueSchema:void 0,type:"OBJECT"}},Dropdown(e){return{...e,valueSchema:void 0,type:"DROPDOWN"}},StaticDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_DROPDOWN"}},MultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"MULTI_SELECT_DROPDOWN"}},DynamicProperties(e){return{...e,valueSchema:void 0,type:"DYNAMIC"}},StaticMultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_MULTI_SELECT_DROPDOWN"}},DateTime(e){return{...e,valueSchema:void 0,type:"DATE_TIME"}},File(e){return{...e,valueSchema:void 0,type:"FILE"}},Custom(e){let t=e.code.toString();return{...e,code:t,valueSchema:void 0,type:"CUSTOM"}},Color(e){return{...e,valueSchema:void 0,type:"COLOR"}}};var Ue=g({displayName:c(),description:P(c()),hasConnectionIdentifier:P(Y())});var Js=g({username:c(),password:c()}),Fo=g({...Ue.shape,username:g({displayName:c(),description:P(c())}),password:g({displayName:c(),description:P(c())}),...q(Js,"BASIC_AUTH").shape});var wf=U(c(),B([Ie,Fe,He,Ve,Ae])),Bo=g({...Ue.shape,props:wf,...q(M(),"CUSTOM_AUTH").shape});var ft=g({...Ue.shape,...q(g({auth:c()}),"SECRET_TEXT").shape});var Of=U(c(),B([Ie,Fe,ft,He,Ve,Ae,Be,Br])),Xs=g({...Ue.shape,props:Of,...q(M(),"OIDC").shape});var Vo=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Vo||{}),Ys=B([Ie,ft,Ae]),Qs=U(c(),Ys),Rf=g({props:P(U(c(),Ys)),authUrl:c(),tokenUrl:c(),scope:F(c()),prompt:P(B([C("none"),C("consent"),C("login"),C("omit")])),pkce:P(Y()),pkceMethod:P(B([C("plain"),C("S256")])),authorizationMethod:P(W(Vo)),grantType:P(B([W(sr),C($o)])),extra:P(U(c(),c()))}),eu=g({access_token:c(),props:P(Qs),data:U(c(),Yt())}),Ho=g({...Ue.shape,...Rf.shape,...q(eu,"OAUTH2").shape});var At=B([Fo,Bo,Xs,Ho,ft]),dr="Connection",Zo={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||dr}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||dr,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||dr}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||dr}},None(){}};var cz={OAUTH2:"OAUTH2",CLOUD_OAUTH2:"OAUTH2",PLATFORM_OAUTH2:"OAUTH2",BASIC_AUTH:"BASIC_AUTH",CUSTOM_AUTH:"CUSTOM_AUTH",OIDC:"OIDC",SECRET_TEXT:"SECRET_TEXT",NO_AUTH:void 0};var zf=g({...Q.shape,...q(M(),"CUSTOM").shape,code:c()});var Cf=B([jo,At]),qo=U(c(),Cf),wz=U(c(),jo);var tu=B([g({strategy:C("CRON"),cronExpression:c()}),g({strategy:C("NONE")})]),St=class{constructor(t,r,n,o,i,s,u,p,d,m,y,v,l,f,_,h,x,E,V){this.name=t;this.displayName=r;this.description=n;this.requireAuth=o;this.props=i;this.type=s;this.handshakeConfiguration=u;this.onHandshake=p;this.renewConfiguration=d;this.onRenew=m;this.onEnable=y;this.onDisable=v;this.onStart=l;this.run=f;this.test=_;this.sampleData=h;this.testStrategy=x;this.outputSchema=E;this.aiMetadata=V}static{a(this,"ITrigger")}},$t=a(e=>{switch(e.type){case"WEBHOOK":return new St(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,e.handshakeConfiguration??{strategy:"NONE"},e.onHandshake??(async()=>({status:200})),e.renewConfiguration??{strategy:"NONE"},e.onRenew??(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,e.test?"TEST_FUNCTION":"SIMULATION",e.outputSchema,e.aiMetadata);case"POLLING":return new St(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata);case"MANUAL":return new St(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata);case"APP_WEBHOOK":return new St(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,ae(e.sampleData)&&ae(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata)}},"createTrigger");var ru="2",qr="0.82.0";var Go=class{constructor(t,r,n,o,i,s,u,p,d=qr,m,y="",v){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=o;this.categories=u;this.auth=p;this.minimumSupportedRelease=d;this.maximumSupportedRelease=m;this.description=y;this.deprecated=v;this._actions={};this._triggers={};this.getContextInfo=a(()=>({version:ru}),"getContextInfo");(!Df(d)||Nf(d,qr))&&(this.minimumSupportedRelease=qr),i.forEach(l=>this._actions[l.name]=l),s.forEach(l=>this._triggers[l.name]=l)}static{a(this,"Piece")}metadata(){return{displayName:this.displayName,logoUrl:this.logoUrl,actions:this._actions,triggers:this._triggers,categories:this.categories,description:this.description,authors:this.authors,auth:kf(this.auth),minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,deprecated:this.deprecated,contextInfo:this.getContextInfo?.()}}getAction(t){return this._actions[t]}getTrigger(t){return this._triggers[t]}actions(){return this._actions}triggers(){return this._triggers}},ou=a(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((r,n,o)=>n===o.findIndex(i=>i.type===r.type)))throw new Error("Auth properties must be unique by type");return new Go(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description,e.deprecated)},"createPiece");function kf(e){if(e!==void 0)return Array.isArray(e)?e.map(nu):nu(e)}a(kf,"withConnectionIdentifierFlag");function nu(e){return{...e,hasConnectionIdentifier:e.getConnectionIdentifier!==void 0}}a(nu,"flagConnectionIdentifier");function Df(e){return/^\d+\.\d+\.\d+$/.test(e)}a(Df,"isValidSimpleSemver");function Nf(e,t){let[r,n,o]=e.split(".").map(Number),[i,s,u]=t.split(".").map(Number);return r!==i?r<i:n!==s?n<s:o<u}a(Nf,"isSemverLessThan");var Mf=P(U(c(),U(c(),c()))),iu=g({id:P(c()),name:c(),displayName:c(),logoUrl:c(),description:c(),authors:F(c()),platformId:P(c()),directoryPath:P(c()),auth:P(B([At,F(At)])),version:c(),categories:P(F(W(Et))),minimumSupportedRelease:P(c()),maximumSupportedRelease:P(c()),deprecated:P(Y()),i18n:Mf}),Uf=W(["human","ai","both"]),au=g({description:P(c()),idempotent:P(Y())}),su=g({name:c(),displayName:c(),description:c(),props:qo,requireAuth:Y(),errorHandlingOptions:P(Io),outputSchema:P(jr()),audience:P(Uf),aiMetadata:P(au)}),uu=g({name:c(),displayName:c(),description:c(),props:qo,errorHandlingOptions:P(Io),type:W(Ne),sampleData:M(),handshakeConfiguration:P(jr()),renewConfiguration:P(tu),testStrategy:W(cr),outputSchema:P(jr()),aiMetadata:P(au)}),Lf=g({...iu.shape,actions:U(c(),su),triggers:U(c(),uu)}),jf=g({...iu.shape,actions:xe(),triggers:xe(),suggestedActions:P(F(su)),suggestedTriggers:P(F(uu))}),cu=g({projectUsage:xe(),pieceType:W(bt),packageType:W(ar),platformId:P(c()),archiveId:P(c())}),wC=g({...Lf.shape,...cu.shape}),OC=g({...jf.shape,...cu.shape}),RC=g({name:c(),version:c()});var Ff=Re(require("path")),Bf=Re(require("fs/promises"));var mu=require("node:stream");var Gr=class{constructor(t,r){this.baseUrl=t;this.authenticationConverter=r}static{a(this,"BaseHttpClient")}getUrl(t){let r=new URL(`${this.baseUrl}${t.url}`),n=`${r.origin}${r.pathname}`,o=new URLSearchParams;return r.searchParams.forEach((i,s)=>{o.append(s,i)}),{urlWithoutQueryParams:n,queryParams:o}}getHeaders(t){let r={Accept:"application/json"};return t.authentication&&this.populateAuthentication(t.authentication,r),t.body&&(t.headers?.["Content-Type"]==="text/csv"?r["Content-Type"]="text/csv":r["Content-Type"]="application/json"),t.headers&&(r={...r,...t.headers}),r}populateAuthentication(t,r){this.authenticationConverter.convert(t,r)}};var Wr=class{static{a(this,"DelegatingAuthenticationConverter")}constructor(t=new Wo,r=new Ko){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},Wo=class{static{a(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},Ko=class{static{a(this,"BasicTokenAuthenticationConverter")}convert(t,r){let n=`${t.username}:${t.password}`,o=Buffer.from(n).toString("base64");return r.Authorization=`Basic ${o}`,r}};var mr=class extends Error{constructor(r,n){let o=n.status||500,i=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:o,body:i},request:{body:r}}));this.requestBody=r;this.status=o,this.responseBody=i}static{a(this,"HttpError")}errorMessage(){return{response:{status:this.status,body:this.responseBody},request:{body:this.requestBody}}}get response(){return{status:this.status,body:this.responseBody}}get request(){return{body:this.requestBody}}};function lu({error:e,requestBody:t}){return e instanceof mr?e.errorMessage():{response:{status:0,body:e instanceof Error?e.message:String(e)},request:{body:t}}}a(lu,"toFailsafeOutput");var Jo=(s=>(s.GET="GET",s.POST="POST",s.PATCH="PATCH",s.PUT="PUT",s.DELETE="DELETE",s.HEAD="HEAD",s))(Jo||{});var Kr=class extends Gr{static{a(this,"FetchHttpClient")}constructor(t="",r=new Wr){super(t,r)}async sendRequest(t,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:o}=this.getUrl(t),i=this.getHeaders(t),s=t.queryParams??{};for(let[V,me]of Object.entries(s))o.append(V,me);let u=o.toString(),p=u?`${n}?${u}`:n,d=t.responseType??"json",m=t.followRedirects??!0,y=t.retries??0,{body:v,extraHeaders:l,isStream:f}=Vf(t.method)?Hf(t.body,i):{body:void 0,extraHeaders:{},isStream:!1},_=qf({...i,...l}),h=await Zf(async()=>{let V=new AbortController,me=t.timeout&&t.timeout>0?setTimeout(()=>V.abort(),t.timeout):void 0;try{let Pe={method:t.method.toString(),headers:_,body:v,redirect:m?"follow":"manual",signal:V.signal};return f&&(Pe.duplex="half"),r?.dispatcher!==void 0&&(Pe.dispatcher=r.dispatcher),await fetch(p,Pe)}finally{me!==void 0&&clearTimeout(me)}},y),x=m?300:400;if(h.status<200||h.status>=x){let V=await pu(h,d),me=new mr(t.body,{status:h.status,responseBody:V});throw console.error("[HttpClient#(sanitized error message)] Request failed:",me),me}let E=await pu(h,d);return{status:h.status,headers:Gf(h.headers),body:E}}};function Vf(e){return e!=="GET"&&e!=="HEAD"}a(Vf,"acceptsRequestBody");function Hf(e,t){if(Kf(e))return{body:void 0,extraHeaders:{},isStream:!1};if(Wf(e)){let n=new mu.PassThrough;return e.on("error",o=>n.destroy(o)),e.pipe(n),{body:n,extraHeaders:e.getHeaders(),isStream:!0}}return typeof e=="string"||Buffer.isBuffer(e)||e instanceof URLSearchParams||e instanceof ArrayBuffer||typeof FormData<"u"&&e instanceof FormData||typeof Blob<"u"&&e instanceof Blob?{body:e,extraHeaders:{},isStream:!1}:(t["Content-Type"]??t["content-type"]??"").includes("application/x-www-form-urlencoded")?{body:new URLSearchParams(e).toString(),extraHeaders:{},isStream:!1}:{body:JSON.stringify(e),extraHeaders:{},isStream:!1}}a(Hf,"serializeBody");async function pu(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"blob":return await e.blob();case"text":return await e.text();default:{let r=await e.text();if(r.length===0)return;try{return JSON.parse(r)}catch{return r}}}}a(pu,"parseResponseBody");async function Zf(e,t){let r;for(let n=0;n<=t;n++)try{let o=await e();if(o.status>=500&&n<t){await du(n);continue}return o}catch(o){if(r=o,n<t){await du(n);continue}throw o}throw r}a(Zf,"sendWithRetries");function du(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}a(du,"backoff");function qf(e){let t={};for(let[r,n]of Object.entries(e))n!==void 0&&(t[r.toLowerCase()]=Array.isArray(n)?n.join(", "):n);return t}a(qf,"normalizeHeaders");function Gf(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}a(Gf,"toHttpHeaders");function Wf(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"&&typeof e.on=="function"}a(Wf,"isNodeFormData");function Kf(e){return e==null}a(Kf,"isNil");var fu=new Kr;var Nh=Re(require("fs")),Pl=Re(_l());var Mh={"application/json":"json","application/pdf":"pdf","application/xml":"xml","text/xml":"xml","application/zip":"zip","application/gzip":"gz","application/x-tar":"tar","application/octet-stream":"bin","application/msword":"doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.ms-excel":"xls","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application/vnd.ms-powerpoint":"ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","application/rtf":"rtf","application/javascript":"js","application/x-www-form-urlencoded":"bin","text/plain":"txt","text/html":"html","text/css":"css","text/csv":"csv","text/calendar":"ics","text/markdown":"md","image/png":"png","image/jpeg":"jpeg","image/jpg":"jpg","image/gif":"gif","image/webp":"webp","image/svg+xml":"svg","image/bmp":"bmp","image/tiff":"tiff","image/x-icon":"ico","image/vnd.microsoft.icon":"ico","image/heic":"heic","audio/mpeg":"mp3","audio/mp4":"m4a","audio/wav":"wav","audio/x-wav":"wav","audio/ogg":"ogg","audio/webm":"weba","video/mp4":"mp4","video/mpeg":"mpeg","video/webm":"webm","video/quicktime":"mov","video/x-msvideo":"avi","font/woff":"woff","font/woff2":"woff2","font/ttf":"ttf","font/otf":"otf"};function Uh(e){let t=e.split(";")[0].trim().toLowerCase();return Mh[t]??""}a(Uh,"contentTypeToExtension");var Lh=a(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),jh=a((e,t)=>{let r="https://api.example.com";try{let n=t?e(t):void 0;return(n?.endsWith("/")?n.slice(0,-1):n)??r}catch{return r}},"getBaseUrlForDescription");function xl({auth:e,baseUrl:t,authMapping:r,description:n,displayName:o,name:i,props:s,extraProps:u,authLocation:p="headers"}){return oe({audience:"human",name:i||"custom_api_call",displayName:o||"Custom API Call",description:n||"Make a custom API call to a specific endpoint",auth:e,requireAuth:!!e,props:{url:T.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:a(async({auth:d})=>({url:T.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
|
|
6
|
-
i.e ${
|
|
5
|
+
3. Same - all individual requests that state a dependency in the dependsOn property, state the same dependency.`),u.name="Invalid Dependency",u;p.label=1;case 1:return o.done?[3,3]:(a=o.value[1],[4,e.getRequestData(a.request)]);case 2:if(s=p.sent(),s.body!==void 0&&(s.headers===void 0||s.headers["content-type"]===void 0))throw u=new Error("Content-type header is not mentioned for request #".concat(a.id,", For request having body, Content-type header should be mentioned")),u.name="Invalid Content-type header",u;return s.id=a.id,a.dependsOn!==void 0&&a.dependsOn.length>0&&(s.dependsOn=a.dependsOn),t.push(s),o=n.next(),[3,1];case 3:return r.requests=t,[2,r]}})})},e.prototype.addDependency=function(t,r){if(!this.requests.has(t)){var n=new Error("Dependent ".concat(t," does not exists, Please check the id"));throw n.name="Invalid Dependent",n}if(typeof r<"u"&&!this.requests.has(r)){var n=new Error("Dependency ".concat(r," does not exists, Please check the id"));throw n.name="Invalid Dependency",n}if(typeof r<"u"){var o=this.requests.get(t);if(o.dependsOn===void 0&&(o.dependsOn=[]),o.dependsOn.indexOf(r)!==-1){var n=new Error("Dependency ".concat(r," is already added for the request ").concat(t));throw n.name="Duplicate Dependency",n}o.dependsOn.push(r)}else{for(var a=this.requests.entries(),s=void 0,u=a.next();!u.done&&u.value[1].id!==t;)s=u,u=a.next();if(typeof s<"u"){var p=s.value[0];if(u.value[1].dependsOn===void 0&&(u.value[1].dependsOn=[]),u.value[1].dependsOn.indexOf(p)!==-1){var n=new Error("Dependency ".concat(p," is already added for the request ").concat(t));throw n.name="Duplicate Dependency",n}u.value[1].dependsOn.push(p)}else{var n=new Error("Can't add dependency ".concat(r,", There is only a dependent request in the batch"));throw n.name="Invalid Dependency Addition",n}}},e.prototype.removeDependency=function(t,r){var n=this.requests.get(t);if(typeof n>"u"||n.dependsOn===void 0||n.dependsOn.length===0)return!1;if(typeof r<"u"){var o=n.dependsOn.indexOf(r);return o===-1?!1:(n.dependsOn.splice(o,1),!0)}else return delete n.dependsOn,!0},e.requestLimit=20,e})();dn.BatchRequestContent=ny});var pp=b(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.BatchResponseContent=void 0;var oy=(ce(),ie(ue)),iy=(function(){function e(t){this.responses=new Map,this.update(t)}return i(e,"BatchResponseContent"),e.prototype.createResponseObject=function(t){var r=t.body,n={};if(n.status=t.status,t.statusText!==void 0&&(n.statusText=t.statusText),n.headers=t.headers,n.headers!==void 0&&n.headers["Content-Type"]!==void 0&&n.headers["Content-Type"].split(";")[0]==="application/json"){var o=JSON.stringify(r);return new Response(o,n)}return new Response(r,n)},e.prototype.update=function(t){this.nextLink=t["@odata.nextLink"];for(var r=t.responses,n=0,o=r.length;n<o;n++)this.responses.set(r[n].id,this.createResponseObject(r[n]))},e.prototype.getResponseById=function(t){return this.responses.get(t)},e.prototype.getResponses=function(){return this.responses},e.prototype.getResponsesIterator=function(){var t,r;return oy.__generator(this,function(n){switch(n.label){case 0:t=this.responses.entries(),r=t.next(),n.label=1;case 1:return r.done?[3,3]:[4,r.value];case 2:return n.sent(),r=t.next(),[3,1];case 3:return[2]}})},e})();fn.BatchResponseContent=iy});var Ti=b(st=>{"use strict";Object.defineProperty(st,"__esModule",{value:!0});st.GRAPH_URLS=st.GRAPH_BASE_URL=st.GRAPH_API_VERSION=void 0;st.GRAPH_API_VERSION="v1.0";st.GRAPH_BASE_URL="https://graph.microsoft.com/";st.GRAPH_URLS=new Set(["graph.microsoft.com","graph.microsoft.us","dod-graph.microsoft.us","graph.microsoft.de","microsoftgraph.chinacloudapi.cn","canary.graph.microsoft.com"])});var We=b(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.GraphClientError=void 0;var ay=(ce(),ie(ue)),sy=(function(e){ay.__extends(t,e);function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return i(t,"GraphClientError"),t.setGraphClientError=function(r){var n;return r instanceof Error?n=r:(n=new t,n.customError=r),n},t})(Error);mn.GraphClientError=sy});var gn=b(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re.isCustomHost=Re.isGraphURL=Re.serializeContent=Re.urlJoin=Re.oDataQueryNames=void 0;var uy=Ti(),cy=We();Re.oDataQueryNames=["$select","$expand","$orderby","$filter","$top","$skip","$skipToken","$count"];var ly=i(function(e){var t=i(function(a){return a.replace(/\/+$/,"")},"removePostSlash"),r=i(function(a){return a.replace(/^\/+/,"")},"removePreSlash"),n=i(function(a,s){return[t(a),r(s)].join("/")},"joiner"),o=Array.prototype.slice.call(e);return o.reduce(n)},"urlJoin");Re.urlJoin=ly;var py=i(function(e){var t=e&&e.constructor&&e.constructor.name;if(t==="Buffer"||t==="Blob"||t==="File"||t==="FormData"||typeof e=="string")return e;if(t==="ArrayBuffer")e=Buffer.from(e);else if(t==="Int8Array"||t==="Int16Array"||t==="Int32Array"||t==="Uint8Array"||t==="Uint16Array"||t==="Uint32Array"||t==="Uint8ClampedArray"||t==="Float32Array"||t==="Float64Array"||t==="DataView")e=Buffer.from(e.buffer);else try{e=JSON.stringify(e)}catch{throw new Error("Unable to stringify the content")}return e},"serializeContent");Re.serializeContent=py;var dy=i(function(e){return dp(e)},"isGraphURL");Re.isGraphURL=dy;var fy=i(function(e,t){return t.forEach(function(r){return my(r)}),dp(e,t)},"isCustomHost");Re.isCustomHost=fy;var dp=i(function(e,t){if(t===void 0&&(t=uy.GRAPH_URLS),e=e.toLowerCase(),e.indexOf("https://")!==-1){e=e.replace("https://","");var r=e.indexOf(":"),n=e.indexOf("/"),o="";if(n!==-1)return r!==-1&&r<n?(o=e.substring(0,r),t.has(o)):(o=e.substring(0,n),t.has(o))}return!1},"isValidEndpoint"),my=i(function(e){if(e.indexOf("/")!==-1)throw new cy.GraphClientError("Please add only hosts or hostnames to the CustomHosts config. If the url is `http://example.com:3000/`, host is `example:3000`")},"isCustomHostValid")});var ut=b(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.MiddlewareControl=void 0;var gy=(function(){function e(t){t===void 0&&(t=[]),this.middlewareOptions=new Map;for(var r=0,n=t;r<n.length;r++){var o=n[r],a=o.constructor;this.middlewareOptions.set(a,o)}}return i(e,"MiddlewareControl"),e.prototype.getMiddlewareOptions=function(t){return this.middlewareOptions.get(t)},e.prototype.setMiddlewareOptions=function(t,r){this.middlewareOptions.set(t,r)},e})();hn.MiddlewareControl=gy});var Nt=b(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.cloneRequestWithNewUrl=ze.appendRequestHeader=ze.setRequestHeader=ze.getRequestHeader=ze.generateUUID=void 0;var fp=(ce(),ie(ue)),hy=i(function(){for(var e="",t=0;t<32;t++)(t===8||t===12||t===16||t===20)&&(e+="-"),e+=Math.floor(Math.random()*16).toString(16);return e},"generateUUID");ze.generateUUID=hy;var yy=i(function(e,t,r){var n=null;if(typeof Request<"u"&&e instanceof Request)n=e.headers.get(r);else if(typeof t<"u"&&t.headers!==void 0)if(typeof Headers<"u"&&t.headers instanceof Headers)n=t.headers.get(r);else if(t.headers instanceof Array){for(var o=t.headers,a=0,s=o.length;a<s;a++)if(o[a][0]===r){n=o[a][1];break}}else t.headers[r]!==void 0&&(n=t.headers[r]);return n},"getRequestHeader");ze.getRequestHeader=yy;var vy=i(function(e,t,r,n){var o,a;if(typeof Request<"u"&&e instanceof Request)e.headers.set(r,n);else if(typeof t<"u")if(t.headers===void 0)t.headers=new Headers((o={},o[r]=n,o));else if(typeof Headers<"u"&&t.headers instanceof Headers)t.headers.set(r,n);else if(t.headers instanceof Array){for(var s=0,u=t.headers.length;s<u;s++){var p=t.headers[s];if(p[0]===r){p[1]=n;break}}s===u&&t.headers.push([r,n])}else Object.assign(t.headers,(a={},a[r]=n,a))},"setRequestHeader");ze.setRequestHeader=vy;var _y=i(function(e,t,r,n){var o,a;typeof Request<"u"&&e instanceof Request?e.headers.append(r,n):typeof t<"u"&&(t.headers===void 0?t.headers=new Headers((o={},o[r]=n,o)):typeof Headers<"u"&&t.headers instanceof Headers?t.headers.append(r,n):t.headers instanceof Array?t.headers.push([r,n]):t.headers===void 0?t.headers=(a={},a[r]=n,a):t.headers[r]===void 0?t.headers[r]=n:t.headers[r]+=", ".concat(n))},"appendRequestHeader");ze.appendRequestHeader=_y;var Py=i(function(e,t){return fp.__awaiter(void 0,void 0,void 0,function(){var r,n,o,a,s,u,p,d,f,_,y,l,m;return fp.__generator(this,function(P){switch(P.label){case 0:return t.headers.get("Content-Type")?[4,t.blob()]:[3,2];case 1:return n=P.sent(),[3,4];case 2:return[4,Promise.resolve(void 0)];case 3:n=P.sent(),P.label=4;case 4:return r=n,o=t.method,a=t.headers,s=t.referrer,u=t.referrerPolicy,p=t.mode,d=t.credentials,f=t.cache,_=t.redirect,y=t.integrity,l=t.keepalive,m=t.signal,[2,new Request(e,{method:o,headers:a,body:r,referrer:s,referrerPolicy:u,mode:p,credentials:d,cache:f,redirect:_,integrity:y,keepalive:l,signal:m})]}})})},"cloneRequestWithNewUrl");ze.cloneRequestWithNewUrl=Py});var Ai=b(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.AuthenticationHandlerOptions=void 0;var xy=(function(){function e(t,r){this.authenticationProvider=t,this.authenticationProviderOptions=r}return i(e,"AuthenticationHandlerOptions"),e})();yn.AuthenticationHandlerOptions=xy});var Ut=b(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.TelemetryHandlerOptions=Mt.FeatureUsageFlag=void 0;var mp=ut(),Ii;(function(e){e[e.NONE=0]="NONE",e[e.REDIRECT_HANDLER_ENABLED=1]="REDIRECT_HANDLER_ENABLED",e[e.RETRY_HANDLER_ENABLED=2]="RETRY_HANDLER_ENABLED",e[e.AUTHENTICATION_HANDLER_ENABLED=4]="AUTHENTICATION_HANDLER_ENABLED"})(Ii||(Mt.FeatureUsageFlag=Ii={}));var by=(function(){function e(){this.featureUsage=Ii.NONE}return i(e,"TelemetryHandlerOptions"),e.updateFeatureUsageFlag=function(t,r){var n;t.middlewareControl instanceof mp.MiddlewareControl?n=t.middlewareControl.getMiddlewareOptions(e):t.middlewareControl=new mp.MiddlewareControl,typeof n>"u"&&(n=new e,t.middlewareControl.setMiddlewareOptions(e,n)),n.setFeatureUsage(r)},e.prototype.setFeatureUsage=function(t){this.featureUsage=this.featureUsage|t},e.prototype.getFeatureUsage=function(){return this.featureUsage.toString(16)},e})();Mt.TelemetryHandlerOptions=by});var _n=b(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.AuthenticationHandler=void 0;var gp=(ce(),ie(ue)),hp=gn(),Ey=ut(),Ty=Nt(),Ay=Ai(),yp=Ut(),Iy=(function(){function e(t){this.authenticationProvider=t}return i(e,"AuthenticationHandler"),e.prototype.execute=function(t){return gp.__awaiter(this,void 0,void 0,function(){var r,n,o,a,s,u;return gp.__generator(this,function(p){switch(p.label){case 0:return r=typeof t.request=="string"?t.request:t.request.url,(0,hp.isGraphURL)(r)||t.customHosts&&(0,hp.isCustomHost)(r,t.customHosts)?(n=void 0,t.middlewareControl instanceof Ey.MiddlewareControl&&(n=t.middlewareControl.getMiddlewareOptions(Ay.AuthenticationHandlerOptions)),o=void 0,a=void 0,n&&(o=n.authenticationProvider,a=n.authenticationProviderOptions),o||(o=this.authenticationProvider),[4,o.getAccessToken(a)]):[3,2];case 1:return s=p.sent(),u="Bearer ".concat(s),(0,Ty.appendRequestHeader)(t.request,t.options,e.AUTHORIZATION_HEADER,u),yp.TelemetryHandlerOptions.updateFeatureUsageFlag(t,yp.FeatureUsageFlag.AUTHENTICATION_HANDLER_ENABLED),[3,3];case 2:t.options.headers&&delete t.options.headers[e.AUTHORIZATION_HEADER],p.label=3;case 3:return[4,this.nextMiddleware.execute(t)];case 4:return[2,p.sent()]}})})},e.prototype.setNext=function(t){this.nextMiddleware=t},e.AUTHORIZATION_HEADER="Authorization",e})();vn.AuthenticationHandler=Iy});var xn=b(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.HTTPMessageHandler=void 0;var vp=(ce(),ie(ue)),Sy=(function(){function e(){}return i(e,"HTTPMessageHandler"),e.prototype.execute=function(t){return vp.__awaiter(this,void 0,void 0,function(){var r;return vp.__generator(this,function(n){switch(n.label){case 0:return r=t,[4,fetch(t.request,t.options)];case 1:return r.response=n.sent(),[2]}})})},e})();Pn.HTTPMessageHandler=Sy});var _r=b(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.RetryHandlerOptions=void 0;var $y=(function(){function e(t,r,n){if(t===void 0&&(t=e.DEFAULT_DELAY),r===void 0&&(r=e.DEFAULT_MAX_RETRIES),n===void 0&&(n=e.defaultShouldRetry),t>e.MAX_DELAY&&r>e.MAX_MAX_RETRIES){var o=new Error("Delay and MaxRetries should not be more than ".concat(e.MAX_DELAY," and ").concat(e.MAX_MAX_RETRIES));throw o.name="MaxLimitExceeded",o}else if(t>e.MAX_DELAY){var o=new Error("Delay should not be more than ".concat(e.MAX_DELAY));throw o.name="MaxLimitExceeded",o}else if(r>e.MAX_MAX_RETRIES){var o=new Error("MaxRetries should not be more than ".concat(e.MAX_MAX_RETRIES));throw o.name="MaxLimitExceeded",o}else if(t<0&&r<0){var o=new Error("Delay and MaxRetries should not be negative");throw o.name="MinExpectationNotMet",o}else if(t<0){var o=new Error("Delay should not be negative");throw o.name="MinExpectationNotMet",o}else if(r<0){var o=new Error("MaxRetries should not be negative");throw o.name="MinExpectationNotMet",o}this.delay=Math.min(t,e.MAX_DELAY),this.maxRetries=Math.min(r,e.MAX_MAX_RETRIES),this.shouldRetry=n}return i(e,"RetryHandlerOptions"),e.prototype.getMaxDelay=function(){return e.MAX_DELAY},e.DEFAULT_DELAY=3,e.DEFAULT_MAX_RETRIES=3,e.MAX_DELAY=180,e.MAX_MAX_RETRIES=10,e.defaultShouldRetry=function(){return!0},e})();bn.RetryHandlerOptions=$y});var Tn=b(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.RetryHandler=void 0;var Lt=(ce(),ie(ue)),Si=vr(),wy=ut(),_p=Nt(),Pp=_r(),xp=Ut(),Oy=(function(){function e(t){t===void 0&&(t=new Pp.RetryHandlerOptions),this.options=t}return i(e,"RetryHandler"),e.prototype.isRetry=function(t){return e.RETRY_STATUS_CODES.indexOf(t.status)!==-1},e.prototype.isBuffered=function(t,r){var n=typeof t=="string"?r.method:t.method,o=n===Si.RequestMethod.PUT||n===Si.RequestMethod.PATCH||n===Si.RequestMethod.POST;if(o){var a=(0,_p.getRequestHeader)(t,r,"Content-Type")==="application/octet-stream";if(a)return!1}return!0},e.prototype.getDelay=function(t,r,n){var o=i(function(){return Number(Math.random().toFixed(3))},"getRandomness"),a=t.headers!==void 0?t.headers.get(e.RETRY_AFTER_HEADER):null,s;return a!==null?Number.isNaN(Number(a))?s=Math.round((new Date(a).getTime()-Date.now())/1e3):s=Number(a):s=r>=2?this.getExponentialBackOffTime(r)+n+o():n+o(),Math.min(s,this.options.getMaxDelay()+o())},e.prototype.getExponentialBackOffTime=function(t){return Math.round(1/2*(Math.pow(2,t)-1))},e.prototype.sleep=function(t){return Lt.__awaiter(this,void 0,void 0,function(){var r;return Lt.__generator(this,function(n){return r=t*1e3,[2,new Promise(function(o){return setTimeout(o,r)})]})})},e.prototype.getOptions=function(t){var r;return t.middlewareControl instanceof wy.MiddlewareControl&&(r=t.middlewareControl.getMiddlewareOptions(this.options.constructor)),typeof r>"u"&&(r=Object.assign(new Pp.RetryHandlerOptions,this.options)),r},e.prototype.executeWithRetry=function(t,r,n){return Lt.__awaiter(this,void 0,void 0,function(){var o;return Lt.__generator(this,function(a){switch(a.label){case 0:return[4,this.nextMiddleware.execute(t)];case 1:return a.sent(),r<n.maxRetries&&this.isRetry(t.response)&&this.isBuffered(t.request,t.options)&&n.shouldRetry(n.delay,r,t.request,t.options,t.response)?(++r,(0,_p.setRequestHeader)(t.request,t.options,e.RETRY_ATTEMPT_HEADER,r.toString()),o=this.getDelay(t.response,r,n.delay),[4,this.sleep(o)]):[3,4];case 2:return a.sent(),[4,this.executeWithRetry(t,r,n)];case 3:return[2,a.sent()];case 4:return[2]}})})},e.prototype.execute=function(t){return Lt.__awaiter(this,void 0,void 0,function(){var r,n;return Lt.__generator(this,function(o){switch(o.label){case 0:return r=0,n=this.getOptions(t),xp.TelemetryHandlerOptions.updateFeatureUsageFlag(t,xp.FeatureUsageFlag.RETRY_HANDLER_ENABLED),[4,this.executeWithRetry(t,r,n)];case 1:return[2,o.sent()]}})})},e.prototype.setNext=function(t){this.nextMiddleware=t},e.RETRY_STATUS_CODES=[429,503,504],e.RETRY_ATTEMPT_HEADER="Retry-Attempt",e.RETRY_AFTER_HEADER="Retry-After",e})();En.RetryHandler=Oy});var Pr=b(An=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.RedirectHandlerOptions=void 0;var Ry=(function(){function e(t,r){if(t===void 0&&(t=e.DEFAULT_MAX_REDIRECTS),r===void 0&&(r=e.defaultShouldRedirect),t>e.MAX_MAX_REDIRECTS){var n=new Error("MaxRedirects should not be more than ".concat(e.MAX_MAX_REDIRECTS));throw n.name="MaxLimitExceeded",n}if(t<0){var n=new Error("MaxRedirects should not be negative");throw n.name="MinExpectationNotMet",n}this.maxRedirects=t,this.shouldRedirect=r}return i(e,"RedirectHandlerOptions"),e.DEFAULT_MAX_REDIRECTS=5,e.MAX_MAX_REDIRECTS=20,e.defaultShouldRedirect=function(){return!0},e})();An.RedirectHandlerOptions=Ry});var Sn=b(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.RedirectHandler=void 0;var jt=(ce(),ie(ue)),zy=vr(),Cy=ut(),Dy=Nt(),$i=Pr(),bp=Ut(),ky=(function(){function e(t){t===void 0&&(t=new $i.RedirectHandlerOptions),this.options=t}return i(e,"RedirectHandler"),e.prototype.isRedirect=function(t){return e.REDIRECT_STATUS_CODES.indexOf(t.status)!==-1},e.prototype.hasLocationHeader=function(t){return t.headers.has(e.LOCATION_HEADER)},e.prototype.getLocationHeader=function(t){return t.headers.get(e.LOCATION_HEADER)},e.prototype.isRelativeURL=function(t){return t.indexOf("://")===-1},e.prototype.shouldDropAuthorizationHeader=function(t,r){var n=/^[A-Za-z].+?:\/\/.+?(?=\/|$)/,o=n.exec(t),a,s;o!==null&&(a=o[0]);var u=n.exec(r);return u!==null&&(s=u[0]),typeof a<"u"&&typeof s<"u"&&a!==s},e.prototype.updateRequestUrl=function(t,r){return jt.__awaiter(this,void 0,void 0,function(){var n,o;return jt.__generator(this,function(a){switch(a.label){case 0:return n=r,typeof r.request!="string"?[3,1]:(o=t,[3,3]);case 1:return[4,(0,Dy.cloneRequestWithNewUrl)(t,r.request)];case 2:o=a.sent(),a.label=3;case 3:return n.request=o,[2]}})})},e.prototype.getOptions=function(t){var r;return t.middlewareControl instanceof Cy.MiddlewareControl&&(r=t.middlewareControl.getMiddlewareOptions($i.RedirectHandlerOptions)),typeof r>"u"&&(r=Object.assign(new $i.RedirectHandlerOptions,this.options)),r},e.prototype.executeWithRedirect=function(t,r,n){return jt.__awaiter(this,void 0,void 0,function(){var o,a;return jt.__generator(this,function(s){switch(s.label){case 0:return[4,this.nextMiddleware.execute(t)];case 1:return s.sent(),o=t.response,r<n.maxRedirects&&this.isRedirect(o)&&this.hasLocationHeader(o)&&n.shouldRedirect(o)?(++r,o.status!==e.STATUS_CODE_SEE_OTHER?[3,2]:(t.options.method=zy.RequestMethod.GET,delete t.options.body,[3,4])):[3,6];case 2:return a=this.getLocationHeader(o),!this.isRelativeURL(a)&&this.shouldDropAuthorizationHeader(o.url,a)&&delete t.options.headers[e.AUTHORIZATION_HEADER],[4,this.updateRequestUrl(a,t)];case 3:s.sent(),s.label=4;case 4:return[4,this.executeWithRedirect(t,r,n)];case 5:return s.sent(),[3,7];case 6:return[2];case 7:return[2]}})})},e.prototype.execute=function(t){return jt.__awaiter(this,void 0,void 0,function(){var r,n;return jt.__generator(this,function(o){switch(o.label){case 0:return r=0,n=this.getOptions(t),t.options.redirect=e.MANUAL_REDIRECT,bp.TelemetryHandlerOptions.updateFeatureUsageFlag(t,bp.FeatureUsageFlag.REDIRECT_HANDLER_ENABLED),[4,this.executeWithRedirect(t,r,n)];case 1:return[2,o.sent()]}})})},e.prototype.setNext=function(t){this.nextMiddleware=t},e.REDIRECT_STATUS_CODES=[301,302,303,307,308],e.STATUS_CODE_SEE_OTHER=303,e.LOCATION_HEADER="Location",e.AUTHORIZATION_HEADER="Authorization",e.MANUAL_REDIRECT="manual",e})();In.RedirectHandler=ky});var Ep=b($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.PACKAGE_VERSION=void 0;$n.PACKAGE_VERSION="3.0.7"});var Rn=b(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.TelemetryHandler=void 0;var Tp=(ce(),ie(ue)),Ap=gn(),Ny=Ep(),My=ut(),wn=Nt(),Uy=Ut(),Ly=(function(){function e(){}return i(e,"TelemetryHandler"),e.prototype.execute=function(t){return Tp.__awaiter(this,void 0,void 0,function(){var r,n,o,a,s;return Tp.__generator(this,function(u){switch(u.label){case 0:return r=typeof t.request=="string"?t.request:t.request.url,(0,Ap.isGraphURL)(r)||t.customHosts&&(0,Ap.isCustomHost)(r,t.customHosts)?(n=(0,wn.getRequestHeader)(t.request,t.options,e.CLIENT_REQUEST_ID_HEADER),n||(n=(0,wn.generateUUID)(),(0,wn.setRequestHeader)(t.request,t.options,e.CLIENT_REQUEST_ID_HEADER,n)),o="".concat(e.PRODUCT_NAME,"/").concat(Ny.PACKAGE_VERSION),a=void 0,t.middlewareControl instanceof My.MiddlewareControl&&(a=t.middlewareControl.getMiddlewareOptions(Uy.TelemetryHandlerOptions)),a&&(s=a.getFeatureUsage(),o+=" (".concat(e.FEATURE_USAGE_STRING,"=").concat(s,")")),(0,wn.appendRequestHeader)(t.request,t.options,e.SDK_VERSION_HEADER,o)):(delete t.options.headers[e.CLIENT_REQUEST_ID_HEADER],delete t.options.headers[e.SDK_VERSION_HEADER]),[4,this.nextMiddleware.execute(t)];case 1:return[2,u.sent()]}})})},e.prototype.setNext=function(t){this.nextMiddleware=t},e.CLIENT_REQUEST_ID_HEADER="client-request-id",e.SDK_VERSION_HEADER="SdkVersion",e.PRODUCT_NAME="graph-js",e.FEATURE_USAGE_STRING="featureUsage",e})();On.TelemetryHandler=Ly});var Ip=b(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.MiddlewareFactory=void 0;var jy=_n(),Fy=xn(),By=Pr(),Vy=_r(),Hy=Sn(),Zy=Tn(),qy=Rn(),Gy=i(function(){return typeof process=="object"&&typeof require=="function"},"isNodeEnvironment"),Wy=(function(){function e(){}return i(e,"MiddlewareFactory"),e.getDefaultMiddlewareChain=function(t){var r=[],n=new jy.AuthenticationHandler(t),o=new Zy.RetryHandler(new Vy.RetryHandlerOptions),a=new qy.TelemetryHandler,s=new Fy.HTTPMessageHandler;if(r.push(n),r.push(o),Gy()){var u=new Hy.RedirectHandler(new By.RedirectHandlerOptions);r.push(u)}return r.push(a),r.push(s),r},e})();zn.MiddlewareFactory=Wy});var Dn=b(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.ChaosStrategy=void 0;var Sp;(function(e){e[e.MANUAL=0]="MANUAL",e[e.RANDOM=1]="RANDOM"})(Sp||(Cn.ChaosStrategy=Sp={}))});var wi=b(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.ChaosHandlerOptions=void 0;var Ky=Dn(),Jy=(function(){function e(t,r,n,o,a,s){if(t===void 0&&(t=Ky.ChaosStrategy.RANDOM),r===void 0&&(r="Some error Happened"),this.chaosStrategy=t,this.statusCode=n,this.statusMessage=r,this.chaosPercentage=o!==void 0?o:10,this.responseBody=a,this.headers=s,this.chaosPercentage>100)throw new Error("Error Pecentage can not be more than 100")}return i(e,"ChaosHandlerOptions"),e})();kn.ChaosHandlerOptions=Jy});var $p=b(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.httpStatusCode=Ft.methodStatusCode=void 0;Ft.methodStatusCode={GET:[429,500,502,503,504],POST:[429,500,502,503,504,507],PUT:[429,500,502,503,504,507],PATCH:[429,500,502,503,504],DELETE:[429,500,502,503,504,507]};Ft.httpStatusCode={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"}});var Rp=b(Mn=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});Mn.ChaosHandler=void 0;var Nn=(ce(),ie(ue)),Xy=ut(),Yy=Nt(),wp=$p(),Oi=wi(),Op=Dn(),Qy=(function(){function e(t,r){t===void 0&&(t=new Oi.ChaosHandlerOptions),this.options=t,this.manualMap=r}return i(e,"ChaosHandler"),e.prototype.createResponseHeaders=function(t,r,n){var o=t.headers?new Headers(t.headers):new Headers;return o.append("Cache-Control","no-store"),o.append("request-id",r),o.append("client-request-id",r),o.append("x-ms-ags-diagnostic",""),o.append("Date",n),o.append("Strict-Transport-Security",""),t.statusCode===429&&o.append("retry-after","3"),o},e.prototype.createResponseBody=function(t,r,n){if(t.responseBody)return t.responseBody;var o;if(t.statusCode>=400){var a=wp.httpStatusCode[t.statusCode],s=t.statusMessage;o={error:{code:a,message:s,innerError:{"request-id":r,date:n}}}}else o={};return o},e.prototype.createResponse=function(t,r){var n=r.request,o=(0,Yy.generateUUID)(),a=new Date,s=this.createResponseHeaders(t,o,a.toString()),u=this.createResponseBody(t,o,a.toString()),p={url:n,status:t.statusCode,statusText:t.statusMessage,headers:s};r.response=new Response(typeof u=="string"?u:JSON.stringify(u),p)},e.prototype.sendRequest=function(t,r){return Nn.__awaiter(this,void 0,void 0,function(){return Nn.__generator(this,function(n){switch(n.label){case 0:return this.setStatusCode(t,r.request,r.options.method),t.chaosStrategy===Op.ChaosStrategy.MANUAL&&!this.nextMiddleware||Math.floor(Math.random()*100)<t.chaosPercentage?(this.createResponse(t,r),[3,3]):[3,1];case 1:return this.nextMiddleware?[4,this.nextMiddleware.execute(r)]:[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}})})},e.prototype.getRandomStatusCode=function(t){var r=wp.methodStatusCode[t];return r[Math.floor(Math.random()*r.length)]},e.prototype.getRelativeURL=function(t){var r=/https?:\/\/graph\.microsoft\.com\/[^/]+(.+?)(\?|$)/,n;return r.exec(t)!==null&&(n=r.exec(t)[1]),n},e.prototype.setStatusCode=function(t,r,n){var o=this;if(t.chaosStrategy===Op.ChaosStrategy.MANUAL){if(t.statusCode===void 0){var a=this.getRelativeURL(r);this.manualMap.get(a)!==void 0?this.manualMap.get(a).get(n)!==void 0&&(t.statusCode=this.manualMap.get(a).get(n)):this.manualMap.forEach(function(s,u){var p=new RegExp(u+"$");p.test(a)&&o.manualMap.get(u).get(n)!==void 0&&(t.statusCode=o.manualMap.get(u).get(n))})}}else t.statusCode=this.getRandomStatusCode(n)},e.prototype.getOptions=function(t){var r;return t.middlewareControl instanceof Xy.MiddlewareControl&&(r=t.middlewareControl.getMiddlewareOptions(Oi.ChaosHandlerOptions)),typeof r>"u"&&(r=Object.assign(new Oi.ChaosHandlerOptions,this.options)),r},e.prototype.execute=function(t){return Nn.__awaiter(this,void 0,void 0,function(){var r;return Nn.__generator(this,function(n){switch(n.label){case 0:return r=this.getOptions(t),[4,this.sendRequest(r,t)];case 1:return[2,n.sent()]}})})},e.prototype.setNext=function(t){this.nextMiddleware=t},e})();Mn.ChaosHandler=Qy});var xr=b(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.ResponseType=void 0;var zp;(function(e){e.ARRAYBUFFER="arraybuffer",e.BLOB="blob",e.DOCUMENT="document",e.JSON="json",e.RAW="raw",e.STREAM="stream",e.TEXT="text"})(zp||(Un.ResponseType=zp={}))});var zi=b(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.GraphResponseHandler=Bt.DocumentType=void 0;var Ln=(ce(),ie(ue)),ht=xr(),Ri;(function(e){e.TEXT_HTML="text/html",e.TEXT_XML="text/xml",e.APPLICATION_XML="application/xml",e.APPLICATION_XHTML="application/xhtml+xml"})(Ri||(Bt.DocumentType=Ri={}));var jn;(function(e){e.TEXT_PLAIN="text/plain",e.APPLICATION_JSON="application/json"})(jn||(jn={}));var Fn;(function(e){e.DOCUMENT="^(text\\/(html|xml))|(application\\/(xml|xhtml\\+xml))$",e.IMAGE="^image\\/.+"})(Fn||(Fn={}));var ev=(function(){function e(){}return i(e,"GraphResponseHandler"),e.parseDocumentResponse=function(t,r){return typeof DOMParser<"u"?new Promise(function(n,o){t.text().then(function(a){try{var s=new DOMParser,u=s.parseFromString(a,r);n(u)}catch(p){o(p)}})}):Promise.resolve(t.body)},e.convertResponse=function(t,r){return Ln.__awaiter(this,void 0,void 0,function(){var n,o,a,s;return Ln.__generator(this,function(u){switch(u.label){case 0:if(t.status===204)return[2,Promise.resolve()];switch(o=t.headers.get("Content-type"),a=r,a){case ht.ResponseType.ARRAYBUFFER:return[3,1];case ht.ResponseType.BLOB:return[3,3];case ht.ResponseType.DOCUMENT:return[3,5];case ht.ResponseType.JSON:return[3,7];case ht.ResponseType.STREAM:return[3,9];case ht.ResponseType.TEXT:return[3,11]}return[3,13];case 1:return[4,t.arrayBuffer()];case 2:return n=u.sent(),[3,24];case 3:return[4,t.blob()];case 4:return n=u.sent(),[3,24];case 5:return[4,e.parseDocumentResponse(t,Ri.TEXT_XML)];case 6:return n=u.sent(),[3,24];case 7:return[4,t.json()];case 8:return n=u.sent(),[3,24];case 9:return[4,Promise.resolve(t.body)];case 10:return n=u.sent(),[3,24];case 11:return[4,t.text()];case 12:return n=u.sent(),[3,24];case 13:return o===null?[3,22]:(s=o.split(";")[0],new RegExp(Fn.DOCUMENT).test(s)?[4,e.parseDocumentResponse(t,s)]:[3,15]);case 14:return n=u.sent(),[3,21];case 15:return new RegExp(Fn.IMAGE).test(s)?(n=t.blob(),[3,21]):[3,16];case 16:return s!==jn.TEXT_PLAIN?[3,18]:[4,t.text()];case 17:return n=u.sent(),[3,21];case 18:return s!==jn.APPLICATION_JSON?[3,20]:[4,t.json()];case 19:return n=u.sent(),[3,21];case 20:n=Promise.resolve(t.body),u.label=21;case 21:return[3,23];case 22:n=Promise.resolve(t.body),u.label=23;case 23:return[3,24];case 24:return[2,n]}})})},e.getResponse=function(t,r,n){return Ln.__awaiter(this,void 0,void 0,function(){var o;return Ln.__generator(this,function(a){switch(a.label){case 0:return r!==ht.ResponseType.RAW?[3,1]:[2,Promise.resolve(t)];case 1:return[4,e.convertResponse(t,r)];case 2:if(o=a.sent(),t.ok)if(typeof n=="function")n(null,o);else return[2,o];else throw o;a.label=3;case 3:return[2]}})})},e})();Bt.GraphResponseHandler=ev});var Ci=b(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.Range=void 0;var tv=(function(){function e(t,r){t===void 0&&(t=-1),r===void 0&&(r=-1),this.minValue=t,this.maxValue=r}return i(e,"Range"),e})();Bn.Range=tv});var Di=b(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.UploadResult=void 0;var rv=(function(){function e(t,r){this._location=r,this._responseBody=t}return i(e,"UploadResult"),Object.defineProperty(e.prototype,"location",{get:i(function(){return this._location},"get"),set:i(function(t){this._location=t},"set"),enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"responseBody",{get:i(function(){return this._responseBody},"get"),set:i(function(t){this._responseBody=t},"set"),enumerable:!1,configurable:!0}),e.CreateUploadResult=function(t,r){return new e(t,r.get("location"))},e})();Vn.UploadResult=rv});var Ni=b(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.LargeFileUploadTask=void 0;var Ae=(ce(),ie(ue)),ki=We(),nv=zi(),Cp=xr(),Hn=Ci(),ov=Di(),iv=(function(){function e(t,r,n,o){if(o===void 0&&(o={}),this.DEFAULT_FILE_SIZE=5*1024*1024,this.client=t,r.sliceFile)this.file=r;else throw new ki.GraphClientError("Please pass the FileUpload object, StreamUpload object or any custom implementation of the FileObject interface");this.file=r,o.rangeSize||(o.rangeSize=this.DEFAULT_FILE_SIZE),this.options=o,this.uploadSession=n,this.nextRange=new Hn.Range(0,this.options.rangeSize-1)}return i(e,"LargeFileUploadTask"),e.createUploadSession=function(t,r,n,o){return o===void 0&&(o={}),Ae.__awaiter(this,void 0,void 0,function(){var a,s;return Ae.__generator(this,function(u){switch(u.label){case 0:return[4,t.api(r).headers(o).post(n)];case 1:return a=u.sent(),s={url:a.uploadUrl,expiry:new Date(a.expirationDateTime),isCancelled:!1},[2,s]}})})},e.prototype.parseRange=function(t){var r=t[0];if(typeof r>"u"||r==="")return new Hn.Range;var n=r.split("-"),o=parseInt(n[0],10),a=parseInt(n[1],10);return Number.isNaN(a)&&(a=this.file.size-1),new Hn.Range(o,a)},e.prototype.updateTaskStatus=function(t){this.uploadSession.expiry=new Date(t.expirationDateTime),this.nextRange=this.parseRange(t.nextExpectedRanges)},e.prototype.getNextRange=function(){if(this.nextRange.minValue===-1)return this.nextRange;var t=this.nextRange.minValue,r=t+this.options.rangeSize-1;return r>=this.file.size&&(r=this.file.size-1),new Hn.Range(t,r)},e.prototype.sliceFile=function(t){if(console.warn("The LargeFileUploadTask.sliceFile() function has been deprecated and moved into the FileObject interface."),this.file.content instanceof ArrayBuffer||this.file.content instanceof Blob||this.file.content instanceof Uint8Array)return this.file.content.slice(t.minValue,t.maxValue+1);throw new ki.GraphClientError("The LargeFileUploadTask.sliceFile() function expects only Blob, ArrayBuffer or Uint8Array file content. Please note that the sliceFile() function is deprecated.")},e.prototype.upload=function(){return Ae.__awaiter(this,void 0,void 0,function(){var t,r,n,o,a,s,u;return Ae.__generator(this,function(p){switch(p.label){case 0:t=this.options&&this.options.uploadEventHandlers,p.label=1;case 1:if(this.uploadSession.isCancelled)return[3,5];if(r=this.getNextRange(),r.maxValue===-1)throw n=new Error("Task with which you are trying to upload is already completed, Please check for your uploaded file"),n.name="Invalid Session",n;return[4,this.file.sliceFile(r)];case 2:return o=p.sent(),[4,this.uploadSliceGetRawResponse(o,r,this.file.size)];case 3:if(a=p.sent(),!a)throw new ki.GraphClientError("Something went wrong! Large file upload slice response is null.");return[4,nv.GraphResponseHandler.getResponse(a)];case 4:return s=p.sent(),a.status===201||a.status===200&&s.id?(this.reportProgress(t,r),[2,ov.UploadResult.CreateUploadResult(s,a.headers)]):(u={expirationDateTime:s.expirationDateTime||s.ExpirationDateTime,nextExpectedRanges:s.NextExpectedRanges||s.nextExpectedRanges},this.updateTaskStatus(u),this.reportProgress(t,r),[3,1]);case 5:return[2]}})})},e.prototype.reportProgress=function(t,r){t&&t.progress&&t.progress(r,t.extraCallbackParam)},e.prototype.uploadSlice=function(t,r,n){return Ae.__awaiter(this,void 0,void 0,function(){return Ae.__generator(this,function(o){switch(o.label){case 0:return[4,this.client.api(this.uploadSession.url).headers({"Content-Length":"".concat(r.maxValue-r.minValue+1),"Content-Range":"bytes ".concat(r.minValue,"-").concat(r.maxValue,"/").concat(n),"Content-Type":"application/octet-stream"}).put(t)];case 1:return[2,o.sent()]}})})},e.prototype.uploadSliceGetRawResponse=function(t,r,n){return Ae.__awaiter(this,void 0,void 0,function(){return Ae.__generator(this,function(o){switch(o.label){case 0:return[4,this.client.api(this.uploadSession.url).headers({"Content-Length":"".concat(r.maxValue-r.minValue+1),"Content-Range":"bytes ".concat(r.minValue,"-").concat(r.maxValue,"/").concat(n),"Content-Type":"application/octet-stream"}).responseType(Cp.ResponseType.RAW).put(t)];case 1:return[2,o.sent()]}})})},e.prototype.cancel=function(){return Ae.__awaiter(this,void 0,void 0,function(){var t;return Ae.__generator(this,function(r){switch(r.label){case 0:return[4,this.client.api(this.uploadSession.url).responseType(Cp.ResponseType.RAW).delete()];case 1:return t=r.sent(),t.status===204&&(this.uploadSession.isCancelled=!0),[2,t]}})})},e.prototype.getStatus=function(){return Ae.__awaiter(this,void 0,void 0,function(){var t;return Ae.__generator(this,function(r){switch(r.label){case 0:return[4,this.client.api(this.uploadSession.url).get()];case 1:return t=r.sent(),this.updateTaskStatus(t),[2,t]}})})},e.prototype.resume=function(){return Ae.__awaiter(this,void 0,void 0,function(){return Ae.__generator(this,function(t){switch(t.label){case 0:return[4,this.getStatus()];case 1:return t.sent(),[4,this.upload()];case 2:return[2,t.sent()]}})})},e.prototype.getUploadSession=function(){return this.uploadSession},e})();Zn.LargeFileUploadTask=iv});var Mi=b(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.FileUpload=void 0;var av=We(),sv=(function(){function e(t,r,n){if(this.content=t,this.name=r,this.size=n,!t||!r||!n)throw new av.GraphClientError("Please provide the upload content, name of the file and size of the file")}return i(e,"FileUpload"),e.prototype.sliceFile=function(t){return this.content.slice(t.minValue,t.maxValue+1)},e})();qn.FileUpload=sv});var Ui=b(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.getValidRangeSize=void 0;var uv=5*1024*1024,cv=i(function(e){return e>320*1024&&(e=Math.floor(e/(320*1024))*320*1024),e},"roundTo320KB"),lv=i(function(e){e===void 0&&(e=uv);var t=60*1024*1024;return e>t&&(e=t),cv(e)},"getValidRangeSize");Gn.getValidRangeSize=lv});var kp=b(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.OneDriveLargeFileUploadTask=void 0;var Ke=(ce(),ie(ue)),Dp=We(),pv=Mi(),dv=Ni(),fv=Ui(),mv=(function(e){Ke.__extends(t,e);function t(r,n,o,a){return e.call(this,r,n,o,a)||this}return i(t,"OneDriveLargeFileUploadTask"),t.constructCreateSessionUrl=function(r,n){return n===void 0&&(n=t.DEFAULT_UPLOAD_PATH),r=r.trim(),n=n.trim(),n===""&&(n="/"),n[0]!=="/"&&(n="/".concat(n)),n[n.length-1]!=="/"&&(n="".concat(n,"/")),"/me/drive/root:".concat(n.split("/").map(function(o){return encodeURIComponent(o)}).join("/")).concat(encodeURIComponent(r),":/createUploadSession")},t.getFileInfo=function(r,n){var o,a;if(typeof Blob<"u"&&r instanceof Blob)o=new File([r],n),a=o.size;else if(typeof File<"u"&&r instanceof File)o=r,a=o.size;else if(typeof Uint8Array<"u"&&r instanceof Uint8Array){var s=r;a=s.byteLength,o=s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength)}return{content:o,size:a}},t.create=function(r,n,o){return Ke.__awaiter(this,void 0,void 0,function(){var a,s,u;return Ke.__generator(this,function(p){if(!r||!n||!o)throw new Dp.GraphClientError("Please provide the Graph client instance, file object and OneDriveLargeFileUploadOptions value");return a=o.fileName,s=t.getFileInfo(n,a),u=new pv.FileUpload(s.content,a,s.size),[2,this.createTaskWithFileObject(r,u,o)]})})},t.createTaskWithFileObject=function(r,n,o){return Ke.__awaiter(this,void 0,void 0,function(){var a,s,u,p;return Ke.__generator(this,function(d){switch(d.label){case 0:if(!r||!n||!o)throw new Dp.GraphClientError("Please provide the Graph client instance, FileObject interface implementation and OneDriveLargeFileUploadOptions value");return a=o.uploadSessionURL?o.uploadSessionURL:t.constructCreateSessionUrl(o.fileName,o.path),s={fileName:o.fileName,fileDescription:o.fileDescription,conflictBehavior:o.conflictBehavior},[4,t.createUploadSession(r,a,s)];case 1:return u=d.sent(),p=(0,fv.getValidRangeSize)(o.rangeSize),[2,new t(r,n,u,{rangeSize:p,uploadEventHandlers:o.uploadEventHandlers})]}})})},t.createUploadSession=function(r,n,o){return Ke.__awaiter(this,void 0,void 0,function(){var a;return Ke.__generator(this,function(s){return a={item:{"@microsoft.graph.conflictBehavior":o?.conflictBehavior||"rename",name:o?.fileName,description:o?.fileDescription}},[2,e.createUploadSession.call(this,r,n,a)]})})},t.prototype.commit=function(r,n){return n===void 0&&(n="rename"),Ke.__awaiter(this,void 0,void 0,function(){var o;return Ke.__generator(this,function(a){switch(a.label){case 0:return o={name:this.file.name,"@microsoft.graph.conflictBehavior":n,"@microsoft.graph.sourceUrl":this.uploadSession.url},[4,this.client.api(r).put(o)];case 1:return[2,a.sent()]}})})},t.DEFAULT_UPLOAD_PATH="/",t})(dv.LargeFileUploadTask);Wn.OneDriveLargeFileUploadTask=mv});var Mp=b(Kn=>{"use strict";Object.defineProperty(Kn,"__esModule",{value:!0});Kn.StreamUpload=void 0;var Np=(ce(),ie(ue)),br=We(),gv=(function(){function e(t,r,n){if(this.content=t,this.name=r,this.size=n,!t||!r||!n)throw new br.GraphClientError("Please provide the Readable Stream content, name of the file and size of the file")}return i(e,"StreamUpload"),e.prototype.sliceFile=function(t){return Np.__awaiter(this,void 0,void 0,function(){var r,n,o,a,s,u,p;return Np.__generator(this,function(d){switch(d.label){case 0:if(r=t.maxValue-t.minValue+1,n=[],this.previousSlice){if(t.minValue<this.previousSlice.range.minValue)throw new br.GraphClientError("An error occurred while uploading the stream. Please restart the stream upload from the first byte of the file.");if(t.minValue<this.previousSlice.range.maxValue){if(o=this.previousSlice.range.minValue,a=this.previousSlice.range.maxValue,t.minValue===o&&t.maxValue===a)return[2,this.previousSlice.fileSlice];if(t.maxValue===a)return[2,this.previousSlice.fileSlice.slice(t.minValue,t.maxValue+1)];n.push(this.previousSlice.fileSlice.slice(t.minValue,a+1)),r=t.maxValue-a}}return this.content&&this.content.readable?this.content.readableLength>=r?(n.push(this.content.read(r)),[3,3]):[3,1]:[3,4];case 1:return u=(s=n).push,[4,this.readNBytesFromStream(r)];case 2:u.apply(s,[d.sent()]),d.label=3;case 3:return[3,5];case 4:throw new br.GraphClientError("Stream is not readable.");case 5:return p=Buffer.concat(n),this.previousSlice={fileSlice:p,range:t},[2,p]}})})},e.prototype.readNBytesFromStream=function(t){var r=this;return new Promise(function(n,o){var a=[],s=t,u=0;r.content.on("end",function(){if(s>0)return o(new br.GraphClientError("Stream ended before reading required range size"))}),r.content.on("readable",function(){for(var p;u<t&&(p=r.content.read(s))!==null;)u+=p.length,a.push(p),s>0&&(s=t-u);if(u===t)return n(Buffer.concat(a));if(!r.content||!r.content.readable)return o(new br.GraphClientError("Error encountered while reading the stream during the upload"))})})},e})();Kn.StreamUpload=gv});var Up=b(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.PageIterator=void 0;var Vt=(ce(),ie(ue)),hv=(function(){function e(t,r,n,o){this.client=t,this.collection=r.value,this.nextLink=r["@odata.nextLink"],this.deltaLink=r["@odata.deltaLink"],this.callback=n,this.cursor=0,this.complete=!1,this.requestOptions=o}return i(e,"PageIterator"),e.prototype.iterationHelper=function(){if(this.collection===void 0)return!1;for(var t=!0;t&&this.cursor<this.collection.length;){var r=this.collection[this.cursor];t=this.callback(r),this.cursor++}return t},e.prototype.fetchAndUpdateNextPageData=function(){return Vt.__awaiter(this,void 0,void 0,function(){var t,r;return Vt.__generator(this,function(n){switch(n.label){case 0:return t=this.client.api(this.nextLink),this.requestOptions&&(this.requestOptions.headers&&(t=t.headers(this.requestOptions.headers)),this.requestOptions.middlewareOptions&&(t=t.middlewareOptions(this.requestOptions.middlewareOptions)),this.requestOptions.options&&(t=t.options(this.requestOptions.options))),[4,t.get()];case 1:return r=n.sent(),this.collection=r.value,this.cursor=0,this.nextLink=r["@odata.nextLink"],this.deltaLink=r["@odata.deltaLink"],[2]}})})},e.prototype.getDeltaLink=function(){return this.deltaLink},e.prototype.iterate=function(){return Vt.__awaiter(this,void 0,void 0,function(){var t;return Vt.__generator(this,function(r){switch(r.label){case 0:t=this.iterationHelper(),r.label=1;case 1:return t?this.nextLink===void 0?[3,3]:[4,this.fetchAndUpdateNextPageData()]:[3,5];case 2:return r.sent(),t=this.iterationHelper(),[3,4];case 3:t=!1,r.label=4;case 4:return[3,1];case 5:return this.nextLink===void 0&&this.cursor>=this.collection.length&&(this.complete=!0),[2]}})})},e.prototype.resume=function(){return Vt.__awaiter(this,void 0,void 0,function(){return Vt.__generator(this,function(t){return[2,this.iterate()]})})},e.prototype.isComplete=function(){return this.complete},e})();Jn.PageIterator=hv});var Li=b(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.CustomAuthenticationProvider=void 0;var Xn=(ce(),ie(ue)),Lp=We(),yv=(function(){function e(t){this.provider=t}return i(e,"CustomAuthenticationProvider"),e.prototype.getAccessToken=function(){return Xn.__awaiter(this,void 0,void 0,function(){var t=this;return Xn.__generator(this,function(r){return[2,new Promise(function(n,o){t.provider(function(a,s){return Xn.__awaiter(t,void 0,void 0,function(){var u,p;return Xn.__generator(this,function(d){switch(d.label){case 0:return s?(n(s),[3,3]):[3,1];case 1:return a||(u="Access token is undefined or empty. Please provide a valid token. For more help - https://github.com/microsoftgraph/msgraph-sdk-javascript/blob/dev/docs/CustomAuthenticationProvider.md",a=new Lp.GraphClientError(u)),[4,Lp.GraphClientError.setGraphClientError(a)];case 2:p=d.sent(),o(p),d.label=3;case 3:return[2]}})})})})]})})},e})();Yn.CustomAuthenticationProvider=yv});var ji=b(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.GraphError=void 0;var vv=(ce(),ie(ue)),_v=(function(e){vv.__extends(t,e);function t(r,n,o){r===void 0&&(r=-1);var a=e.call(this,n||o&&o.message)||this;return Object.setPrototypeOf(a,t.prototype),a.statusCode=r,a.code=null,a.requestId=null,a.date=new Date,a.body=null,a.stack=o?o.stack:a.stack,a}return i(t,"GraphError"),t})(Error);Qn.GraphError=_v});var Fp=b(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});eo.GraphErrorHandler=void 0;var jp=(ce(),ie(ue)),Fi=ji(),Pv=(function(){function e(){}return i(e,"GraphErrorHandler"),e.constructError=function(t,r,n){var o=new Fi.GraphError(r,"",t);return t.name!==void 0&&(o.code=t.name),o.body=t.toString(),o.date=new Date,o.headers=n?.headers,o},e.constructErrorFromResponse=function(t,r,n){var o=t.error,a=new Fi.GraphError(r,o.message);return a.code=o.code,o.innerError!==void 0&&(a.requestId=o.innerError["request-id"],a.date=new Date(o.innerError.date)),a.body=JSON.stringify(o),a.headers=n?.headers,a},e.getError=function(t,r,n,o){return t===void 0&&(t=null),r===void 0&&(r=-1),jp.__awaiter(this,void 0,void 0,function(){var a;return jp.__generator(this,function(s){if(t&&t.error?a=e.constructErrorFromResponse(t,r,o):t instanceof Error?a=e.constructError(t,r,o):(a=new Fi.GraphError(r),a.body=t),typeof n=="function")n(a,null);else return[2,a];return[2]})})},e})();eo.GraphErrorHandler=Pv});var Bi=b(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});to.GraphRequest=void 0;var te=(ce(),ie(ue)),xv=We(),bv=Fp(),Er=gn(),Ev=zi(),Tv=ut(),yt=vr(),Av=xr(),Iv=(function(){function e(t,r,n){var o=this;this.parsePath=function(a){if(a.indexOf("https://")!==-1){a=a.replace("https://","");var s=a.indexOf("/");s!==-1&&(o.urlComponents.host="https://"+a.substring(0,s),a=a.substring(s+1,a.length));var u=a.indexOf("/");u!==-1&&(o.urlComponents.version=a.substring(0,u),a=a.substring(u+1,a.length))}a.charAt(0)==="/"&&(a=a.substr(1));var p=a.indexOf("?");if(p===-1)o.urlComponents.path=a;else{o.urlComponents.path=a.substr(0,p);for(var d=a.substring(p+1,a.length).split("&"),f=0,_=d;f<_.length;f++){var y=_[f];o.parseQueryParameter(y)}}},this.httpClient=t,this.config=r,this.urlComponents={host:this.config.baseUrl,version:this.config.defaultVersion,oDataQueryParams:{},otherURLQueryParams:{},otherURLQueryOptions:[]},this._headers={},this._options={},this._middlewareOptions=[],this.parsePath(n)}return i(e,"GraphRequest"),e.prototype.addCsvQueryParameter=function(t,r,n){this.urlComponents.oDataQueryParams[t]=this.urlComponents.oDataQueryParams[t]?this.urlComponents.oDataQueryParams[t]+",":"";var o=[];n.length>1&&typeof r=="string"?o=Array.prototype.slice.call(n):typeof r=="string"?o.push(r):o=o.concat(r),this.urlComponents.oDataQueryParams[t]+=o.join(",")},e.prototype.buildFullUrl=function(){var t=(0,Er.urlJoin)([this.urlComponents.host,this.urlComponents.version,this.urlComponents.path])+this.createQueryString();return this.config.debugLogging&&console.log(t),t},e.prototype.createQueryString=function(){var t=this.urlComponents,r=[];if(Object.keys(t.oDataQueryParams).length!==0)for(var n in t.oDataQueryParams)Object.prototype.hasOwnProperty.call(t.oDataQueryParams,n)&&r.push(n+"="+t.oDataQueryParams[n]);if(Object.keys(t.otherURLQueryParams).length!==0)for(var n in t.otherURLQueryParams)Object.prototype.hasOwnProperty.call(t.otherURLQueryParams,n)&&r.push(n+"="+t.otherURLQueryParams[n]);if(t.otherURLQueryOptions.length!==0)for(var o=0,a=t.otherURLQueryOptions;o<a.length;o++){var s=a[o];r.push(s)}return r.length>0?"?"+r.join("&"):""},e.prototype.parseQueryParameter=function(t){if(typeof t=="string")if(t.charAt(0)==="?"&&(t=t.substring(1)),t.indexOf("&")!==-1)for(var r=t.split("&"),n=0,o=r;n<o.length;n++){var a=o[n];this.parseQueryParamenterString(a)}else this.parseQueryParamenterString(t);else if(t.constructor===Object)for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&this.setURLComponentsQueryParamater(s,t[s]);return this},e.prototype.parseQueryParamenterString=function(t){if(this.isValidQueryKeyValuePair(t)){var r=t.indexOf("="),n=t.substring(0,r),o=t.substring(r+1);this.setURLComponentsQueryParamater(n,o)}else this.urlComponents.otherURLQueryOptions.push(t)},e.prototype.setURLComponentsQueryParamater=function(t,r){if(Er.oDataQueryNames.indexOf(t)!==-1){var n=this.urlComponents.oDataQueryParams[t],o=n&&(t==="$expand"||t==="$select"||t==="$orderby");this.urlComponents.oDataQueryParams[t]=o?n+","+r:r}else this.urlComponents.otherURLQueryParams[t]=r},e.prototype.isValidQueryKeyValuePair=function(t){var r=t.indexOf("=");if(r===-1)return!1;var n=t.indexOf("(");return!(n!==-1&&t.indexOf("(")<r)},e.prototype.updateRequestOptions=function(t){var r=te.__assign({},t.headers);if(this.config.fetchOptions!==void 0){var n=te.__assign({},this.config.fetchOptions);Object.assign(t,n),typeof this.config.fetchOptions.headers!==void 0&&(t.headers=te.__assign({},this.config.fetchOptions.headers))}Object.assign(t,this._options),t.headers!==void 0&&Object.assign(r,t.headers),Object.assign(r,this._headers),t.headers=r},e.prototype.send=function(t,r,n){var o;return te.__awaiter(this,void 0,void 0,function(){var a,s,u,p,d,f,_,y;return te.__generator(this,function(l){switch(l.label){case 0:s=new Tv.MiddlewareControl(this._middlewareOptions),this.updateRequestOptions(r),u=(o=this.config)===null||o===void 0?void 0:o.customHosts,l.label=1;case 1:return l.trys.push([1,4,,6]),[4,this.httpClient.sendRequest({request:t,options:r,middlewareControl:s,customHosts:u})];case 2:return p=l.sent(),a=p.response,[4,Ev.GraphResponseHandler.getResponse(a,this._responseType,n)];case 3:return d=l.sent(),[2,d];case 4:if(f=l.sent(),f instanceof xv.GraphClientError)throw f;return _=void 0,a&&(_=a.status),[4,bv.GraphErrorHandler.getError(f,_,n,a)];case 5:throw y=l.sent(),y;case 6:return[2]}})})},e.prototype.setHeaderContentType=function(){if(!this._headers){this.header("Content-Type","application/json");return}for(var t=Object.keys(this._headers),r=0,n=t;r<n.length;r++){var o=n[r];if(o.toLowerCase()==="content-type")return}this.header("Content-Type","application/json")},e.prototype.header=function(t,r){return this._headers[t]=r,this},e.prototype.headers=function(t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this._headers[r]=t[r]);return this},e.prototype.option=function(t,r){return this._options[t]=r,this},e.prototype.options=function(t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this._options[r]=t[r]);return this},e.prototype.middlewareOptions=function(t){return this._middlewareOptions=t,this},e.prototype.version=function(t){return this.urlComponents.version=t,this},e.prototype.responseType=function(t){return this._responseType=t,this},e.prototype.select=function(t){return this.addCsvQueryParameter("$select",t,arguments),this},e.prototype.expand=function(t){return this.addCsvQueryParameter("$expand",t,arguments),this},e.prototype.orderby=function(t){return this.addCsvQueryParameter("$orderby",t,arguments),this},e.prototype.filter=function(t){return this.urlComponents.oDataQueryParams.$filter=t,this},e.prototype.search=function(t){return this.urlComponents.oDataQueryParams.$search=t,this},e.prototype.top=function(t){return this.urlComponents.oDataQueryParams.$top=t,this},e.prototype.skip=function(t){return this.urlComponents.oDataQueryParams.$skip=t,this},e.prototype.skipToken=function(t){return this.urlComponents.oDataQueryParams.$skipToken=t,this},e.prototype.count=function(t){return t===void 0&&(t=!0),this.urlComponents.oDataQueryParams.$count=t.toString(),this},e.prototype.query=function(t){return this.parseQueryParameter(t)},e.prototype.get=function(t){return te.__awaiter(this,void 0,void 0,function(){var r,n,o;return te.__generator(this,function(a){switch(a.label){case 0:return r=this.buildFullUrl(),n={method:yt.RequestMethod.GET},[4,this.send(r,n,t)];case 1:return o=a.sent(),[2,o]}})})},e.prototype.post=function(t,r){return te.__awaiter(this,void 0,void 0,function(){var n,o,a;return te.__generator(this,function(s){switch(s.label){case 0:return n=this.buildFullUrl(),o={method:yt.RequestMethod.POST,body:(0,Er.serializeContent)(t)},a=t&&t.constructor&&t.constructor.name,a==="FormData"?o.headers={}:(this.setHeaderContentType(),o.headers=this._headers),[4,this.send(n,o,r)];case 1:return[2,s.sent()]}})})},e.prototype.create=function(t,r){return te.__awaiter(this,void 0,void 0,function(){return te.__generator(this,function(n){switch(n.label){case 0:return[4,this.post(t,r)];case 1:return[2,n.sent()]}})})},e.prototype.put=function(t,r){return te.__awaiter(this,void 0,void 0,function(){var n,o;return te.__generator(this,function(a){switch(a.label){case 0:return n=this.buildFullUrl(),this.setHeaderContentType(),o={method:yt.RequestMethod.PUT,body:(0,Er.serializeContent)(t)},[4,this.send(n,o,r)];case 1:return[2,a.sent()]}})})},e.prototype.patch=function(t,r){return te.__awaiter(this,void 0,void 0,function(){var n,o;return te.__generator(this,function(a){switch(a.label){case 0:return n=this.buildFullUrl(),this.setHeaderContentType(),o={method:yt.RequestMethod.PATCH,body:(0,Er.serializeContent)(t)},[4,this.send(n,o,r)];case 1:return[2,a.sent()]}})})},e.prototype.update=function(t,r){return te.__awaiter(this,void 0,void 0,function(){return te.__generator(this,function(n){switch(n.label){case 0:return[4,this.patch(t,r)];case 1:return[2,n.sent()]}})})},e.prototype.delete=function(t){return te.__awaiter(this,void 0,void 0,function(){var r,n;return te.__generator(this,function(o){switch(o.label){case 0:return r=this.buildFullUrl(),n={method:yt.RequestMethod.DELETE},[4,this.send(r,n,t)];case 1:return[2,o.sent()]}})})},e.prototype.del=function(t){return te.__awaiter(this,void 0,void 0,function(){return te.__generator(this,function(r){switch(r.label){case 0:return[4,this.delete(t)];case 1:return[2,r.sent()]}})})},e.prototype.getStream=function(t){return te.__awaiter(this,void 0,void 0,function(){var r,n;return te.__generator(this,function(o){switch(o.label){case 0:return r=this.buildFullUrl(),n={method:yt.RequestMethod.GET},this.responseType(Av.ResponseType.STREAM),[4,this.send(r,n,t)];case 1:return[2,o.sent()]}})})},e.prototype.putStream=function(t,r){return te.__awaiter(this,void 0,void 0,function(){var n,o;return te.__generator(this,function(a){switch(a.label){case 0:return n=this.buildFullUrl(),o={method:yt.RequestMethod.PUT,headers:{"Content-Type":"application/octet-stream"},body:t},[4,this.send(n,o,r)];case 1:return[2,a.sent()]}})})},e})();to.GraphRequest=Iv});var Vi=b(ro=>{"use strict";Object.defineProperty(ro,"__esModule",{value:!0});ro.HTTPClient=void 0;var Bp=(ce(),ie(ue)),Sv=(function(){function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(!t||!t.length){var n=new Error;throw n.name="InvalidMiddlewareChain",n.message="Please provide a default middleware chain or custom middleware chain",n}this.setMiddleware.apply(this,t)}return i(e,"HTTPClient"),e.prototype.setMiddleware=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];t.length>1?this.parseMiddleWareArray(t):this.middleware=t[0]},e.prototype.parseMiddleWareArray=function(t){t.forEach(function(r,n){n<t.length-1&&r.setNext(t[n+1])}),this.middleware=t[0]},e.prototype.sendRequest=function(t){return Bp.__awaiter(this,void 0,void 0,function(){var r;return Bp.__generator(this,function(n){switch(n.label){case 0:if(typeof t.request=="string"&&t.options===void 0)throw r=new Error,r.name="InvalidRequestOptions",r.message="Unable to execute the middleware, Please provide valid options for a request",r;return[4,this.middleware.execute(t)];case 1:return n.sent(),[2,t]}})})},e})();ro.HTTPClient=Sv});var Hp=b(no=>{"use strict";Object.defineProperty(no,"__esModule",{value:!0});no.HTTPClientFactory=void 0;var $v=(ce(),ie(ue)),Vp=Vi(),wv=_n(),Ov=xn(),Rv=Pr(),zv=_r(),Cv=Sn(),Dv=Tn(),kv=Rn(),Nv=i(function(){return typeof process=="object"&&typeof require=="function"},"isNodeEnvironment"),Mv=(function(){function e(){}return i(e,"HTTPClientFactory"),e.createWithAuthenticationProvider=function(t){var r=new wv.AuthenticationHandler(t),n=new Dv.RetryHandler(new zv.RetryHandlerOptions),o=new kv.TelemetryHandler,a=new Ov.HTTPMessageHandler;if(r.setNext(n),Nv()){var s=new Cv.RedirectHandler(new Rv.RedirectHandlerOptions);n.setNext(s),s.setNext(o)}else n.setNext(o);return o.setNext(a),e.createWithMiddleware(r)},e.createWithMiddleware=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new(Vp.HTTPClient.bind.apply(Vp.HTTPClient,$v.__spreadArray([void 0],t,!1)))},e})();no.HTTPClientFactory=Mv});var Zp=b(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.validatePolyFilling=void 0;var Uv=i(function(){if(typeof Promise>"u"&&typeof fetch>"u"){var e=new Error("Library cannot function without Promise and fetch. So, please provide polyfill for them.");throw e.name="PolyFillNotAvailable",e}else if(typeof Promise>"u"){var e=new Error("Library cannot function without Promise. So, please provide polyfill for it.");throw e.name="PolyFillNotAvailable",e}else if(typeof fetch>"u"){var e=new Error("Library cannot function without fetch. So, please provide polyfill for it.");throw e.name="PolyFillNotAvailable",e}return!0},"validatePolyFilling");oo.validatePolyFilling=Uv});var Wp=b(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.Client=void 0;var Lv=(ce(),ie(ue)),qp=Ti(),jv=Li(),Fv=Bi(),Gp=Vi(),Bv=Hp(),Vv=Zp(),Hv=(function(){function e(t){this.config={baseUrl:qp.GRAPH_BASE_URL,debugLogging:!1,defaultVersion:qp.GRAPH_API_VERSION},(0,Vv.validatePolyFilling)();for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this.config[r]=t[r]);var n;if(t.authProvider!==void 0&&t.middleware!==void 0){var o=new Error;throw o.name="AmbiguityInInitialization",o.message="Unable to Create Client, Please provide either authentication provider for default middleware chain or custom middleware chain not both",o}else if(t.authProvider!==void 0)n=Bv.HTTPClientFactory.createWithAuthenticationProvider(t.authProvider);else if(t.middleware!==void 0)n=new(Gp.HTTPClient.bind.apply(Gp.HTTPClient,Lv.__spreadArray([void 0],[].concat(t.middleware),!1)));else{var o=new Error;throw o.name="InvalidMiddlewareChain",o.message="Unable to Create Client, Please provide either authentication provider for default middleware chain or custom middleware chain",o}this.httpClient=n}return i(e,"Client"),e.init=function(t){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=n==="authProvider"?new jv.CustomAuthenticationProvider(t[n]):t[n]);return e.initWithMiddleware(r)},e.initWithMiddleware=function(t){return new e(t)},e.prototype.api=function(t){return new Fv.GraphRequest(this.httpClient,this.config,t)},e})();io.Client=Hv});var Jp=b(w=>{"use strict";Object.defineProperty(w,"__esModule",{value:!0});w.ResponseType=w.GraphRequest=w.GraphClientError=w.GraphError=w.CustomAuthenticationProvider=w.Client=w.PageIterator=w.Range=w.UploadResult=w.FileUpload=w.StreamUpload=w.getValidRangeSize=w.OneDriveLargeFileUploadTask=w.LargeFileUploadTask=w.ChaosHandler=w.ChaosStrategy=w.ChaosHandlerOptions=w.TelemetryHandlerOptions=w.FeatureUsageFlag=w.RedirectHandlerOptions=w.RetryHandlerOptions=w.AuthenticationHandlerOptions=w.MiddlewareFactory=w.TelemetryHandler=w.RedirectHandler=w.RetryHandler=w.HTTPMessageHandler=w.AuthenticationHandler=w.BatchResponseContent=w.BatchRequestContent=void 0;var Zv=lp();Object.defineProperty(w,"BatchRequestContent",{enumerable:!0,get:i(function(){return Zv.BatchRequestContent},"get")});var qv=pp();Object.defineProperty(w,"BatchResponseContent",{enumerable:!0,get:i(function(){return qv.BatchResponseContent},"get")});var Gv=_n();Object.defineProperty(w,"AuthenticationHandler",{enumerable:!0,get:i(function(){return Gv.AuthenticationHandler},"get")});var Wv=xn();Object.defineProperty(w,"HTTPMessageHandler",{enumerable:!0,get:i(function(){return Wv.HTTPMessageHandler},"get")});var Kv=Tn();Object.defineProperty(w,"RetryHandler",{enumerable:!0,get:i(function(){return Kv.RetryHandler},"get")});var Jv=Sn();Object.defineProperty(w,"RedirectHandler",{enumerable:!0,get:i(function(){return Jv.RedirectHandler},"get")});var Xv=Rn();Object.defineProperty(w,"TelemetryHandler",{enumerable:!0,get:i(function(){return Xv.TelemetryHandler},"get")});var Yv=Ip();Object.defineProperty(w,"MiddlewareFactory",{enumerable:!0,get:i(function(){return Yv.MiddlewareFactory},"get")});var Qv=Ai();Object.defineProperty(w,"AuthenticationHandlerOptions",{enumerable:!0,get:i(function(){return Qv.AuthenticationHandlerOptions},"get")});var e_=_r();Object.defineProperty(w,"RetryHandlerOptions",{enumerable:!0,get:i(function(){return e_.RetryHandlerOptions},"get")});var t_=Pr();Object.defineProperty(w,"RedirectHandlerOptions",{enumerable:!0,get:i(function(){return t_.RedirectHandlerOptions},"get")});var Kp=Ut();Object.defineProperty(w,"FeatureUsageFlag",{enumerable:!0,get:i(function(){return Kp.FeatureUsageFlag},"get")});Object.defineProperty(w,"TelemetryHandlerOptions",{enumerable:!0,get:i(function(){return Kp.TelemetryHandlerOptions},"get")});var r_=wi();Object.defineProperty(w,"ChaosHandlerOptions",{enumerable:!0,get:i(function(){return r_.ChaosHandlerOptions},"get")});var n_=Dn();Object.defineProperty(w,"ChaosStrategy",{enumerable:!0,get:i(function(){return n_.ChaosStrategy},"get")});var o_=Rp();Object.defineProperty(w,"ChaosHandler",{enumerable:!0,get:i(function(){return o_.ChaosHandler},"get")});var i_=Ni();Object.defineProperty(w,"LargeFileUploadTask",{enumerable:!0,get:i(function(){return i_.LargeFileUploadTask},"get")});var a_=kp();Object.defineProperty(w,"OneDriveLargeFileUploadTask",{enumerable:!0,get:i(function(){return a_.OneDriveLargeFileUploadTask},"get")});var s_=Ui();Object.defineProperty(w,"getValidRangeSize",{enumerable:!0,get:i(function(){return s_.getValidRangeSize},"get")});var u_=Mp();Object.defineProperty(w,"StreamUpload",{enumerable:!0,get:i(function(){return u_.StreamUpload},"get")});var c_=Mi();Object.defineProperty(w,"FileUpload",{enumerable:!0,get:i(function(){return c_.FileUpload},"get")});var l_=Di();Object.defineProperty(w,"UploadResult",{enumerable:!0,get:i(function(){return l_.UploadResult},"get")});var p_=Ci();Object.defineProperty(w,"Range",{enumerable:!0,get:i(function(){return p_.Range},"get")});var d_=Up();Object.defineProperty(w,"PageIterator",{enumerable:!0,get:i(function(){return d_.PageIterator},"get")});var f_=Wp();Object.defineProperty(w,"Client",{enumerable:!0,get:i(function(){return f_.Client},"get")});var m_=Li();Object.defineProperty(w,"CustomAuthenticationProvider",{enumerable:!0,get:i(function(){return m_.CustomAuthenticationProvider},"get")});var g_=ji();Object.defineProperty(w,"GraphError",{enumerable:!0,get:i(function(){return g_.GraphError},"get")});var h_=We();Object.defineProperty(w,"GraphClientError",{enumerable:!0,get:i(function(){return h_.GraphClientError},"get")});var y_=Bi();Object.defineProperty(w,"GraphRequest",{enumerable:!0,get:i(function(){return y_.GraphRequest},"get")});var v_=xr();Object.defineProperty(w,"ResponseType",{enumerable:!0,get:i(function(){return v_.ResponseType},"get")})});var Tr=b((Hi,Zi)=>{(function(e,t){typeof Hi=="object"&&typeof Zi<"u"?Zi.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(Hi,(function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",a="minute",s="hour",u="day",p="week",d="month",f="quarter",_="year",y="date",l="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,P=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,h={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:i(function(N){var S=["th","st","nd","rd"],A=N%100;return"["+N+(S[(A-20)%10]||S[A]||S[0])+"]"},"ordinal")},x=i(function(N,S,A){var R=String(N);return!R||R.length>=S?N:""+Array(S+1-R.length).join(A)+N},"m"),E={s:x,z:i(function(N){var S=-N.utcOffset(),A=Math.abs(S),R=Math.floor(A/60),I=A%60;return(S<=0?"+":"-")+x(R,2,"0")+":"+x(I,2,"0")},"z"),m:i(function N(S,A){if(S.date()<A.date())return-N(A,S);var R=12*(A.year()-S.year())+(A.month()-S.month()),I=S.clone().add(R,d),q=A-I<0,G=S.clone().add(R+(q?-1:1),d);return+(-(R+(A-I)/(q?I-G:G-I))||0)},"t"),a:i(function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},"a"),p:i(function(N){return{M:d,y:_,w:p,d:u,D:y,h:s,m:a,s:o,ms:n,Q:f}[N]||String(N||"").toLowerCase().replace(/s$/,"")},"p"),u:i(function(N){return N===void 0},"u")},H="en",de={};de[H]=h;var xe=i(function(N){return N instanceof be},"p"),Ie=i(function N(S,A,R){var I;if(!S)return H;if(typeof S=="string"){var q=S.toLowerCase();de[q]&&(I=q),A&&(de[q]=A,I=q);var G=S.split("-");if(!I&&G.length>1)return N(G[0])}else{var ee=S.name;de[ee]=S,I=ee}return!R&&I&&(H=I),I||!R&&H},"t"),me=i(function(N,S){if(xe(N))return N.clone();var A=typeof S=="object"?S:{};return A.date=N,A.args=arguments,new be(A)},"w"),W=E;W.l=Ie,W.i=xe,W.w=function(N,S){return me(N,{locale:S.$L,utc:S.$u,x:S.$x,$offset:S.$offset})};var be=(function(){function N(A){this.$L=Ie(A.locale,null,!0),this.parse(A)}i(N,"M");var S=N.prototype;return S.parse=function(A){this.$d=(function(R){var I=R.date,q=R.utc;if(I===null)return new Date(NaN);if(W.u(I))return new Date;if(I instanceof Date)return new Date(I);if(typeof I=="string"&&!/Z$/i.test(I)){var G=I.match(m);if(G){var ee=G[2]-1||0,fe=(G[7]||"0").substring(0,3);return q?new Date(Date.UTC(G[1],ee,G[3]||1,G[4]||0,G[5]||0,G[6]||0,fe)):new Date(G[1],ee,G[3]||1,G[4]||0,G[5]||0,G[6]||0,fe)}}return new Date(I)})(A),this.$x=A.x||{},this.init()},S.init=function(){var A=this.$d;this.$y=A.getFullYear(),this.$M=A.getMonth(),this.$D=A.getDate(),this.$W=A.getDay(),this.$H=A.getHours(),this.$m=A.getMinutes(),this.$s=A.getSeconds(),this.$ms=A.getMilliseconds()},S.$utils=function(){return W},S.isValid=function(){return this.$d.toString()!==l},S.isSame=function(A,R){var I=me(A);return this.startOf(R)<=I&&I<=this.endOf(R)},S.isAfter=function(A,R){return me(A)<this.startOf(R)},S.isBefore=function(A,R){return this.endOf(R)<me(A)},S.$g=function(A,R,I){return W.u(A)?this[R]:this.set(I,A)},S.unix=function(){return Math.floor(this.valueOf()/1e3)},S.valueOf=function(){return this.$d.getTime()},S.startOf=function(A,R){var I=this,q=!!W.u(R)||R,G=W.p(A),ee=i(function(dt,Ee){var Je=W.w(I.$u?Date.UTC(I.$y,Ee,dt):new Date(I.$y,Ee,dt),I);return q?Je:Je.endOf(u)},"l"),fe=i(function(dt,Ee){return W.w(I.toDate()[dt].apply(I.toDate("s"),(q?[0,0,0,0]:[23,59,59,999]).slice(Ee)),I)},"$"),ye=this.$W,Pe=this.$M,we=this.$D,vt="set"+(this.$u?"UTC":"");switch(G){case _:return q?ee(1,0):ee(31,11);case d:return q?ee(1,Pe):ee(0,Pe+1);case p:var pt=this.$locale().weekStart||0,Ht=(ye<pt?ye+7:ye)-pt;return ee(q?we-Ht:we+(6-Ht),Pe);case u:case y:return fe(vt+"Hours",0);case s:return fe(vt+"Minutes",1);case a:return fe(vt+"Seconds",2);case o:return fe(vt+"Milliseconds",3);default:return this.clone()}},S.endOf=function(A){return this.startOf(A,!1)},S.$set=function(A,R){var I,q=W.p(A),G="set"+(this.$u?"UTC":""),ee=(I={},I[u]=G+"Date",I[y]=G+"Date",I[d]=G+"Month",I[_]=G+"FullYear",I[s]=G+"Hours",I[a]=G+"Minutes",I[o]=G+"Seconds",I[n]=G+"Milliseconds",I)[q],fe=q===u?this.$D+(R-this.$W):R;if(q===d||q===_){var ye=this.clone().set(y,1);ye.$d[ee](fe),ye.init(),this.$d=ye.set(y,Math.min(this.$D,ye.daysInMonth())).$d}else ee&&this.$d[ee](fe);return this.init(),this},S.set=function(A,R){return this.clone().$set(A,R)},S.get=function(A){return this[W.p(A)]()},S.add=function(A,R){var I,q=this;A=Number(A);var G=W.p(R),ee=i(function(Pe){var we=me(q);return W.w(we.date(we.date()+Math.round(Pe*A)),q)},"y");if(G===d)return this.set(d,this.$M+A);if(G===_)return this.set(_,this.$y+A);if(G===u)return ee(1);if(G===p)return ee(7);var fe=(I={},I[a]=t,I[s]=r,I[o]=e,I)[G]||1,ye=this.$d.getTime()+A*fe;return W.w(ye,this)},S.subtract=function(A,R){return this.add(-1*A,R)},S.format=function(A){var R=this,I=this.$locale();if(!this.isValid())return I.invalidDate||l;var q=A||"YYYY-MM-DDTHH:mm:ssZ",G=W.z(this),ee=this.$H,fe=this.$m,ye=this.$M,Pe=I.weekdays,we=I.months,vt=I.meridiem,pt=i(function(Ee,Je,Zt,Ir){return Ee&&(Ee[Je]||Ee(R,q))||Zt[Je].slice(0,Ir)},"h"),Ht=i(function(Ee){return W.s(ee%12||12,Ee,"0")},"d"),dt=vt||function(Ee,Je,Zt){var Ir=Ee<12?"AM":"PM";return Zt?Ir.toLowerCase():Ir};return q.replace(P,(function(Ee,Je){return Je||(function(Zt){switch(Zt){case"YY":return String(R.$y).slice(-2);case"YYYY":return W.s(R.$y,4,"0");case"M":return ye+1;case"MM":return W.s(ye+1,2,"0");case"MMM":return pt(I.monthsShort,ye,we,3);case"MMMM":return pt(we,ye);case"D":return R.$D;case"DD":return W.s(R.$D,2,"0");case"d":return String(R.$W);case"dd":return pt(I.weekdaysMin,R.$W,Pe,2);case"ddd":return pt(I.weekdaysShort,R.$W,Pe,3);case"dddd":return Pe[R.$W];case"H":return String(ee);case"HH":return W.s(ee,2,"0");case"h":return Ht(1);case"hh":return Ht(2);case"a":return dt(ee,fe,!0);case"A":return dt(ee,fe,!1);case"m":return String(fe);case"mm":return W.s(fe,2,"0");case"s":return String(R.$s);case"ss":return W.s(R.$s,2,"0");case"SSS":return W.s(R.$ms,3,"0");case"Z":return G}return null})(Ee)||G.replace(":","")}))},S.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},S.diff=function(A,R,I){var q,G=this,ee=W.p(R),fe=me(A),ye=(fe.utcOffset()-this.utcOffset())*t,Pe=this-fe,we=i(function(){return W.m(G,fe)},"D");switch(ee){case _:q=we()/12;break;case d:q=we();break;case f:q=we()/3;break;case p:q=(Pe-ye)/6048e5;break;case u:q=(Pe-ye)/864e5;break;case s:q=Pe/r;break;case a:q=Pe/t;break;case o:q=Pe/e;break;default:q=Pe}return I?q:W.a(q)},S.daysInMonth=function(){return this.endOf(d).$D},S.$locale=function(){return de[this.$L]},S.locale=function(A,R){if(!A)return this.$L;var I=this.clone(),q=Ie(A,R,!0);return q&&(I.$L=q),I},S.clone=function(){return W.w(this.$d,this)},S.toDate=function(){return new Date(this.valueOf())},S.toJSON=function(){return this.isValid()?this.toISOString():null},S.toISOString=function(){return this.$d.toISOString()},S.toString=function(){return this.$d.toUTCString()},N})(),Ar=be.prototype;return me.prototype=Ar,[["$ms",n],["$s",o],["$m",a],["$H",s],["$W",u],["$M",d],["$y",_],["$D",y]].forEach((function(N){Ar[N[1]]=function(S){return this.$g(S,N[0],N[1])}})),me.extend=function(N,S){return N.$i||(N(S,be,me),N.$i=!0),me},me.locale=Ie,me.isDayjs=xe,me.unix=function(N){return me(1e3*N)},me.en=de[H],me.Ls=de,me.p={},me}))});var A_={};co(A_,{microsoftOutlook:()=>T_});module.exports=ie(A_);var Pd=Object.freeze({status:"aborted"});function O(e,t,r){function n(u,p){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:p,constr:s,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,p);let d=s.prototype,f=Object.keys(d);for(let _=0;_<f.length;_++){let y=f[_];y in u||(u[y]=d[y].bind(u))}}i(n,"init");let o=r?.Parent??Object;class a extends o{static{i(this,"Definition")}}Object.defineProperty(a,"name",{value:e});function s(u){var p;let d=r?.Parent?new a:this;n(d,u),(p=d._zod).deferred??(p.deferred=[]);for(let f of d._zod.deferred)f();return d}return i(s,"_"),Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:i(u=>r?.Parent&&u instanceof r.Parent?!0:u?._zod?.traits?.has(e),"value")}),Object.defineProperty(s,"name",{value:e}),s}i(O,"$constructor");var Ne=class extends Error{static{i(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Sr=class extends Error{static{i(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},lo={};function Fe(e){return e&&Object.assign(lo,e),lo}i(Fe,"config");function fo(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}i(fo,"getEnumValues");function Xi(e,t){return typeof t=="bigint"?t.toString():t}i(Xi,"jsonStringifyReplacer");function wr(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}i(wr,"cached");function Yi(e){return e==null}i(Yi,"nullish");function Or(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}i(Or,"cleanRegex");var Ji=Symbol("evaluating");function ge(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Ji)return n===void 0&&(n=Ji,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}i(ge,"defineLazy");var mo="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Gt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}i(Gt,"isObject");var xd=wr(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Qi(e){if(Gt(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Gt(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}i(Qi,"isPlainObject");var ea=new Set(["string","number","symbol"]);function _t(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}i(_t,"escapeRegex");function Rr(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}i(Rr,"clone");function re(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:i(()=>t,"error")};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:i(()=>t.error,"error")}:t}i(re,"normalizeParams");function ta(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}i(ta,"optionalKeys");var ra={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Pt(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}i(Pt,"aborted");function Xe(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}i(Xe,"prefixIssues");function $r(e){return typeof e=="string"?e:e?.message}i($r,"unwrapMessage");function Ye(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let o=$r(e.inst?._zod.def?.error?.(e))??$r(t?.error?.(e))??$r(r.customError?.(e))??$r(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}i(Ye,"finalizeIssue");function na(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}i(na,"getLengthableOrigin");function go(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}i(go,"issue");var oa=i((e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Xi,2),Object.defineProperty(e,"toString",{value:i(()=>e.message,"value"),enumerable:!1})},"initializer"),ia=O("$ZodError",oa),Wt=O("$ZodError",oa,{Parent:Error});var Ed=i(e=>(t,r,n,o)=>{let a=n?Object.assign(n,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},a);if(s instanceof Promise)throw new Ne;if(s.issues.length){let u=new(o?.Err??e)(s.issues.map(p=>Ye(p,a,Fe())));throw mo(u,o?.callee),u}return s.value},"_parse"),zr=Ed(Wt),Td=i(e=>async(t,r,n,o)=>{let a=n?Object.assign(n,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let u=new(o?.Err??e)(s.issues.map(p=>Ye(p,a,Fe())));throw mo(u,o?.callee),u}return s.value},"_parseAsync"),Cr=Td(Wt),Ad=i(e=>(t,r,n)=>{let o=n?{...n,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise)throw new Ne;return a.issues.length?{success:!1,error:new(e??ia)(a.issues.map(s=>Ye(s,o,Fe())))}:{success:!0,data:a.value}},"_safeParse"),Kt=Ad(Wt),Id=i(e=>async(t,r,n)=>{let o=n?Object.assign(n,{async:!0}):{async:!0},a=t._zod.run({value:r,issues:[]},o);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(s=>Ye(s,o,Fe())))}:{success:!0,data:a.value}},"_safeParseAsync"),Jt=Id(Wt);var Sd="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",$d=new RegExp(`^${Sd}$`);var aa=i(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),sa=/^-?\d+n?$/,ua=/^-?\d+$/,ho=/^-?\d+(?:\.\d+)?$/,ca=/^(?:true|false)$/i;var Qe=O("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),wd={number:"number",bigint:"bigint",object:"date"};var la=O("$ZodCheckGreaterThan",(e,t)=>{Qe.init(e,t);let r=wd[typeof t.value];e._zod.onattach.push(n=>{let o=n._zod.bag,a=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>a&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}});var pa=O("$ZodCheckNumberFormat",(e,t)=>{Qe.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[o,a]=ra[t.format];e._zod.onattach.push(s=>{let u=s._zod.bag;u.format=t.format,u.minimum=o,u.maximum=a,r&&(u.pattern=ua)}),e._zod.check=s=>{let u=s.value;if(r){if(!Number.isInteger(u)){s.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?s.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):s.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}u<o&&s.issues.push({origin:"number",input:u,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),u>a&&s.issues.push({origin:"number",input:u,code:"too_big",maximum:a,inclusive:!0,inst:e,continue:!t.abort})}});var da=O("$ZodCheckMinLength",(e,t)=>{var r;Qe.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!Yi(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let o=n.value;if(o.length>=t.minimum)return;let s=na(o);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}});var yo=O("$ZodCheckStringFormat",(e,t)=>{var r,n;Qe.init(e,t),e._zod.onattach.push(o=>{let a=o._zod.bag;a.format=t.format,t.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),fa=O("$ZodCheckRegex",(e,t)=>{yo.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}});var ga={major:4,minor:3,patch:6};var le=O("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=ga;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let o of n)for(let a of o._zod.onattach)a(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let o=i((s,u,p)=>{let d=Pt(s),f;for(let _ of u){if(_._zod.def.when){if(!_._zod.def.when(s))continue}else if(d)continue;let y=s.issues.length,l=_._zod.check(s);if(l instanceof Promise&&p?.async===!1)throw new Ne;if(f||l instanceof Promise)f=(f??Promise.resolve()).then(async()=>{await l,s.issues.length!==y&&(d||(d=Pt(s,y)))});else{if(s.issues.length===y)continue;d||(d=Pt(s,y))}}return f?f.then(()=>s):s},"runChecks"),a=i((s,u,p)=>{if(Pt(s))return s.aborted=!0,s;let d=o(u,n,p);if(d instanceof Promise){if(p.async===!1)throw new Ne;return d.then(f=>e._zod.parse(f,p))}return e._zod.parse(d,p)},"handleCanaryResult");e._zod.run=(s,u)=>{if(u.skipChecks)return e._zod.parse(s,u);if(u.direction==="backward"){let d=e._zod.parse({value:s.value,issues:[]},{...u,skipChecks:!0});return d instanceof Promise?d.then(f=>a(f,s,u)):a(d,s,u)}let p=e._zod.parse(s,u);if(p instanceof Promise){if(u.async===!1)throw new Ne;return p.then(d=>o(d,n,u))}return o(p,n,u)}}ge(e,"~standard",()=>({validate:i(o=>{try{let a=Kt(e,o);return a.success?{value:a.data}:{issues:a.error?.issues}}catch{return Jt(e,o).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Nr=O("$ZodString",(e,t)=>{le.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??aa(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),vo=O("$ZodStringFormat",(e,t)=>{yo.init(e,t),Nr.init(e,t)});var Pa=O("$ZodURL",(e,t)=>{vo.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),o=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=o.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}});var _o=O("$ZodNumber",(e,t)=>{le.init(e,t),e._zod.pattern=e._zod.bag.pattern??ho,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let a=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...a?{received:a}:{}}),r}}),xa=O("$ZodNumberFormat",(e,t)=>{pa.init(e,t),_o.init(e,t)}),Po=O("$ZodBoolean",(e,t)=>{le.init(e,t),e._zod.pattern=ca,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),ba=O("$ZodBigInt",(e,t)=>{le.init(e,t),e._zod.pattern=sa,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}});var Ea=O("$ZodAny",(e,t)=>{le.init(e,t),e._zod.parse=r=>r}),Ta=O("$ZodUnknown",(e,t)=>{le.init(e,t),e._zod.parse=r=>r});var Aa=O("$ZodVoid",(e,t)=>{le.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"void",code:"invalid_type",input:o,inst:e}),r}}),Ia=O("$ZodDate",(e,t)=>{le.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let o=r.value,a=o instanceof Date;return a&&!Number.isNaN(o.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:o,...a?{received:"Invalid Date"}:{},inst:e}),r}});function ha(e,t,r){e.issues.length&&t.issues.push(...Xe(r,e.issues)),t.value[r]=e.value}i(ha,"handleArrayResult");var Sa=O("$ZodArray",(e,t)=>{le.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);let a=[];for(let s=0;s<o.length;s++){let u=o[s],p=t.element._zod.run({value:u,issues:[]},n);p instanceof Promise?a.push(p.then(d=>ha(d,r,s))):ha(p,r,s)}return a.length?Promise.all(a).then(()=>r):r}});function kr(e,t,r,n,o){if(e.issues.length){if(o&&!(r in n))return;t.issues.push(...Xe(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}i(kr,"handlePropertyResult");function Od(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=ta(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}i(Od,"normalizeDef");function Rd(e,t,r,n,o,a){let s=[],u=o.keySet,p=o.catchall._zod,d=p.def.type,f=p.optout==="optional";for(let _ in t){if(u.has(_))continue;if(d==="never"){s.push(_);continue}let y=p.run({value:t[_],issues:[]},n);y instanceof Promise?e.push(y.then(l=>kr(l,r,_,t,f))):kr(y,r,_,t,f)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:a}),e.length?Promise.all(e).then(()=>r):r}i(Rd,"handleCatchall");var $a=O("$ZodObject",(e,t)=>{if(le.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let u=t.shape;Object.defineProperty(t,"shape",{get:i(()=>{let p={...u};return Object.defineProperty(t,"shape",{value:p}),p},"get")})}let n=wr(()=>Od(t));ge(e._zod,"propValues",()=>{let u=t.shape,p={};for(let d in u){let f=u[d]._zod;if(f.values){p[d]??(p[d]=new Set);for(let _ of f.values)p[d].add(_)}}return p});let o=Gt,a=t.catchall,s;e._zod.parse=(u,p)=>{s??(s=n.value);let d=u.value;if(!o(d))return u.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),u;u.value={};let f=[],_=s.shape;for(let y of s.keys){let l=_[y],m=l._zod.optout==="optional",P=l._zod.run({value:d[y],issues:[]},p);P instanceof Promise?f.push(P.then(h=>kr(h,u,y,d,m))):kr(P,u,y,d,m)}return a?Rd(f,d,u,p,n.value,e):f.length?Promise.all(f).then(()=>u):u}});function ya(e,t,r,n){for(let a of e)if(a.issues.length===0)return t.value=a.value,t;let o=e.filter(a=>!Pt(a));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(a=>a.issues.map(s=>Ye(s,n,Fe())))}),t)}i(ya,"handleUnionResults");var xo=O("$ZodUnion",(e,t)=>{le.init(e,t),ge(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),ge(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),ge(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),ge(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){let o=t.options.map(a=>a._zod.pattern);return new RegExp(`^(${o.map(a=>Or(a.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(o,a)=>{if(r)return n(o,a);let s=!1,u=[];for(let p of t.options){let d=p._zod.run({value:o.value,issues:[]},a);if(d instanceof Promise)u.push(d),s=!0;else{if(d.issues.length===0)return d;u.push(d)}}return s?Promise.all(u).then(p=>ya(p,o,e,a)):ya(u,o,e,a)}});var wa=O("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,xo.init(e,t);let r=e._zod.parse;ge(e._zod,"propValues",()=>{let o={};for(let a of t.options){let s=a._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let[u,p]of Object.entries(s)){o[u]||(o[u]=new Set);for(let d of p)o[u].add(d)}}return o});let n=wr(()=>{let o=t.options,a=new Map;for(let s of o){let u=s._zod.propValues?.[t.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let p of u){if(a.has(p))throw new Error(`Duplicate discriminator value "${String(p)}"`);a.set(p,s)}}return a});e._zod.parse=(o,a)=>{let s=o.value;if(!Gt(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),o;let u=n.value.get(s?.[t.discriminator]);return u?u._zod.run(o,a):t.unionFallback?r(o,a):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),o)}});var Oa=O("$ZodRecord",(e,t)=>{le.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!Qi(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),r;let a=[],s=t.keyType._zod.values;if(s){r.value={};let u=new Set;for(let d of s)if(typeof d=="string"||typeof d=="number"||typeof d=="symbol"){u.add(typeof d=="number"?d.toString():d);let f=t.valueType._zod.run({value:o[d],issues:[]},n);f instanceof Promise?a.push(f.then(_=>{_.issues.length&&r.issues.push(...Xe(d,_.issues)),r.value[d]=_.value})):(f.issues.length&&r.issues.push(...Xe(d,f.issues)),r.value[d]=f.value)}let p;for(let d in o)u.has(d)||(p=p??[],p.push(d));p&&p.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:p})}else{r.value={};for(let u of Reflect.ownKeys(o)){if(u==="__proto__")continue;let p=t.keyType._zod.run({value:u,issues:[]},n);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&ho.test(u)&&p.issues.length){let _=t.keyType._zod.run({value:Number(u),issues:[]},n);if(_ instanceof Promise)throw new Error("Async schemas not supported in object keys currently");_.issues.length===0&&(p=_)}if(p.issues.length){t.mode==="loose"?r.value[u]=o[u]:r.issues.push({code:"invalid_key",origin:"record",issues:p.issues.map(_=>Ye(_,n,Fe())),input:u,path:[u],inst:e});continue}let f=t.valueType._zod.run({value:o[u],issues:[]},n);f instanceof Promise?a.push(f.then(_=>{_.issues.length&&r.issues.push(...Xe(u,_.issues)),r.value[p.value]=_.value})):(f.issues.length&&r.issues.push(...Xe(u,f.issues)),r.value[p.value]=f.value)}}return a.length?Promise.all(a).then(()=>r):r}});var Ra=O("$ZodEnum",(e,t)=>{le.init(e,t);let r=fo(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>ea.has(typeof o)).map(o=>typeof o=="string"?_t(o):o.toString()).join("|")})$`),e._zod.parse=(o,a)=>{let s=o.value;return n.has(s)||o.issues.push({code:"invalid_value",values:r,input:s,inst:e}),o}}),za=O("$ZodLiteral",(e,t)=>{if(le.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?_t(n):n?_t(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,o)=>{let a=n.value;return r.has(a)||n.issues.push({code:"invalid_value",values:t.values,input:a,inst:e}),n}});var Ca=O("$ZodTransform",(e,t)=>{le.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Sr(e.constructor.name);let o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(r.value=s,r));if(o instanceof Promise)throw new Ne;return r.value=o,r}});function va(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}i(va,"handleOptionalResult");var Da=O("$ZodOptional",(e,t)=>{le.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ge(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ge(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Or(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(a=>va(a,r.value)):va(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var ka=O("$ZodNullable",(e,t)=>{le.init(e,t),ge(e._zod,"optin",()=>t.innerType._zod.optin),ge(e._zod,"optout",()=>t.innerType._zod.optout),ge(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Or(r.source)}|null)$`):void 0}),ge(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)});var Na=O("$ZodPipe",(e,t)=>{le.init(e,t),ge(e._zod,"values",()=>t.in._zod.values),ge(e._zod,"optin",()=>t.in._zod.optin),ge(e._zod,"optout",()=>t.out._zod.optout),ge(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let a=t.out._zod.run(r,n);return a instanceof Promise?a.then(s=>Dr(s,t.in,n)):Dr(a,t.in,n)}let o=t.in._zod.run(r,n);return o instanceof Promise?o.then(a=>Dr(a,t.out,n)):Dr(o,t.out,n)}});function Dr(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}i(Dr,"handlePipeResult");var Ma=O("$ZodCustom",(e,t)=>{Qe.init(e,t),le.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(a=>_a(a,r,n,e));_a(o,r,n,e)}});function _a(e,t,r,n){if(!e){let o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(go(o))}}i(_a,"handleRefineResult");var La;var bo=class{static{i(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function ja(){return new bo}i(ja,"registry");(La=globalThis).__zod_globalRegistry??(La.__zod_globalRegistry=ja());var Eo=globalThis.__zod_globalRegistry;function Fa(e,t){return new e({type:"string",...re(t)})}i(Fa,"_string");function Ba(e,t){return new e({type:"string",coerce:!0,...re(t)})}i(Ba,"_coercedString");function Va(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...re(t)})}i(Va,"_url");function Ha(e,t){return new e({type:"number",checks:[],...re(t)})}i(Ha,"_number");function Za(e,t){return new e({type:"number",coerce:!0,checks:[],...re(t)})}i(Za,"_coercedNumber");function qa(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...re(t)})}i(qa,"_int");function Ga(e,t){return new e({type:"boolean",...re(t)})}i(Ga,"_boolean");function Wa(e,t){return new e({type:"boolean",coerce:!0,...re(t)})}i(Wa,"_coercedBoolean");function Ka(e,t){return new e({type:"bigint",coerce:!0,...re(t)})}i(Ka,"_coercedBigint");function Ja(e){return new e({type:"any"})}i(Ja,"_any");function Xa(e){return new e({type:"unknown"})}i(Xa,"_unknown");function Ya(e,t){return new e({type:"void",...re(t)})}i(Ya,"_void");function Qa(e,t){return new e({type:"date",coerce:!0,...re(t)})}i(Qa,"_coercedDate");function Mr(e,t){return new la({check:"greater_than",...re(t),value:e,inclusive:!0})}i(Mr,"_gte");function De(e,t){return new da({check:"min_length",...re(t),minimum:e})}i(De,"_minLength");function et(e,t){return new fa({check:"string_format",format:"regex",...re(t),pattern:e})}i(et,"_regex");function es(e,t,r){let n=re(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}i(es,"_custom");var he=O("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");le.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>zr(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>Kt(e,r,n),e.parseAsync=async(r,n)=>Cr(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>Jt(e,r,n),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0}),e.with=e.check,e.clone=(r,n)=>Rr(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.apply=r=>r(e)}),Lr=O("ZodMiniString",(e,t)=>{Nr.init(e,t),he.init(e,t)});function c(e){return Fa(Lr,e)}i(c,"string");var ts=O("ZodMiniStringFormat",(e,t)=>{vo.init(e,t),Lr.init(e,t)});var Hd=O("ZodMiniURL",(e,t)=>{Pa.init(e,t),ts.init(e,t)});function rs(e){return Va(Hd,e)}i(rs,"url");var jr=O("ZodMiniNumber",(e,t)=>{_o.init(e,t),he.init(e,t)});function ve(e){return Ha(jr,e)}i(ve,"number");var Zd=O("ZodMiniNumberFormat",(e,t)=>{xa.init(e,t),jr.init(e,t)});function ns(e){return qa(Zd,e)}i(ns,"int");var To=O("ZodMiniBoolean",(e,t)=>{Po.init(e,t),he.init(e,t)});function Y(e){return Ga(To,e)}i(Y,"boolean");var os=O("ZodMiniBigInt",(e,t)=>{ba.init(e,t),he.init(e,t)});var qd=O("ZodMiniAny",(e,t)=>{Ea.init(e,t),he.init(e,t)});function Yt(){return Ja(qd)}i(Yt,"any");var Gd=O("ZodMiniUnknown",(e,t)=>{Ta.init(e,t),he.init(e,t)});function F(){return Xa(Gd)}i(F,"unknown");var Wd=O("ZodMiniVoid",(e,t)=>{Aa.init(e,t),he.init(e,t)});function is(e){return Ya(Wd,e)}i(is,"_void");var as=O("ZodMiniDate",(e,t)=>{Ia.init(e,t),he.init(e,t)});var Kd=O("ZodMiniArray",(e,t)=>{Sa.init(e,t),he.init(e,t)});function M(e,t){return new Kd({type:"array",element:e,...re(t)})}i(M,"array");var Jd=O("ZodMiniObject",(e,t)=>{$a.init(e,t),he.init(e,t),ge(e,"shape",()=>t.shape)});function g(e,t){let r={type:"object",shape:e??{},...re(t)};return new Jd(r)}i(g,"object");var Xd=O("ZodMiniUnion",(e,t)=>{xo.init(e,t),he.init(e,t)});function Z(e,t){return new Xd({type:"union",options:e,...re(t)})}i(Z,"union");var Yd=O("ZodMiniDiscriminatedUnion",(e,t)=>{wa.init(e,t),he.init(e,t)});function tt(e,t,r){return new Yd({type:"union",options:t,discriminator:e,...re(r)})}i(tt,"discriminatedUnion");var Qd=O("ZodMiniRecord",(e,t)=>{Oa.init(e,t),he.init(e,t)});function B(e,t,r){return new Qd({type:"record",keyType:e,valueType:t,...re(r)})}i(B,"record");var ef=O("ZodMiniEnum",(e,t)=>{Ra.init(e,t),he.init(e,t),e.options=Object.values(t.entries)});function D(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new ef({type:"enum",entries:r,...re(t)})}i(D,"_enum");var tf=O("ZodMiniLiteral",(e,t)=>{za.init(e,t),he.init(e,t)});function C(e,t){return new tf({type:"literal",values:Array.isArray(e)?e:[e],...re(t)})}i(C,"literal");var rf=O("ZodMiniTransform",(e,t)=>{Ca.init(e,t),he.init(e,t)});function rt(e){return new rf({type:"transform",transform:e})}i(rt,"transform");var nf=O("ZodMiniOptional",(e,t)=>{Da.init(e,t),he.init(e,t)});function v(e){return new nf({type:"optional",innerType:e})}i(v,"optional");var of=O("ZodMiniNullable",(e,t)=>{ka.init(e,t),he.init(e,t)});function Qt(e){return new of({type:"nullable",innerType:e})}i(Qt,"nullable");var af=O("ZodMiniPipe",(e,t)=>{Na.init(e,t),he.init(e,t)});function nt(e,t){return new af({type:"pipe",in:e,out:t})}i(nt,"pipe");var sf=O("ZodMiniCustom",(e,t)=>{Ma.init(e,t),he.init(e,t)});function Fr(e,t){return es(sf,e??(()=>!0),t)}i(Fr,"custom");var er={};co(er,{bigint:()=>ff,boolean:()=>df,date:()=>mf,number:()=>pf,string:()=>lf});function lf(e){return Ba(Lr,e)}i(lf,"string");function pf(e){return Za(jr,e)}i(pf,"number");function df(e){return Wa(To,e)}i(df,"boolean");function ff(e){return Ka(os,e)}i(ff,"bigint");function mf(e){return Qa(as,e)}i(mf,"date");var Io=g({retryOnFailure:g({defaultValue:v(Y()),hide:v(Y())}),continueOnFailure:g({defaultValue:v(Y()),hide:v(Y())})}),Ao=class{constructor(t,r,n,o,a,s,u,p,d,f,_,y,l){this.name=t;this.displayName=r;this.description=n;this.props=o;this.propertyGroups=a;this.run=s;this.test=u;this.requireAuth=p;this.errorHandlingOptions=d;this.outputSchema=f;this.audience=_;this.aiMetadata=y;this.classification=l}static{i(this,"IAction")}},ne=i(e=>new Ao(e.name,e.displayName,e.description,e.props,e.propertyGroups,e.run,e.test??e.run,e.requireAuth??!0,e.errorHandlingOptions??{continueOnFailure:{defaultValue:!1},retryOnFailure:{defaultValue:!1}},e.outputSchema,e.audience,e.aiMetadata,e.classification),"createAction");var J=g({displayName:c(),description:v(c()),advanced:v(Y()),width:v(D(["half","full"])),icon:v(c()),placeholder:v(c())}),V=i((e,t)=>g({type:C(t),required:Y(),defaultValue:v(Yt())}),"TPropertyValue");var Se=g({...J.shape,...V(c(),"SHORT_TEXT").shape}),Be=g({...J.shape,...V(c(),"LONG_TEXT").shape});var us=g({label:c(),value:F(),description:v(c()),icon:v(c())}),Br=g({disabled:v(Y()),placeholder:v(c()),options:M(us)});var hf=D(["cards"]),$e=g({...J.shape,options:Br,display:v(hf),...V(F(),"STATIC_DROPDOWN").shape}),Ve=g({...J.shape,options:Br,...V(M(F()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var So=g({...J.shape,...V(F(),"DROPDOWN").shape,refreshers:M(c())}),tr=g({...J.shape,...V(M(F()),"MULTI_SELECT_DROPDOWN").shape,refreshers:M(c())});var He=g({...J.shape,reveals:v(M(c())),...V(Y(),"CHECKBOX").shape});var Ze=g({...J.shape,display:v(D(["stepper"])),min:v(ve()),max:v(ve()),step:v(ve()),...V(ve(),"NUMBER").shape});var rr=g({...J.shape,streaming:v(Y()),...V(F(),"FILE").shape});var nr=g({...J.shape,...V(c(),"DATE_TIME").shape});var cs=B(c(),Z([Se,Be,$e,tr,Ve,He,Ze,rr,nr])),or=g({...J.shape,properties:cs,...V(M(F()),"ARRAY").shape});var ls=D(["any_time","last_24_hours","last_7_days","last_30_days","last_90_days","this_month","custom"]),ps=g({preset:v(ls),after:v(c()),before:v(c())}),$o=g({...J.shape,display:v(D(["dropdown"])),...V(ps,"DATE_RANGE").shape});var ir=g({...J.shape,...V(Z([B(c(),F())]),"JSON").shape});var ds=Z([Se,$e,ir,or,Ve]),yf=B(c(),ds),wo=g({refreshers:M(c()),...J.shape,...V(F(),"DYNAMIC").shape});var Vr=g({...J.shape,...V(is(),"MARKDOWN").shape});var ar=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(ar||{}),xt=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(xt||{}),bt=(x=>(x.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",x.COMMUNICATION="COMMUNICATION",x.COMMERCE="COMMERCE",x.CORE="CORE",x.UNIVERSAL_AI="UNIVERSAL_AI",x.FLOW_CONTROL="FLOW_CONTROL",x.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",x.ACCOUNTING="ACCOUNTING",x.PRODUCTIVITY="PRODUCTIVITY",x.CONTENT_AND_FILES="CONTENT_AND_FILES",x.DEVELOPER_TOOLS="DEVELOPER_TOOLS",x.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",x.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",x.HUMAN_RESOURCES="HUMAN_RESOURCES",x.PAYMENT_PROCESSING="PAYMENT_PROCESSING",x.MARKETING="MARKETING",x.SALES_AND_CRM="SALES_AND_CRM",x))(bt||{});var sr=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(sr||{}),Oo="both_client_credentials_and_authorization_code";var Me=(o=>(o.POLLING="POLLING",o.WEBHOOK="WEBHOOK",o.APP_WEBHOOK="APP_WEBHOOK",o.MANUAL="MANUAL",o))(Me||{}),ur=(a=>(a.NONE="NONE",a.HEADER_PRESENT="HEADER_PRESENT",a.QUERY_PRESENT="QUERY_PRESENT",a.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",a.HEAD_REQUEST="HEAD_REQUEST",a))(ur||{}),vf=g({strategy:D(ur),paramName:v(c())}),cr=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(cr||{});var Hr=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Hr||{}),fs=g({status:v(ve()),body:v(F()),headers:v(B(c(),c()))}),ms=g({type:C("DELAY"),resumeDateTime:c(),requestIdToReply:v(c()),handlerId:v(c()),streamStepProgress:v(D(Hr))}),gs=g({type:C("WEBHOOK"),requestId:c(),requestIdToReply:v(c()),response:fs,handlerId:v(c()),streamStepProgress:v(D(Hr))}),_f=Z([ms,gs]);var Pf=g({body:F(),rawBody:v(F()),headers:B(c(),c()),queryParams:B(c(),c())});function ae(e){return e==null}i(ae,"isNil");function lr(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}i(lr,"isEmpty");function qe(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}i(qe,"assertNotNullOrUndefined");var Ro=Ce(require("crypto"),1);var xf=128,ot,Et,bf=i(e=>{if(e<0)throw new RangeError("Wrong ID size");try{!ot||ot.length<e?(ot=Buffer.allocUnsafe(e*xf),Ro.default.randomFillSync(ot),Et=0):Et+e>ot.length&&(Ro.default.randomFillSync(ot),Et=0)}catch(t){throw ot=void 0,t}Et+=e},"fillPool"),Ef=i(e=>(bf(e|=0),ot.subarray(Et-e,Et)),"random"),Tf=i((e,t,r)=>{let n=(2<<31-Math.clz32(e.length-1|1))-1,o=Math.ceil(1.6*n*t/e.length);return(a=t)=>{if(a<=0)return"";let s="";for(;;){let u=r(o),p=o;for(;p--;)if(s+=e[u[p]&n]||"",s.length===a)return s}}},"customRandom"),ys=i((e,t=21)=>Tf(e,t,Ef),"customAlphabet");var Af="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",vs=21,cw=c().check(et(new RegExp(`^[0-9a-zA-Z]{${vs}}$`))),If=ys(Af,vs);var it=nt(rt(e=>e instanceof Date?e.toISOString():e),c()),Oe={id:c(),created:it,updated:it},se=i(e=>v(Qt(e)),"Nullable");function zo(e){return v(Qt(D(e)))}i(zo,"NullableEnum");var dw=nt(rt(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),v(Y())),Zr=i(e=>nt(rt(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),v(M(e))),"OptionalArrayFromQuery");var gw=B(c(),F());var pr=(f=>(f.OPENAI="openai",f.OPENROUTER="openrouter",f.ANTHROPIC="anthropic",f.AZURE="azure",f.GOOGLE="google",f.ACTIVEPIECES="activepieces",f.CLOUDFLARE_GATEWAY="cloudflare-gateway",f.CUSTOM="custom",f.BEDROCK="bedrock",f.MISTRAL="mistral",f))(pr||{});var Sw=c().check(et(/^#[0-9A-Fa-f]{6}$/));var ww=g({filename:c(),data:F(),type:C("file"),mimetype:v(c())});var Sf=Ce(Ps());var Nw=g({...Oe,name:c(),permissions:M(c()),platformId:se(c()),type:c(),userCount:v(ve())});var xs=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(xs||{}),Co=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(Co||{}),Do=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(Do||{});var ko=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(ko||{});var No=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(No||{});var $f=g({mode:D(xs),value:F()}),wf=g({auth:v(c()),fields:B(c(),$f)}),Of=g({pieceName:c(),pieceVersion:c(),actionName:c(),predefinedInput:v(wf)}),Rf=g({type:C("PIECE"),toolName:c().check(De(1)),pieceMetadata:Of}),zf=g({type:C("none")}),Cf=g({type:C("access_token"),accessToken:c()}),Df=g({type:C("api_key"),apiKey:c(),apiKeyHeader:c()}),kf=g({type:C("headers"),headers:B(c(),c())}),Nf=tt("type",[zf,Cf,Df,kf]),bs=g({type:C("FLOW"),toolName:c().check(De(1)),externalFlowId:c(),flowDisplayName:v(c())}),Es=g({type:C("MCP"),toolName:c().check(De(1)),serverUrl:rs(),protocol:D(Do),auth:Nf}),Ts=g({type:C("KNOWLEDGE_BASE"),toolName:c().check(De(1)),sourceType:D(Co),sourceId:c(),sourceName:c()}),Mf=tt("type",[Rf,bs,Es,Ts]),Uf=g({displayName:c(),description:v(c()),type:D(ko)}),As=g({type:C("MARKDOWN"),markdown:c()}),Tt={type:C("TOOL_CALL"),input:se(B(c(),F())),output:v(F()),toolName:c(),status:D(No),toolCallId:c(),startTime:c(),endTime:v(c())},fO=g(Tt),Is=tt("toolCallType",[g({...Tt,toolCallType:C("PIECE"),pieceName:c(),pieceVersion:c(),actionName:c()}),g({...Tt,toolCallType:C("FLOW"),displayName:c(),externalFlowId:c()}),g({...Tt,toolCallType:C("MCP"),displayName:c(),serverUrl:c()}),g({...Tt,toolCallType:C("KNOWLEDGE_BASE"),displayName:c(),sourceType:c()}),g({...Tt,toolCallType:C("UNKNOWN"),displayName:c()})]),Lf=Z([As,Is]);var Mo=(r=>(r.IMAGE="image",r.TEXT="text",r))(Mo||{}),Ge=g({apiKey:c()}),jf=Ge,Ff=g({apiKey:c(),apiKeyHash:c()}),Bf=Ge,Vf=Ge,Hf=Ge,Zf=Ge,qf=Ge,Gf=Ge,Wf=Ge,Rs=g({accessKeyId:c().check(De(1)),secretAccessKey:c().check(De(1))}),Kf=g({}),Jf=g({}),Xf=g({}),Yf=g({}),Qf=g({}),em=g({}),zs=g({modelId:c(),modelName:c(),modelType:D(Mo)}),Cs=g({apiKeyHeader:c(),baseUrl:c(),models:M(zs),defaultHeaders:v(B(c(),c()))}),Ds=g({accountId:c(),gatewayId:c(),models:M(zs),vertexProject:v(c()),vertexRegion:v(c())}),ks=g({resourceName:c(),apiVersion:nt(rt(e=>typeof e=="string"&&e.trim().length===0?void 0:e),v(c()))}),Ns=g({region:c().check(De(1))}),tm=Z([jf,Hf,Zf,qf,Gf,Vf,Bf,Ff,Rs,Wf]),Ms=Z([Cs,Ds,ks,Ns,Kf,Xf,Yf,Qf,Jf,em]),rm=g({id:c(),name:c(),type:D(Mo)}),nm=g({id:c(),name:c(),provider:D(pr),config:Ms,enabledForChat:Y()}),om=g({provider:D(pr),config:Ms,auth:tm,platformId:c()});var yO={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"},Ss=["gpt-5.5","gpt-5.4-mini","gpt-5.4-nano","gpt-4.1","gpt-4.1-mini"],im=["claude-sonnet-4-6","claude-opus-4-7","claude-haiku-4-5"],am=["claude-sonnet-4.6","claude-opus-4.7","claude-haiku-4.5"],$s=["gemini-2.5-pro","gemini-2.5-flash","gemini-3.1-pro-preview","gemini-3-flash-preview"],sm=["grok-4.20","grok-4.1-fast"],um={openai:Ss,anthropic:im,google:$s,activepieces:[...am.map(e=>`anthropic/${e}`),...Ss.map(e=>`openai/${e}`),...$s.map(e=>`google/${e}`),...sm.map(e=>`x-ai/${e}`)]};var ws=128e3,cm={openai:128e3,anthropic:2e5,google:1048576,bedrock:2e5,azure:128e3,openrouter:128e3,activepieces:2e5,mistral:128e3};function lm({provider:e}){return e?cm[e]??ws:ws}i(lm,"getMaxContextTokens");var Os={openai:"text-embedding-3-small",google:"text-embedding-004",azure:"text-embedding-3-small",activepieces:"text-embedding-3-small",openrouter:"openai/text-embedding-3-small"},pm={anthropic:"native",google:"native",openrouter:"plugin",activepieces:"plugin"},dm=new Set(["anthropic","mistral"]);function Ue(e){return{chatModels:um[e],maxContextTokens:lm({provider:e}),defaultEmbeddingModel:Os[e],supportsEmbedding:Os[e]!==void 0,supportsImageGeneration:!dm.has(e),webSearch:pm[e]}}i(Ue,"buildProviderCapabilities");var fm={openai:Ue("openai"),anthropic:Ue("anthropic"),openrouter:Ue("openrouter"),azure:Ue("azure"),google:Ue("google"),"cloudflare-gateway":Ue("cloudflare-gateway"),custom:Ue("custom"),bedrock:Ue("bedrock"),mistral:Ue("mistral"),activepieces:Ue("activepieces")};var mm=g({base64Url:c(),fileName:c(),extension:v(c())}),gm=g({mimeType:c(),url:c(),fileName:v(c())}),Uo=Z([mm,gm]);var hm=Z([g({type:C("file"),value:Uo}),g({type:C("markdown"),value:c(),files:v(M(Uo))})]),ym=g({sessionId:c(),message:c(),files:v(M(c()))});var Ls=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(Ls||{}),js=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(js||{}),Lo=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(Lo||{});var vm=Z([g({...Oe,name:c(),externalId:c(),type:C("STATIC_DROPDOWN"),tableId:c(),projectId:c(),data:g({options:M(g({value:c()}))})}),g({...Oe,name:c(),externalId:c(),type:Z([C("TEXT"),C("NUMBER"),C("DATE"),C("DATETIME")]),tableId:c(),projectId:c()})]),_m=g({...Oe,name:c(),folderId:se(c()),projectId:c(),externalId:c(),status:zo(js),trigger:zo(Ls)}),Pm=g({...Oe,tableId:c(),projectId:c(),cells:B(c(),g({updated:c(),created:c(),value:F(),fieldName:c()}))}),xm=g({events:M(D(Lo)),webhookUrl:c(),flowId:c()}),bm=g({fields:M(g({id:c(),name:c()})),rows:M(B(c(),c())),name:c()}),Em=g({projectId:c(),limit:v(er.number()),cursor:v(c()),name:v(c()),externalIds:Zr(c()),folderId:v(c()),folderIds:Zr(c())}),Tm=g({records:M(M(g({fieldId:c(),value:Bs()}))),tableId:c()}),Am=g({cells:v(M(g({fieldId:c(),value:Bs()}))),tableId:c(),agentUpdate:v(Y())}),Fs=tt("operator",[ft("eq"),ft("neq"),ft("gt"),ft("gte"),ft("lt"),ft("lte"),ft("co"),Us("exists"),Us("not_exists")]),Im=g({tableId:c(),limit:v(er.number()),cursor:v(c()),filters:Zr(Fs)});function Bs(){return nt(rt(e=>e==null?e:String(e)),Qt(c()))}i(Bs,"coerceToString");function ft(e){return g({fieldId:c(),operator:C(e),value:c()})}i(ft,"valueFilter");function Us(e){return g({fieldId:c(),operator:C(e)})}i(Us,"existenceFilter");var Sm=g({status:v(ve()),body:v(F()),headers:v(B(c(),c()))}),$m=g({...Oe,deleted:se(it),ownerId:c(),displayName:c(),platformId:c(),externalId:se(c())});var Vs=g({name:c(),description:v(c()),type:c(),required:Y()}),wm=g({pieceName:c(),triggerName:c(),input:g({toolName:c(),toolDescription:c(),inputSchema:M(Vs),returnsResponse:Y()})});var Hs="^[0-9]+\\.[0-9]+\\.[0-9]+$",NO=new RegExp(Hs),Rm="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",MO=c().check(et(new RegExp(Hs))),UO=c().check(et(new RegExp(Rm))),zm=g({packageType:C("ARCHIVE"),pieceType:D(xt),pieceName:c(),pieceVersion:c(),archiveId:c(),platformId:c()}),Zs=g({packageType:C("REGISTRY"),pieceType:C("OFFICIAL"),pieceName:c(),pieceVersion:c()}),qs=g({packageType:C("REGISTRY"),pieceType:C("CUSTOM"),pieceName:c(),pieceVersion:c(),platformId:c()}),LO=Z([Zs,qs]),jO=Z([zm,Zs,qs]);var Cm=tt("type",[g({type:C("CRON_EXPRESSION"),cronExpression:c(),timezone:c()}),g({type:C("INTERVAL"),intervalMs:ns().check(Mr(6e4))})]),FO=g({...Oe,type:D(Me),projectId:c(),flowId:c(),triggerName:c(),schedule:se(Cm),flowVersionId:c(),pieceName:c(),pieceVersion:c(),deleted:se(c()),simulate:Y()}),Gs=(h=>(h.UNKNOWN="UNKNOWN",h.FLOW_RUN_LOG="FLOW_RUN_LOG",h.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",h.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",h.FLOW_STEP_FILE="FLOW_STEP_FILE",h.SAMPLE_DATA="SAMPLE_DATA",h.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",h.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",h.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",h.PROJECT_RELEASE="PROJECT_RELEASE",h.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",h.PLATFORM_ASSET="PLATFORM_ASSET",h.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",h.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",h.KNOWLEDGE_BASE="KNOWLEDGE_BASE",h.FLOW_BUNDLE="FLOW_BUNDLE",h))(Gs||{}),Ws=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(Ws||{}),Ks=(r=>(r.S3="S3",r.DB="DB",r))(Ks||{}),BO=g({...Oe,projectId:se(c()),platformId:se(c()),type:D(Gs),compression:D(Ws),data:v(F()),location:D(Ks),size:se(ve()),fileName:se(c()),s3Key:se(c()),metadata:se(B(c(),c()))}),Js=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(Js||{}),Xs=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(Xs||{}),VO=g({id:c(),email:c(),firstName:c(),status:D(Xs),externalId:se(c()),platformId:se(c()),platformRole:D(Js),lastName:c(),created:it,updated:it,lastActiveDate:se(it),imageUrl:se(c())});var Fo=g({...J.shape,...V(B(c(),F()),"OBJECT").shape});var Bo=g({...J.shape,formatProperty:v(c()),...V(c(),"RICH_TEXT").shape});var eu=g({...J.shape,...V(c(),"COLOR").shape});var Vo=Z([Se,Be,Bo,Vr,He,$e,Ve,So,tr,wo,Ze,or,Fo,ir,nr,$o,rr,eu]),T={ShortText(e){return{...e,valueSchema:void 0,type:"SHORT_TEXT"}},Checkbox(e){return{...e,valueSchema:void 0,type:"CHECKBOX"}},LongText(e){return{...e,valueSchema:void 0,type:"LONG_TEXT"}},RichText(e){return{...e,valueSchema:void 0,type:"RICH_TEXT"}},MarkDown(e){return{displayName:"Markdown",required:!1,description:e.value,type:"MARKDOWN",valueSchema:void 0,variant:e.variant??"INFO"}},Number(e){return{...e,valueSchema:void 0,type:"NUMBER"}},Json(e){return{...e,valueSchema:void 0,type:"JSON"}},Array(e){return{...e,valueSchema:void 0,type:"ARRAY"}},Object(e){return{...e,valueSchema:void 0,type:"OBJECT"}},Dropdown(e){return{...e,valueSchema:void 0,type:"DROPDOWN"}},StaticDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_DROPDOWN"}},MultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"MULTI_SELECT_DROPDOWN"}},DynamicProperties(e){return{...e,valueSchema:void 0,type:"DYNAMIC"}},StaticMultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_MULTI_SELECT_DROPDOWN"}},DateTime(e){return{...e,valueSchema:void 0,type:"DATE_TIME"}},DateRange(e){return{...e,valueSchema:void 0,type:"DATE_RANGE"}},File(e){return{...e,valueSchema:void 0,type:"FILE"}},Custom(e){let t=e.code.toString();return{...e,code:t,valueSchema:void 0,type:"CUSTOM"}},Color(e){return{...e,valueSchema:void 0,type:"COLOR"}}};var Le=g({displayName:c(),description:v(c()),hasConnectionIdentifier:v(Y())});var tu=g({username:c(),password:c()}),Ho=g({...Le.shape,username:g({displayName:c(),description:v(c())}),password:g({displayName:c(),description:v(c())}),...V(tu,"BASIC_AUTH").shape});var Mm=B(c(),Z([Se,Be,Ze,He,$e])),Zo=g({...Le.shape,props:Mm,...V(F(),"CUSTOM_AUTH").shape});var mt=g({...Le.shape,...V(g({auth:c()}),"SECRET_TEXT").shape});var Um=B(c(),Z([Se,Be,mt,Ze,He,$e,Ve,Vr])),ru=g({...Le.shape,props:Um,...V(F(),"OIDC").shape});var qo=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(qo||{}),nu=Z([Se,mt,$e]),ou=B(c(),nu),Lm=g({props:v(B(c(),nu)),authUrl:c(),tokenUrl:c(),scope:M(c()),prompt:v(Z([C("none"),C("consent"),C("login"),C("omit")])),pkce:v(Y()),pkceMethod:v(Z([C("plain"),C("S256")])),authorizationMethod:v(D(qo)),grantType:v(Z([D(sr),C(Oo)])),extra:v(B(c(),c()))}),iu=g({access_token:c(),props:v(ou),data:B(c(),Yt())}),Go=g({...Le.shape,...Lm.shape,...V(iu,"OAUTH2").shape});var At=Z([Ho,Zo,ru,Go,mt]),dr="Connection",Wo={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||dr}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||dr,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||dr}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||dr}},None(){}};var Iz={OAUTH2:"OAUTH2",CLOUD_OAUTH2:"OAUTH2",PLATFORM_OAUTH2:"OAUTH2",BASIC_AUTH:"BASIC_AUTH",CUSTOM_AUTH:"CUSTOM_AUTH",OIDC:"OIDC",SECRET_TEXT:"SECRET_TEXT",NO_AUTH:void 0};var jm=g({...J.shape,...V(F(),"CUSTOM").shape,code:c()});var Fm=Z([Vo,At]),Ko=B(c(),Fm),Gz=B(c(),Vo);var au=Z([g({strategy:C("CRON"),cronExpression:c()}),g({strategy:C("NONE")})]),It=class{constructor(t,r,n,o,a,s,u,p,d,f,_,y,l,m,P,h,x,E,H,de,xe){this.name=t;this.displayName=r;this.description=n;this.requireAuth=o;this.props=a;this.type=s;this.handshakeConfiguration=u;this.onHandshake=p;this.renewConfiguration=d;this.onRenew=f;this.onEnable=_;this.onDisable=y;this.onStart=l;this.run=m;this.test=P;this.sampleData=h;this.testStrategy=x;this.outputSchema=E;this.aiMetadata=H;this.classification=de;this.propertyGroups=xe}static{i(this,"ITrigger")}},St=i(e=>{switch(e.type){case"WEBHOOK":return new It(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,e.handshakeConfiguration??{strategy:"NONE"},e.onHandshake??(async()=>({status:200})),e.renewConfiguration??{strategy:"NONE"},e.onRenew??(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,e.test?"TEST_FUNCTION":"SIMULATION",e.outputSchema,e.aiMetadata,e.classification,e.propertyGroups);case"POLLING":return new It(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata,e.classification,e.propertyGroups);case"MANUAL":return new It(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata,e.classification,e.propertyGroups);case"APP_WEBHOOK":return new It(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,ae(e.sampleData)&&ae(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata,e.classification,e.propertyGroups)}},"createTrigger");var su="2",Gr="0.82.0";var Jo=class{constructor(t,r,n,o,a,s,u,p,d=Gr,f,_="",y){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=o;this.categories=u;this.auth=p;this.minimumSupportedRelease=d;this.maximumSupportedRelease=f;this.description=_;this.deprecated=y;this._actions={};this._triggers={};this.getContextInfo=i(()=>({version:su}),"getContextInfo");(!Vm(d)||Hm(d,Gr))&&(this.minimumSupportedRelease=Gr),a.forEach(l=>this._actions[l.name]=l),s.forEach(l=>this._triggers[l.name]=l)}static{i(this,"Piece")}metadata(){return{displayName:this.displayName,logoUrl:this.logoUrl,actions:this._actions,triggers:this._triggers,categories:this.categories,description:this.description,authors:this.authors,auth:Bm(this.auth),minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,deprecated:this.deprecated,contextInfo:this.getContextInfo?.()}}getAction(t){return this._actions[t]}getTrigger(t){return this._triggers[t]}actions(){return this._actions}triggers(){return this._triggers}},cu=i(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((r,n,o)=>n===o.findIndex(a=>a.type===r.type)))throw new Error("Auth properties must be unique by type");return new Jo(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description,e.deprecated)},"createPiece");function Bm(e){if(e!==void 0)return Array.isArray(e)?e.map(uu):uu(e)}i(Bm,"withConnectionIdentifierFlag");function uu(e){return{...e,hasConnectionIdentifier:e.getConnectionIdentifier!==void 0}}i(uu,"flagConnectionIdentifier");function Vm(e){return/^\d+\.\d+\.\d+$/.test(e)}i(Vm,"isValidSimpleSemver");function Hm(e,t){let[r,n,o]=e.split(".").map(Number),[a,s,u]=t.split(".").map(Number);return r!==a?r<a:n!==s?n<s:o<u}i(Hm,"isSemverLessThan");var Zm=v(B(c(),B(c(),c()))),lu=g({id:v(c()),name:c(),displayName:c(),logoUrl:c(),description:c(),authors:M(c()),platformId:v(c()),directoryPath:v(c()),auth:v(Z([At,M(At)])),version:c(),categories:v(M(D(bt))),minimumSupportedRelease:v(c()),maximumSupportedRelease:v(c()),deprecated:v(Y()),i18n:Zm}),qm=D(["human","ai","both"]),pu=g({description:v(c()),idempotent:v(Y())}),du=D(["READ","SEARCH","WRITE","DESTRUCTIVE"]);var Gm=D(["tabs","section","summary","builder","footer"]),fu=g({key:c(),display:Gm,label:v(c()),description:v(c()),icon:v(c()),props:M(c())}),mu=g({name:c(),displayName:c(),description:c(),props:Ko,propertyGroups:v(M(fu)),requireAuth:Y(),errorHandlingOptions:v(Io),outputSchema:v(Fr()),audience:v(qm),aiMetadata:v(pu),classification:v(du)}),gu=g({name:c(),displayName:c(),description:c(),props:Ko,propertyGroups:v(M(fu)),errorHandlingOptions:v(Io),type:D(Me),sampleData:F(),handshakeConfiguration:v(Fr()),renewConfiguration:v(au),testStrategy:D(cr),outputSchema:v(Fr()),aiMetadata:v(pu),classification:v(du)}),Wm=g({...lu.shape,actions:B(c(),mu),triggers:B(c(),gu)}),Km=g({...lu.shape,actions:ve(),triggers:ve(),suggestedActions:v(M(mu)),suggestedTriggers:v(M(gu))}),hu=g({projectUsage:ve(),pieceType:D(xt),packageType:D(ar),platformId:v(c()),archiveId:v(c())}),KC=g({...Wm.shape,...hu.shape}),JC=g({...Km.shape,...hu.shape}),XC=g({name:c(),version:c()});var Jm=Ce(require("path")),Xm=Ce(require("fs/promises"));var $t=require("node:stream");var Wr=class{constructor(t,r){this.baseUrl=t;this.authenticationConverter=r}static{i(this,"BaseHttpClient")}getUrl(t){let r=new URL(`${this.baseUrl}${t.url}`),n=`${r.origin}${r.pathname}`,o=new URLSearchParams;return r.searchParams.forEach((a,s)=>{o.append(s,a)}),{urlWithoutQueryParams:n,queryParams:o}}getHeaders(t){let r={Accept:"application/json"};return t.authentication&&this.populateAuthentication(t.authentication,r),t.body&&(t.headers?.["Content-Type"]==="text/csv"?r["Content-Type"]="text/csv":r["Content-Type"]="application/json"),t.headers&&(r={...r,...t.headers}),r}populateAuthentication(t,r){this.authenticationConverter.convert(t,r)}};var Kr=class{static{i(this,"DelegatingAuthenticationConverter")}constructor(t=new Xo,r=new Yo){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},Xo=class{static{i(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},Yo=class{static{i(this,"BasicTokenAuthenticationConverter")}convert(t,r){let n=`${t.username}:${t.password}`,o=Buffer.from(n).toString("base64");return r.Authorization=`Basic ${o}`,r}};var fr=class extends Error{constructor(r,n){let o=n.status||500,a=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:o,body:a},request:{body:r}}));this.requestBody=r;this.status=o,this.responseBody=a}static{i(this,"HttpError")}errorMessage(){return{response:{status:this.status,body:this.responseBody},request:{body:this.requestBody}}}get response(){return{status:this.status,body:this.responseBody}}get request(){return{body:this.requestBody}}};function yu({error:e,requestBody:t}){return e instanceof fr?e.errorMessage():{response:{status:0,body:e instanceof Error?e.message:String(e)},request:{body:t}}}i(yu,"toFailsafeOutput");var Qo=(s=>(s.GET="GET",s.POST="POST",s.PATCH="PATCH",s.PUT="PUT",s.DELETE="DELETE",s.HEAD="HEAD",s))(Qo||{});var Jr=class extends Wr{static{i(this,"FetchHttpClient")}constructor(t="",r=new Kr){super(t,r)}async sendRequest(t,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:o}=this.getUrl(t),a=this.getHeaders(t),s=t.queryParams??{};for(let[H,de]of Object.entries(s))o.append(H,de);let u=o.toString(),p=u?`${n}?${u}`:n,d=t.responseType??"json",f=t.followRedirects??!0,_=t.retries??0,{body:y,extraHeaders:l,isStream:m}=Ym(t.method)?Qm(t.body,a):{body:void 0,extraHeaders:{},isStream:!1},P=tg({...a,...l}),h=await eg(async()=>{let H=new AbortController,de=t.timeout&&t.timeout>0?setTimeout(()=>H.abort(),t.timeout):void 0;try{let xe={method:t.method.toString(),headers:P,body:y,redirect:f?"follow":"manual",signal:H.signal};return m&&(xe.duplex="half"),r?.dispatcher!==void 0&&(xe.dispatcher=r.dispatcher),await fetch(p,xe)}finally{de!==void 0&&clearTimeout(de)}},m?0:_),x=f?300:400;if(h.status<200||h.status>=x){let H=await vu(h,d==="stream"?"text":d),de=new fr(t.body,{status:h.status,responseBody:H});throw console.error("[HttpClient#(sanitized error message)] Request failed:",de),de}let E=await vu(h,d);return{status:h.status,headers:rg(h.headers),body:E}}};function Ym(e){return e!=="GET"&&e!=="HEAD"}i(Ym,"acceptsRequestBody");function Qm(e,t){if(Pu(e))return{body:void 0,extraHeaders:{},isStream:!1};if(ng(e)){let n=new $t.PassThrough;return e.on("error",o=>n.destroy(o)),e.pipe(n),{body:n,extraHeaders:e.getHeaders(),isStream:!0}}return e instanceof $t.Readable?{body:e,extraHeaders:{},isStream:!0}:typeof e=="string"||Buffer.isBuffer(e)||e instanceof URLSearchParams||e instanceof ArrayBuffer||typeof FormData<"u"&&e instanceof FormData||typeof Blob<"u"&&e instanceof Blob?{body:e,extraHeaders:{},isStream:!1}:(t["Content-Type"]??t["content-type"]??"").includes("application/x-www-form-urlencoded")?{body:new URLSearchParams(e).toString(),extraHeaders:{},isStream:!1}:{body:JSON.stringify(e),extraHeaders:{},isStream:!1}}i(Qm,"serializeBody");async function vu(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"stream":return Pu(e.body)?$t.Readable.from([]):$t.Readable.fromWeb(e.body);case"blob":return await e.blob();case"text":return await e.text();default:{let r=await e.text();if(r.length===0)return;try{return JSON.parse(r)}catch{return r}}}}i(vu,"parseResponseBody");async function eg(e,t){let r;for(let n=0;n<=t;n++)try{let o=await e();if(o.status>=500&&n<t){await _u(n);continue}return o}catch(o){if(r=o,n<t){await _u(n);continue}throw o}throw r}i(eg,"sendWithRetries");function _u(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}i(_u,"backoff");function tg(e){let t={};for(let[r,n]of Object.entries(e))n!==void 0&&(t[r.toLowerCase()]=Array.isArray(n)?n.join(", "):n);return t}i(tg,"normalizeHeaders");function rg(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}i(rg,"toHttpHeaders");function ng(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"&&typeof e.on=="function"}i(ng,"isNodeFormData");function Pu(e){return e==null}i(Pu,"isNil");var xu=new Jr;var Hh=Ce(require("fs")),Sl=Ce(Il());var Zh={"application/json":"json","application/pdf":"pdf","application/xml":"xml","text/xml":"xml","application/zip":"zip","application/gzip":"gz","application/x-tar":"tar","application/octet-stream":"bin","application/msword":"doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.ms-excel":"xls","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application/vnd.ms-powerpoint":"ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","application/rtf":"rtf","application/javascript":"js","application/x-www-form-urlencoded":"bin","text/plain":"txt","text/html":"html","text/css":"css","text/csv":"csv","text/calendar":"ics","text/markdown":"md","image/png":"png","image/jpeg":"jpeg","image/jpg":"jpg","image/gif":"gif","image/webp":"webp","image/svg+xml":"svg","image/bmp":"bmp","image/tiff":"tiff","image/x-icon":"ico","image/vnd.microsoft.icon":"ico","image/heic":"heic","audio/mpeg":"mp3","audio/mp4":"m4a","audio/wav":"wav","audio/x-wav":"wav","audio/ogg":"ogg","audio/webm":"weba","video/mp4":"mp4","video/mpeg":"mpeg","video/webm":"webm","video/quicktime":"mov","video/x-msvideo":"avi","font/woff":"woff","font/woff2":"woff2","font/ttf":"ttf","font/otf":"otf"};function qh(e){let t=e.split(";")[0].trim().toLowerCase();return Zh[t]??""}i(qh,"contentTypeToExtension");var Gh=i(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),Wh=i((e,t)=>{let r="https://api.example.com";try{let n=t?e(t):void 0;return(n?.endsWith("/")?n.slice(0,-1):n)??r}catch{return r}},"getBaseUrlForDescription");function $l({auth:e,baseUrl:t,authMapping:r,description:n,displayName:o,name:a,props:s,extraProps:u,authLocation:p="headers",classification:d="WRITE"}){return ne({audience:"human",name:a||"custom_api_call",classification:d,displayName:o||"Custom API Call",description:n||"Make a custom API call to a specific endpoint",auth:e,requireAuth:!!e,props:{url:T.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:i(async({auth:f})=>({url:T.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
|
|
6
|
+
i.e ${Wh(t,f)}/resource or /resource`,required:!0,defaultValue:f?t(f):"",...s?.url??{}})}),"props")}),method:T.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(Qo).map(f=>({label:f,value:f}))},...s?.method??{}}),headers:T.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...s?.headers??{}}),queryParams:T.Object({displayName:"Query Parameters",required:!0,...s?.queryParams??{}}),body_type:T.StaticDropdown({displayName:"Body Type",required:!1,defaultValue:"none",options:{disabled:!1,options:[{label:"None",value:"none"},{label:"JSON",value:"json"},{label:"Form Data",value:"form_data"},{label:"Raw",value:"raw"}]}}),body:T.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:i(async({body_type:f})=>{if(!f)return{};let _=f,y={};switch(_){case"none":break;case"json":y.data=T.Json({displayName:"JSON Body",required:!0,...s?.body??{}});break;case"raw":y.data=T.LongText({displayName:"Raw Body",required:!0});break;case"form_data":y.data=T.Array({displayName:"Form Data",required:!0,properties:{fieldName:T.ShortText({displayName:"Field Name",required:!0}),fieldType:T.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:T.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:T.File({displayName:"File Field Value",required:!1})}});break}return y},"props")}),response_is_binary:T.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:T.Checkbox({displayName:"No Error on Failure",required:!1,...s?.failsafe??{}}),timeout:T.Number({displayName:"Timeout (in seconds)",required:!1,...s?.timeout??{}}),followRedirects:T.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...u},run:i(async f=>{let{method:_,url:y,headers:l,queryParams:m,body:P,body_type:h,failsafe:x,timeout:E,response_is_binary:H,followRedirects:de}=f.propsValue;qe(_,"Method"),qe(y,"URL");let xe=ae(r)?{}:await r(f.auth,f.propsValue),Ie=y.url,me=Ie.startsWith("http://")||Ie.startsWith("https://")?Ie:Gh({baseUrl:t(f.auth),relativePath:Ie}),W={method:_,url:me,headers:{...l??{},...p==="headers"||!ae(p)?xe:{}},queryParams:{...p==="queryParams"?xe:{},...m??{}},timeout:E?E*1e3:0,followRedirects:de};if(H&&(W.responseType="arraybuffer"),P)if(h&&h!=="none"){let be=P.data;if(h==="form_data"){let Ar=be,N=new Sl.default;for(let{fieldName:S,fieldType:A,textFieldValue:R,fileFieldValue:I}of Ar)A==="text"&&!lr(R)?N.append(S,R):A==="file"&&!lr(I)&&N.append(S,I.data,{filename:I?.filename});W.body=N,W.headers={...W.headers,...N.getHeaders()}}else W.body=be}else h||(W.body=P);try{let be=await xu.sendRequest(W);return await Kh(f.files,be.body,be.status,be.headers,H)}catch(be){if(x)return yu({error:be,requestBody:W.body});throw be}},"run")})}i($l,"createCustomApiCallAction");var Kh=i(async(e,t,r,n,o)=>{let a;if(o&&Jh(t)){let s=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],u=qh(s??"")||"txt",p;t instanceof ArrayBuffer?p=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?p=t:p=Buffer.from(t),a=await e.write({fileName:`output.${u}`,data:p})}else a=t;return{status:r,headers:n,body:a}},"handleBinaryResponse"),Jh=i(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var je={async poll(e,{store:t,auth:r,propsValue:n,maxItemsToPoll:o,files:a,server:s}){switch(e.strategy){case 0:{let u=await t.get("lastPoll");if(ae(u))throw new Error("lastPoll doesn't exist in the store.");let p=await e.items({store:t,auth:r,propsValue:n,lastFetchEpochMS:u,server:s}),d=p.reduce((f,_)=>Math.max(f,_.epochMilliSeconds),u);return await t.put("lastPoll",d),p.filter(f=>f.epochMilliSeconds>u).map(f=>f.data)}case 1:{let u=await t.get("lastItem"),p=await e.items({store:t,auth:r,propsValue:n,lastItemId:u,files:a,server:s}),d=p.findIndex(y=>y.id===u),f=[];ae(u)||d==-1?f=p??[]:f=p?.slice(0,d)??[],ae(o)||(f=f.slice(-o));let _=f?.[0]?.id;return ae(_)||await t.put("lastItem",_),f.map(y=>y.data)}}},async onEnable(e,{store:t,auth:r,propsValue:n,server:o,isRepublish:a}){switch(e.strategy){case 0:{if(a&&!ae(await t.get("lastPoll")))break;await t.put("lastPoll",Date.now());break}case 1:{if(a&&!ae(await t.get("lastItem")))break;let u=(await e.items({store:t,auth:r,propsValue:n,lastItemId:null,server:o}))?.[0]?.id;ae(u)?await t.delete("lastItem"):await t.put("lastItem",u);break}}},async onDisable(e,t){switch(e.strategy){case 0:case 1:return}},async test(e,{auth:t,propsValue:r,store:n,files:o,server:a}){let s=[];switch(e.strategy){case 0:{s=await e.items({store:n,auth:t,propsValue:r,lastFetchEpochMS:0,server:a});break}case 1:{s=await e.items({store:n,auth:t,propsValue:r,lastItemId:null,files:o,server:a});break}}return Xh(s.map(u=>u.data))}};function Xh(e){return e.length<=5?e:e.slice(0,5)}i(Xh,"getFirstFiveOrAll");var yr="login.microsoftonline.com",Rl="login.microsoftonline.us",wl="Mail.ReadWrite Mail.Send Calendars.Read offline_access User.Read openid email profile",Yh="https://graph.microsoft.com/.default",Qh="https://graph.microsoft.us/.default",Ol={[yr]:"https://graph.microsoft.com",[Rl]:"https://graph.microsoft.us"},zl=T.StaticDropdown({displayName:"Cloud Environment",description:"Select your Microsoft cloud environment.",required:!0,defaultValue:yr,options:{disabled:!1,options:[{label:"Commercial (Global)",value:yr},{label:"US Government (GCC High)",value:Rl}]}}),Cl=T.StaticDropdown({displayName:"Access Mode",description:"Pick the option matching your Grant Type. Use a Delegated option with the Authorization Code grant (acts as the signed-in user). Use an App-only option with the Client Credentials grant (acts as the application \u2014 also set Tenant ID and Mailbox), choosing the one that matches your Cloud Environment.",required:!0,defaultValue:wl,options:{disabled:!1,options:[{label:"Delegated \u2014 Commercial (Global)",value:wl},{label:"App-only \u2014 Commercial (Global)",value:Yh},{label:"App-only \u2014 US Government (GCC High)",value:Qh}]}});function Dl(e){return e??yr}i(Dl,"resolveCloudHost");function kl(e){return Dl(e.props?.cloud)}i(kl,"getMicrosoftCloudFromAuth");function sn(e){let t=Dl(e);return Ol[t]??Ol[yr]}i(sn,"getGraphBaseUrl");var Xp=Ce(Jp());function __(e){let t=kl(e);return Xp.Client.initWithMiddleware({authProvider:{getAccessToken:i(()=>Promise.resolve(e.access_token),"getAccessToken")},baseUrl:sn(t)})}i(__,"createClient");function P_(e){let t=e.props?.mailbox?.trim();return t?`/users/${encodeURIComponent(t)}`:"/me"}i(P_,"mailboxPrefix");var $={createClient:__,mailboxPrefix:P_};var x_=`
|
|
7
7
|
This connection supports two access modes. Pick the matching **Grant Type** and **Access Mode** below.
|
|
8
8
|
|
|
9
9
|
**Delegated (Authorization Code)** \u2014 acts as the signed-in user. Keep **Access Mode** on the Delegated option, leave **Mailbox** blank, and keep **Tenant ID** as \`common\`. If you use your own Azure app, follow the [Azure app creation guide](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app#register-an-application), set the **Redirect URI** to {{redirectUrl}} and add these **Microsoft Graph (Delegated) permissions**:
|
|
@@ -18,7 +18,7 @@ This connection supports two access modes. Pick the matching **Grant Type** and
|
|
|
18
18
|
- Mail.Send
|
|
19
19
|
|
|
20
20
|
For app-only, Microsoft grants tenant-wide mailbox access by default \u2014 scope it to specific mailboxes with an [ApplicationAccessPolicy](https://learn.microsoft.com/en-us/graph/auth-limit-mailbox-access).
|
|
21
|
-
`,J=Zo.OAuth2({description:m_,grantType:"both_client_credentials_and_authorization_code",props:{cloud:Il,accessMode:Al,tenant:T.ShortText({displayName:"Tenant ID",description:'Use "common" for the default delegated multi-tenant flow. For app-only (Client Credentials), set this to your Directory (tenant) ID.',required:!0,defaultValue:"common"}),mailbox:T.ShortText({displayName:"Mailbox (App-only)",description:"Email/UPN or user object ID of the mailbox to act on. Required for app-only (Client Credentials). Leave blank for delegated access (acts as the signed-in user).",required:!1})},authUrl:"https://{cloud}/{tenant}/oauth2/v2.0/authorize",tokenUrl:"https://{cloud}/{tenant}/oauth2/v2.0/token",required:!0,scope:["{accessMode}"],prompt:"omit",validate:a(async({auth:e})=>{try{let t=e;return await $.createClient(t).api(`${$.mailboxPrefix(t)}/mailFolders/inbox`).get(),{valid:!0}}catch(t){return{valid:!1,error:f_(t)}}},"validate")});function f_(e){if(typeof e=="object"&&e!==null){let t=[];if("statusCode"in e&&e.statusCode&&t.push(`HTTP ${String(e.statusCode)}`),"code"in e&&e.code&&t.push(String(e.code)),"message"in e&&e.message&&t.push(String(e.message)),"body"in e&&e.body){let r=e.body;t.push(typeof r=="string"?r.slice(0,800):JSON.stringify(r).slice(0,800))}if(t.length>0)return t.join(" | ")}return e instanceof Error&&e.message?e.message:"Unknown error while validating the connection."}a(f_,"describeGraphError");var st=a(e=>T.Dropdown({auth:J,displayName:e.displayName,description:e.description,required:e.required,refreshers:[],options:a(async({auth:t})=>{if(!t)return{placeholder:"Please connect your account first.",disabled:!0,options:[]};let r=t,n=$.createClient(r);try{return{disabled:!1,options:(await n.api(`${$.mailboxPrefix(r)}/messages?$top=50&$select=id,subject,from,receivedDateTime`).orderby("receivedDateTime desc").get()).value.map(s=>({label:`${s.subject||"No Subject"}`,value:s.id}))}}catch{return{disabled:!0,options:[]}}},"options")}),"messageIdDropdown"),Zp=a(e=>T.Dropdown({auth:J,displayName:e.displayName,description:e.description,required:e.required,refreshers:[],options:a(async({auth:t})=>{if(!t)return{placeholder:"Please connect your account first.",disabled:!0,options:[]};let r=t,n=$.createClient(r);try{return{disabled:!1,options:(await n.api(`${$.mailboxPrefix(r)}/mailFolders/drafts/messages?$top=50&$select=id,subject,from,receivedDateTime`).orderby("receivedDateTime desc").get()).value.map(s=>({label:`${s.subject||"No Subject"}`,value:s.id}))}}catch{return{disabled:!0,options:[]}}},"options")}),"draftMessageIdDropdown"),ut=a(e=>T.Dropdown({auth:J,displayName:e.displayName,description:e.description,required:e.required,refreshers:[],options:a(async({auth:t})=>{if(!t)return{placeholder:"Please connect your account first.",disabled:!0,options:[]};let r=t,n=$.createClient(r);try{return{disabled:!1,options:(await n.api(`${$.mailboxPrefix(r)}/mailFolders`).get()).value.map(s=>({label:s.displayName||s.id||"Unknown",value:s.id||""}))}}catch{return{disabled:!0,options:[]}}},"options")}),"mailFolderIdDropdown");var qp=oe({auth:J,name:"addLabelToEmail",displayName:"Add Label to Email",description:"Adds a category (label) to an email message.",audience:"both",aiMetadata:{description:"Adds one or more Outlook categories (labels) to a specific message, merging them with any categories already present. Use this to tag or classify an email. Idempotent: re-adding the same categories leaves the message unchanged since duplicates are de-duplicated.",idempotent:!0},props:{messageId:st({displayName:"Email",description:"Select the email message to add the label to.",required:!0}),categories:T.Array({displayName:"Categories",description:"Categories to add to the email.",required:!0})},async run(e){let{messageId:t,categories:r}=e.propsValue,n=$.createClient(e.auth),i=(await n.api(`${$.mailboxPrefix(e.auth)}/messages/${t}`).get()).categories||[],s=[...new Set([...i,...r])];return await n.api(`${$.mailboxPrefix(e.auth)}/messages/${t}`).patch({categories:s})}});var Gp=oe({auth:J,name:"createDraftEmail",displayName:"Create Draft Email",description:"Creates a draft email message.",audience:"both",aiMetadata:{description:"Creates a new unsent draft email in the Outlook mailbox with recipients, subject, body, and optional attachments. Use this to stage a message for later review or sending (pair with Send Draft Email). Not idempotent: each call creates a separate draft.",idempotent:!1},props:{recipients:T.Array({displayName:"To Email(s)",required:!0}),ccRecipients:T.Array({displayName:"CC Email(s)",required:!1,defaultValue:[]}),bccRecipients:T.Array({displayName:"BCC Email(s)",required:!1,defaultValue:[]}),subject:T.ShortText({displayName:"Subject",required:!0}),bodyFormat:T.StaticDropdown({displayName:"Body Format",required:!0,defaultValue:"text",options:{disabled:!1,options:[{label:"HTML",value:"html"},{label:"Text",value:"text"}]}}),body:T.LongText({displayName:"Body",required:!0}),attachments:T.Array({displayName:"Attachments",required:!1,defaultValue:[],properties:{file:T.File({displayName:"File",required:!0}),fileName:T.ShortText({displayName:"File Name",required:!1})}})},async run(e){let t=e.propsValue.recipients,r=e.propsValue.ccRecipients,n=e.propsValue.bccRecipients,o=e.propsValue.attachments,{subject:i,body:s,bodyFormat:u}=e.propsValue,p={subject:i,body:{content:s,contentType:u},toRecipients:t.map(y=>({emailAddress:{address:y}})),ccRecipients:r.map(y=>({emailAddress:{address:y}})),bccRecipients:n.map(y=>({emailAddress:{address:y}})),attachments:o.map(y=>({"@odata.type":"#microsoft.graph.fileAttachment",name:y.fileName||y.file.filename,contentBytes:y.file.base64}))};return await $.createClient(e.auth).api(`${$.mailboxPrefix(e.auth)}/messages`).post(p)}});var Wp=oe({auth:J,name:"downloadAttachment",displayName:"Download Attachment",description:"Download attachments from a specific email message.",audience:"both",aiMetadata:{description:"Fetches all file attachments from a specific Outlook message (by message ID) and writes them to storage for downstream steps. Use this after locating a message to retrieve its attached files. Requires a valid message ID; idempotent since it only reads.",idempotent:!0},props:{messageId:T.ShortText({displayName:"Message ID",description:"The ID of the email message containing the attachment.",required:!0})},async run(e){let{messageId:t}=e.propsValue,n=await $.createClient(e.auth).api(`${$.mailboxPrefix(e.auth)}/messages/${t}/attachments`).get(),o=[];for(let i of n.value)i.name&&i.contentBytes&&o.push({...i,file:await e.files.write({fileName:i.name||"test.png",data:Buffer.from(i.contentBytes,"base64")})});return o}});var Vi=Re(Tr());var Kp=oe({auth:J,name:"findEmail",displayName:"Find Email",description:"Searches for emails using full-text search.",audience:"both",aiMetadata:{description:"Searches the Outlook mailbox for messages matching a full-text query (supports field syntax like from:, subject:, hasAttachments:), optionally scoped to one folder and capped by a max-results count. Use this to locate emails and obtain their message IDs for follow-up actions. Idempotent read-only lookup.",idempotent:!0},props:{searchQuery:T.ShortText({displayName:"Search Query",description:'Search terms to find emails (e.g., "from:john@example.com", "subject:urgent", "hasAttachments:true")',required:!0}),folderId:ut({displayName:"Folder",description:"Search in a specific folder. Leave empty to search all folders.",required:!1}),top:T.Number({displayName:"Max Results",description:"Maximum number of results to return (1-1000).",required:!1,defaultValue:25})},async run(e){let{searchQuery:t,folderId:r,top:n}=e.propsValue,o=$.createClient(e.auth),i=r?`${$.mailboxPrefix(e.auth)}/mailFolders/${r}/messages`:`${$.mailboxPrefix(e.auth)}/messages`,s=`$search="${t}"`,u=n?`$top=${Math.min(Math.max(n,1),1e3)}`:"$top=25",p=["id","subject","from","toRecipients","receivedDateTime"].join(","),d=[s,u,p].filter(Boolean).join("&"),m=`${i}?${d}`,y={ConsistencyLevel:"eventual",Prefer:'outlook.body-content-type="text"'},v=await o.api(m).headers(y).get(),l=v.value,f=v["@odata.nextLink"];return t&&l.sort((_,h)=>(0,Vi.default)(h.receivedDateTime).valueOf()-(0,Vi.default)(_.receivedDateTime).valueOf()),{found:l.length>0,result:l,hasMore:!!f,nextPageUrl:f,totalCount:l.length}}});var Jp=oe({auth:J,name:"forwardEmail",displayName:"Forward Email",description:"Forwards an email message.",audience:"both",aiMetadata:{description:"Forwards an existing Outlook message (by message ID) to new recipients, preserving the original body and attachments and prepending an optional comment. Use this to pass an existing email along rather than composing a new one. Not idempotent: each call sends a new forwarded email.",idempotent:!1},props:{messageId:st({displayName:"Email",description:"Select the email message to forward.",required:!0}),recipients:T.Array({displayName:"To Email(s)",required:!0}),comment:T.LongText({displayName:"Comment",description:"Optional comment to include with the forwarded message.",required:!1})},async run(e){let{messageId:t,comment:r}=e.propsValue,n=e.propsValue.recipients,o=$.createClient(e.auth),i=await o.api(`${$.mailboxPrefix(e.auth)}/messages/${t}`).get(),s={toRecipients:n.map(p=>({emailAddress:{address:p}})),body:{contentType:"html",content:(r??"")+"<br><br>"+i.body.content},attachments:i.attachments},u=await o.api(`${$.mailboxPrefix(e.auth)}/messages/${t}/forward`).post({message:s});return{success:!0,message:"Email forwarded successfully.",messageId:u.id,...u}}});var Xp=oe({auth:J,name:"moveEmailToFolder",displayName:"Move Email to Folder",description:"Moves an email message to a specific folder.",audience:"both",aiMetadata:{description:"Moves a specific Outlook message into a chosen mail folder. Use this to organize, archive, or route an email after processing it. Note: the move assigns a new message ID, so re-running with the original ID will fail once moved.",idempotent:!1},props:{messageId:st({displayName:"Email",description:"Select the email message to move.",required:!0}),destinationFolderId:ut({displayName:"Destination Folder",description:"The folder to move the email to.",required:!0})},async run(e){let{messageId:t,destinationFolderId:r}=e.propsValue;return await $.createClient(e.auth).api(`${$.mailboxPrefix(e.auth)}/messages/${t}/move`).post({destinationId:r})}});var Yp=oe({auth:J,name:"removeLabelFromEmail",displayName:"Remove Label from Email",description:"Removes a category (label) from an email message.",audience:"both",aiMetadata:{description:"Removes one or more Outlook categories (labels) from a specific message, leaving any other categories intact. Use this to untag or reclassify an email. Idempotent: re-running with the same categories yields the same final label set.",idempotent:!0},props:{messageId:st({displayName:"Email",description:"Select the email message to remove the label from.",required:!0}),categories:T.Array({displayName:"Categories to Remove",description:"Categories to remove from the email.",required:!0})},async run(e){let{messageId:t,categories:r}=e.propsValue,n=$.createClient(e.auth),s=((await n.api(`${$.mailboxPrefix(e.auth)}/messages/${t}`).get()).categories||[]).filter(p=>!r.includes(p));return await n.api(`${$.mailboxPrefix(e.auth)}/messages/${t}`).patch({categories:s})}});var Qp=oe({auth:J,name:"reply-email",displayName:"Reply to Email",description:"Reply to an outlook email.",audience:"both",aiMetadata:{description:"Replies to an existing Outlook message (identified by message ID), supporting added CC/BCC recipients and attachments. Set the Create Draft flag to stage the reply without sending; otherwise it is sent immediately. Not idempotent when sending: each call creates and dispatches a new reply.",idempotent:!1},props:{messageId:T.Dropdown({auth:J,displayName:"Email",description:"Select the email message to reply to.",required:!0,refreshers:[],options:a(async({auth:e})=>{if(!e)return{disabled:!0,options:[]};let t=$.createClient(e);try{return{disabled:!1,options:(await t.api(`${$.mailboxPrefix(e)}/messages?$top=50&$select=id,subject,from,receivedDateTime`).orderby("receivedDateTime desc").get()).value.map(o=>({label:`${o.subject||"No Subject"} - ${o.from?.emailAddress?.name||o.from?.emailAddress?.address||"Unknown Sender"}`,value:o.id||""}))}}catch{return{disabled:!0,options:[]}}},"options")}),bodyFormat:T.StaticDropdown({displayName:"Body Format",required:!0,defaultValue:"text",options:{disabled:!1,options:[{label:"HTML",value:"html"},{label:"Text",value:"text"}]}}),replyBody:T.LongText({displayName:"Reply Body",required:!0}),ccRecipients:T.Array({displayName:"CC Recipients",required:!1}),bccRecipients:T.Array({displayName:"BCC Recipients",required:!1}),attachments:T.Array({displayName:"Attachments",required:!1,defaultValue:[],properties:{file:T.File({displayName:"File",required:!0}),fileName:T.ShortText({displayName:"File Name",required:!1})}}),draft:T.Checkbox({displayName:"Create Draft",description:"If enabled, creates draft without sending.",required:!0,defaultValue:!1})},async run(e){let{replyBody:t,bodyFormat:r,messageId:n,draft:o}=e.propsValue,i=e.propsValue.ccRecipients,s=e.propsValue.bccRecipients,u=e.propsValue.attachments,p={body:{content:t,contentType:r},ccRecipients:i.map(m=>({emailAddress:{address:m}})),bccRecipients:s.map(m=>({emailAddress:{address:m}})),attachments:u.map(m=>({"@odata.type":"#microsoft.graph.fileAttachment",name:m.fileName||m.file.filename,contentBytes:m.file.base64}))},d=$.createClient(e.auth);try{let y=(await d.api(`${$.mailboxPrefix(e.auth)}/messages/${n}/createReply`).post({message:p})).id;return o?{success:!0,message:"Draft created successfully.",draftId:y,draftLink:`https://outlook.office.com/mail/drafts/id/${y}`}:(await d.api(`${$.mailboxPrefix(e.auth)}/messages/${y}/send`).post({}),{success:!0,message:"Reply sent successfully.",draftId:y})}catch(m){console.error("Reply Email Error:",m);let y=m instanceof Error?m.message:"Unknown error";throw new Error(y)}}});var ed=oe({auth:J,name:"sendDraftEmail",displayName:"Send Draft Email",description:"Sends a draft email message.",audience:"both",aiMetadata:{description:"Sends an existing draft email (identified by draft message ID) from the Outlook mailbox. Use this to dispatch a draft previously staged by Create Draft Email or a draft reply. Not idempotent: once sent the draft no longer exists, so re-running with the same ID will fail.",idempotent:!1},props:{messageId:Zp({displayName:"Draft Email",description:"Select the draft email message to send.",required:!0})},async run(e){let{messageId:t}=e.propsValue;return await $.createClient(e.auth).api(`${$.mailboxPrefix(e.auth)}/messages/${t}/send`).post({}),{success:!0,message:"Draft sent successfully.",messageId:t}}});var td=oe({auth:J,name:"send-email",displayName:"Send Email",description:"Sends an email using Microsoft Outlook.",audience:"both",aiMetadata:{description:"Composes and sends a new email from the authenticated Outlook mailbox to the given recipients, with optional CC/BCC and file attachments. Use this to send a fresh message (not a reply or forward). Not idempotent: each call dispatches a new email and saves a copy to Sent Items.",idempotent:!1},props:{recipients:T.Array({displayName:"To Email(s)",required:!0}),ccRecipients:T.Array({displayName:"CC Email(s)",required:!1,defaultValue:[]}),bccRecipients:T.Array({displayName:"BCC Email(s)",required:!1,defaultValue:[]}),subject:T.ShortText({displayName:"Subject",required:!0}),bodyFormat:T.StaticDropdown({displayName:"Body Format",required:!0,defaultValue:"text",options:{disabled:!1,options:[{label:"HTML",value:"html"},{label:"Text",value:"text"}]}}),body:T.LongText({displayName:"Body",required:!0}),attachments:T.Array({displayName:"Attachments",required:!1,defaultValue:[],properties:{file:T.File({displayName:"File",required:!0}),fileName:T.ShortText({displayName:"File Name",required:!1})}})},async run(e){let t=e.propsValue.recipients,r=e.propsValue.ccRecipients,n=e.propsValue.bccRecipients,o=e.propsValue.attachments,{subject:i,body:s,bodyFormat:u}=e.propsValue,p={subject:i,body:{content:s,contentType:u},toRecipients:t.map(y=>({emailAddress:{address:y}})),ccRecipients:r.map(y=>({emailAddress:{address:y}})),bccRecipients:n.map(y=>({emailAddress:{address:y}})),attachments:o.map(y=>({"@odata.type":"#microsoft.graph.fileAttachment",name:y.fileName||y.file.filename,contentBytes:y.file.base64}))};return await $.createClient(e.auth).api(`${$.mailboxPrefix(e.auth)}/sendMail`).post({message:p,saveToSentItems:"true"})}});var io=Re(Tr());async function rd(e,t,r,n,o,i){let s=[];for(let u of r){if(i&&u.sender?.emailAddress?.address&&!u.sender.emailAddress.address.toLowerCase().includes(i.toLowerCase()))continue;let p=await e.api(`${t}/messages/${u.id}/attachments`).get();for(let d of p.value){let{contentBytes:m,...y}=d;if(!(o&&d.name&&!d.name.toLowerCase().includes(o.toLowerCase()))&&d.name&&m){let v=await n.write({fileName:d.name,data:Buffer.from(m,"base64")});s.push({file:v,messageId:u.id,messageSubject:u.subject,messageSender:u.sender,messageReceivedDateTime:u.receivedDateTime,parentFolderId:u.parentFolderId,...y})}}}return s}a(rd,"enrichAttachments");var nd=$t({auth:J,name:"newAttachment",displayName:"New Attachment",description:"Triggers when a new email containing one or more attachments arrives.",aiMetadata:{description:"Fires once per attachment when a new email carrying one or more file attachments arrives, optionally scoped to a folder, sender, or attachment-name filter. Each fire represents a single attachment from a newly received message."},props:{folderId:ut({displayName:"Folder",description:"Monitor attachments in a specific folder. Leave empty to monitor all folders.",required:!1}),sender:T.ShortText({displayName:"From (Sender Email)",description:"Filter emails from a specific sender (optional). Leave empty to for all senders.",required:!1}),attachmentNameFilter:T.ShortText({displayName:"Attachment Name Filter",description:"Filter attachments by name (contains). Leave empty to include all attachments.",required:!1})},sampleData:{},type:"POLLING",async onEnable(e){await e.store.put("lastPoll",Date.now())},async onDisable(e){},async test(e){let{folderId:t,attachmentNameFilter:r,sender:n}=e.propsValue,o=$.createClient(e.auth),i=t?`${$.mailboxPrefix(e.auth)}/mailFolders/${t}/messages`:`${$.mailboxPrefix(e.auth)}/messages`,s=await o.api(`${i}?$filter=hasAttachments eq true`).top(10).get();return(await rd(o,$.mailboxPrefix(e.auth),s.value,e.files,r,n)).map(d=>({epochMilliSeconds:(0,io.default)(d.messageReceivedDateTime).valueOf(),data:d})).map(d=>d.data)},async run(e){let t=await e.store.get("lastPoll");if(ae(t))throw new Error("lastPoll doesn't exist in the store.");let{folderId:r,attachmentNameFilter:n,sender:o}=e.propsValue,i=$.createClient(e.auth),s=r?`${$.mailboxPrefix(e.auth)}/mailFolders/${r}/messages`:`${$.mailboxPrefix(e.auth)}/messages`,u=await i.api(`${s}?$filter=receivedDateTime gt ${(0,io.default)(t).toISOString()} and hasAttachments eq true`).orderby("receivedDateTime desc").get(),p=[];for(;u.value.length>0&&(p.push(...u.value),u["@odata.nextLink"]);)u=await i.api(u["@odata.nextLink"]).get();let m=(await rd(i,$.mailboxPrefix(e.auth),p,e.files,n,o)).map(v=>({epochMilliSeconds:(0,io.default)(v.messageReceivedDateTime).valueOf(),data:v})),y=m.reduce((v,l)=>Math.max(v,l.epochMilliSeconds),t);return await e.store.put("lastPoll",y),m.filter(v=>v.epochMilliSeconds>t).map(v=>v.data)}});var Hi=Re(Tr());var ao={strategy:0,items:a(async({auth:e,lastFetchEpochMS:t,propsValue:r})=>{let n=$.createClient(e),o=[],i=r.folderId,s=t===0?"$top=10":`$filter=createdDateTime gt ${(0,Hi.default)(t).toISOString()}`,u=await n.api(`${$.mailboxPrefix(e)}/mailFolders/${i}/messages?${s}`).orderby("createdDateTime desc").get();if(t===0)for(let p of u.value)o.push(p);else for(;u.value.length>0;){for(let p of u.value)o.push(p);if(u["@odata.nextLink"])u=await n.api(u["@odata.nextLink"]).get();else break}return o.map(p=>({epochMilliSeconds:(0,Hi.default)(p.createdDateTime).valueOf(),data:p}))},"items")},od=$t({auth:J,name:"newEmailInFolder",displayName:"New Email in Folder",description:"Triggers when a new email is delivered into the specified folder.",aiMetadata:{description:"Fires when a new message appears in the chosen Outlook mail folder. Each fire represents one new email added to that folder."},props:{folderId:ut({displayName:"Folder",description:"",required:!0})},sampleData:{},type:"POLLING",async onEnable(e){await Le.onEnable(ao,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async onDisable(e){await Le.onDisable(ao,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async test(e){return await Le.test(ao,e)},async run(e){return await Le.poll(ao,e)}});var Zi=Re(Tr());var so={strategy:0,items:a(async({auth:e,lastFetchEpochMS:t,propsValue:r})=>{let n=$.createClient(e),o=[],i=t===0?"$top=10":`$filter=receivedDateTime gt ${(0,Zi.default)(t).toISOString()}`,s=await n.api(`${$.mailboxPrefix(e)}/mailFolders/inbox/messages?${i}`).orderby("receivedDateTime desc").get();if(t===0)for(let p of s.value)o.push(p);else for(;s.value.length>0;){for(let p of s.value)o.push(p);if(s["@odata.nextLink"])s=await n.api(s["@odata.nextLink"]).get();else break}let u=o;return r?.sender&&(u=u.filter(p=>{let d=p.from?.emailAddress?.address?.toLowerCase(),m=r.sender?.toLowerCase();return d===m})),r?.recipient&&(u=u.filter(p=>p.toRecipients?.some(m=>{let y=m.emailAddress?.address?.toLowerCase(),v=r.recipient?.toLowerCase();return y===v}))),u.map(p=>({epochMilliSeconds:(0,Zi.default)(p.receivedDateTime).valueOf(),data:p}))},"items")},id=$t({auth:J,name:"newEmail",displayName:"New Email",description:"Triggers when a new email is received in the inbox.",aiMetadata:{description:"Fires when a new message arrives in the mailbox Inbox, optionally narrowed to a specific sender and/or recipient address. Each fire represents one newly received email."},props:{sender:T.ShortText({displayName:"From (Sender Email)",description:"Filter emails from a specific sender (optional). Leave empty to for all senders.",required:!1}),recipient:T.ShortText({displayName:"To (Recipient Email)",description:"Filter emails to a specific recipient (optional). Leave empty to for all recipients.",required:!1})},sampleData:{},type:"POLLING",async onEnable(e){await Le.onEnable(so,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async onDisable(e){await Le.onDisable(so,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async test(e){return await Le.test(so,e)},async run(e){return await Le.poll(so,e)}});var ad=oe({auth:J,name:"request_approval_in_mail",displayName:"Request Approval in Email",description:"Send approval request email and then wait until the email is approved or disapproved",audience:"both",aiMetadata:{description:"Sends an email with a single link to a confirmation page where the recipient chooses Approve or Disapprove, then pauses the flow until they respond, resuming with the decision. Use this as a human-in-the-loop approval gate before proceeding. Not idempotent: each call sends a new email and creates a new pending waitpoint.",idempotent:!1},props:{recipients:T.ShortText({displayName:"To Email Address",description:"The email address of the recipient who will receive the approval request.",required:!0}),subject:T.ShortText({displayName:"Subject",description:"The subject of the approval request email.",required:!0}),body:T.LongText({displayName:"Body",description:"The main content of the email. You can include details about the approval request here in the html format or plain text.",required:!0})},async run(e){if(e.executionType==="BEGIN")try{let t=e.auth.access_token,r=e.propsValue.recipients,{subject:n,body:o}=e.propsValue;Ze(t,"token"),Ze(r,"recipients"),Ze(n,"subject"),Ze(o,"body");let i=await e.run.createWaitpoint({type:"WEBHOOK"}),s=`${i.resumeUrl}/confirm`,u=`
|
|
21
|
+
`,X=Wo.OAuth2({description:x_,grantType:"both_client_credentials_and_authorization_code",props:{cloud:zl,accessMode:Cl,tenant:T.ShortText({displayName:"Tenant ID",description:'Use "common" for the default delegated multi-tenant flow. For app-only (Client Credentials), set this to your Directory (tenant) ID.',required:!0,defaultValue:"common"}),mailbox:T.ShortText({displayName:"Mailbox (App-only)",description:"Email/UPN or user object ID of the mailbox to act on. Required for app-only (Client Credentials). Leave blank for delegated access (acts as the signed-in user).",required:!1})},authUrl:"https://{cloud}/{tenant}/oauth2/v2.0/authorize",tokenUrl:"https://{cloud}/{tenant}/oauth2/v2.0/token",required:!0,scope:["{accessMode}"],prompt:"omit",validate:i(async({auth:e})=>{try{let t=e;return await $.createClient(t).api(`${$.mailboxPrefix(t)}/mailFolders/inbox`).get(),{valid:!0}}catch(t){return{valid:!1,error:b_(t)}}},"validate")});function b_(e){if(typeof e=="object"&&e!==null){let t=[];if("statusCode"in e&&e.statusCode&&t.push(`HTTP ${String(e.statusCode)}`),"code"in e&&e.code&&t.push(String(e.code)),"message"in e&&e.message&&t.push(String(e.message)),"body"in e&&e.body){let r=e.body;t.push(typeof r=="string"?r.slice(0,800):JSON.stringify(r).slice(0,800))}if(t.length>0)return t.join(" | ")}return e instanceof Error&&e.message?e.message:"Unknown error while validating the connection."}i(b_,"describeGraphError");var ct=i(e=>T.Dropdown({auth:X,displayName:e.displayName,description:e.description,required:e.required,refreshers:[],options:i(async({auth:t})=>{if(!t)return{placeholder:"Please connect your account first.",disabled:!0,options:[]};let r=t,n=$.createClient(r);try{return{disabled:!1,options:(await n.api(`${$.mailboxPrefix(r)}/messages?$top=50&$select=id,subject,from,receivedDateTime`).orderby("receivedDateTime desc").get()).value.map(s=>({label:`${s.subject||"No Subject"}`,value:s.id}))}}catch{return{disabled:!0,options:[]}}},"options")}),"messageIdDropdown"),Yp=i(e=>T.Dropdown({auth:X,displayName:e.displayName,description:e.description,required:e.required,refreshers:[],options:i(async({auth:t})=>{if(!t)return{placeholder:"Please connect your account first.",disabled:!0,options:[]};let r=t,n=$.createClient(r);try{return{disabled:!1,options:(await n.api(`${$.mailboxPrefix(r)}/mailFolders/drafts/messages?$top=50&$select=id,subject,from,receivedDateTime`).orderby("receivedDateTime desc").get()).value.map(s=>({label:`${s.subject||"No Subject"}`,value:s.id}))}}catch{return{disabled:!0,options:[]}}},"options")}),"draftMessageIdDropdown"),lt=i(e=>T.Dropdown({auth:X,displayName:e.displayName,description:e.description,required:e.required,refreshers:[],options:i(async({auth:t})=>{if(!t)return{placeholder:"Please connect your account first.",disabled:!0,options:[]};let r=t,n=$.createClient(r);try{return{disabled:!1,options:(await n.api(`${$.mailboxPrefix(r)}/mailFolders`).get()).value.map(s=>({label:s.displayName||s.id||"Unknown",value:s.id||""}))}}catch{return{disabled:!0,options:[]}}},"options")}),"mailFolderIdDropdown");var Qp=ne({auth:X,name:"addLabelToEmail",classification:"WRITE",displayName:"Add Label to Email",description:"Adds a category (label) to an email message.",audience:"both",aiMetadata:{description:"Adds one or more Outlook categories (labels) to a specific message, merging them with any categories already present. Use this to tag or classify an email. Idempotent: re-adding the same categories leaves the message unchanged since duplicates are de-duplicated.",idempotent:!0},props:{messageId:ct({displayName:"Email",description:"Select the email message to add the label to.",required:!0}),categories:T.Array({displayName:"Categories",description:"Categories to add to the email.",required:!0})},async run(e){let{messageId:t,categories:r}=e.propsValue,n=$.createClient(e.auth),a=(await n.api(`${$.mailboxPrefix(e.auth)}/messages/${t}`).get()).categories||[],s=[...new Set([...a,...r])];return await n.api(`${$.mailboxPrefix(e.auth)}/messages/${t}`).patch({categories:s})}});var ed=ne({auth:X,name:"createDraftEmail",classification:"WRITE",displayName:"Create Draft Email",description:"Creates a draft email message.",audience:"both",aiMetadata:{description:"Creates a new unsent draft email in the Outlook mailbox with recipients, subject, body, and optional attachments. Use this to stage a message for later review or sending (pair with Send Draft Email). Not idempotent: each call creates a separate draft.",idempotent:!1},props:{recipients:T.Array({displayName:"To Email(s)",required:!0}),ccRecipients:T.Array({displayName:"CC Email(s)",required:!1,defaultValue:[]}),bccRecipients:T.Array({displayName:"BCC Email(s)",required:!1,defaultValue:[]}),subject:T.ShortText({displayName:"Subject",required:!0}),bodyFormat:T.StaticDropdown({displayName:"Body Format",required:!0,defaultValue:"text",options:{disabled:!1,options:[{label:"HTML",value:"html"},{label:"Text",value:"text"}]}}),body:T.LongText({displayName:"Body",required:!0}),attachments:T.Array({displayName:"Attachments",required:!1,defaultValue:[],properties:{file:T.File({displayName:"File",required:!0}),fileName:T.ShortText({displayName:"File Name",required:!1})}})},async run(e){let t=e.propsValue.recipients,r=e.propsValue.ccRecipients,n=e.propsValue.bccRecipients,o=e.propsValue.attachments,{subject:a,body:s,bodyFormat:u}=e.propsValue,p={subject:a,body:{content:s,contentType:u},toRecipients:t.map(_=>({emailAddress:{address:_}})),ccRecipients:r.map(_=>({emailAddress:{address:_}})),bccRecipients:n.map(_=>({emailAddress:{address:_}})),attachments:o.map(_=>({"@odata.type":"#microsoft.graph.fileAttachment",name:_.fileName||_.file.filename,contentBytes:_.file.base64}))};return await $.createClient(e.auth).api(`${$.mailboxPrefix(e.auth)}/messages`).post(p)}});var td=ne({auth:X,name:"downloadAttachment",classification:"READ",displayName:"Download Attachment",description:"Download attachments from a specific email message.",audience:"both",aiMetadata:{description:"Fetches all file attachments from a specific Outlook message (by message ID) and writes them to storage for downstream steps. Use this after locating a message to retrieve its attached files. Requires a valid message ID; idempotent since it only reads.",idempotent:!0},props:{messageId:T.ShortText({displayName:"Message ID",description:"The ID of the email message containing the attachment.",required:!0})},async run(e){let{messageId:t}=e.propsValue,n=await $.createClient(e.auth).api(`${$.mailboxPrefix(e.auth)}/messages/${t}/attachments`).get(),o=[];for(let a of n.value)a.name&&a.contentBytes&&o.push({...a,file:await e.files.write({fileName:a.name||"test.png",data:Buffer.from(a.contentBytes,"base64")})});return o}});var qi=Ce(Tr());var rd=ne({auth:X,name:"findEmail",classification:"SEARCH",displayName:"Find Email",description:"Searches for emails using full-text search.",audience:"both",aiMetadata:{description:"Searches the Outlook mailbox for messages matching a full-text query (supports field syntax like from:, subject:, hasAttachments:), optionally scoped to one folder and capped by a max-results count. Use this to locate emails and obtain their message IDs for follow-up actions. Idempotent read-only lookup.",idempotent:!0},props:{searchQuery:T.ShortText({displayName:"Search Query",description:'Search terms to find emails (e.g., "from:john@example.com", "subject:urgent", "hasAttachments:true")',required:!0}),folderId:lt({displayName:"Folder",description:"Search in a specific folder. Leave empty to search all folders.",required:!1}),top:T.Number({displayName:"Max Results",description:"Maximum number of results to return (1-1000).",required:!1,defaultValue:25})},async run(e){let{searchQuery:t,folderId:r,top:n}=e.propsValue,o=$.createClient(e.auth),a=r?`${$.mailboxPrefix(e.auth)}/mailFolders/${r}/messages`:`${$.mailboxPrefix(e.auth)}/messages`,s=`$search="${t}"`,u=n?`$top=${Math.min(Math.max(n,1),1e3)}`:"$top=25",p=["id","subject","from","toRecipients","receivedDateTime"].join(","),d=[s,u,p].filter(Boolean).join("&"),f=`${a}?${d}`,_={ConsistencyLevel:"eventual",Prefer:'outlook.body-content-type="text"'},y=await o.api(f).headers(_).get(),l=y.value,m=y["@odata.nextLink"];return t&&l.sort((P,h)=>(0,qi.default)(h.receivedDateTime).valueOf()-(0,qi.default)(P.receivedDateTime).valueOf()),{found:l.length>0,result:l,hasMore:!!m,nextPageUrl:m,totalCount:l.length}}});var nd=ne({auth:X,name:"forwardEmail",classification:"WRITE",displayName:"Forward Email",description:"Forwards an email message.",audience:"both",aiMetadata:{description:"Forwards an existing Outlook message (by message ID) to new recipients, preserving the original body and attachments and prepending an optional comment. Use this to pass an existing email along rather than composing a new one. Not idempotent: each call sends a new forwarded email.",idempotent:!1},props:{messageId:ct({displayName:"Email",description:"Select the email message to forward.",required:!0}),recipients:T.Array({displayName:"To Email(s)",required:!0}),comment:T.LongText({displayName:"Comment",description:"Optional comment to include with the forwarded message.",required:!1})},async run(e){let{messageId:t,comment:r}=e.propsValue,n=e.propsValue.recipients,o=$.createClient(e.auth),a=await o.api(`${$.mailboxPrefix(e.auth)}/messages/${t}`).get(),s={toRecipients:n.map(p=>({emailAddress:{address:p}})),body:{contentType:"html",content:(r??"")+"<br><br>"+a.body.content},attachments:a.attachments},u=await o.api(`${$.mailboxPrefix(e.auth)}/messages/${t}/forward`).post({message:s});return{success:!0,message:"Email forwarded successfully.",messageId:u.id,...u}}});var od=ne({auth:X,name:"moveEmailToFolder",classification:"WRITE",displayName:"Move Email to Folder",description:"Moves an email message to a specific folder.",audience:"both",aiMetadata:{description:"Moves a specific Outlook message into a chosen mail folder. Use this to organize, archive, or route an email after processing it. Note: the move assigns a new message ID, so re-running with the original ID will fail once moved.",idempotent:!1},props:{messageId:ct({displayName:"Email",description:"Select the email message to move.",required:!0}),destinationFolderId:lt({displayName:"Destination Folder",description:"The folder to move the email to.",required:!0})},async run(e){let{messageId:t,destinationFolderId:r}=e.propsValue;return await $.createClient(e.auth).api(`${$.mailboxPrefix(e.auth)}/messages/${t}/move`).post({destinationId:r})}});var id=ne({auth:X,name:"removeLabelFromEmail",classification:"WRITE",displayName:"Remove Label from Email",description:"Removes a category (label) from an email message.",audience:"both",aiMetadata:{description:"Removes one or more Outlook categories (labels) from a specific message, leaving any other categories intact. Use this to untag or reclassify an email. Idempotent: re-running with the same categories yields the same final label set.",idempotent:!0},props:{messageId:ct({displayName:"Email",description:"Select the email message to remove the label from.",required:!0}),categories:T.Array({displayName:"Categories to Remove",description:"Categories to remove from the email.",required:!0})},async run(e){let{messageId:t,categories:r}=e.propsValue,n=$.createClient(e.auth),s=((await n.api(`${$.mailboxPrefix(e.auth)}/messages/${t}`).get()).categories||[]).filter(p=>!r.includes(p));return await n.api(`${$.mailboxPrefix(e.auth)}/messages/${t}`).patch({categories:s})}});var ad=ne({auth:X,name:"reply-email",classification:"WRITE",displayName:"Reply to Email",description:"Reply to an outlook email.",audience:"both",aiMetadata:{description:"Replies to an existing Outlook message (identified by message ID), supporting added CC/BCC recipients and attachments. Set the Create Draft flag to stage the reply without sending; otherwise it is sent immediately. Not idempotent when sending: each call creates and dispatches a new reply.",idempotent:!1},props:{messageId:T.Dropdown({auth:X,displayName:"Email",description:"Select the email message to reply to.",required:!0,refreshers:[],options:i(async({auth:e})=>{if(!e)return{disabled:!0,options:[]};let t=$.createClient(e);try{return{disabled:!1,options:(await t.api(`${$.mailboxPrefix(e)}/messages?$top=50&$select=id,subject,from,receivedDateTime`).orderby("receivedDateTime desc").get()).value.map(o=>({label:`${o.subject||"No Subject"} - ${o.from?.emailAddress?.name||o.from?.emailAddress?.address||"Unknown Sender"}`,value:o.id||""}))}}catch{return{disabled:!0,options:[]}}},"options")}),bodyFormat:T.StaticDropdown({displayName:"Body Format",required:!0,defaultValue:"text",options:{disabled:!1,options:[{label:"HTML",value:"html"},{label:"Text",value:"text"}]}}),replyBody:T.LongText({displayName:"Reply Body",required:!0}),ccRecipients:T.Array({displayName:"CC Recipients",required:!1}),bccRecipients:T.Array({displayName:"BCC Recipients",required:!1}),attachments:T.Array({displayName:"Attachments",required:!1,defaultValue:[],properties:{file:T.File({displayName:"File",required:!0}),fileName:T.ShortText({displayName:"File Name",required:!1})}}),draft:T.Checkbox({displayName:"Create Draft",description:"If enabled, creates draft without sending.",required:!0,defaultValue:!1})},async run(e){let{replyBody:t,bodyFormat:r,messageId:n,draft:o}=e.propsValue,a=e.propsValue.ccRecipients,s=e.propsValue.bccRecipients,u=e.propsValue.attachments,p={body:{content:t,contentType:r},ccRecipients:a.map(f=>({emailAddress:{address:f}})),bccRecipients:s.map(f=>({emailAddress:{address:f}})),attachments:u.map(f=>({"@odata.type":"#microsoft.graph.fileAttachment",name:f.fileName||f.file.filename,contentBytes:f.file.base64}))},d=$.createClient(e.auth);try{let _=(await d.api(`${$.mailboxPrefix(e.auth)}/messages/${n}/createReply`).post({message:p})).id;return o?{success:!0,message:"Draft created successfully.",draftId:_,draftLink:`https://outlook.office.com/mail/drafts/id/${_}`}:(await d.api(`${$.mailboxPrefix(e.auth)}/messages/${_}/send`).post({}),{success:!0,message:"Reply sent successfully.",draftId:_})}catch(f){console.error("Reply Email Error:",f);let _=f instanceof Error?f.message:"Unknown error";throw new Error(_)}}});var sd=ne({auth:X,name:"sendDraftEmail",classification:"WRITE",displayName:"Send Draft Email",description:"Sends a draft email message.",audience:"both",aiMetadata:{description:"Sends an existing draft email (identified by draft message ID) from the Outlook mailbox. Use this to dispatch a draft previously staged by Create Draft Email or a draft reply. Not idempotent: once sent the draft no longer exists, so re-running with the same ID will fail.",idempotent:!1},props:{messageId:Yp({displayName:"Draft Email",description:"Select the draft email message to send.",required:!0})},async run(e){let{messageId:t}=e.propsValue;return await $.createClient(e.auth).api(`${$.mailboxPrefix(e.auth)}/messages/${t}/send`).post({}),{success:!0,message:"Draft sent successfully.",messageId:t}}});var ud=ne({auth:X,name:"send-email",classification:"WRITE",displayName:"Send Email",description:"Sends an email using Microsoft Outlook.",audience:"both",aiMetadata:{description:"Composes and sends a new email from the authenticated Outlook mailbox to the given recipients, with optional CC/BCC and file attachments. Use this to send a fresh message (not a reply or forward). Not idempotent: each call dispatches a new email and saves a copy to Sent Items.",idempotent:!1},props:{recipients:T.Array({displayName:"To Email(s)",required:!0}),ccRecipients:T.Array({displayName:"CC Email(s)",required:!1,defaultValue:[]}),bccRecipients:T.Array({displayName:"BCC Email(s)",required:!1,defaultValue:[]}),subject:T.ShortText({displayName:"Subject",required:!0}),bodyFormat:T.StaticDropdown({displayName:"Body Format",required:!0,defaultValue:"text",options:{disabled:!1,options:[{label:"HTML",value:"html"},{label:"Text",value:"text"}]}}),body:T.LongText({displayName:"Body",required:!0}),attachments:T.Array({displayName:"Attachments",required:!1,defaultValue:[],properties:{file:T.File({displayName:"File",required:!0}),fileName:T.ShortText({displayName:"File Name",required:!1})}})},async run(e){let t=e.propsValue.recipients,r=e.propsValue.ccRecipients,n=e.propsValue.bccRecipients,o=e.propsValue.attachments,{subject:a,body:s,bodyFormat:u}=e.propsValue,p={subject:a,body:{content:s,contentType:u},toRecipients:t.map(_=>({emailAddress:{address:_}})),ccRecipients:r.map(_=>({emailAddress:{address:_}})),bccRecipients:n.map(_=>({emailAddress:{address:_}})),attachments:o.map(_=>({"@odata.type":"#microsoft.graph.fileAttachment",name:_.fileName||_.file.filename,contentBytes:_.file.base64}))};return await $.createClient(e.auth).api(`${$.mailboxPrefix(e.auth)}/sendMail`).post({message:p,saveToSentItems:"true"})}});var ao=Ce(Tr());async function cd(e,t,r,n,o,a){let s=[];for(let u of r){if(a&&u.sender?.emailAddress?.address&&!u.sender.emailAddress.address.toLowerCase().includes(a.toLowerCase()))continue;let p=await e.api(`${t}/messages/${u.id}/attachments`).get();for(let d of p.value){let{contentBytes:f,..._}=d;if(!(o&&d.name&&!d.name.toLowerCase().includes(o.toLowerCase()))&&d.name&&f){let y=await n.write({fileName:d.name,data:Buffer.from(f,"base64")});s.push({file:y,messageId:u.id,messageSubject:u.subject,messageSender:u.sender,messageReceivedDateTime:u.receivedDateTime,parentFolderId:u.parentFolderId,..._})}}}return s}i(cd,"enrichAttachments");var ld=St({auth:X,name:"newAttachment",classification:"READ",displayName:"New Attachment",description:"Triggers when a new email containing one or more attachments arrives.",aiMetadata:{description:"Fires once per attachment when a new email carrying one or more file attachments arrives, optionally scoped to a folder, sender, or attachment-name filter. Each fire represents a single attachment from a newly received message."},props:{folderId:lt({displayName:"Folder",description:"Monitor attachments in a specific folder. Leave empty to monitor all folders.",required:!1}),sender:T.ShortText({displayName:"From (Sender Email)",description:"Filter emails from a specific sender (optional). Leave empty to for all senders.",required:!1}),attachmentNameFilter:T.ShortText({displayName:"Attachment Name Filter",description:"Filter attachments by name (contains). Leave empty to include all attachments.",required:!1})},sampleData:{},type:"POLLING",async onEnable(e){await e.store.put("lastPoll",Date.now())},async onDisable(e){},async test(e){let{folderId:t,attachmentNameFilter:r,sender:n}=e.propsValue,o=$.createClient(e.auth),a=t?`${$.mailboxPrefix(e.auth)}/mailFolders/${t}/messages`:`${$.mailboxPrefix(e.auth)}/messages`,s=await o.api(`${a}?$filter=hasAttachments eq true`).top(10).get();return(await cd(o,$.mailboxPrefix(e.auth),s.value,e.files,r,n)).map(d=>({epochMilliSeconds:(0,ao.default)(d.messageReceivedDateTime).valueOf(),data:d})).map(d=>d.data)},async run(e){let t=await e.store.get("lastPoll");if(ae(t))throw new Error("lastPoll doesn't exist in the store.");let{folderId:r,attachmentNameFilter:n,sender:o}=e.propsValue,a=$.createClient(e.auth),s=r?`${$.mailboxPrefix(e.auth)}/mailFolders/${r}/messages`:`${$.mailboxPrefix(e.auth)}/messages`,u=await a.api(`${s}?$filter=receivedDateTime gt ${(0,ao.default)(t).toISOString()} and hasAttachments eq true`).orderby("receivedDateTime desc").get(),p=[];for(;u.value.length>0&&(p.push(...u.value),u["@odata.nextLink"]);)u=await a.api(u["@odata.nextLink"]).get();let f=(await cd(a,$.mailboxPrefix(e.auth),p,e.files,n,o)).map(y=>({epochMilliSeconds:(0,ao.default)(y.messageReceivedDateTime).valueOf(),data:y})),_=f.reduce((y,l)=>Math.max(y,l.epochMilliSeconds),t);return await e.store.put("lastPoll",_),f.filter(y=>y.epochMilliSeconds>t).map(y=>y.data)}});var Gi=Ce(Tr());var so={strategy:0,items:i(async({auth:e,lastFetchEpochMS:t,propsValue:r})=>{let n=$.createClient(e),o=[],a=r.folderId,s=t===0?"$top=10":`$filter=createdDateTime gt ${(0,Gi.default)(t).toISOString()}`,u=await n.api(`${$.mailboxPrefix(e)}/mailFolders/${a}/messages?${s}`).orderby("createdDateTime desc").get();if(t===0)for(let p of u.value)o.push(p);else for(;u.value.length>0;){for(let p of u.value)o.push(p);if(u["@odata.nextLink"])u=await n.api(u["@odata.nextLink"]).get();else break}return o.map(p=>({epochMilliSeconds:(0,Gi.default)(p.createdDateTime).valueOf(),data:p}))},"items")},pd=St({auth:X,name:"newEmailInFolder",classification:"READ",displayName:"New Email in Folder",description:"Triggers when a new email is delivered into the specified folder.",aiMetadata:{description:"Fires when a new message appears in the chosen Outlook mail folder. Each fire represents one new email added to that folder."},props:{folderId:lt({displayName:"Folder",description:"",required:!0})},sampleData:{},type:"POLLING",async onEnable(e){await je.onEnable(so,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async onDisable(e){await je.onDisable(so,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async test(e){return await je.test(so,e)},async run(e){return await je.poll(so,e)}});var Wi=Ce(Tr());var uo={strategy:0,items:i(async({auth:e,lastFetchEpochMS:t,propsValue:r})=>{let n=$.createClient(e),o=[],a=t===0?"$top=10":`$filter=receivedDateTime gt ${(0,Wi.default)(t).toISOString()}`,s=await n.api(`${$.mailboxPrefix(e)}/mailFolders/inbox/messages?${a}`).orderby("receivedDateTime desc").get();if(t===0)for(let p of s.value)o.push(p);else for(;s.value.length>0;){for(let p of s.value)o.push(p);if(s["@odata.nextLink"])s=await n.api(s["@odata.nextLink"]).get();else break}let u=o;return r?.sender&&(u=u.filter(p=>{let d=p.from?.emailAddress?.address?.toLowerCase(),f=r.sender?.toLowerCase();return d===f})),r?.recipient&&(u=u.filter(p=>p.toRecipients?.some(f=>{let _=f.emailAddress?.address?.toLowerCase(),y=r.recipient?.toLowerCase();return _===y}))),u.map(p=>({epochMilliSeconds:(0,Wi.default)(p.receivedDateTime).valueOf(),data:p}))},"items")},dd=St({auth:X,name:"newEmail",classification:"READ",displayName:"New Email",description:"Triggers when a new email is received in the inbox.",aiMetadata:{description:"Fires when a new message arrives in the mailbox Inbox, optionally narrowed to a specific sender and/or recipient address. Each fire represents one newly received email."},props:{sender:T.ShortText({displayName:"From (Sender Email)",description:"Filter emails from a specific sender (optional). Leave empty to for all senders.",required:!1}),recipient:T.ShortText({displayName:"To (Recipient Email)",description:"Filter emails to a specific recipient (optional). Leave empty to for all recipients.",required:!1})},sampleData:{},type:"POLLING",async onEnable(e){await je.onEnable(uo,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async onDisable(e){await je.onDisable(uo,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async test(e){return await je.test(uo,e)},async run(e){return await je.poll(uo,e)}});var fd=ne({auth:X,name:"request_approval_in_mail",classification:"WRITE",displayName:"Request Approval in Email",description:"Send approval request email and then wait until the email is approved or disapproved",audience:"both",aiMetadata:{description:"Sends an email with a single link to a confirmation page where the recipient chooses Approve or Disapprove, then pauses the flow until they respond, resuming with the decision. Use this as a human-in-the-loop approval gate before proceeding. Not idempotent: each call sends a new email and creates a new pending waitpoint.",idempotent:!1},props:{recipients:T.ShortText({displayName:"To Email Address",description:"The email address of the recipient who will receive the approval request.",required:!0}),subject:T.ShortText({displayName:"Subject",description:"The subject of the approval request email.",required:!0}),body:T.LongText({displayName:"Body",description:"The main content of the email. You can include details about the approval request here in the html format or plain text.",required:!0})},async run(e){if(e.executionType==="BEGIN")try{let t=e.auth.access_token,r=e.propsValue.recipients,{subject:n,body:o}=e.propsValue;qe(t,"token"),qe(r,"recipients"),qe(n,"subject"),qe(o,"body");let a=await e.run.createWaitpoint({type:"WEBHOOK"}),s=`${a.resumeUrl}/confirm`,u=`
|
|
22
22
|
<div>
|
|
23
23
|
<p>${o}</p>
|
|
24
24
|
<br />
|
|
@@ -26,7 +26,7 @@ For app-only, Microsoft grants tenant-wide mailbox access by default \u2014 scop
|
|
|
26
26
|
<a href="${s}" style="display: inline-block; padding: 10px 20px; background-color: #6e41e2; color: white; text-decoration: none; border-radius: 4px;">Review & Respond</a>
|
|
27
27
|
</p>
|
|
28
28
|
</div>
|
|
29
|
-
`,p=$.createClient(e.auth),d={subject:n,body:{content:u,contentType:"html"},toRecipients:[{emailAddress:{address:r}}]},
|
|
29
|
+
`,p=$.createClient(e.auth),d={subject:n,body:{content:u,contentType:"html"},toRecipients:[{emailAddress:{address:r}}]},f=await p.api(`${$.mailboxPrefix(e.auth)}/sendMail`).post({message:d,saveToSentItems:!0});return e.run.waitForWaitpoint(a.id),{approved:!1}}catch(t){throw console.error("[RequestApprovalEmail] Error during BEGIN execution:",t),t}else return{approved:e.resumePayload.queryParams.action==="approve"}}});var T_=cu({displayName:"Microsoft Outlook",auth:X,minimumSupportedRelease:"0.87.0",logoUrl:"https://cdn.activepieces.com/pieces/microsoft-outlook.png",categories:["PRODUCTIVITY"],authors:["lucaslimasouza","kishanprmr","sanket-a11y"],actions:[ud,td,ad,ed,Qp,id,fd,od,sd,nd,rd,$l({auth:X,baseUrl:i(e=>{let t=e.props?.cloud;return sn(t)+"/v1.0/"},"baseUrl"),authMapping:i(async e=>({Authorization:`Bearer ${e.access_token}`}),"authMapping")})],triggers:[dd,pd,ld]});0&&(module.exports={microsoftOutlook});
|
|
30
30
|
/*! Bundled license information:
|
|
31
31
|
|
|
32
32
|
mime-types/index.js:
|