From 83ee0d63a75ac9d9cf11e68bfbf36dc68bb76abd Mon Sep 17 00:00:00 2001 From: xmanrui <841206367@qq.com> Date: Sat, 22 Aug 2026 18:56:49 +0800 Subject: [PATCH] fix(weixin): refine Harness access errors --- lib/index.js | 176 +++++++++--------- src/channels/shared/harness-client.mjs | 55 +++++- src/channels/weixin/weixin-controller.mjs | 4 +- src/channels/weixin/weixin-runtime.mjs | 4 +- test/channels/weixin/harness-client.test.mjs | 14 +- .../weixin/weixin-controller.test.mjs | 72 +++---- test/channels/weixin/weixin-runtime.test.mjs | 4 +- 7 files changed, 194 insertions(+), 135 deletions(-) diff --git a/lib/index.js b/lib/index.js index 74a0bfb..3217912 100644 --- a/lib/index.js +++ b/lib/index.js @@ -4,28 +4,28 @@ import { fileURLToPath as __dshFileURLToPath } from 'node:url'; const require = __dshCreateRequire(import.meta.url); const __filename = __dshFileURLToPath(import.meta.url); const __dirname = __dshDirname(__filename); -var Kae=Object.create;var $w=Object.defineProperty;var Yae=Object.getOwnPropertyDescriptor;var xae=Object.getOwnPropertyNames;var jae=Object.getPrototypeOf,Jae=Object.prototype.hasOwnProperty;var We=(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(r,o)=>(typeof require<"u"?require:r)[o]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var le=(n,r)=>()=>(n&&(r=n(n=0)),r);var W=(n,r)=>()=>(r||n((r={exports:{}}).exports,r),r.exports),Qr=(n,r)=>{for(var o in r)$w(n,o,{get:r[o],enumerable:!0})},qae=(n,r,o,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let e of xae(r))!Jae.call(n,e)&&e!==o&&$w(n,e,{get:()=>r[e],enumerable:!(i=Yae(r,e))||i.enumerable});return n};var Je=(n,r,o)=>(o=n!=null?Kae(jae(n)):{},qae(r||!n||!n.__esModule?$w(o,"default",{value:n,enumerable:!0}):o,n));var vU=W((m4e,kU)=>{var RU=We("stream").Stream,vce=We("util");kU.exports=Mo;function Mo(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}vce.inherits(Mo,RU);Mo.create=function(n,r){var o=new this;r=r||{};for(var i in r)o[i]=r[i];o.source=n;var e=n.emit;return n.emit=function(){return o._handleEmit(arguments),e.apply(n,arguments)},n.on("error",function(){}),o.pauseStream&&n.pause(),o};Object.defineProperty(Mo.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});Mo.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};Mo.prototype.resume=function(){this._released||this.release(),this.source.resume()};Mo.prototype.pause=function(){this.source.pause()};Mo.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(n){this.emit.apply(this,n)}.bind(this)),this._bufferedEvents=[]};Mo.prototype.pipe=function(){var n=RU.prototype.pipe.apply(this,arguments);return this.resume(),n};Mo.prototype._handleEmit=function(n){if(this._released){this.emit.apply(this,n);return}n[0]==="data"&&(this.dataSize+=n[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(n)};Mo.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var n="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(n))}}});var LU=W((S4e,FU)=>{var Pce=We("util"),GU=We("stream").Stream,PU=vU();FU.exports=ir;function ir(){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}Pce.inherits(ir,GU);ir.create=function(n){var r=new this;n=n||{};for(var o in n)r[o]=n[o];return r};ir.isStreamLike=function(n){return typeof n!="function"&&typeof n!="string"&&typeof n!="boolean"&&typeof n!="number"&&!Buffer.isBuffer(n)};ir.prototype.append=function(n){var r=ir.isStreamLike(n);if(r){if(!(n instanceof PU)){var o=PU.create(n,{maxDataSize:1/0,pauseStream:this.pauseStreams});n.on("data",this._checkDataSize.bind(this)),n=o}this._handleErrors(n),this.pauseStreams&&n.pause()}return this._streams.push(n),this};ir.prototype.pipe=function(n,r){return GU.prototype.pipe.call(this,n,r),this.resume(),n};ir.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}};ir.prototype._realGetNext=function(){var n=this._streams.shift();if(typeof n>"u"){this.end();return}if(typeof n!="function"){this._pipeNext(n);return}var r=n;r(function(o){var i=ir.isStreamLike(o);i&&(o.on("data",this._checkDataSize.bind(this)),this._handleErrors(o)),this._pipeNext(o)}.bind(this))};ir.prototype._pipeNext=function(n){this._currentStream=n;var r=ir.isStreamLike(n);if(r){n.on("end",this._getNext.bind(this)),n.pipe(this,{end:!1});return}var o=n;this.write(o),this._getNext()};ir.prototype._handleErrors=function(n){var r=this;n.on("error",function(o){r._emitError(o)})};ir.prototype.write=function(n){this.emit("data",n)};ir.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};ir.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")};ir.prototype.end=function(){this._reset(),this.emit("end")};ir.prototype.destroy=function(){this._reset(),this.emit("close")};ir.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};ir.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var n="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(n))}};ir.prototype._updateDataSize=function(){this.dataSize=0;var n=this;this._streams.forEach(function(r){r.dataSize&&(n.dataSize+=r.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};ir.prototype._emitError=function(n){this._reset(),this.emit("error",n)}});var UU=W((D4e,Gce)=>{Gce.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var KU=W((w4e,HU)=>{HU.exports=UU()});var jU=W(Xa=>{"use strict";var _B=KU(),Fce=We("path").extname,YU=/^\s*([^;\s]*)(?:;|\s|$)/,Lce=/^text\//i;Xa.charset=xU;Xa.charsets={lookup:xU};Xa.contentType=Uce;Xa.extension=Hce;Xa.extensions=Object.create(null);Xa.lookup=Kce;Xa.types=Object.create(null);Yce(Xa.extensions,Xa.types);function xU(n){if(!n||typeof n!="string")return!1;var r=YU.exec(n),o=r&&_B[r[1].toLowerCase()];return o&&o.charset?o.charset:r&&Lce.test(r[1])?"UTF-8":!1}function Uce(n){if(!n||typeof n!="string")return!1;var r=n.indexOf("/")===-1?Xa.lookup(n):n;if(!r)return!1;if(r.indexOf("charset")===-1){var o=Xa.charset(r);o&&(r+="; charset="+o.toLowerCase())}return r}function Hce(n){if(!n||typeof n!="string")return!1;var r=YU.exec(n),o=r&&Xa.extensions[r[1].toLowerCase()];return!o||!o.length?!1:o[0]}function Kce(n){if(!n||typeof n!="string")return!1;var r=Fce("x."+n).toLowerCase().substr(1);return r&&Xa.types[r]||!1}function Yce(n,r){var o=["nginx","apache",void 0,"iana"];Object.keys(_B).forEach(function(e){var a=_B[e],A=a.extensions;if(!(!A||!A.length)){n[e]=A;for(var t=0;tc||g===c&&r[s].substr(0,12)==="application/"))continue}r[s]=e}}})}});var qU=W((b4e,JU)=>{JU.exports=xce;function xce(n){var r=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;r?r(n):setTimeout(n,0)}});var ib=W((M4e,zU)=>{var VU=qU();zU.exports=jce;function jce(n){var r=!1;return VU(function(){r=!0}),function(i,e){r?n(i,e):VU(function(){n(i,e)})}}});var ob=W((_4e,WU)=>{WU.exports=Jce;function Jce(n){Object.keys(n.jobs).forEach(qce.bind(n)),n.jobs={}}function qce(n){typeof this.jobs[n]=="function"&&this.jobs[n]()}});var nb=W((N4e,XU)=>{var ZU=ib(),Vce=ob();XU.exports=zce;function zce(n,r,o,i){var e=o.keyedList?o.keyedList[o.index]:o.index;o.jobs[e]=Wce(r,e,n[e],function(a,A){e in o.jobs&&(delete o.jobs[e],a?Vce(o):o.results[e]=A,i(a,o.results))})}function Wce(n,r,o,i){var e;return n.length==2?e=n(o,ZU(i)):e=n(o,r,ZU(i)),e}});var sb=W((T4e,$U)=>{$U.exports=Zce;function Zce(n,r){var o=!Array.isArray(n),i={index:0,keyedList:o||r?Object.keys(n):null,jobs:{},results:o?{}:[],size:o?Object.keys(n).length:n.length};return r&&i.keyedList.sort(o?r:function(e,a){return r(n[e],n[a])}),i}});var gb=W((R4e,eH)=>{var Xce=ob(),$ce=ib();eH.exports=eIe;function eIe(n){Object.keys(this.jobs).length&&(this.index=this.size,Xce(this),$ce(n)(null,this.results))}});var tH=W((k4e,AH)=>{var AIe=nb(),tIe=sb(),rIe=gb();AH.exports=aIe;function aIe(n,r,o){for(var i=tIe(n);i.index<(i.keyedList||n).length;)AIe(n,r,i,function(e,a){if(e){o(e,a);return}if(Object.keys(i.jobs).length===0){o(null,i.results);return}}),i.index++;return rIe.bind(i,o)}});var cb=W((v4e,NB)=>{var rH=nb(),iIe=sb(),oIe=gb();NB.exports=nIe;NB.exports.ascending=aH;NB.exports.descending=sIe;function nIe(n,r,o,i){var e=iIe(n,o);return rH(n,r,e,function a(A,t){if(A){i(A,t);return}if(e.index++,e.index<(e.keyedList||n).length){rH(n,r,e,a);return}i(null,e.results)}),oIe.bind(e,i)}function aH(n,r){return nr?1:0}function sIe(n,r){return-1*aH(n,r)}});var oH=W((P4e,iH)=>{var gIe=cb();iH.exports=cIe;function cIe(n,r,o){return gIe(n,r,null,o)}});var sH=W((G4e,nH)=>{nH.exports={parallel:tH(),serial:oH(),serialOrdered:cb()}});var Ib=W((F4e,gH)=>{"use strict";gH.exports=Object});var IH=W((L4e,cH)=>{"use strict";cH.exports=Error});var pH=W((U4e,lH)=>{"use strict";lH.exports=EvalError});var CH=W((H4e,EH)=>{"use strict";EH.exports=RangeError});var dH=W((K4e,hH)=>{"use strict";hH.exports=ReferenceError});var BH=W((Y4e,uH)=>{"use strict";uH.exports=SyntaxError});var zs=W((x4e,fH)=>{"use strict";fH.exports=TypeError});var yH=W((j4e,QH)=>{"use strict";QH.exports=URIError});var SH=W((J4e,mH)=>{"use strict";mH.exports=Math.abs});var wH=W((q4e,DH)=>{"use strict";DH.exports=Math.floor});var bH=W((V4e,OH)=>{"use strict";OH.exports=Math.max});var _H=W((z4e,MH)=>{"use strict";MH.exports=Math.min});var TH=W((W4e,NH)=>{"use strict";NH.exports=Math.pow});var kH=W((Z4e,RH)=>{"use strict";RH.exports=Math.round});var PH=W((X4e,vH)=>{"use strict";vH.exports=Number.isNaN||function(r){return r!==r}});var FH=W(($4e,GH)=>{"use strict";var IIe=PH();GH.exports=function(r){return IIe(r)||r===0?r:r<0?-1:1}});var UH=W((e8e,LH)=>{"use strict";LH.exports=Object.getOwnPropertyDescriptor});var lb=W((A8e,HH)=>{"use strict";var TB=UH();if(TB)try{TB([],"length")}catch{TB=null}HH.exports=TB});var pb=W((t8e,KH)=>{"use strict";var RB=Object.defineProperty||!1;if(RB)try{RB({},"a",{value:1})}catch{RB=!1}KH.exports=RB});var Eb=W((r8e,YH)=>{"use strict";YH.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},o=Symbol("test"),i=Object(o);if(typeof o=="string"||Object.prototype.toString.call(o)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var e=42;r[o]=e;for(var a in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var A=Object.getOwnPropertySymbols(r);if(A.length!==1||A[0]!==o||!Object.prototype.propertyIsEnumerable.call(r,o))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var t=Object.getOwnPropertyDescriptor(r,o);if(t.value!==e||t.enumerable!==!0)return!1}return!0}});var JH=W((a8e,jH)=>{"use strict";var xH=typeof Symbol<"u"&&Symbol,lIe=Eb();jH.exports=function(){return typeof xH!="function"||typeof Symbol!="function"||typeof xH("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:lIe()}});var Cb=W((i8e,qH)=>{"use strict";qH.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var hb=W((o8e,VH)=>{"use strict";var pIe=Ib();VH.exports=pIe.getPrototypeOf||null});var ZH=W((n8e,WH)=>{"use strict";var EIe="Function.prototype.bind called on incompatible ",CIe=Object.prototype.toString,hIe=Math.max,dIe="[object Function]",zH=function(r,o){for(var i=[],e=0;e{"use strict";var fIe=ZH();XH.exports=Function.prototype.bind||fIe});var kB=W((g8e,$H)=>{"use strict";$H.exports=Function.prototype.call});var db=W((c8e,eK)=>{"use strict";eK.exports=Function.prototype.apply});var tK=W((I8e,AK)=>{"use strict";AK.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var aK=W((l8e,rK)=>{"use strict";var QIe=EC(),yIe=db(),mIe=kB(),SIe=tK();rK.exports=SIe||QIe.call(mIe,yIe)});var ub=W((p8e,iK)=>{"use strict";var DIe=EC(),wIe=zs(),OIe=kB(),bIe=aK();iK.exports=function(r){if(r.length<1||typeof r[0]!="function")throw new wIe("a function is required");return bIe(DIe,OIe,r)}});var IK=W((E8e,cK)=>{"use strict";var MIe=ub(),oK=lb(),sK;try{sK=[].__proto__===Array.prototype}catch(n){if(!n||typeof n!="object"||!("code"in n)||n.code!=="ERR_PROTO_ACCESS")throw n}var Bb=!!sK&&oK&&oK(Object.prototype,"__proto__"),gK=Object,nK=gK.getPrototypeOf;cK.exports=Bb&&typeof Bb.get=="function"?MIe([Bb.get]):typeof nK=="function"?function(r){return nK(r==null?r:gK(r))}:!1});var hK=W((C8e,CK)=>{"use strict";var lK=Cb(),pK=hb(),EK=IK();CK.exports=lK?function(r){return lK(r)}:pK?function(r){if(!r||typeof r!="object"&&typeof r!="function")throw new TypeError("getProto: not an object");return pK(r)}:EK?function(r){return EK(r)}:null});var vB=W((h8e,dK)=>{"use strict";var _Ie=Function.prototype.call,NIe=Object.prototype.hasOwnProperty,TIe=EC();dK.exports=TIe.call(_Ie,NIe)});var uC=W((d8e,mK)=>{"use strict";var et,RIe=Ib(),kIe=IH(),vIe=pH(),PIe=CH(),GIe=dH(),Cl=BH(),El=zs(),FIe=yH(),LIe=SH(),UIe=wH(),HIe=bH(),KIe=_H(),YIe=TH(),xIe=kH(),jIe=FH(),QK=Function,fb=function(n){try{return QK('"use strict"; return ('+n+").constructor;")()}catch{}},CC=lb(),JIe=pb(),Qb=function(){throw new El},qIe=CC?(function(){try{return arguments.callee,Qb}catch{try{return CC(arguments,"callee").get}catch{return Qb}}})():Qb,ll=JH()(),Lr=hK(),VIe=hb(),zIe=Cb(),yK=db(),hC=kB(),pl={},WIe=typeof Uint8Array>"u"||!Lr?et:Lr(Uint8Array),Cc={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?et:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?et:ArrayBuffer,"%ArrayIteratorPrototype%":ll&&Lr?Lr([][Symbol.iterator]()):et,"%AsyncFromSyncIteratorPrototype%":et,"%AsyncFunction%":pl,"%AsyncGenerator%":pl,"%AsyncGeneratorFunction%":pl,"%AsyncIteratorPrototype%":pl,"%Atomics%":typeof Atomics>"u"?et:Atomics,"%BigInt%":typeof BigInt>"u"?et:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?et:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?et:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?et:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":kIe,"%eval%":eval,"%EvalError%":vIe,"%Float16Array%":typeof Float16Array>"u"?et:Float16Array,"%Float32Array%":typeof Float32Array>"u"?et:Float32Array,"%Float64Array%":typeof Float64Array>"u"?et:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?et:FinalizationRegistry,"%Function%":QK,"%GeneratorFunction%":pl,"%Int8Array%":typeof Int8Array>"u"?et:Int8Array,"%Int16Array%":typeof Int16Array>"u"?et:Int16Array,"%Int32Array%":typeof Int32Array>"u"?et:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ll&&Lr?Lr(Lr([][Symbol.iterator]())):et,"%JSON%":typeof JSON=="object"?JSON:et,"%Map%":typeof Map>"u"?et:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ll||!Lr?et:Lr(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":RIe,"%Object.getOwnPropertyDescriptor%":CC,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?et:Promise,"%Proxy%":typeof Proxy>"u"?et:Proxy,"%RangeError%":PIe,"%ReferenceError%":GIe,"%Reflect%":typeof Reflect>"u"?et:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?et:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ll||!Lr?et:Lr(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?et:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ll&&Lr?Lr(""[Symbol.iterator]()):et,"%Symbol%":ll?Symbol:et,"%SyntaxError%":Cl,"%ThrowTypeError%":qIe,"%TypedArray%":WIe,"%TypeError%":El,"%Uint8Array%":typeof Uint8Array>"u"?et:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?et:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?et:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?et:Uint32Array,"%URIError%":FIe,"%WeakMap%":typeof WeakMap>"u"?et:WeakMap,"%WeakRef%":typeof WeakRef>"u"?et:WeakRef,"%WeakSet%":typeof WeakSet>"u"?et:WeakSet,"%Function.prototype.call%":hC,"%Function.prototype.apply%":yK,"%Object.defineProperty%":JIe,"%Object.getPrototypeOf%":VIe,"%Math.abs%":LIe,"%Math.floor%":UIe,"%Math.max%":HIe,"%Math.min%":KIe,"%Math.pow%":YIe,"%Math.round%":xIe,"%Math.sign%":jIe,"%Reflect.getPrototypeOf%":zIe};if(Lr)try{null.error}catch(n){uK=Lr(Lr(n)),Cc["%Error.prototype%"]=uK}var uK,ZIe=function n(r){var o;if(r==="%AsyncFunction%")o=fb("async function () {}");else if(r==="%GeneratorFunction%")o=fb("function* () {}");else if(r==="%AsyncGeneratorFunction%")o=fb("async function* () {}");else if(r==="%AsyncGenerator%"){var i=n("%AsyncGeneratorFunction%");i&&(o=i.prototype)}else if(r==="%AsyncIteratorPrototype%"){var e=n("%AsyncGenerator%");e&&Lr&&(o=Lr(e.prototype))}return Cc[r]=o,o},BK={__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"]},dC=EC(),PB=vB(),XIe=dC.call(hC,Array.prototype.concat),$Ie=dC.call(yK,Array.prototype.splice),fK=dC.call(hC,String.prototype.replace),GB=dC.call(hC,String.prototype.slice),ele=dC.call(hC,RegExp.prototype.exec),Ale=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,tle=/\\(\\)?/g,rle=function(r){var o=GB(r,0,1),i=GB(r,-1);if(o==="%"&&i!=="%")throw new Cl("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&o!=="%")throw new Cl("invalid intrinsic syntax, expected opening `%`");var e=[];return fK(r,Ale,function(a,A,t,s){e[e.length]=t?fK(s,tle,"$1"):A||a}),e},ale=function(r,o){var i=r,e;if(PB(BK,i)&&(e=BK[i],i="%"+e[0]+"%"),PB(Cc,i)){var a=Cc[i];if(a===pl&&(a=ZIe(i)),typeof a>"u"&&!o)throw new El("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:e,name:i,value:a}}throw new Cl("intrinsic "+r+" does not exist!")};mK.exports=function(r,o){if(typeof r!="string"||r.length===0)throw new El("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof o!="boolean")throw new El('"allowMissing" argument must be a boolean');if(ele(/^%?[^%]*%?$/,r)===null)throw new Cl("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=rle(r),e=i.length>0?i[0]:"",a=ale("%"+e+"%",o),A=a.name,t=a.value,s=!1,g=a.alias;g&&(e=g[0],$Ie(i,XIe([0,1],g)));for(var c=1,I=!0;c=i.length){var Q=CC(t,E);I=!!Q,I&&"get"in Q&&!("originalValue"in Q.get)?t=Q.get:t=t[E]}else I=PB(t,E),t=t[E];I&&!s&&(Cc[A]=t)}}return t}});var DK=W((u8e,SK)=>{"use strict";var ile=Eb();SK.exports=function(){return ile()&&!!Symbol.toStringTag}});var bK=W((B8e,OK)=>{"use strict";var ole=uC(),wK=ole("%Object.defineProperty%",!0),nle=DK()(),sle=vB(),gle=zs(),FB=nle?Symbol.toStringTag:null;OK.exports=function(r,o){var i=arguments.length>2&&!!arguments[2]&&arguments[2].force,e=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof i<"u"&&typeof i!="boolean"||typeof e<"u"&&typeof e!="boolean")throw new gle("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");FB&&(i||!sle(r,FB))&&(wK?wK(r,FB,{configurable:!e,enumerable:!1,value:o,writable:!1}):r[FB]=o)}});var _K=W((f8e,MK)=>{"use strict";MK.exports=function(n,r){return Object.keys(r).forEach(function(o){n[o]=n[o]||r[o]}),n}});var RK=W((Q8e,TK)=>{"use strict";var Db=LU(),cle=We("util"),yb=We("path"),Ile=We("http"),lle=We("https"),ple=We("url").parse,Ele=We("fs"),Cle=We("stream").Stream,hle=We("crypto"),mb=jU(),dle=sH(),ule=bK(),Ws=vB(),Sb=_K();function NK(n){return String(n).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}function gt(n){if(!(this instanceof gt))return new gt(n);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Db.call(this),n=n||{};for(var r in n)this[r]=n[r]}cle.inherits(gt,Db);gt.LINE_BREAK=`\r -`;gt.DEFAULT_CONTENT_TYPE="application/octet-stream";gt.prototype.append=function(n,r,o){o=o||{},typeof o=="string"&&(o={filename:o});var i=Db.prototype.append.bind(this);if((typeof r=="number"||r==null)&&(r=String(r)),Array.isArray(r)){this._error(new Error("Arrays are not supported."));return}var e=this._multiPartHeader(n,r,o),a=this._multiPartFooter();i(e),i(r),i(a),this._trackLength(e,r,o)};gt.prototype._trackLength=function(n,r,o){var i=0;o.knownLength!=null?i+=Number(o.knownLength):Buffer.isBuffer(r)?i=r.length:typeof r=="string"&&(i=Buffer.byteLength(r)),this._valueLength+=i,this._overheadLength+=Buffer.byteLength(n)+gt.LINE_BREAK.length,!(!r||!r.path&&!(r.readable&&Ws(r,"httpVersion"))&&!(r instanceof Cle))&&(o.knownLength||this._valuesToMeasure.push(r))};gt.prototype._lengthRetriever=function(n,r){Ws(n,"fd")?n.end!=null&&n.end!=1/0&&n.start!=null?r(null,n.end+1-(n.start?n.start:0)):Ele.stat(n.path,function(o,i){if(o){r(o);return}var e=i.size-(n.start?n.start:0);r(null,e)}):Ws(n,"httpVersion")?r(null,Number(n.headers["content-length"])):Ws(n,"httpModule")?(n.on("response",function(o){n.pause(),r(null,Number(o.headers["content-length"]))}),n.resume()):r("Unknown stream")};gt.prototype._multiPartHeader=function(n,r,o){if(typeof o.header=="string")return o.header;var i=this._getContentDisposition(r,o),e=this._getContentType(r,o),a="",A={"Content-Disposition":["form-data",'name="'+NK(n)+'"'].concat(i||[]),"Content-Type":[].concat(e||[])};typeof o.header=="object"&&Sb(A,o.header);var t;for(var s in A)if(Ws(A,s)){if(t=A[s],t==null)continue;Array.isArray(t)||(t=[t]),t.length&&(a+=s+": "+t.join("; ")+gt.LINE_BREAK)}return"--"+this.getBoundary()+gt.LINE_BREAK+a+gt.LINE_BREAK};gt.prototype._getContentDisposition=function(n,r){var o;if(typeof r.filepath=="string"?o=yb.normalize(r.filepath).replace(/\\/g,"/"):r.filename||n&&(n.name||n.path)?o=yb.basename(r.filename||n&&(n.name||n.path)):n&&n.readable&&Ws(n,"httpVersion")&&(o=yb.basename(n.client._httpMessage.path||"")),o)return'filename="'+NK(o)+'"'};gt.prototype._getContentType=function(n,r){var o=r.contentType;return!o&&n&&n.name&&(o=mb.lookup(n.name)),!o&&n&&n.path&&(o=mb.lookup(n.path)),!o&&n&&n.readable&&Ws(n,"httpVersion")&&(o=n.headers["content-type"]),!o&&(r.filepath||r.filename)&&(o=mb.lookup(r.filepath||r.filename)),!o&&n&&typeof n=="object"&&(o=gt.DEFAULT_CONTENT_TYPE),o};gt.prototype._multiPartFooter=function(){return function(n){var r=gt.LINE_BREAK,o=this._streams.length===0;o&&(r+=this._lastBoundary()),n(r)}.bind(this)};gt.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+gt.LINE_BREAK};gt.prototype.getHeaders=function(n){var r,o={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(r in n)Ws(n,r)&&(o[r.toLowerCase()]=n[r]);return o};gt.prototype.setBoundary=function(n){if(typeof n!="string")throw new TypeError("FormData boundary must be a string");this._boundary=n};gt.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};gt.prototype.getBuffer=function(){for(var n=new Buffer.alloc(0),r=this.getBoundary(),o=0,i=this._streams.length;o{var ul=1e3,Bl=ul*60,fl=Bl*60,uc=fl*24,Kle=uc*7,Yle=uc*365.25;VK.exports=function(n,r){r=r||{};var o=typeof n;if(o==="string"&&n.length>0)return xle(n);if(o==="number"&&isFinite(n))return r.long?Jle(n):jle(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function xle(n){if(n=String(n),!(n.length>100)){var r=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(n);if(r){var o=parseFloat(r[1]),i=(r[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return o*Yle;case"weeks":case"week":case"w":return o*Kle;case"days":case"day":case"d":return o*uc;case"hours":case"hour":case"hrs":case"hr":case"h":return o*fl;case"minutes":case"minute":case"mins":case"min":case"m":return o*Bl;case"seconds":case"second":case"secs":case"sec":case"s":return o*ul;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}function jle(n){var r=Math.abs(n);return r>=uc?Math.round(n/uc)+"d":r>=fl?Math.round(n/fl)+"h":r>=Bl?Math.round(n/Bl)+"m":r>=ul?Math.round(n/ul)+"s":n+"ms"}function Jle(n){var r=Math.abs(n);return r>=uc?KB(n,r,uc,"day"):r>=fl?KB(n,r,fl,"hour"):r>=Bl?KB(n,r,Bl,"minute"):r>=ul?KB(n,r,ul,"second"):n+" ms"}function KB(n,r,o,i){var e=r>=o*1.5;return Math.round(n/o)+" "+i+(e?"s":"")}});var Hb=W((SVe,WK)=>{function qle(n){o.debug=o,o.default=o,o.coerce=s,o.disable=A,o.enable=e,o.enabled=t,o.humanize=zK(),o.destroy=g,Object.keys(n).forEach(c=>{o[c]=n[c]}),o.names=[],o.skips=[],o.formatters={};function r(c){let I=0;for(let E=0;E{if(j==="%%")return"%";P++;let q=o.formatters[K];if(typeof q=="function"){let V=y[P];j=q.call(m,V),y.splice(P,1),P--}return j}),o.formatArgs.call(m,y),(m.log||o.log).apply(m,y)}return Q.namespace=c,Q.useColors=o.useColors(),Q.color=o.selectColor(c),Q.extend=i,Q.destroy=o.destroy,Object.defineProperty(Q,"enabled",{enumerable:!0,configurable:!1,get:()=>E!==null?E:(B!==o.namespaces&&(B=o.namespaces,f=o.enabled(c)),f),set:y=>{E=y}}),typeof o.init=="function"&&o.init(Q),Q}function i(c,I){let E=o(this.namespace+(typeof I>"u"?":":I)+c);return E.log=this.log,E}function e(c){o.save(c),o.namespaces=c,o.names=[],o.skips=[];let I=(typeof c=="string"?c:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let E of I)E[0]==="-"?o.skips.push(E.slice(1)):o.names.push(E)}function a(c,I){let E=0,B=0,f=-1,Q=0;for(;E"-"+I)].join(",");return o.enable(""),c}function t(c){for(let I of o.skips)if(a(c,I))return!1;for(let I of o.names)if(a(c,I))return!0;return!1}function s(c){return c instanceof Error?c.stack||c.message:c}function g(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return o.enable(o.load()),o}WK.exports=qle});var ZK=W(($a,YB)=>{$a.formatArgs=zle;$a.save=Wle;$a.load=Zle;$a.useColors=Vle;$a.storage=Xle();$a.destroy=(()=>{let n=!1;return()=>{n||(n=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();$a.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Vle(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let n;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(n=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(n[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function zle(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+YB.exports.humanize(this.diff),!this.useColors)return;let r="color: "+this.color;n.splice(1,0,r,"color: inherit");let o=0,i=0;n[0].replace(/%[a-zA-Z%]/g,e=>{e!=="%%"&&(o++,e==="%c"&&(i=o))}),n.splice(i,0,r)}$a.log=console.debug||console.log||(()=>{});function Wle(n){try{n?$a.storage.setItem("debug",n):$a.storage.removeItem("debug")}catch{}}function Zle(){let n;try{n=$a.storage.getItem("debug")||$a.storage.getItem("DEBUG")}catch{}return!n&&typeof process<"u"&&"env"in process&&(n=process.env.DEBUG),n}function Xle(){try{return localStorage}catch{}}YB.exports=Hb()($a);var{formatters:$le}=YB.exports;$le.j=function(n){try{return JSON.stringify(n)}catch(r){return"[UnexpectedJSONParseError]: "+r.message}}});var $K=W((Ur,jB)=>{var epe=We("tty"),xB=We("util");Ur.init=npe;Ur.log=ape;Ur.formatArgs=tpe;Ur.save=ipe;Ur.load=ope;Ur.useColors=Ape;Ur.destroy=xB.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Ur.colors=[6,2,3,4,5,1];try{let n=We("supports-color");n&&(n.stderr||n).level>=2&&(Ur.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Ur.inspectOpts=Object.keys(process.env).filter(n=>/^debug_/i.test(n)).reduce((n,r)=>{let o=r.substring(6).toLowerCase().replace(/_([a-z])/g,(e,a)=>a.toUpperCase()),i=process.env[r];return/^(yes|on|true|enabled)$/i.test(i)?i=!0:/^(no|off|false|disabled)$/i.test(i)?i=!1:i==="null"?i=null:i=Number(i),n[o]=i,n},{});function Ape(){return"colors"in Ur.inspectOpts?!!Ur.inspectOpts.colors:epe.isatty(process.stderr.fd)}function tpe(n){let{namespace:r,useColors:o}=this;if(o){let i=this.color,e="\x1B[3"+(i<8?i:"8;5;"+i),a=` ${e};1m${r} \x1B[0m`;n[0]=a+n[0].split(` +var Kae=Object.create;var $w=Object.defineProperty;var Yae=Object.getOwnPropertyDescriptor;var xae=Object.getOwnPropertyNames;var jae=Object.getPrototypeOf,Jae=Object.prototype.hasOwnProperty;var We=(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(r,o)=>(typeof require<"u"?require:r)[o]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var le=(n,r)=>()=>(n&&(r=n(n=0)),r);var W=(n,r)=>()=>(r||n((r={exports:{}}).exports,r),r.exports),Qr=(n,r)=>{for(var o in r)$w(n,o,{get:r[o],enumerable:!0})},qae=(n,r,o,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let e of xae(r))!Jae.call(n,e)&&e!==o&&$w(n,e,{get:()=>r[e],enumerable:!(i=Yae(r,e))||i.enumerable});return n};var Je=(n,r,o)=>(o=n!=null?Kae(jae(n)):{},qae(r||!n||!n.__esModule?$w(o,"default",{value:n,enumerable:!0}):o,n));var vU=W((w4e,kU)=>{var RU=We("stream").Stream,Fce=We("util");kU.exports=Mo;function Mo(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}Fce.inherits(Mo,RU);Mo.create=function(n,r){var o=new this;r=r||{};for(var i in r)o[i]=r[i];o.source=n;var e=n.emit;return n.emit=function(){return o._handleEmit(arguments),e.apply(n,arguments)},n.on("error",function(){}),o.pauseStream&&n.pause(),o};Object.defineProperty(Mo.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});Mo.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};Mo.prototype.resume=function(){this._released||this.release(),this.source.resume()};Mo.prototype.pause=function(){this.source.pause()};Mo.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(n){this.emit.apply(this,n)}.bind(this)),this._bufferedEvents=[]};Mo.prototype.pipe=function(){var n=RU.prototype.pipe.apply(this,arguments);return this.resume(),n};Mo.prototype._handleEmit=function(n){if(this._released){this.emit.apply(this,n);return}n[0]==="data"&&(this.dataSize+=n[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(n)};Mo.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var n="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(n))}}});var LU=W((O4e,FU)=>{var Lce=We("util"),GU=We("stream").Stream,PU=vU();FU.exports=ir;function ir(){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}Lce.inherits(ir,GU);ir.create=function(n){var r=new this;n=n||{};for(var o in n)r[o]=n[o];return r};ir.isStreamLike=function(n){return typeof n!="function"&&typeof n!="string"&&typeof n!="boolean"&&typeof n!="number"&&!Buffer.isBuffer(n)};ir.prototype.append=function(n){var r=ir.isStreamLike(n);if(r){if(!(n instanceof PU)){var o=PU.create(n,{maxDataSize:1/0,pauseStream:this.pauseStreams});n.on("data",this._checkDataSize.bind(this)),n=o}this._handleErrors(n),this.pauseStreams&&n.pause()}return this._streams.push(n),this};ir.prototype.pipe=function(n,r){return GU.prototype.pipe.call(this,n,r),this.resume(),n};ir.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}};ir.prototype._realGetNext=function(){var n=this._streams.shift();if(typeof n>"u"){this.end();return}if(typeof n!="function"){this._pipeNext(n);return}var r=n;r(function(o){var i=ir.isStreamLike(o);i&&(o.on("data",this._checkDataSize.bind(this)),this._handleErrors(o)),this._pipeNext(o)}.bind(this))};ir.prototype._pipeNext=function(n){this._currentStream=n;var r=ir.isStreamLike(n);if(r){n.on("end",this._getNext.bind(this)),n.pipe(this,{end:!1});return}var o=n;this.write(o),this._getNext()};ir.prototype._handleErrors=function(n){var r=this;n.on("error",function(o){r._emitError(o)})};ir.prototype.write=function(n){this.emit("data",n)};ir.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};ir.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")};ir.prototype.end=function(){this._reset(),this.emit("end")};ir.prototype.destroy=function(){this._reset(),this.emit("close")};ir.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};ir.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var n="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(n))}};ir.prototype._updateDataSize=function(){this.dataSize=0;var n=this;this._streams.forEach(function(r){r.dataSize&&(n.dataSize+=r.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};ir.prototype._emitError=function(n){this._reset(),this.emit("error",n)}});var UU=W((b4e,Uce)=>{Uce.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var KU=W((M4e,HU)=>{HU.exports=UU()});var jU=W(Xa=>{"use strict";var _B=KU(),Hce=We("path").extname,YU=/^\s*([^;\s]*)(?:;|\s|$)/,Kce=/^text\//i;Xa.charset=xU;Xa.charsets={lookup:xU};Xa.contentType=Yce;Xa.extension=xce;Xa.extensions=Object.create(null);Xa.lookup=jce;Xa.types=Object.create(null);Jce(Xa.extensions,Xa.types);function xU(n){if(!n||typeof n!="string")return!1;var r=YU.exec(n),o=r&&_B[r[1].toLowerCase()];return o&&o.charset?o.charset:r&&Kce.test(r[1])?"UTF-8":!1}function Yce(n){if(!n||typeof n!="string")return!1;var r=n.indexOf("/")===-1?Xa.lookup(n):n;if(!r)return!1;if(r.indexOf("charset")===-1){var o=Xa.charset(r);o&&(r+="; charset="+o.toLowerCase())}return r}function xce(n){if(!n||typeof n!="string")return!1;var r=YU.exec(n),o=r&&Xa.extensions[r[1].toLowerCase()];return!o||!o.length?!1:o[0]}function jce(n){if(!n||typeof n!="string")return!1;var r=Hce("x."+n).toLowerCase().substr(1);return r&&Xa.types[r]||!1}function Jce(n,r){var o=["nginx","apache",void 0,"iana"];Object.keys(_B).forEach(function(e){var a=_B[e],A=a.extensions;if(!(!A||!A.length)){n[e]=A;for(var t=0;tc||g===c&&r[s].substr(0,12)==="application/"))continue}r[s]=e}}})}});var qU=W((N4e,JU)=>{JU.exports=qce;function qce(n){var r=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;r?r(n):setTimeout(n,0)}});var ib=W((T4e,zU)=>{var VU=qU();zU.exports=Vce;function Vce(n){var r=!1;return VU(function(){r=!0}),function(i,e){r?n(i,e):VU(function(){n(i,e)})}}});var ob=W((R4e,WU)=>{WU.exports=zce;function zce(n){Object.keys(n.jobs).forEach(Wce.bind(n)),n.jobs={}}function Wce(n){typeof this.jobs[n]=="function"&&this.jobs[n]()}});var nb=W((k4e,XU)=>{var ZU=ib(),Zce=ob();XU.exports=Xce;function Xce(n,r,o,i){var e=o.keyedList?o.keyedList[o.index]:o.index;o.jobs[e]=$ce(r,e,n[e],function(a,A){e in o.jobs&&(delete o.jobs[e],a?Zce(o):o.results[e]=A,i(a,o.results))})}function $ce(n,r,o,i){var e;return n.length==2?e=n(o,ZU(i)):e=n(o,r,ZU(i)),e}});var sb=W((v4e,$U)=>{$U.exports=eIe;function eIe(n,r){var o=!Array.isArray(n),i={index:0,keyedList:o||r?Object.keys(n):null,jobs:{},results:o?{}:[],size:o?Object.keys(n).length:n.length};return r&&i.keyedList.sort(o?r:function(e,a){return r(n[e],n[a])}),i}});var gb=W((P4e,eH)=>{var AIe=ob(),tIe=ib();eH.exports=rIe;function rIe(n){Object.keys(this.jobs).length&&(this.index=this.size,AIe(this),tIe(n)(null,this.results))}});var tH=W((G4e,AH)=>{var aIe=nb(),iIe=sb(),oIe=gb();AH.exports=nIe;function nIe(n,r,o){for(var i=iIe(n);i.index<(i.keyedList||n).length;)aIe(n,r,i,function(e,a){if(e){o(e,a);return}if(Object.keys(i.jobs).length===0){o(null,i.results);return}}),i.index++;return oIe.bind(i,o)}});var cb=W((F4e,NB)=>{var rH=nb(),sIe=sb(),gIe=gb();NB.exports=cIe;NB.exports.ascending=aH;NB.exports.descending=IIe;function cIe(n,r,o,i){var e=sIe(n,o);return rH(n,r,e,function a(A,t){if(A){i(A,t);return}if(e.index++,e.index<(e.keyedList||n).length){rH(n,r,e,a);return}i(null,e.results)}),gIe.bind(e,i)}function aH(n,r){return nr?1:0}function IIe(n,r){return-1*aH(n,r)}});var oH=W((L4e,iH)=>{var lIe=cb();iH.exports=pIe;function pIe(n,r,o){return lIe(n,r,null,o)}});var sH=W((U4e,nH)=>{nH.exports={parallel:tH(),serial:oH(),serialOrdered:cb()}});var Ib=W((H4e,gH)=>{"use strict";gH.exports=Object});var IH=W((K4e,cH)=>{"use strict";cH.exports=Error});var pH=W((Y4e,lH)=>{"use strict";lH.exports=EvalError});var CH=W((x4e,EH)=>{"use strict";EH.exports=RangeError});var dH=W((j4e,hH)=>{"use strict";hH.exports=ReferenceError});var BH=W((J4e,uH)=>{"use strict";uH.exports=SyntaxError});var zs=W((q4e,fH)=>{"use strict";fH.exports=TypeError});var yH=W((V4e,QH)=>{"use strict";QH.exports=URIError});var SH=W((z4e,mH)=>{"use strict";mH.exports=Math.abs});var wH=W((W4e,DH)=>{"use strict";DH.exports=Math.floor});var bH=W((Z4e,OH)=>{"use strict";OH.exports=Math.max});var _H=W((X4e,MH)=>{"use strict";MH.exports=Math.min});var TH=W(($4e,NH)=>{"use strict";NH.exports=Math.pow});var kH=W((e8e,RH)=>{"use strict";RH.exports=Math.round});var PH=W((A8e,vH)=>{"use strict";vH.exports=Number.isNaN||function(r){return r!==r}});var FH=W((t8e,GH)=>{"use strict";var EIe=PH();GH.exports=function(r){return EIe(r)||r===0?r:r<0?-1:1}});var UH=W((r8e,LH)=>{"use strict";LH.exports=Object.getOwnPropertyDescriptor});var lb=W((a8e,HH)=>{"use strict";var TB=UH();if(TB)try{TB([],"length")}catch{TB=null}HH.exports=TB});var pb=W((i8e,KH)=>{"use strict";var RB=Object.defineProperty||!1;if(RB)try{RB({},"a",{value:1})}catch{RB=!1}KH.exports=RB});var Eb=W((o8e,YH)=>{"use strict";YH.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},o=Symbol("test"),i=Object(o);if(typeof o=="string"||Object.prototype.toString.call(o)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var e=42;r[o]=e;for(var a in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var A=Object.getOwnPropertySymbols(r);if(A.length!==1||A[0]!==o||!Object.prototype.propertyIsEnumerable.call(r,o))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var t=Object.getOwnPropertyDescriptor(r,o);if(t.value!==e||t.enumerable!==!0)return!1}return!0}});var JH=W((n8e,jH)=>{"use strict";var xH=typeof Symbol<"u"&&Symbol,CIe=Eb();jH.exports=function(){return typeof xH!="function"||typeof Symbol!="function"||typeof xH("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:CIe()}});var Cb=W((s8e,qH)=>{"use strict";qH.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var hb=W((g8e,VH)=>{"use strict";var hIe=Ib();VH.exports=hIe.getPrototypeOf||null});var ZH=W((c8e,WH)=>{"use strict";var dIe="Function.prototype.bind called on incompatible ",uIe=Object.prototype.toString,BIe=Math.max,fIe="[object Function]",zH=function(r,o){for(var i=[],e=0;e{"use strict";var mIe=ZH();XH.exports=Function.prototype.bind||mIe});var kB=W((l8e,$H)=>{"use strict";$H.exports=Function.prototype.call});var db=W((p8e,eK)=>{"use strict";eK.exports=Function.prototype.apply});var tK=W((E8e,AK)=>{"use strict";AK.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var aK=W((C8e,rK)=>{"use strict";var SIe=EC(),DIe=db(),wIe=kB(),OIe=tK();rK.exports=OIe||SIe.call(wIe,DIe)});var ub=W((h8e,iK)=>{"use strict";var bIe=EC(),MIe=zs(),_Ie=kB(),NIe=aK();iK.exports=function(r){if(r.length<1||typeof r[0]!="function")throw new MIe("a function is required");return NIe(bIe,_Ie,r)}});var IK=W((d8e,cK)=>{"use strict";var TIe=ub(),oK=lb(),sK;try{sK=[].__proto__===Array.prototype}catch(n){if(!n||typeof n!="object"||!("code"in n)||n.code!=="ERR_PROTO_ACCESS")throw n}var Bb=!!sK&&oK&&oK(Object.prototype,"__proto__"),gK=Object,nK=gK.getPrototypeOf;cK.exports=Bb&&typeof Bb.get=="function"?TIe([Bb.get]):typeof nK=="function"?function(r){return nK(r==null?r:gK(r))}:!1});var hK=W((u8e,CK)=>{"use strict";var lK=Cb(),pK=hb(),EK=IK();CK.exports=lK?function(r){return lK(r)}:pK?function(r){if(!r||typeof r!="object"&&typeof r!="function")throw new TypeError("getProto: not an object");return pK(r)}:EK?function(r){return EK(r)}:null});var vB=W((B8e,dK)=>{"use strict";var RIe=Function.prototype.call,kIe=Object.prototype.hasOwnProperty,vIe=EC();dK.exports=vIe.call(RIe,kIe)});var uC=W((f8e,mK)=>{"use strict";var et,PIe=Ib(),GIe=IH(),FIe=pH(),LIe=CH(),UIe=dH(),Cl=BH(),El=zs(),HIe=yH(),KIe=SH(),YIe=wH(),xIe=bH(),jIe=_H(),JIe=TH(),qIe=kH(),VIe=FH(),QK=Function,fb=function(n){try{return QK('"use strict"; return ('+n+").constructor;")()}catch{}},CC=lb(),zIe=pb(),Qb=function(){throw new El},WIe=CC?(function(){try{return arguments.callee,Qb}catch{try{return CC(arguments,"callee").get}catch{return Qb}}})():Qb,ll=JH()(),Lr=hK(),ZIe=hb(),XIe=Cb(),yK=db(),hC=kB(),pl={},$Ie=typeof Uint8Array>"u"||!Lr?et:Lr(Uint8Array),Cc={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?et:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?et:ArrayBuffer,"%ArrayIteratorPrototype%":ll&&Lr?Lr([][Symbol.iterator]()):et,"%AsyncFromSyncIteratorPrototype%":et,"%AsyncFunction%":pl,"%AsyncGenerator%":pl,"%AsyncGeneratorFunction%":pl,"%AsyncIteratorPrototype%":pl,"%Atomics%":typeof Atomics>"u"?et:Atomics,"%BigInt%":typeof BigInt>"u"?et:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?et:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?et:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?et:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":GIe,"%eval%":eval,"%EvalError%":FIe,"%Float16Array%":typeof Float16Array>"u"?et:Float16Array,"%Float32Array%":typeof Float32Array>"u"?et:Float32Array,"%Float64Array%":typeof Float64Array>"u"?et:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?et:FinalizationRegistry,"%Function%":QK,"%GeneratorFunction%":pl,"%Int8Array%":typeof Int8Array>"u"?et:Int8Array,"%Int16Array%":typeof Int16Array>"u"?et:Int16Array,"%Int32Array%":typeof Int32Array>"u"?et:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ll&&Lr?Lr(Lr([][Symbol.iterator]())):et,"%JSON%":typeof JSON=="object"?JSON:et,"%Map%":typeof Map>"u"?et:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ll||!Lr?et:Lr(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":PIe,"%Object.getOwnPropertyDescriptor%":CC,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?et:Promise,"%Proxy%":typeof Proxy>"u"?et:Proxy,"%RangeError%":LIe,"%ReferenceError%":UIe,"%Reflect%":typeof Reflect>"u"?et:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?et:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ll||!Lr?et:Lr(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?et:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ll&&Lr?Lr(""[Symbol.iterator]()):et,"%Symbol%":ll?Symbol:et,"%SyntaxError%":Cl,"%ThrowTypeError%":WIe,"%TypedArray%":$Ie,"%TypeError%":El,"%Uint8Array%":typeof Uint8Array>"u"?et:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?et:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?et:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?et:Uint32Array,"%URIError%":HIe,"%WeakMap%":typeof WeakMap>"u"?et:WeakMap,"%WeakRef%":typeof WeakRef>"u"?et:WeakRef,"%WeakSet%":typeof WeakSet>"u"?et:WeakSet,"%Function.prototype.call%":hC,"%Function.prototype.apply%":yK,"%Object.defineProperty%":zIe,"%Object.getPrototypeOf%":ZIe,"%Math.abs%":KIe,"%Math.floor%":YIe,"%Math.max%":xIe,"%Math.min%":jIe,"%Math.pow%":JIe,"%Math.round%":qIe,"%Math.sign%":VIe,"%Reflect.getPrototypeOf%":XIe};if(Lr)try{null.error}catch(n){uK=Lr(Lr(n)),Cc["%Error.prototype%"]=uK}var uK,ele=function n(r){var o;if(r==="%AsyncFunction%")o=fb("async function () {}");else if(r==="%GeneratorFunction%")o=fb("function* () {}");else if(r==="%AsyncGeneratorFunction%")o=fb("async function* () {}");else if(r==="%AsyncGenerator%"){var i=n("%AsyncGeneratorFunction%");i&&(o=i.prototype)}else if(r==="%AsyncIteratorPrototype%"){var e=n("%AsyncGenerator%");e&&Lr&&(o=Lr(e.prototype))}return Cc[r]=o,o},BK={__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"]},dC=EC(),PB=vB(),Ale=dC.call(hC,Array.prototype.concat),tle=dC.call(yK,Array.prototype.splice),fK=dC.call(hC,String.prototype.replace),GB=dC.call(hC,String.prototype.slice),rle=dC.call(hC,RegExp.prototype.exec),ale=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ile=/\\(\\)?/g,ole=function(r){var o=GB(r,0,1),i=GB(r,-1);if(o==="%"&&i!=="%")throw new Cl("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&o!=="%")throw new Cl("invalid intrinsic syntax, expected opening `%`");var e=[];return fK(r,ale,function(a,A,t,s){e[e.length]=t?fK(s,ile,"$1"):A||a}),e},nle=function(r,o){var i=r,e;if(PB(BK,i)&&(e=BK[i],i="%"+e[0]+"%"),PB(Cc,i)){var a=Cc[i];if(a===pl&&(a=ele(i)),typeof a>"u"&&!o)throw new El("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:e,name:i,value:a}}throw new Cl("intrinsic "+r+" does not exist!")};mK.exports=function(r,o){if(typeof r!="string"||r.length===0)throw new El("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof o!="boolean")throw new El('"allowMissing" argument must be a boolean');if(rle(/^%?[^%]*%?$/,r)===null)throw new Cl("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=ole(r),e=i.length>0?i[0]:"",a=nle("%"+e+"%",o),A=a.name,t=a.value,s=!1,g=a.alias;g&&(e=g[0],tle(i,Ale([0,1],g)));for(var c=1,I=!0;c=i.length){var Q=CC(t,E);I=!!Q,I&&"get"in Q&&!("originalValue"in Q.get)?t=Q.get:t=t[E]}else I=PB(t,E),t=t[E];I&&!s&&(Cc[A]=t)}}return t}});var DK=W((Q8e,SK)=>{"use strict";var sle=Eb();SK.exports=function(){return sle()&&!!Symbol.toStringTag}});var bK=W((y8e,OK)=>{"use strict";var gle=uC(),wK=gle("%Object.defineProperty%",!0),cle=DK()(),Ile=vB(),lle=zs(),FB=cle?Symbol.toStringTag:null;OK.exports=function(r,o){var i=arguments.length>2&&!!arguments[2]&&arguments[2].force,e=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof i<"u"&&typeof i!="boolean"||typeof e<"u"&&typeof e!="boolean")throw new lle("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");FB&&(i||!Ile(r,FB))&&(wK?wK(r,FB,{configurable:!e,enumerable:!1,value:o,writable:!1}):r[FB]=o)}});var _K=W((m8e,MK)=>{"use strict";MK.exports=function(n,r){return Object.keys(r).forEach(function(o){n[o]=n[o]||r[o]}),n}});var RK=W((S8e,TK)=>{"use strict";var Db=LU(),ple=We("util"),yb=We("path"),Ele=We("http"),Cle=We("https"),hle=We("url").parse,dle=We("fs"),ule=We("stream").Stream,Ble=We("crypto"),mb=jU(),fle=sH(),Qle=bK(),Ws=vB(),Sb=_K();function NK(n){return String(n).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}function gt(n){if(!(this instanceof gt))return new gt(n);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Db.call(this),n=n||{};for(var r in n)this[r]=n[r]}ple.inherits(gt,Db);gt.LINE_BREAK=`\r +`;gt.DEFAULT_CONTENT_TYPE="application/octet-stream";gt.prototype.append=function(n,r,o){o=o||{},typeof o=="string"&&(o={filename:o});var i=Db.prototype.append.bind(this);if((typeof r=="number"||r==null)&&(r=String(r)),Array.isArray(r)){this._error(new Error("Arrays are not supported."));return}var e=this._multiPartHeader(n,r,o),a=this._multiPartFooter();i(e),i(r),i(a),this._trackLength(e,r,o)};gt.prototype._trackLength=function(n,r,o){var i=0;o.knownLength!=null?i+=Number(o.knownLength):Buffer.isBuffer(r)?i=r.length:typeof r=="string"&&(i=Buffer.byteLength(r)),this._valueLength+=i,this._overheadLength+=Buffer.byteLength(n)+gt.LINE_BREAK.length,!(!r||!r.path&&!(r.readable&&Ws(r,"httpVersion"))&&!(r instanceof ule))&&(o.knownLength||this._valuesToMeasure.push(r))};gt.prototype._lengthRetriever=function(n,r){Ws(n,"fd")?n.end!=null&&n.end!=1/0&&n.start!=null?r(null,n.end+1-(n.start?n.start:0)):dle.stat(n.path,function(o,i){if(o){r(o);return}var e=i.size-(n.start?n.start:0);r(null,e)}):Ws(n,"httpVersion")?r(null,Number(n.headers["content-length"])):Ws(n,"httpModule")?(n.on("response",function(o){n.pause(),r(null,Number(o.headers["content-length"]))}),n.resume()):r("Unknown stream")};gt.prototype._multiPartHeader=function(n,r,o){if(typeof o.header=="string")return o.header;var i=this._getContentDisposition(r,o),e=this._getContentType(r,o),a="",A={"Content-Disposition":["form-data",'name="'+NK(n)+'"'].concat(i||[]),"Content-Type":[].concat(e||[])};typeof o.header=="object"&&Sb(A,o.header);var t;for(var s in A)if(Ws(A,s)){if(t=A[s],t==null)continue;Array.isArray(t)||(t=[t]),t.length&&(a+=s+": "+t.join("; ")+gt.LINE_BREAK)}return"--"+this.getBoundary()+gt.LINE_BREAK+a+gt.LINE_BREAK};gt.prototype._getContentDisposition=function(n,r){var o;if(typeof r.filepath=="string"?o=yb.normalize(r.filepath).replace(/\\/g,"/"):r.filename||n&&(n.name||n.path)?o=yb.basename(r.filename||n&&(n.name||n.path)):n&&n.readable&&Ws(n,"httpVersion")&&(o=yb.basename(n.client._httpMessage.path||"")),o)return'filename="'+NK(o)+'"'};gt.prototype._getContentType=function(n,r){var o=r.contentType;return!o&&n&&n.name&&(o=mb.lookup(n.name)),!o&&n&&n.path&&(o=mb.lookup(n.path)),!o&&n&&n.readable&&Ws(n,"httpVersion")&&(o=n.headers["content-type"]),!o&&(r.filepath||r.filename)&&(o=mb.lookup(r.filepath||r.filename)),!o&&n&&typeof n=="object"&&(o=gt.DEFAULT_CONTENT_TYPE),o};gt.prototype._multiPartFooter=function(){return function(n){var r=gt.LINE_BREAK,o=this._streams.length===0;o&&(r+=this._lastBoundary()),n(r)}.bind(this)};gt.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+gt.LINE_BREAK};gt.prototype.getHeaders=function(n){var r,o={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(r in n)Ws(n,r)&&(o[r.toLowerCase()]=n[r]);return o};gt.prototype.setBoundary=function(n){if(typeof n!="string")throw new TypeError("FormData boundary must be a string");this._boundary=n};gt.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};gt.prototype.getBuffer=function(){for(var n=new Buffer.alloc(0),r=this.getBoundary(),o=0,i=this._streams.length;o{var ul=1e3,Bl=ul*60,fl=Bl*60,uc=fl*24,jle=uc*7,Jle=uc*365.25;VK.exports=function(n,r){r=r||{};var o=typeof n;if(o==="string"&&n.length>0)return qle(n);if(o==="number"&&isFinite(n))return r.long?zle(n):Vle(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function qle(n){if(n=String(n),!(n.length>100)){var r=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(n);if(r){var o=parseFloat(r[1]),i=(r[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return o*Jle;case"weeks":case"week":case"w":return o*jle;case"days":case"day":case"d":return o*uc;case"hours":case"hour":case"hrs":case"hr":case"h":return o*fl;case"minutes":case"minute":case"mins":case"min":case"m":return o*Bl;case"seconds":case"second":case"secs":case"sec":case"s":return o*ul;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}function Vle(n){var r=Math.abs(n);return r>=uc?Math.round(n/uc)+"d":r>=fl?Math.round(n/fl)+"h":r>=Bl?Math.round(n/Bl)+"m":r>=ul?Math.round(n/ul)+"s":n+"ms"}function zle(n){var r=Math.abs(n);return r>=uc?KB(n,r,uc,"day"):r>=fl?KB(n,r,fl,"hour"):r>=Bl?KB(n,r,Bl,"minute"):r>=ul?KB(n,r,ul,"second"):n+" ms"}function KB(n,r,o,i){var e=r>=o*1.5;return Math.round(n/o)+" "+i+(e?"s":"")}});var Hb=W((OVe,WK)=>{function Wle(n){o.debug=o,o.default=o,o.coerce=s,o.disable=A,o.enable=e,o.enabled=t,o.humanize=zK(),o.destroy=g,Object.keys(n).forEach(c=>{o[c]=n[c]}),o.names=[],o.skips=[],o.formatters={};function r(c){let I=0;for(let E=0;E{if(j==="%%")return"%";P++;let q=o.formatters[K];if(typeof q=="function"){let V=y[P];j=q.call(m,V),y.splice(P,1),P--}return j}),o.formatArgs.call(m,y),(m.log||o.log).apply(m,y)}return Q.namespace=c,Q.useColors=o.useColors(),Q.color=o.selectColor(c),Q.extend=i,Q.destroy=o.destroy,Object.defineProperty(Q,"enabled",{enumerable:!0,configurable:!1,get:()=>E!==null?E:(B!==o.namespaces&&(B=o.namespaces,f=o.enabled(c)),f),set:y=>{E=y}}),typeof o.init=="function"&&o.init(Q),Q}function i(c,I){let E=o(this.namespace+(typeof I>"u"?":":I)+c);return E.log=this.log,E}function e(c){o.save(c),o.namespaces=c,o.names=[],o.skips=[];let I=(typeof c=="string"?c:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let E of I)E[0]==="-"?o.skips.push(E.slice(1)):o.names.push(E)}function a(c,I){let E=0,B=0,f=-1,Q=0;for(;E"-"+I)].join(",");return o.enable(""),c}function t(c){for(let I of o.skips)if(a(c,I))return!1;for(let I of o.names)if(a(c,I))return!0;return!1}function s(c){return c instanceof Error?c.stack||c.message:c}function g(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return o.enable(o.load()),o}WK.exports=Wle});var ZK=W(($a,YB)=>{$a.formatArgs=Xle;$a.save=$le;$a.load=epe;$a.useColors=Zle;$a.storage=Ape();$a.destroy=(()=>{let n=!1;return()=>{n||(n=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();$a.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Zle(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let n;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(n=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(n[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Xle(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+YB.exports.humanize(this.diff),!this.useColors)return;let r="color: "+this.color;n.splice(1,0,r,"color: inherit");let o=0,i=0;n[0].replace(/%[a-zA-Z%]/g,e=>{e!=="%%"&&(o++,e==="%c"&&(i=o))}),n.splice(i,0,r)}$a.log=console.debug||console.log||(()=>{});function $le(n){try{n?$a.storage.setItem("debug",n):$a.storage.removeItem("debug")}catch{}}function epe(){let n;try{n=$a.storage.getItem("debug")||$a.storage.getItem("DEBUG")}catch{}return!n&&typeof process<"u"&&"env"in process&&(n=process.env.DEBUG),n}function Ape(){try{return localStorage}catch{}}YB.exports=Hb()($a);var{formatters:tpe}=YB.exports;tpe.j=function(n){try{return JSON.stringify(n)}catch(r){return"[UnexpectedJSONParseError]: "+r.message}}});var $K=W((Ur,jB)=>{var rpe=We("tty"),xB=We("util");Ur.init=cpe;Ur.log=npe;Ur.formatArgs=ipe;Ur.save=spe;Ur.load=gpe;Ur.useColors=ape;Ur.destroy=xB.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Ur.colors=[6,2,3,4,5,1];try{let n=We("supports-color");n&&(n.stderr||n).level>=2&&(Ur.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Ur.inspectOpts=Object.keys(process.env).filter(n=>/^debug_/i.test(n)).reduce((n,r)=>{let o=r.substring(6).toLowerCase().replace(/_([a-z])/g,(e,a)=>a.toUpperCase()),i=process.env[r];return/^(yes|on|true|enabled)$/i.test(i)?i=!0:/^(no|off|false|disabled)$/i.test(i)?i=!1:i==="null"?i=null:i=Number(i),n[o]=i,n},{});function ape(){return"colors"in Ur.inspectOpts?!!Ur.inspectOpts.colors:rpe.isatty(process.stderr.fd)}function ipe(n){let{namespace:r,useColors:o}=this;if(o){let i=this.color,e="\x1B[3"+(i<8?i:"8;5;"+i),a=` ${e};1m${r} \x1B[0m`;n[0]=a+n[0].split(` `).join(` -`+a),n.push(e+"m+"+jB.exports.humanize(this.diff)+"\x1B[0m")}else n[0]=rpe()+r+" "+n[0]}function rpe(){return Ur.inspectOpts.hideDate?"":new Date().toISOString()+" "}function ape(...n){return process.stderr.write(xB.formatWithOptions(Ur.inspectOpts,...n)+` -`)}function ipe(n){n?process.env.DEBUG=n:delete process.env.DEBUG}function ope(){return process.env.DEBUG}function npe(n){n.inspectOpts={};let r=Object.keys(Ur.inspectOpts);for(let o=0;or.trim()).join(" ")};XK.O=function(n){return this.inspectOpts.colors=this.useColors,xB.inspect(n,this.inspectOpts)}});var at=W((DVe,Kb)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Kb.exports=ZK():Kb.exports=$K()});var eY=W(Yb=>{"use strict";Object.defineProperty(Yb,"__esModule",{value:!0});function spe(n){return function(r,o){return new Promise((i,e)=>{n.call(this,r,o,(a,A)=>{a?e(a):i(A)})})}}Yb.default=spe});var rY=W((jb,tY)=>{"use strict";var AY=jb&&jb.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},gpe=We("events"),cpe=AY(at()),Ipe=AY(eY()),QC=cpe.default("agent-base");function lpe(n){return!!n&&typeof n.addRequest=="function"}function xb(){let{stack:n}=new Error;return typeof n!="string"?!1:n.split(` -`).some(r=>r.indexOf("(https.js:")!==-1||r.indexOf("node:https:")!==-1)}function JB(n,r){return new JB.Agent(n,r)}(function(n){class r extends gpe.EventEmitter{constructor(i,e){super();let a=e;typeof i=="function"?this.callback=i:i&&(a=i),this.timeout=null,a&&typeof a.timeout=="number"&&(this.timeout=a.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return typeof this.explicitDefaultPort=="number"?this.explicitDefaultPort:xb()?443:80}set defaultPort(i){this.explicitDefaultPort=i}get protocol(){return typeof this.explicitProtocol=="string"?this.explicitProtocol:xb()?"https:":"http:"}set protocol(i){this.explicitProtocol=i}callback(i,e,a){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(i,e){let a=Object.assign({},e);typeof a.secureEndpoint!="boolean"&&(a.secureEndpoint=xb()),a.host==null&&(a.host="localhost"),a.port==null&&(a.port=a.secureEndpoint?443:80),a.protocol==null&&(a.protocol=a.secureEndpoint?"https:":"http:"),a.host&&a.path&&delete a.path,delete a.agent,delete a.hostname,delete a._defaultAgent,delete a.defaultPort,delete a.createConnection,i._last=!0,i.shouldKeepAlive=!1;let A=!1,t=null,s=a.timeout||this.timeout,g=B=>{i._hadError||(i.emit("error",B),i._hadError=!0)},c=()=>{t=null,A=!0;let B=new Error(`A "socket" was not created for HTTP request before ${s}ms`);B.code="ETIMEOUT",g(B)},I=B=>{A||(t!==null&&(clearTimeout(t),t=null),g(B))},E=B=>{if(A)return;if(t!=null&&(clearTimeout(t),t=null),lpe(B)){QC("Callback returned another Agent instance %o",B.constructor.name),B.addRequest(i,a);return}if(B){B.once("free",()=>{this.freeSocket(B,a)}),i.onSocket(B);return}let f=new Error(`no Duplex stream was returned to agent-base for \`${i.method} ${i.path}\``);g(f)};if(typeof this.callback!="function"){g(new Error("`callback` is not defined"));return}this.promisifiedCallback||(this.callback.length>=3?(QC("Converting legacy callback function to promise"),this.promisifiedCallback=Ipe.default(this.callback)):this.promisifiedCallback=this.callback),typeof s=="number"&&s>0&&(t=setTimeout(c,s)),"port"in a&&typeof a.port!="number"&&(a.port=Number(a.port));try{QC("Resolving socket for %o request: %o",a.protocol,`${i.method} ${i.path}`),Promise.resolve(this.promisifiedCallback(i,a)).then(E,I)}catch(B){Promise.reject(B).catch(I)}}freeSocket(i,e){QC("Freeing socket %o %o",i.constructor.name,e),i.destroy()}destroy(){QC("Destroying agent %o",this.constructor.name)}}n.Agent=r,n.prototype=n.Agent.prototype})(JB||(JB={}));tY.exports=JB});var aY=W(mC=>{"use strict";var ppe=mC&&mC.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(mC,"__esModule",{value:!0});var Epe=ppe(at()),yC=Epe.default("https-proxy-agent:parse-proxy-response");function Cpe(n){return new Promise((r,o)=>{let i=0,e=[];function a(){let I=n.read();I?c(I):n.once("readable",a)}function A(){n.removeListener("end",s),n.removeListener("error",g),n.removeListener("close",t),n.removeListener("readable",a)}function t(I){yC("onclose had error %o",I)}function s(){yC("onend")}function g(I){A(),yC("onerror %o",I),o(I)}function c(I){e.push(I),i+=I.length;let E=Buffer.concat(e,i);if(E.indexOf(`\r +`+a),n.push(e+"m+"+jB.exports.humanize(this.diff)+"\x1B[0m")}else n[0]=ope()+r+" "+n[0]}function ope(){return Ur.inspectOpts.hideDate?"":new Date().toISOString()+" "}function npe(...n){return process.stderr.write(xB.formatWithOptions(Ur.inspectOpts,...n)+` +`)}function spe(n){n?process.env.DEBUG=n:delete process.env.DEBUG}function gpe(){return process.env.DEBUG}function cpe(n){n.inspectOpts={};let r=Object.keys(Ur.inspectOpts);for(let o=0;or.trim()).join(" ")};XK.O=function(n){return this.inspectOpts.colors=this.useColors,xB.inspect(n,this.inspectOpts)}});var at=W((bVe,Kb)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Kb.exports=ZK():Kb.exports=$K()});var eY=W(Yb=>{"use strict";Object.defineProperty(Yb,"__esModule",{value:!0});function Ipe(n){return function(r,o){return new Promise((i,e)=>{n.call(this,r,o,(a,A)=>{a?e(a):i(A)})})}}Yb.default=Ipe});var rY=W((jb,tY)=>{"use strict";var AY=jb&&jb.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},lpe=We("events"),ppe=AY(at()),Epe=AY(eY()),QC=ppe.default("agent-base");function Cpe(n){return!!n&&typeof n.addRequest=="function"}function xb(){let{stack:n}=new Error;return typeof n!="string"?!1:n.split(` +`).some(r=>r.indexOf("(https.js:")!==-1||r.indexOf("node:https:")!==-1)}function JB(n,r){return new JB.Agent(n,r)}(function(n){class r extends lpe.EventEmitter{constructor(i,e){super();let a=e;typeof i=="function"?this.callback=i:i&&(a=i),this.timeout=null,a&&typeof a.timeout=="number"&&(this.timeout=a.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return typeof this.explicitDefaultPort=="number"?this.explicitDefaultPort:xb()?443:80}set defaultPort(i){this.explicitDefaultPort=i}get protocol(){return typeof this.explicitProtocol=="string"?this.explicitProtocol:xb()?"https:":"http:"}set protocol(i){this.explicitProtocol=i}callback(i,e,a){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(i,e){let a=Object.assign({},e);typeof a.secureEndpoint!="boolean"&&(a.secureEndpoint=xb()),a.host==null&&(a.host="localhost"),a.port==null&&(a.port=a.secureEndpoint?443:80),a.protocol==null&&(a.protocol=a.secureEndpoint?"https:":"http:"),a.host&&a.path&&delete a.path,delete a.agent,delete a.hostname,delete a._defaultAgent,delete a.defaultPort,delete a.createConnection,i._last=!0,i.shouldKeepAlive=!1;let A=!1,t=null,s=a.timeout||this.timeout,g=B=>{i._hadError||(i.emit("error",B),i._hadError=!0)},c=()=>{t=null,A=!0;let B=new Error(`A "socket" was not created for HTTP request before ${s}ms`);B.code="ETIMEOUT",g(B)},I=B=>{A||(t!==null&&(clearTimeout(t),t=null),g(B))},E=B=>{if(A)return;if(t!=null&&(clearTimeout(t),t=null),Cpe(B)){QC("Callback returned another Agent instance %o",B.constructor.name),B.addRequest(i,a);return}if(B){B.once("free",()=>{this.freeSocket(B,a)}),i.onSocket(B);return}let f=new Error(`no Duplex stream was returned to agent-base for \`${i.method} ${i.path}\``);g(f)};if(typeof this.callback!="function"){g(new Error("`callback` is not defined"));return}this.promisifiedCallback||(this.callback.length>=3?(QC("Converting legacy callback function to promise"),this.promisifiedCallback=Epe.default(this.callback)):this.promisifiedCallback=this.callback),typeof s=="number"&&s>0&&(t=setTimeout(c,s)),"port"in a&&typeof a.port!="number"&&(a.port=Number(a.port));try{QC("Resolving socket for %o request: %o",a.protocol,`${i.method} ${i.path}`),Promise.resolve(this.promisifiedCallback(i,a)).then(E,I)}catch(B){Promise.reject(B).catch(I)}}freeSocket(i,e){QC("Freeing socket %o %o",i.constructor.name,e),i.destroy()}destroy(){QC("Destroying agent %o",this.constructor.name)}}n.Agent=r,n.prototype=n.Agent.prototype})(JB||(JB={}));tY.exports=JB});var aY=W(mC=>{"use strict";var hpe=mC&&mC.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(mC,"__esModule",{value:!0});var dpe=hpe(at()),yC=dpe.default("https-proxy-agent:parse-proxy-response");function upe(n){return new Promise((r,o)=>{let i=0,e=[];function a(){let I=n.read();I?c(I):n.once("readable",a)}function A(){n.removeListener("end",s),n.removeListener("error",g),n.removeListener("close",t),n.removeListener("readable",a)}function t(I){yC("onclose had error %o",I)}function s(){yC("onend")}function g(I){A(),yC("onerror %o",I),o(I)}function c(I){e.push(I),i+=I.length;let E=Buffer.concat(e,i);if(E.indexOf(`\r \r `)===-1){yC("have not received end of HTTP headers yet..."),a();return}let f=E.toString("ascii",0,E.indexOf(`\r -`)),Q=+f.split(" ")[1];yC("got proxy server response: %o",f),r({statusCode:Q,buffered:E})}n.on("error",g),n.on("close",t),n.on("end",s),a()})}mC.default=Cpe});var nY=W(Bc=>{"use strict";var hpe=Bc&&Bc.__awaiter||function(n,r,o,i){function e(a){return a instanceof o?a:new o(function(A){A(a)})}return new(o||(o=Promise))(function(a,A){function t(c){try{g(i.next(c))}catch(I){A(I)}}function s(c){try{g(i.throw(c))}catch(I){A(I)}}function g(c){c.done?a(c.value):e(c.value).then(t,s)}g((i=i.apply(n,r||[])).next())})},Ql=Bc&&Bc.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Bc,"__esModule",{value:!0});var iY=Ql(We("net")),oY=Ql(We("tls")),dpe=Ql(We("url")),upe=Ql(We("assert")),Bpe=Ql(at()),fpe=rY(),Qpe=Ql(aY()),SC=Bpe.default("https-proxy-agent:agent"),Jb=class extends fpe.Agent{constructor(r){let o;if(typeof r=="string"?o=dpe.default.parse(r):o=r,!o)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");SC("creating new HttpsProxyAgent instance: %o",o),super(o);let i=Object.assign({},o);this.secureProxy=o.secureProxy||Spe(i.protocol),i.host=i.hostname||i.host,typeof i.port=="string"&&(i.port=parseInt(i.port,10)),!i.port&&i.host&&(i.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in i)&&(i.ALPNProtocols=["http 1.1"]),i.host&&i.path&&(delete i.path,delete i.pathname),this.proxy=i}callback(r,o){return hpe(this,void 0,void 0,function*(){let{proxy:i,secureProxy:e}=this,a;e?(SC("Creating `tls.Socket`: %o",i),a=oY.default.connect(i)):(SC("Creating `net.Socket`: %o",i),a=iY.default.connect(i));let A=Object.assign({},i.headers),s=`CONNECT ${`${o.host}:${o.port}`} HTTP/1.1\r -`;i.auth&&(A["Proxy-Authorization"]=`Basic ${Buffer.from(i.auth).toString("base64")}`);let{host:g,port:c,secureEndpoint:I}=o;mpe(c,I)||(g+=`:${c}`),A.Host=g,A.Connection="close";for(let y of Object.keys(A))s+=`${y}: ${A[y]}\r -`;let E=Qpe.default(a);a.write(`${s}\r -`);let{statusCode:B,buffered:f}=yield E;if(B===200){if(r.once("socket",ype),o.secureEndpoint){SC("Upgrading socket connection to TLS");let y=o.servername||o.host;return oY.default.connect(Object.assign(Object.assign({},Dpe(o,"host","hostname","path","port")),{socket:a,servername:y}))}return a}a.destroy();let Q=new iY.default.Socket({writable:!1});return Q.readable=!0,r.once("socket",y=>{SC("replaying proxy buffer for failed request"),upe.default(y.listenerCount("data")>0),y.push(f),y.push(null)}),Q})}};Bc.default=Jb;function ype(n){n.resume()}function mpe(n,r){return!!(!r&&n===80||r&&n===443)}function Spe(n){return typeof n=="string"?/^https:?$/i.test(n):!1}function Dpe(n,...r){let o={},i;for(i in n)r.includes(i)||(o[i]=n[i]);return o}});var Wb=W((zb,sY)=>{"use strict";var wpe=zb&&zb.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},qb=wpe(nY());function Vb(n){return new qb.default(n)}(function(n){n.HttpsProxyAgent=qb.default,n.prototype=qb.default.prototype})(Vb||(Vb={}));sY.exports=Vb});var cY=W((MVe,gY)=>{var DC;gY.exports=function(){if(!DC){try{DC=at()("follow-redirects")}catch{}typeof DC!="function"&&(DC=function(){})}DC.apply(null,arguments)}});var CY=W((_Ve,sM)=>{var OC=We("url"),wC=OC.URL,Ope=We("http"),bpe=We("https"),AM=We("stream").Writable,tM=We("assert"),IY=cY();(function(){var r=typeof process<"u",o=typeof window<"u"&&typeof document<"u",i=Qc(Error.captureStackTrace);!r&&(o||!i)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var rM=!1;try{tM(new wC(""))}catch(n){rM=n.code==="ERR_INVALID_URL"}var Mpe=["Authorization","Proxy-Authorization","Cookie"],_pe=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],aM=["abort","aborted","connect","error","socket","timeout"],iM=Object.create(null);aM.forEach(function(n){iM[n]=function(r,o,i){this._redirectable.emit(n,r,o,i)}});var Xb=bC("ERR_INVALID_URL","Invalid URL",TypeError),$b=bC("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Npe=bC("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",$b),Tpe=bC("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Rpe=bC("ERR_STREAM_WRITE_AFTER_END","write after end"),kpe=AM.prototype.destroy||pY;function ei(n,r){AM.call(this),this._sanitizeOptions(n),this._options=n,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],r&&this.on("response",r);var o=this;this._onNativeResponse=function(i){try{o._processResponse(i)}catch(e){o.emit("error",e instanceof $b?e:new $b({cause:e}))}},this._headerFilter=new RegExp("^(?:"+Mpe.concat(n.sensitiveHeaders).map(Upe).join("|")+")$","i"),this._performRequest()}ei.prototype=Object.create(AM.prototype);ei.prototype.abort=function(){nM(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};ei.prototype.destroy=function(n){return nM(this._currentRequest,n),kpe.call(this,n),this};ei.prototype.write=function(n,r,o){if(this._ending)throw new Rpe;if(!fc(n)&&!Fpe(n))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Qc(r)&&(o=r,r=null),n.length===0){o&&o();return}this._requestBodyLength+n.length<=this._options.maxBodyLength?(this._requestBodyLength+=n.length,this._requestBodyBuffers.push({data:n,encoding:r}),this._currentRequest.write(n,r,o)):(this.emit("error",new Tpe),this.abort())};ei.prototype.end=function(n,r,o){if(Qc(n)?(o=n,n=r=null):Qc(r)&&(o=r,r=null),!n)this._ended=this._ending=!0,this._currentRequest.end(null,null,o);else{var i=this,e=this._currentRequest;this.write(n,r,function(){i._ended=!0,e.end(null,null,o)}),this._ending=!0}};ei.prototype.setHeader=function(n,r){this._options.headers[n]=r,this._currentRequest.setHeader(n,r)};ei.prototype.removeHeader=function(n){delete this._options.headers[n],this._currentRequest.removeHeader(n)};ei.prototype.setTimeout=function(n,r){var o=this;function i(A){A.setTimeout(n),A.removeListener("timeout",A.destroy),A.addListener("timeout",A.destroy)}function e(A){o._timeout&&clearTimeout(o._timeout),o._timeout=setTimeout(function(){o.emit("timeout"),a()},n),i(A)}function a(){o._timeout&&(clearTimeout(o._timeout),o._timeout=null),o.removeListener("abort",a),o.removeListener("error",a),o.removeListener("response",a),o.removeListener("close",a),r&&o.removeListener("timeout",r),o.socket||o._currentRequest.removeListener("socket",e)}return r&&this.on("timeout",r),this.socket?e(this.socket):this._currentRequest.once("socket",e),this.on("socket",i),this.on("abort",a),this.on("error",a),this.on("response",a),this.on("close",a),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(n){ei.prototype[n]=function(r,o){return this._currentRequest[n](r,o)}});["aborted","connection","socket"].forEach(function(n){Object.defineProperty(ei.prototype,n,{get:function(){return this._currentRequest[n]}})});ei.prototype._sanitizeOptions=function(n){if(n.headers||(n.headers={}),Gpe(n.sensitiveHeaders)||(n.sensitiveHeaders=[]),n.host&&(n.hostname||(n.hostname=n.host),delete n.host),!n.pathname&&n.path){var r=n.path.indexOf("?");r<0?n.pathname=n.path:(n.pathname=n.path.substring(0,r),n.search=n.path.substring(r))}};ei.prototype._performRequest=function(){var n=this._options.protocol,r=this._options.nativeProtocols[n];if(!r)throw new TypeError("Unsupported protocol "+n);if(this._options.agents){var o=n.slice(0,-1);this._options.agent=this._options.agents[o]}var i=this._currentRequest=r.request(this._options,this._onNativeResponse);i._redirectable=this;for(var e of aM)i.on(e,iM[e]);if(this._currentUrl=/^\//.test(this._options.path)?OC.format(this._options):this._options.path,this._isRedirect){var a=0,A=this,t=this._requestBodyBuffers;(function s(g){if(i===A._currentRequest)if(g)A.emit("error",g);else if(a=400){n.responseUrl=this._currentUrl,n.redirects=this._redirects,this.emit("response",n),this._requestBodyBuffers=[];return}if(nM(this._currentRequest),n.destroy(),++this._redirectCount>this._options.maxRedirects)throw new Npe;var i,e=this._options.beforeRedirect;e&&(i=Object.assign({Host:n.req.getHeader("host")},this._options.headers));var a=this._options.method;((r===301||r===302)&&this._options.method==="POST"||r===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],Zb(/^content-/i,this._options.headers));var A=Zb(/^host$/i,this._options.headers),t=oM(this._currentUrl),s=A||t.host,g=/^\w+:/.test(o)?this._currentUrl:OC.format(Object.assign(t,{host:s})),c=vpe(o,g);if(IY("redirecting to",c.href),this._isRedirect=!0,eM(c,this._options),(c.protocol!==t.protocol&&c.protocol!=="https:"||c.host!==s&&!Ppe(c.host,s))&&Zb(this._headerFilter,this._options.headers),Qc(e)){var I={headers:n.headers,statusCode:r},E={url:g,method:a,headers:i};e(this._options,I,E),this._sanitizeOptions(this._options)}this._performRequest()};function lY(n){var r={maxRedirects:21,maxBodyLength:10485760},o={};return Object.keys(n).forEach(function(i){var e=i+":",a=o[e]=n[i],A=r[i]=Object.create(a);function t(g,c,I){return Lpe(g)?g=eM(g):fc(g)?g=eM(oM(g)):(I=c,c=EY(g),g={protocol:e}),Qc(c)&&(I=c,c=null),c=Object.assign({maxRedirects:r.maxRedirects,maxBodyLength:r.maxBodyLength},g,c),c.nativeProtocols=o,!fc(c.host)&&!fc(c.hostname)&&(c.hostname="::1"),tM.equal(c.protocol,e,"protocol mismatch"),IY("options",c),new ei(c,I)}function s(g,c,I){var E=A.request(g,c,I);return E.end(),E}Object.defineProperties(A,{request:{value:t,configurable:!0,enumerable:!0,writable:!0},get:{value:s,configurable:!0,enumerable:!0,writable:!0}})}),r}function pY(){}function oM(n){var r;if(rM)r=new wC(n);else if(r=EY(OC.parse(n)),!fc(r.protocol))throw new Xb({input:n});return r}function vpe(n,r){return rM?new wC(n,r):oM(OC.resolve(r,n))}function EY(n){if(/^\[/.test(n.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(n.hostname))throw new Xb({input:n.href||n});if(/^\[/.test(n.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(n.host))throw new Xb({input:n.href||n});return n}function eM(n,r){var o=r||{};for(var i of _pe)o[i]=n[i];return o.hostname.startsWith("[")&&(o.hostname=o.hostname.slice(1,-1)),o.port!==""&&(o.port=Number(o.port)),o.path=o.search?o.pathname+o.search:o.pathname,o}function Zb(n,r){var o;for(var i in r)n.test(i)&&(o=r[i],delete r[i]);return o===null||typeof o>"u"?void 0:String(o).trim()}function bC(n,r,o){function i(e){Qc(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,e||{}),this.code=n,this.message=this.cause?r+": "+this.cause.message:r}return i.prototype=new(o||Error),Object.defineProperties(i.prototype,{constructor:{value:i,enumerable:!1},name:{value:"Error ["+n+"]",enumerable:!1}}),i}function nM(n,r){for(var o of aM)n.removeListener(o,iM[o]);n.on("error",pY),n.destroy(r)}function Ppe(n,r){tM(fc(n)&&fc(r));var o=n.length-r.length-1;return o>0&&n[o]==="."&&n.endsWith(r)}function Gpe(n){return n instanceof Array}function fc(n){return typeof n=="string"||n instanceof String}function Qc(n){return typeof n=="function"}function Fpe(n){return typeof n=="object"&&"length"in n}function Lpe(n){return wC&&n instanceof wC}function Upe(n){return n.replace(/[\]\\/()*+?.$]/g,"\\$&")}sM.exports=lY({http:Ope,https:bpe});sM.exports.wrap=lY});var Ix=W((z6e,cx)=>{cx.exports=We("util").inspect});var LC=W((W6e,Nx)=>{var UM=typeof Map=="function"&&Map.prototype,NM=Object.getOwnPropertyDescriptor&&UM?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Af=UM&&NM&&typeof NM.get=="function"?NM.get:null,lx=UM&&Map.prototype.forEach,HM=typeof Set=="function"&&Set.prototype,TM=Object.getOwnPropertyDescriptor&&HM?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,tf=HM&&TM&&typeof TM.get=="function"?TM.get:null,px=HM&&Set.prototype.forEach,$Ee=typeof WeakMap=="function"&&WeakMap.prototype,PC=$Ee?WeakMap.prototype.has:null,eCe=typeof WeakSet=="function"&&WeakSet.prototype,GC=eCe?WeakSet.prototype.has:null,ACe=typeof WeakRef=="function"&&WeakRef.prototype,Ex=ACe?WeakRef.prototype.deref:null,tCe=Boolean.prototype.valueOf,rCe=Object.prototype.toString,aCe=Function.prototype.toString,iCe=String.prototype.match,KM=String.prototype.slice,$s=String.prototype.replace,oCe=String.prototype.toUpperCase,Cx=String.prototype.toLowerCase,Sx=RegExp.prototype.test,hx=Array.prototype.concat,nn=Array.prototype.join,nCe=Array.prototype.slice,dx=Math.floor,vM=typeof BigInt=="function"?BigInt.prototype.valueOf:null,RM=Object.getOwnPropertySymbols,PM=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Dl=typeof Symbol=="function"&&typeof Symbol.iterator=="object",FC=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Dl||!0)?Symbol.toStringTag:null,Dx=Object.prototype.propertyIsEnumerable,ux=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(n){return n.__proto__}:null);function Bx(n,r){if(n===1/0||n===-1/0||n!==n||n&&n>-1e3&&n<1e3||Sx.call(/e/,r))return r;var o=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof n=="number"){var i=n<0?-dx(-n):dx(n);if(i!==n){var e=String(i),a=KM.call(r,e.length+1);return $s.call(e,o,"$&_")+"."+$s.call($s.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return $s.call(r,o,"$&_")}var GM=Ix(),fx=GM.custom,Qx=bx(fx)?fx:null,wx={__proto__:null,double:'"',single:"'"},sCe={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Nx.exports=function n(r,o,i,e){var a=o||{};if(es(a,"quoteStyle")&&!es(wx,a.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(es(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var A=es(a,"customInspect")?a.customInspect:!0;if(typeof A!="boolean"&&A!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(es(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(es(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var t=a.numericSeparator;if(typeof r>"u")return"undefined";if(r===null)return"null";if(typeof r=="boolean")return r?"true":"false";if(typeof r=="string")return _x(r,a);if(typeof r=="number"){if(r===0)return 1/0/r>0?"0":"-0";var s=String(r);return t?Bx(r,s):s}if(typeof r=="bigint"){var g=String(r)+"n";return t?Bx(r,g):g}var c=typeof a.depth>"u"?5:a.depth;if(typeof i>"u"&&(i=0),i>=c&&c>0&&typeof r=="object")return FM(r)?"[Array]":"[Object]";var I=wCe(a,i);if(typeof e>"u")e=[];else if(Mx(e,r)>=0)return"[Circular]";function E(U,M,G){if(M&&(e=nCe.call(e),e.push(M)),G){var te={depth:a.depth};return es(a,"quoteStyle")&&(te.quoteStyle=a.quoteStyle),n(U,te,i+1,e)}return n(U,a,i+1,e)}if(typeof r=="function"&&!yx(r)){var B=dCe(r),f=ef(r,E);return"[Function"+(B?": "+B:" (anonymous)")+"]"+(f.length>0?" { "+nn.call(f,", ")+" }":"")}if(bx(r)){var Q=Dl?$s.call(String(r),/^(Symbol\(.*\))_[^)]*$/,"$1"):PM.call(r);return typeof r=="object"&&!Dl?vC(Q):Q}if(mCe(r)){for(var y="<"+Cx.call(String(r.nodeName)),m=r.attributes||[],T=0;T",y}if(FM(r)){if(r.length===0)return"[]";var _=ef(r,E);return I&&!DCe(_)?"["+LM(_,I)+"]":"[ "+nn.call(_,", ")+" ]"}if(ICe(r)){var P=ef(r,E);return!("cause"in Error.prototype)&&"cause"in r&&!Dx.call(r,"cause")?"{ ["+String(r)+"] "+nn.call(hx.call("[cause]: "+E(r.cause),P),", ")+" }":P.length===0?"["+String(r)+"]":"{ ["+String(r)+"] "+nn.call(P,", ")+" }"}if(typeof r=="object"&&A){if(Qx&&typeof r[Qx]=="function"&&GM)return GM(r,{depth:c-i});if(A!=="symbol"&&typeof r.inspect=="function")return r.inspect()}if(uCe(r)){var Y=[];return lx&&lx.call(r,function(U,M){Y.push(E(M,r,!0)+" => "+E(U,r))}),mx("Map",Af.call(r),Y,I)}if(QCe(r)){var j=[];return px&&px.call(r,function(U){j.push(E(U,r))}),mx("Set",tf.call(r),j,I)}if(BCe(r))return kM("WeakMap");if(yCe(r))return kM("WeakSet");if(fCe(r))return kM("WeakRef");if(pCe(r))return vC(E(Number(r)));if(CCe(r))return vC(E(vM.call(r)));if(ECe(r))return vC(tCe.call(r));if(lCe(r))return vC(E(String(r)));if(typeof window<"u"&&r===window)return"{ [object Window] }";if(typeof globalThis<"u"&&r===globalThis||typeof global<"u"&&r===global)return"{ [object globalThis] }";if(!cCe(r)&&!yx(r)){var K=ef(r,E),q=ux?ux(r)===Object.prototype:r instanceof Object||r.constructor===Object,V=r instanceof Object?"":"null prototype",H=!q&&FC&&Object(r)===r&&FC in r?KM.call(eg(r),8,-1):V?"Object":"",v=q||typeof r.constructor!="function"?"":r.constructor.name?r.constructor.name+" ":"",Z=v+(H||V?"["+nn.call(hx.call([],H||[],V||[]),": ")+"] ":"");return K.length===0?Z+"{}":I?Z+"{"+LM(K,I)+"}":Z+"{ "+nn.call(K,", ")+" }"}return String(r)};function Ox(n,r,o){var i=o.quoteStyle||r,e=wx[i];return e+n+e}function gCe(n){return $s.call(String(n),/"/g,""")}function mc(n){return!FC||!(typeof n=="object"&&(FC in n||typeof n[FC]<"u"))}function FM(n){return eg(n)==="[object Array]"&&mc(n)}function cCe(n){return eg(n)==="[object Date]"&&mc(n)}function yx(n){return eg(n)==="[object RegExp]"&&mc(n)}function ICe(n){return eg(n)==="[object Error]"&&mc(n)}function lCe(n){return eg(n)==="[object String]"&&mc(n)}function pCe(n){return eg(n)==="[object Number]"&&mc(n)}function ECe(n){return eg(n)==="[object Boolean]"&&mc(n)}function bx(n){if(Dl)return n&&typeof n=="object"&&n instanceof Symbol;if(typeof n=="symbol")return!0;if(!n||typeof n!="object"||!PM)return!1;try{return PM.call(n),!0}catch{}return!1}function CCe(n){if(!n||typeof n!="object"||!vM)return!1;try{return vM.call(n),!0}catch{}return!1}var hCe=Object.prototype.hasOwnProperty||function(n){return n in this};function es(n,r){return hCe.call(n,r)}function eg(n){return rCe.call(n)}function dCe(n){if(n.name)return n.name;var r=iCe.call(aCe.call(n),/^function\s*([\w$]+)/);return r?r[1]:null}function Mx(n,r){if(n.indexOf)return n.indexOf(r);for(var o=0,i=n.length;or.maxStringLength){var o=n.length-r.maxStringLength,i="... "+o+" more character"+(o>1?"s":"");return _x(KM.call(n,0,r.maxStringLength),r)+i}var e=sCe[r.quoteStyle||"single"];e.lastIndex=0;var a=$s.call($s.call(n,e,"\\$1"),/[\x00-\x1f]/g,SCe);return Ox(a,"single",r)}function SCe(n){var r=n.charCodeAt(0),o={8:"b",9:"t",10:"n",12:"f",13:"r"}[r];return o?"\\"+o:"\\x"+(r<16?"0":"")+oCe.call(r.toString(16))}function vC(n){return"Object("+n+")"}function kM(n){return n+" { ? }"}function mx(n,r,o,i){var e=i?LM(o,i):nn.call(o,", ");return n+" ("+r+") {"+e+"}"}function DCe(n){for(var r=0;r=0)return!1;return!0}function wCe(n,r){var o;if(n.indent===" ")o=" ";else if(typeof n.indent=="number"&&n.indent>0)o=nn.call(Array(n.indent+1)," ");else return null;return{base:o,prev:nn.call(Array(r+1),o)}}function LM(n,r){if(n.length===0)return"";var o=` +`)),Q=+f.split(" ")[1];yC("got proxy server response: %o",f),r({statusCode:Q,buffered:E})}n.on("error",g),n.on("close",t),n.on("end",s),a()})}mC.default=upe});var nY=W(Bc=>{"use strict";var Bpe=Bc&&Bc.__awaiter||function(n,r,o,i){function e(a){return a instanceof o?a:new o(function(A){A(a)})}return new(o||(o=Promise))(function(a,A){function t(c){try{g(i.next(c))}catch(I){A(I)}}function s(c){try{g(i.throw(c))}catch(I){A(I)}}function g(c){c.done?a(c.value):e(c.value).then(t,s)}g((i=i.apply(n,r||[])).next())})},Ql=Bc&&Bc.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Bc,"__esModule",{value:!0});var iY=Ql(We("net")),oY=Ql(We("tls")),fpe=Ql(We("url")),Qpe=Ql(We("assert")),ype=Ql(at()),mpe=rY(),Spe=Ql(aY()),SC=ype.default("https-proxy-agent:agent"),Jb=class extends mpe.Agent{constructor(r){let o;if(typeof r=="string"?o=fpe.default.parse(r):o=r,!o)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");SC("creating new HttpsProxyAgent instance: %o",o),super(o);let i=Object.assign({},o);this.secureProxy=o.secureProxy||Ope(i.protocol),i.host=i.hostname||i.host,typeof i.port=="string"&&(i.port=parseInt(i.port,10)),!i.port&&i.host&&(i.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in i)&&(i.ALPNProtocols=["http 1.1"]),i.host&&i.path&&(delete i.path,delete i.pathname),this.proxy=i}callback(r,o){return Bpe(this,void 0,void 0,function*(){let{proxy:i,secureProxy:e}=this,a;e?(SC("Creating `tls.Socket`: %o",i),a=oY.default.connect(i)):(SC("Creating `net.Socket`: %o",i),a=iY.default.connect(i));let A=Object.assign({},i.headers),s=`CONNECT ${`${o.host}:${o.port}`} HTTP/1.1\r +`;i.auth&&(A["Proxy-Authorization"]=`Basic ${Buffer.from(i.auth).toString("base64")}`);let{host:g,port:c,secureEndpoint:I}=o;wpe(c,I)||(g+=`:${c}`),A.Host=g,A.Connection="close";for(let y of Object.keys(A))s+=`${y}: ${A[y]}\r +`;let E=Spe.default(a);a.write(`${s}\r +`);let{statusCode:B,buffered:f}=yield E;if(B===200){if(r.once("socket",Dpe),o.secureEndpoint){SC("Upgrading socket connection to TLS");let y=o.servername||o.host;return oY.default.connect(Object.assign(Object.assign({},bpe(o,"host","hostname","path","port")),{socket:a,servername:y}))}return a}a.destroy();let Q=new iY.default.Socket({writable:!1});return Q.readable=!0,r.once("socket",y=>{SC("replaying proxy buffer for failed request"),Qpe.default(y.listenerCount("data")>0),y.push(f),y.push(null)}),Q})}};Bc.default=Jb;function Dpe(n){n.resume()}function wpe(n,r){return!!(!r&&n===80||r&&n===443)}function Ope(n){return typeof n=="string"?/^https:?$/i.test(n):!1}function bpe(n,...r){let o={},i;for(i in n)r.includes(i)||(o[i]=n[i]);return o}});var Wb=W((zb,sY)=>{"use strict";var Mpe=zb&&zb.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},qb=Mpe(nY());function Vb(n){return new qb.default(n)}(function(n){n.HttpsProxyAgent=qb.default,n.prototype=qb.default.prototype})(Vb||(Vb={}));sY.exports=Vb});var cY=W((TVe,gY)=>{var DC;gY.exports=function(){if(!DC){try{DC=at()("follow-redirects")}catch{}typeof DC!="function"&&(DC=function(){})}DC.apply(null,arguments)}});var CY=W((RVe,sM)=>{var OC=We("url"),wC=OC.URL,_pe=We("http"),Npe=We("https"),AM=We("stream").Writable,tM=We("assert"),IY=cY();(function(){var r=typeof process<"u",o=typeof window<"u"&&typeof document<"u",i=Qc(Error.captureStackTrace);!r&&(o||!i)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var rM=!1;try{tM(new wC(""))}catch(n){rM=n.code==="ERR_INVALID_URL"}var Tpe=["Authorization","Proxy-Authorization","Cookie"],Rpe=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],aM=["abort","aborted","connect","error","socket","timeout"],iM=Object.create(null);aM.forEach(function(n){iM[n]=function(r,o,i){this._redirectable.emit(n,r,o,i)}});var Xb=bC("ERR_INVALID_URL","Invalid URL",TypeError),$b=bC("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),kpe=bC("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",$b),vpe=bC("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Ppe=bC("ERR_STREAM_WRITE_AFTER_END","write after end"),Gpe=AM.prototype.destroy||pY;function ei(n,r){AM.call(this),this._sanitizeOptions(n),this._options=n,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],r&&this.on("response",r);var o=this;this._onNativeResponse=function(i){try{o._processResponse(i)}catch(e){o.emit("error",e instanceof $b?e:new $b({cause:e}))}},this._headerFilter=new RegExp("^(?:"+Tpe.concat(n.sensitiveHeaders).map(Ype).join("|")+")$","i"),this._performRequest()}ei.prototype=Object.create(AM.prototype);ei.prototype.abort=function(){nM(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};ei.prototype.destroy=function(n){return nM(this._currentRequest,n),Gpe.call(this,n),this};ei.prototype.write=function(n,r,o){if(this._ending)throw new Ppe;if(!fc(n)&&!Hpe(n))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Qc(r)&&(o=r,r=null),n.length===0){o&&o();return}this._requestBodyLength+n.length<=this._options.maxBodyLength?(this._requestBodyLength+=n.length,this._requestBodyBuffers.push({data:n,encoding:r}),this._currentRequest.write(n,r,o)):(this.emit("error",new vpe),this.abort())};ei.prototype.end=function(n,r,o){if(Qc(n)?(o=n,n=r=null):Qc(r)&&(o=r,r=null),!n)this._ended=this._ending=!0,this._currentRequest.end(null,null,o);else{var i=this,e=this._currentRequest;this.write(n,r,function(){i._ended=!0,e.end(null,null,o)}),this._ending=!0}};ei.prototype.setHeader=function(n,r){this._options.headers[n]=r,this._currentRequest.setHeader(n,r)};ei.prototype.removeHeader=function(n){delete this._options.headers[n],this._currentRequest.removeHeader(n)};ei.prototype.setTimeout=function(n,r){var o=this;function i(A){A.setTimeout(n),A.removeListener("timeout",A.destroy),A.addListener("timeout",A.destroy)}function e(A){o._timeout&&clearTimeout(o._timeout),o._timeout=setTimeout(function(){o.emit("timeout"),a()},n),i(A)}function a(){o._timeout&&(clearTimeout(o._timeout),o._timeout=null),o.removeListener("abort",a),o.removeListener("error",a),o.removeListener("response",a),o.removeListener("close",a),r&&o.removeListener("timeout",r),o.socket||o._currentRequest.removeListener("socket",e)}return r&&this.on("timeout",r),this.socket?e(this.socket):this._currentRequest.once("socket",e),this.on("socket",i),this.on("abort",a),this.on("error",a),this.on("response",a),this.on("close",a),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(n){ei.prototype[n]=function(r,o){return this._currentRequest[n](r,o)}});["aborted","connection","socket"].forEach(function(n){Object.defineProperty(ei.prototype,n,{get:function(){return this._currentRequest[n]}})});ei.prototype._sanitizeOptions=function(n){if(n.headers||(n.headers={}),Upe(n.sensitiveHeaders)||(n.sensitiveHeaders=[]),n.host&&(n.hostname||(n.hostname=n.host),delete n.host),!n.pathname&&n.path){var r=n.path.indexOf("?");r<0?n.pathname=n.path:(n.pathname=n.path.substring(0,r),n.search=n.path.substring(r))}};ei.prototype._performRequest=function(){var n=this._options.protocol,r=this._options.nativeProtocols[n];if(!r)throw new TypeError("Unsupported protocol "+n);if(this._options.agents){var o=n.slice(0,-1);this._options.agent=this._options.agents[o]}var i=this._currentRequest=r.request(this._options,this._onNativeResponse);i._redirectable=this;for(var e of aM)i.on(e,iM[e]);if(this._currentUrl=/^\//.test(this._options.path)?OC.format(this._options):this._options.path,this._isRedirect){var a=0,A=this,t=this._requestBodyBuffers;(function s(g){if(i===A._currentRequest)if(g)A.emit("error",g);else if(a=400){n.responseUrl=this._currentUrl,n.redirects=this._redirects,this.emit("response",n),this._requestBodyBuffers=[];return}if(nM(this._currentRequest),n.destroy(),++this._redirectCount>this._options.maxRedirects)throw new kpe;var i,e=this._options.beforeRedirect;e&&(i=Object.assign({Host:n.req.getHeader("host")},this._options.headers));var a=this._options.method;((r===301||r===302)&&this._options.method==="POST"||r===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],Zb(/^content-/i,this._options.headers));var A=Zb(/^host$/i,this._options.headers),t=oM(this._currentUrl),s=A||t.host,g=/^\w+:/.test(o)?this._currentUrl:OC.format(Object.assign(t,{host:s})),c=Fpe(o,g);if(IY("redirecting to",c.href),this._isRedirect=!0,eM(c,this._options),(c.protocol!==t.protocol&&c.protocol!=="https:"||c.host!==s&&!Lpe(c.host,s))&&Zb(this._headerFilter,this._options.headers),Qc(e)){var I={headers:n.headers,statusCode:r},E={url:g,method:a,headers:i};e(this._options,I,E),this._sanitizeOptions(this._options)}this._performRequest()};function lY(n){var r={maxRedirects:21,maxBodyLength:10485760},o={};return Object.keys(n).forEach(function(i){var e=i+":",a=o[e]=n[i],A=r[i]=Object.create(a);function t(g,c,I){return Kpe(g)?g=eM(g):fc(g)?g=eM(oM(g)):(I=c,c=EY(g),g={protocol:e}),Qc(c)&&(I=c,c=null),c=Object.assign({maxRedirects:r.maxRedirects,maxBodyLength:r.maxBodyLength},g,c),c.nativeProtocols=o,!fc(c.host)&&!fc(c.hostname)&&(c.hostname="::1"),tM.equal(c.protocol,e,"protocol mismatch"),IY("options",c),new ei(c,I)}function s(g,c,I){var E=A.request(g,c,I);return E.end(),E}Object.defineProperties(A,{request:{value:t,configurable:!0,enumerable:!0,writable:!0},get:{value:s,configurable:!0,enumerable:!0,writable:!0}})}),r}function pY(){}function oM(n){var r;if(rM)r=new wC(n);else if(r=EY(OC.parse(n)),!fc(r.protocol))throw new Xb({input:n});return r}function Fpe(n,r){return rM?new wC(n,r):oM(OC.resolve(r,n))}function EY(n){if(/^\[/.test(n.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(n.hostname))throw new Xb({input:n.href||n});if(/^\[/.test(n.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(n.host))throw new Xb({input:n.href||n});return n}function eM(n,r){var o=r||{};for(var i of Rpe)o[i]=n[i];return o.hostname.startsWith("[")&&(o.hostname=o.hostname.slice(1,-1)),o.port!==""&&(o.port=Number(o.port)),o.path=o.search?o.pathname+o.search:o.pathname,o}function Zb(n,r){var o;for(var i in r)n.test(i)&&(o=r[i],delete r[i]);return o===null||typeof o>"u"?void 0:String(o).trim()}function bC(n,r,o){function i(e){Qc(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,e||{}),this.code=n,this.message=this.cause?r+": "+this.cause.message:r}return i.prototype=new(o||Error),Object.defineProperties(i.prototype,{constructor:{value:i,enumerable:!1},name:{value:"Error ["+n+"]",enumerable:!1}}),i}function nM(n,r){for(var o of aM)n.removeListener(o,iM[o]);n.on("error",pY),n.destroy(r)}function Lpe(n,r){tM(fc(n)&&fc(r));var o=n.length-r.length-1;return o>0&&n[o]==="."&&n.endsWith(r)}function Upe(n){return n instanceof Array}function fc(n){return typeof n=="string"||n instanceof String}function Qc(n){return typeof n=="function"}function Hpe(n){return typeof n=="object"&&"length"in n}function Kpe(n){return wC&&n instanceof wC}function Ype(n){return n.replace(/[\]\\/()*+?.$]/g,"\\$&")}sM.exports=lY({http:_pe,https:Npe});sM.exports.wrap=lY});var Ix=W((X6e,cx)=>{cx.exports=We("util").inspect});var LC=W(($6e,Nx)=>{var UM=typeof Map=="function"&&Map.prototype,NM=Object.getOwnPropertyDescriptor&&UM?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Af=UM&&NM&&typeof NM.get=="function"?NM.get:null,lx=UM&&Map.prototype.forEach,HM=typeof Set=="function"&&Set.prototype,TM=Object.getOwnPropertyDescriptor&&HM?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,tf=HM&&TM&&typeof TM.get=="function"?TM.get:null,px=HM&&Set.prototype.forEach,tCe=typeof WeakMap=="function"&&WeakMap.prototype,PC=tCe?WeakMap.prototype.has:null,rCe=typeof WeakSet=="function"&&WeakSet.prototype,GC=rCe?WeakSet.prototype.has:null,aCe=typeof WeakRef=="function"&&WeakRef.prototype,Ex=aCe?WeakRef.prototype.deref:null,iCe=Boolean.prototype.valueOf,oCe=Object.prototype.toString,nCe=Function.prototype.toString,sCe=String.prototype.match,KM=String.prototype.slice,$s=String.prototype.replace,gCe=String.prototype.toUpperCase,Cx=String.prototype.toLowerCase,Sx=RegExp.prototype.test,hx=Array.prototype.concat,nn=Array.prototype.join,cCe=Array.prototype.slice,dx=Math.floor,vM=typeof BigInt=="function"?BigInt.prototype.valueOf:null,RM=Object.getOwnPropertySymbols,PM=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Dl=typeof Symbol=="function"&&typeof Symbol.iterator=="object",FC=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Dl||!0)?Symbol.toStringTag:null,Dx=Object.prototype.propertyIsEnumerable,ux=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(n){return n.__proto__}:null);function Bx(n,r){if(n===1/0||n===-1/0||n!==n||n&&n>-1e3&&n<1e3||Sx.call(/e/,r))return r;var o=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof n=="number"){var i=n<0?-dx(-n):dx(n);if(i!==n){var e=String(i),a=KM.call(r,e.length+1);return $s.call(e,o,"$&_")+"."+$s.call($s.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return $s.call(r,o,"$&_")}var GM=Ix(),fx=GM.custom,Qx=bx(fx)?fx:null,wx={__proto__:null,double:'"',single:"'"},ICe={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Nx.exports=function n(r,o,i,e){var a=o||{};if(es(a,"quoteStyle")&&!es(wx,a.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(es(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var A=es(a,"customInspect")?a.customInspect:!0;if(typeof A!="boolean"&&A!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(es(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(es(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var t=a.numericSeparator;if(typeof r>"u")return"undefined";if(r===null)return"null";if(typeof r=="boolean")return r?"true":"false";if(typeof r=="string")return _x(r,a);if(typeof r=="number"){if(r===0)return 1/0/r>0?"0":"-0";var s=String(r);return t?Bx(r,s):s}if(typeof r=="bigint"){var g=String(r)+"n";return t?Bx(r,g):g}var c=typeof a.depth>"u"?5:a.depth;if(typeof i>"u"&&(i=0),i>=c&&c>0&&typeof r=="object")return FM(r)?"[Array]":"[Object]";var I=MCe(a,i);if(typeof e>"u")e=[];else if(Mx(e,r)>=0)return"[Circular]";function E(U,M,G){if(M&&(e=cCe.call(e),e.push(M)),G){var te={depth:a.depth};return es(a,"quoteStyle")&&(te.quoteStyle=a.quoteStyle),n(U,te,i+1,e)}return n(U,a,i+1,e)}if(typeof r=="function"&&!yx(r)){var B=fCe(r),f=ef(r,E);return"[Function"+(B?": "+B:" (anonymous)")+"]"+(f.length>0?" { "+nn.call(f,", ")+" }":"")}if(bx(r)){var Q=Dl?$s.call(String(r),/^(Symbol\(.*\))_[^)]*$/,"$1"):PM.call(r);return typeof r=="object"&&!Dl?vC(Q):Q}if(wCe(r)){for(var y="<"+Cx.call(String(r.nodeName)),m=r.attributes||[],T=0;T",y}if(FM(r)){if(r.length===0)return"[]";var _=ef(r,E);return I&&!bCe(_)?"["+LM(_,I)+"]":"[ "+nn.call(_,", ")+" ]"}if(ECe(r)){var P=ef(r,E);return!("cause"in Error.prototype)&&"cause"in r&&!Dx.call(r,"cause")?"{ ["+String(r)+"] "+nn.call(hx.call("[cause]: "+E(r.cause),P),", ")+" }":P.length===0?"["+String(r)+"]":"{ ["+String(r)+"] "+nn.call(P,", ")+" }"}if(typeof r=="object"&&A){if(Qx&&typeof r[Qx]=="function"&&GM)return GM(r,{depth:c-i});if(A!=="symbol"&&typeof r.inspect=="function")return r.inspect()}if(QCe(r)){var Y=[];return lx&&lx.call(r,function(U,M){Y.push(E(M,r,!0)+" => "+E(U,r))}),mx("Map",Af.call(r),Y,I)}if(SCe(r)){var j=[];return px&&px.call(r,function(U){j.push(E(U,r))}),mx("Set",tf.call(r),j,I)}if(yCe(r))return kM("WeakMap");if(DCe(r))return kM("WeakSet");if(mCe(r))return kM("WeakRef");if(hCe(r))return vC(E(Number(r)));if(uCe(r))return vC(E(vM.call(r)));if(dCe(r))return vC(iCe.call(r));if(CCe(r))return vC(E(String(r)));if(typeof window<"u"&&r===window)return"{ [object Window] }";if(typeof globalThis<"u"&&r===globalThis||typeof global<"u"&&r===global)return"{ [object globalThis] }";if(!pCe(r)&&!yx(r)){var K=ef(r,E),q=ux?ux(r)===Object.prototype:r instanceof Object||r.constructor===Object,V=r instanceof Object?"":"null prototype",H=!q&&FC&&Object(r)===r&&FC in r?KM.call(eg(r),8,-1):V?"Object":"",v=q||typeof r.constructor!="function"?"":r.constructor.name?r.constructor.name+" ":"",Z=v+(H||V?"["+nn.call(hx.call([],H||[],V||[]),": ")+"] ":"");return K.length===0?Z+"{}":I?Z+"{"+LM(K,I)+"}":Z+"{ "+nn.call(K,", ")+" }"}return String(r)};function Ox(n,r,o){var i=o.quoteStyle||r,e=wx[i];return e+n+e}function lCe(n){return $s.call(String(n),/"/g,""")}function mc(n){return!FC||!(typeof n=="object"&&(FC in n||typeof n[FC]<"u"))}function FM(n){return eg(n)==="[object Array]"&&mc(n)}function pCe(n){return eg(n)==="[object Date]"&&mc(n)}function yx(n){return eg(n)==="[object RegExp]"&&mc(n)}function ECe(n){return eg(n)==="[object Error]"&&mc(n)}function CCe(n){return eg(n)==="[object String]"&&mc(n)}function hCe(n){return eg(n)==="[object Number]"&&mc(n)}function dCe(n){return eg(n)==="[object Boolean]"&&mc(n)}function bx(n){if(Dl)return n&&typeof n=="object"&&n instanceof Symbol;if(typeof n=="symbol")return!0;if(!n||typeof n!="object"||!PM)return!1;try{return PM.call(n),!0}catch{}return!1}function uCe(n){if(!n||typeof n!="object"||!vM)return!1;try{return vM.call(n),!0}catch{}return!1}var BCe=Object.prototype.hasOwnProperty||function(n){return n in this};function es(n,r){return BCe.call(n,r)}function eg(n){return oCe.call(n)}function fCe(n){if(n.name)return n.name;var r=sCe.call(nCe.call(n),/^function\s*([\w$]+)/);return r?r[1]:null}function Mx(n,r){if(n.indexOf)return n.indexOf(r);for(var o=0,i=n.length;or.maxStringLength){var o=n.length-r.maxStringLength,i="... "+o+" more character"+(o>1?"s":"");return _x(KM.call(n,0,r.maxStringLength),r)+i}var e=ICe[r.quoteStyle||"single"];e.lastIndex=0;var a=$s.call($s.call(n,e,"\\$1"),/[\x00-\x1f]/g,OCe);return Ox(a,"single",r)}function OCe(n){var r=n.charCodeAt(0),o={8:"b",9:"t",10:"n",12:"f",13:"r"}[r];return o?"\\"+o:"\\x"+(r<16?"0":"")+gCe.call(r.toString(16))}function vC(n){return"Object("+n+")"}function kM(n){return n+" { ? }"}function mx(n,r,o,i){var e=i?LM(o,i):nn.call(o,", ");return n+" ("+r+") {"+e+"}"}function bCe(n){for(var r=0;r=0)return!1;return!0}function MCe(n,r){var o;if(n.indent===" ")o=" ";else if(typeof n.indent=="number"&&n.indent>0)o=nn.call(Array(n.indent+1)," ");else return null;return{base:o,prev:nn.call(Array(r+1),o)}}function LM(n,r){if(n.length===0)return"";var o=` `+r.prev+r.base;return o+nn.call(n,","+o)+` -`+r.prev}function ef(n,r){var o=FM(n),i=[];if(o){i.length=n.length;for(var e=0;e{"use strict";var OCe=LC(),bCe=zs(),rf=function(n,r,o){for(var i=n,e;(e=i.next)!=null;i=e)if(e.key===r)return i.next=e.next,o||(e.next=n.next,n.next=e),e},MCe=function(n,r){if(n){var o=rf(n,r);return o&&o.value}},_Ce=function(n,r,o){var i=rf(n,r);i?i.value=o:n.next={key:r,next:n.next,value:o}},NCe=function(n,r){return n?!!rf(n,r):!1},TCe=function(n,r){if(n)return rf(n,r,!0)};Tx.exports=function(){var r,o={assert:function(i){if(!o.has(i))throw new bCe("Side channel does not contain "+OCe(i))},delete:function(i){var e=TCe(r,i);return e&&r&&!r.next&&(r=void 0),!!e},get:function(i){return MCe(r,i)},has:function(i){return NCe(r,i)},set:function(i,e){r||(r={next:void 0}),_Ce(r,i,e)}};return o}});var YM=W((X6e,Px)=>{"use strict";var kx=uC(),vx=ub(),RCe=vx([kx("%String.prototype.indexOf%")]);Px.exports=function(r,o){var i=kx(r,!!o);return typeof i=="function"&&RCe(r,".prototype.")>-1?vx([i]):i}});var xM=W(($6e,Fx)=>{"use strict";var kCe=uC(),UC=YM(),vCe=LC(),PCe=zs(),Gx=kCe("%Map%",!0),GCe=UC("Map.prototype.get",!0),FCe=UC("Map.prototype.set",!0),LCe=UC("Map.prototype.has",!0),UCe=UC("Map.prototype.delete",!0),HCe=UC("Map.prototype.size",!0);Fx.exports=!!Gx&&function(){var r,o={assert:function(i){if(!o.has(i))throw new PCe("Side channel does not contain "+vCe(i))},delete:function(i){if(r){var e=UCe(r,i);return HCe(r)===0&&(r=void 0),e}return!1},get:function(i){if(r)return GCe(r,i)},has:function(i){return r?LCe(r,i):!1},set:function(i,e){r||(r=new Gx),FCe(r,i,e)}};return o}});var Ux=W((e5e,Lx)=>{"use strict";var KCe=uC(),of=YM(),YCe=LC(),af=xM(),xCe=zs(),wl=KCe("%WeakMap%",!0),jCe=of("WeakMap.prototype.get",!0),JCe=of("WeakMap.prototype.set",!0),qCe=of("WeakMap.prototype.has",!0),VCe=of("WeakMap.prototype.delete",!0);Lx.exports=wl?function(){var r,o,i={assert:function(e){if(!i.has(e))throw new xCe("Side channel does not contain "+YCe(e))},delete:function(e){if(wl&&e&&(typeof e=="object"||typeof e=="function")){if(r)return VCe(r,e)}else if(af&&o)return o.delete(e);return!1},get:function(e){return wl&&e&&(typeof e=="object"||typeof e=="function")&&r?jCe(r,e):o&&o.get(e)},has:function(e){return wl&&e&&(typeof e=="object"||typeof e=="function")&&r?qCe(r,e):!!o&&o.has(e)},set:function(e,a){wl&&e&&(typeof e=="object"||typeof e=="function")?(r||(r=new wl),JCe(r,e,a)):af&&(o||(o=af()),o.set(e,a))}};return i}:af});var jM=W((A5e,Hx)=>{"use strict";var zCe=zs(),WCe=LC(),ZCe=Rx(),XCe=xM(),$Ce=Ux(),ehe=$Ce||XCe||ZCe;Hx.exports=function(){var r,o={assert:function(i){if(!o.has(i)){var e=i&&Object(i)===i?"the given object key":WCe(i);throw new zCe("Side channel does not contain "+e)}},delete:function(i){return!!r&&r.delete(i)},get:function(i){return r&&r.get(i)},has:function(i){return!!r&&r.has(i)},set:function(i,e){r||(r=ehe()),r.set(i,e)}};return o}});var nf=W((t5e,Kx)=>{"use strict";var Ahe=String.prototype.replace,the=/%20/g,JM={RFC1738:"RFC1738",RFC3986:"RFC3986"};Kx.exports={default:JM.RFC3986,formatters:{RFC1738:function(n){return Ahe.call(n,the,"+")},RFC3986:function(n){return String(n)}},RFC1738:JM.RFC1738,RFC3986:JM.RFC3986}});var WM=W((r5e,jx)=>{"use strict";var rhe=nf(),xx=jM(),Yx=pb(),qM=Object.prototype.hasOwnProperty,Sc=Array.isArray,gf=xx(),Dc=function(r,o){return gf.set(r,o),r},wc=function(r){return gf.has(r)},HC=function(r){return gf.get(r)},VM=function(r,o){gf.set(r,o)},sn=(function(){for(var n=[],r=0;r<256;++r)n[n.length]="%"+((r<16?"0":"")+r.toString(16)).toUpperCase();return n})(),ahe=function(r){for(;r.length>1;){var o=r.pop(),i=o.obj[o.prop];if(Sc(i)){for(var e=[],a=0;a=i.arrayLimit){if(i.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+i.arrayLimit+" element"+(i.arrayLimit===1?"":"s")+" allowed in an array.");return Dc(Ol(r.concat(o),i),e)}r[e]=o}else if(r&&typeof r=="object")if(wc(r)){var a=HC(r)+1;r[a]=o,VM(r,a)}else{if(i&&i.strictMerge)return[r,o];(i&&(i.plainObjects||i.allowPrototypes)||!qM.call(Object.prototype,o))&&(r[o]=!0)}else return[r,o];return r}if(!r||typeof r!="object"){if(wc(o)){for(var A=Object.keys(o),t=i&&i.plainObjects?{__proto__:null,0:r}:{0:r},s=0;si.arrayLimit){if(i.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+i.arrayLimit+" element"+(i.arrayLimit===1?"":"s")+" allowed in an array.");return Dc(Ol(c,i),c.length-1)}return c}var I=r;if(Sc(r)&&!Sc(o)&&(I=Ol(r,i)),Sc(r)&&Sc(o)){if(o.forEach(function(E,B){if(qM.call(r,B)){var f=r[B];f&&typeof f=="object"&&E&&typeof E=="object"?r[B]=n(f,E,i):r[r.length]=E}else r[B]=E}),i&&typeof i.arrayLimit=="number"&&r.length>i.arrayLimit){if(i.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+i.arrayLimit+" element"+(i.arrayLimit===1?"":"s")+" allowed in an array.");return Dc(Ol(r,i),r.length-1)}return r}return Object.keys(o).reduce(function(E,B){var f=o[B];if(qM.call(E,B)?zM(E,B,n(E[B],f,i)):zM(E,B,f),wc(o)&&!wc(E)&&Dc(E,HC(o)),wc(E)){var Q=parseInt(B,10);String(Q)===B&&Q>=0&&Q>HC(E)&&VM(E,Q)}return E},I)},ohe=function(r,o){return Object.keys(o).reduce(function(i,e){return zM(i,e,o[e]),i},r)},nhe=function(n,r,o){var i=n.replace(/\+/g," ");if(o==="iso-8859-1")return i.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(i)}catch{return i}},sf=1024,she=function(r,o,i,e,a){if(r.length===0)return r;var A=r;if(typeof r=="symbol"?A=Symbol.prototype.toString.call(r):typeof r!="string"&&(A=String(r)),i==="iso-8859-1")return escape(A).replace(/%u[0-9a-f]{4}/gi,function(f){return"%26%23"+parseInt(f.slice(2),16)+"%3B"});for(var t="",s=0;s=sf?A.slice(s,s+sf):A;if(s+sf=55296&&c<=56319&&(g=g.slice(0,-1),s-=1)}for(var I=[],E=0;E=48&&B<=57||B>=65&&B<=90||B>=97&&B<=122||a===rhe.RFC1738&&(B===40||B===41)){I[I.length]=g.charAt(E);continue}if(B<128){I[I.length]=sn[B];continue}if(B<2048){I[I.length]=sn[192|B>>6]+sn[128|B&63];continue}if(B<55296||B>=57344){I[I.length]=sn[224|B>>12]+sn[128|B>>6&63]+sn[128|B&63];continue}E+=1,B=65536+((B&1023)<<10|g.charCodeAt(E)&1023),I[I.length]=sn[240|B>>18]+sn[128|B>>12&63]+sn[128|B>>6&63]+sn[128|B&63]}t+=I.join("")}return t},ghe=function(r){for(var o=[{obj:{o:r},prop:"o"}],i=xx(),e=0;ei){if(a)throw new RangeError("Array limit exceeded. Only "+i+" element"+(i===1?"":"s")+" allowed in an array.");return Dc(Ol(t,{plainObjects:e}),t.length-1)}return t},phe=function(r,o){if(Sc(r)){for(var i=[],e=0;e{"use strict";var qx=jM(),cf=WM(),KC=nf(),Ehe=Object.prototype.hasOwnProperty,Vx={brackets:function(r){return r+"[]"},comma:"comma",indices:function(r,o){return r+"["+o+"]"},repeat:function(r){return r}},gn=Array.isArray,Che=Array.prototype.push,zx=function(n,r){Che.apply(n,gn(r)?r:[r])},hhe=Date.prototype.toISOString,Jx=KC.default,yr={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:cf.encode,encodeValuesOnly:!1,filter:void 0,format:Jx,formatter:KC.formatters[Jx],indices:!1,serializeDate:function(r){return hhe.call(r)},skipNulls:!1,strictNullHandling:!1},dhe=function(r){return typeof r=="string"||typeof r=="number"||typeof r=="boolean"||typeof r=="symbol"||typeof r=="bigint"},ZM={},uhe=function n(r,o,i,e,a,A,t,s,g,c,I,E,B,f,Q,y,m,T){for(var _=r,P=T,Y=0,j=!1;(P=P.get(ZM))!==void 0&&!j;){var K=P.get(r);if(Y+=1,typeof K<"u"){if(K===Y)throw new RangeError("Cyclic object value");j=!0}typeof P.get(ZM)>"u"&&(Y=0)}if(typeof c=="function"?_=c(o,_):_ instanceof Date?_=B(_):i==="comma"&&gn(_)&&(_=cf.maybeMap(_,function(Ee){return Ee instanceof Date?B(Ee):Ee})),_===null){if(A)return Q(g&&!y?g(o,yr.encoder,m,"key",f):o);_=""}if(dhe(_)||cf.isBuffer(_)){if(g){var q=y?o:g(o,yr.encoder,m,"key",f);return[Q(q)+"="+Q(g(_,yr.encoder,m,"value",f))]}return[Q(o)+"="+Q(String(_))]}var V=[];if(typeof _>"u")return V;var H;if(i==="comma"&&gn(_))y&&g&&(_=cf.maybeMap(_,function(Ee){return Ee==null?Ee:g(Ee)})),H=[{value:_.length>0?_.join(",")||null:void 0}];else if(gn(c))H=c;else{var v=Object.keys(_);H=I?v.sort(I):v}var Z=s?String(o).replace(/\./g,"%2E"):String(o),U=e&&gn(_)&&_.length===1?Z+"[]":Z;if(a&&gn(_)&&_.length===0)return U+"[]";for(var M=0;M"u"?r.encodeDotInKeys===!0?!0:yr.allowDots:!!r.allowDots;return{addQueryPrefix:typeof r.addQueryPrefix=="boolean"?r.addQueryPrefix:yr.addQueryPrefix,allowDots:t,allowEmptyArrays:typeof r.allowEmptyArrays=="boolean"?!!r.allowEmptyArrays:yr.allowEmptyArrays,arrayFormat:A,charset:o,charsetSentinel:typeof r.charsetSentinel=="boolean"?r.charsetSentinel:yr.charsetSentinel,commaRoundTrip:!!r.commaRoundTrip,delimiter:typeof r.delimiter>"u"?yr.delimiter:r.delimiter,encode:typeof r.encode=="boolean"?r.encode:yr.encode,encodeDotInKeys:typeof r.encodeDotInKeys=="boolean"?r.encodeDotInKeys:yr.encodeDotInKeys,encoder:typeof r.encoder=="function"?r.encoder:yr.encoder,encodeValuesOnly:typeof r.encodeValuesOnly=="boolean"?r.encodeValuesOnly:yr.encodeValuesOnly,filter:a,format:i,formatter:e,serializeDate:typeof r.serializeDate=="function"?r.serializeDate:yr.serializeDate,skipNulls:typeof r.skipNulls=="boolean"?r.skipNulls:yr.skipNulls,sort:typeof r.sort=="function"?r.sort:null,strictNullHandling:typeof r.strictNullHandling=="boolean"?r.strictNullHandling:yr.strictNullHandling}};Wx.exports=function(n,r){var o=n,i=Bhe(r),e,a;typeof i.filter=="function"?(a=i.filter,o=a("",o)):gn(i.filter)&&(a=i.filter,e=a);var A=[];if(typeof o!="object"||o===null)return"";var t=Vx[i.arrayFormat],s=t==="comma"&&i.commaRoundTrip;e||(e=Object.keys(o)),i.sort&&e.sort(i.sort);for(var g=qx(),c=0;c"u"||I===null)){var E=o[I];i.skipNulls&&E===null||zx(A,uhe(E,I,t,s,i.allowEmptyArrays,i.strictNullHandling,i.skipNulls,i.encodeDotInKeys,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,g))}}var B=A.join(i.delimiter),f=i.addQueryPrefix===!0?"?":"";return i.charsetSentinel&&(i.charset==="iso-8859-1"?f+="utf8=%26%2310003%3B"+i.delimiter:f+="utf8=%E2%9C%93"+i.delimiter),B.length>0?f+B:""}});var e1=W((i5e,$x)=>{"use strict";var cn=WM(),If=Object.prototype.hasOwnProperty,XM=Array.isArray,Wt={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:cn.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},fhe=function(n){return n.replace(/&#(\d+);/g,function(r,o){return String.fromCharCode(parseInt(o,10))})},Xx=function(n,r,o,i){if(n&&typeof n=="string"&&r.comma&&n.indexOf(",")>-1){if(i&&r.throwOnLimitExceeded)for(var e=0,a=n.indexOf(",");a>-1;){if(e+=1,e>=r.arrayLimit)throw new RangeError("Array limit exceeded. Only "+r.arrayLimit+" element"+(r.arrayLimit===1?"":"s")+" allowed in an array.");a=n.indexOf(",",a+1)}return n.split(",")}if(r.throwOnLimitExceeded&&o>=r.arrayLimit)throw new RangeError("Array limit exceeded. Only "+r.arrayLimit+" element"+(r.arrayLimit===1?"":"s")+" allowed in an array.");return n},Qhe="utf8=%26%2310003%3B",yhe="utf8=%E2%9C%93",mhe=function(r,o){var i={__proto__:null},e=o.ignoreQueryPrefix?r.replace(/^\?/,""):r;e=e.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=o.parameterLimit===1/0?void 0:o.parameterLimit,A=e.split(o.delimiter,o.throwOnLimitExceeded&&typeof a<"u"?a+1:a);if(o.throwOnLimitExceeded&&typeof a<"u"&&A.length>a)throw new RangeError("Parameter limit exceeded. Only "+a+" parameter"+(a===1?"":"s")+" allowed.");var t=-1,s,g=o.charset;if(o.charsetSentinel)for(s=0;s-1&&(f=XM(f)?[f]:f),o.comma&&XM(f)&&f.length>o.arrayLimit&&(f=cn.combine([],f,o.arrayLimit,o.plainObjects,o.throwOnLimitExceeded)),B!==null){var Q=If.call(i,B);Q&&(o.duplicates==="combine"||c.indexOf("[]=")>-1)?i[B]=cn.combine(i[B],f,o.arrayLimit,o.plainObjects,o.throwOnLimitExceeded):(!Q||o.duplicates==="last")&&(i[B]=f)}}return i},She=function(n,r,o,i){var e=0;if(n.length>0&&n[n.length-1]==="[]"){var a=n.slice(0,-1).join("");e=Array.isArray(r)&&r[a]?r[a].length:0}for(var A=i?r:Xx(r,o,e),t=n.length-1;t>=0;--t){var s,g=n[t];if(g==="[]"&&o.parseArrays)cn.isOverflow(A)?s=A:s=o.allowEmptyArrays&&(A===""||o.strictNullHandling&&A===null)?[]:cn.combine([],A,o.arrayLimit,o.plainObjects,o.throwOnLimitExceeded);else{s=o.plainObjects?{__proto__:null}:{};var c=g.charAt(0)==="["&&g.charAt(g.length-1)==="]"?g.slice(1,-1):g,I=o.decodeDotInKeys?c.replace(/%2E/g,"."):c,E=parseInt(I,10),B=!isNaN(E)&&g!==I&&String(E)===I&&E>=0&&o.parseArrays;if(!o.parseArrays&&I==="")s={0:A};else if(B&&E=0?i.slice(0,a):i;if(A){if(!o.plainObjects&&If.call(Object.prototype,A)&&!o.allowPrototypes)return;e[e.length]=A}for(var t=i.length,s=a,g=0;s>=0&&g=0){if(o.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+o.depth+" and strictDepth is true");e[e.length]="["+i.slice(s)+"]"}return e},whe=function(r,o,i,e){if(r){var a=Dhe(r,i);if(a)return She(a,o,i,e)}},Ohe=function(r){if(!r)return Wt;if(typeof r.allowEmptyArrays<"u"&&typeof r.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof r.decodeDotInKeys<"u"&&typeof r.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(r.decoder!==null&&typeof r.decoder<"u"&&typeof r.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof r.charset<"u"&&r.charset!=="utf-8"&&r.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof r.throwOnLimitExceeded<"u"&&typeof r.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var o=typeof r.charset>"u"?Wt.charset:r.charset,i=typeof r.duplicates>"u"?Wt.duplicates:r.duplicates;if(i!=="combine"&&i!=="first"&&i!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var e=typeof r.allowDots>"u"?r.decodeDotInKeys===!0?!0:Wt.allowDots:!!r.allowDots;return{allowDots:e,allowEmptyArrays:typeof r.allowEmptyArrays=="boolean"?!!r.allowEmptyArrays:Wt.allowEmptyArrays,allowPrototypes:typeof r.allowPrototypes=="boolean"?r.allowPrototypes:Wt.allowPrototypes,allowSparse:typeof r.allowSparse=="boolean"?r.allowSparse:Wt.allowSparse,arrayLimit:typeof r.arrayLimit=="number"?r.arrayLimit:Wt.arrayLimit,charset:o,charsetSentinel:typeof r.charsetSentinel=="boolean"?r.charsetSentinel:Wt.charsetSentinel,comma:typeof r.comma=="boolean"?r.comma:Wt.comma,decodeDotInKeys:typeof r.decodeDotInKeys=="boolean"?r.decodeDotInKeys:Wt.decodeDotInKeys,decoder:typeof r.decoder=="function"?r.decoder:Wt.decoder,delimiter:typeof r.delimiter=="string"||cn.isRegExp(r.delimiter)?r.delimiter:Wt.delimiter,depth:typeof r.depth=="number"||r.depth===!1?+r.depth:Wt.depth,duplicates:i,ignoreQueryPrefix:r.ignoreQueryPrefix===!0,interpretNumericEntities:typeof r.interpretNumericEntities=="boolean"?r.interpretNumericEntities:Wt.interpretNumericEntities,parameterLimit:typeof r.parameterLimit=="number"?r.parameterLimit:Wt.parameterLimit,parseArrays:r.parseArrays!==!1,plainObjects:typeof r.plainObjects=="boolean"?r.plainObjects:Wt.plainObjects,strictDepth:typeof r.strictDepth=="boolean"?!!r.strictDepth:Wt.strictDepth,strictMerge:typeof r.strictMerge=="boolean"?!!r.strictMerge:Wt.strictMerge,strictNullHandling:typeof r.strictNullHandling=="boolean"?r.strictNullHandling:Wt.strictNullHandling,throwOnLimitExceeded:typeof r.throwOnLimitExceeded=="boolean"?r.throwOnLimitExceeded:!1}};$x.exports=function(n,r){var o=Ohe(r);if(n===""||n===null||typeof n>"u")return o.plainObjects?{__proto__:null}:{};for(var i=typeof n=="string"?mhe(n,o):n,e=o.plainObjects?{__proto__:null}:{},a=Object.keys(i),A=0;A{"use strict";var bhe=Zx(),Mhe=e1(),_he=nf();A1.exports={formats:_he,parse:Mhe,stringify:bhe}});var a1=W((n5e,r1)=>{function Nhe(n){return n}r1.exports=Nhe});var H1=W((YC,Ml)=>{var The=200,Rhe="Expected a function",c_="__lodash_hash_undefined__",uf=1,_l=2,E1=1/0,C1=9007199254740991,lf="[object Arguments]",A_="[object Array]",h1="[object Boolean]",d1="[object Date]",u1="[object Error]",B1="[object Function]",khe="[object GeneratorFunction]",pf="[object Map]",f1="[object Number]",bl="[object Object]",i1="[object Promise]",Q1="[object RegExp]",Ef="[object Set]",y1="[object String]",m1="[object Symbol]",t_="[object WeakMap]",S1="[object ArrayBuffer]",Cf="[object DataView]",vhe="[object Float32Array]",Phe="[object Float64Array]",Ghe="[object Int8Array]",Fhe="[object Int16Array]",Lhe="[object Int32Array]",Uhe="[object Uint8Array]",Hhe="[object Uint8ClampedArray]",Khe="[object Uint16Array]",Yhe="[object Uint32Array]",xhe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jhe=/^\w*$/,Jhe=/^\./,qhe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Vhe=/[\\^$.*+?()[\]{}|]/g,zhe=/\\(\\)?/g,Whe=/^\[object .+?Constructor\]$/,Zhe=/^(?:0|[1-9]\d*)$/,Nt={};Nt[vhe]=Nt[Phe]=Nt[Ghe]=Nt[Fhe]=Nt[Lhe]=Nt[Uhe]=Nt[Hhe]=Nt[Khe]=Nt[Yhe]=!0;Nt[lf]=Nt[A_]=Nt[S1]=Nt[h1]=Nt[Cf]=Nt[d1]=Nt[u1]=Nt[B1]=Nt[pf]=Nt[f1]=Nt[bl]=Nt[Q1]=Nt[Ef]=Nt[y1]=Nt[t_]=!1;var D1=typeof global=="object"&&global&&global.Object===Object&&global,Xhe=typeof self=="object"&&self&&self.Object===Object&&self,rg=D1||Xhe||Function("return this")(),w1=typeof YC=="object"&&YC&&!YC.nodeType&&YC,o1=w1&&typeof Ml=="object"&&Ml&&!Ml.nodeType&&Ml,$he=o1&&o1.exports===w1,n1=$he&&D1.process,s1=(function(){try{return n1&&n1.binding("util")}catch{}})(),g1=s1&&s1.isTypedArray;function O1(n,r){for(var o=-1,i=r.length,e=n.length;++o-1}function bde(n,r){var o=this.__data__,i=ff(o,n);return i<0?o.push([n,r]):o[i][1]=r,this}ts.prototype.clear=Sde;ts.prototype.delete=Dde;ts.prototype.get=wde;ts.prototype.has=Ode;ts.prototype.set=bde;function rs(n){var r=-1,o=n?n.length:0;for(this.clear();++rt))return!1;var g=a.get(n);if(g&&a.get(r))return g==r;var c=-1,I=!0,E=e&uf?new df:void 0;for(a.set(n,r),a.set(r,n);++c-1&&n%1==0&&n-1&&n%1==0&&n<=C1}function JC(n){var r=typeof n;return!!n&&(r=="object"||r=="function")}function Sf(n){return!!n&&typeof n=="object"}function h_(n){return typeof n=="symbol"||Sf(n)&&Nl.call(n)==m1}var Eue=g1?rde(g1):qde;function Cue(n){return n==null?"":Aue(n)}function hue(n,r,o){var i=n==null?void 0:_1(n,r);return i===void 0?o:i}function due(n,r){return n!=null&&sue(n,r,Yde)}function g_(n){return E_(n)?M1(n):zde(n)}function uue(n){return E_(n)?M1(n,!0):Wde(n)}function Bue(n,r){return n==null?{}:$de(n,aue(n),Vde(r))}function fue(n){return n}function Que(n){return yf(n)?Ade(mf(n)):eue(n)}function U1(){return[]}Ml.exports=Bue});var h3=W((qC,Rl)=>{var yue=200,Z1="__lodash_hash_undefined__",mue=800,Sue=16,X1=9007199254740991,$1="[object Arguments]",Due="[object Array]",wue="[object AsyncFunction]",Oue="[object Boolean]",bue="[object Date]",Mue="[object Error]",e3="[object Function]",_ue="[object GeneratorFunction]",Nue="[object Map]",Tue="[object Number]",Rue="[object Null]",A3="[object Object]",kue="[object Proxy]",vue="[object RegExp]",Pue="[object Set]",Gue="[object String]",Fue="[object Undefined]",Lue="[object WeakMap]",Uue="[object ArrayBuffer]",Hue="[object DataView]",Kue="[object Float32Array]",Yue="[object Float64Array]",xue="[object Int8Array]",jue="[object Int16Array]",Jue="[object Int32Array]",que="[object Uint8Array]",Vue="[object Uint8ClampedArray]",zue="[object Uint16Array]",Wue="[object Uint32Array]",Zue=/[\\^$.*+?()[\]{}|]/g,Xue=/^\[object .+?Constructor\]$/,$ue=/^(?:0|[1-9]\d*)$/,Tt={};Tt[Kue]=Tt[Yue]=Tt[xue]=Tt[jue]=Tt[Jue]=Tt[que]=Tt[Vue]=Tt[zue]=Tt[Wue]=!0;Tt[$1]=Tt[Due]=Tt[Uue]=Tt[Oue]=Tt[Hue]=Tt[bue]=Tt[Mue]=Tt[e3]=Tt[Nue]=Tt[Tue]=Tt[A3]=Tt[vue]=Tt[Pue]=Tt[Gue]=Tt[Lue]=!1;var t3=typeof global=="object"&&global&&global.Object===Object&&global,eBe=typeof self=="object"&&self&&self.Object===Object&&self,WC=t3||eBe||Function("return this")(),r3=typeof qC=="object"&&qC&&!qC.nodeType&&qC,VC=r3&&typeof Rl=="object"&&Rl&&!Rl.nodeType&&Rl,a3=VC&&VC.exports===r3,d_=a3&&t3.process,K1=(function(){try{var n=VC&&VC.require&&VC.require("util").types;return n||d_&&d_.binding&&d_.binding("util")}catch{}})(),Y1=K1&&K1.isTypedArray;function ABe(n,r,o){switch(o.length){case 0:return n.call(r);case 1:return n.call(r,o[0]);case 2:return n.call(r,o[0],o[1]);case 3:return n.call(r,o[0],o[1],o[2])}return n.apply(r,o)}function tBe(n,r){for(var o=-1,i=Array(n);++o-1}function SBe(n,r){var o=this.__data__,i=Mf(o,n);return i<0?(++this.size,o.push([n,r])):o[i][1]=r,this}is.prototype.clear=fBe;is.prototype.delete=QBe;is.prototype.get=yBe;is.prototype.has=mBe;is.prototype.set=SBe;function kl(n){var r=-1,o=n==null?0:n.length;for(this.clear();++r1?o[e-1]:void 0,A=e>2?o[2]:void 0;for(a=n.length>3&&typeof a=="function"?(e--,a):void 0,A&&$Be(o[0],o[1],A)&&(a=e<3?void 0:a,e=1),r=Object(r);++i-1&&n%1==0&&n0){if(++r>=mue)return arguments[0]}else r=0;return n.apply(void 0,arguments)}}function nfe(n){if(n!=null){try{return bf.call(n)}catch{}try{return n+""}catch{}}return""}function Tf(n,r){return n===r||n!==n&&r!==r}var Q_=W1((function(){return arguments})())?W1:function(n){return ZC(n)&&as.call(n,"callee")&&!cBe.call(n,"callee")},y_=Array.isArray;function D_(n){return n!=null&&l3(n.length)&&!w_(n)}function sfe(n){return ZC(n)&&D_(n)}var I3=lBe||pfe;function w_(n){if(!Nc(n))return!1;var r=_f(n);return r==e3||r==_ue||r==wue||r==kue}function l3(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=X1}function Nc(n){var r=typeof n;return n!=null&&(r=="object"||r=="function")}function ZC(n){return n!=null&&typeof n=="object"}function gfe(n){if(!ZC(n)||_f(n)!=A3)return!1;var r=o3(n);if(r===null)return!0;var o=as.call(r,"constructor")&&r.constructor;return typeof o=="function"&&o instanceof o&&bf.call(o)==sBe}var p3=Y1?rBe(Y1):LBe;function cfe(n){return VBe(n,E3(n))}function E3(n){return D_(n)?vBe(n,!0):UBe(n)}var Ife=zBe(function(n,r,o){s3(n,r,o)});function lfe(n){return function(){return n}}function C3(n){return n}function pfe(){return!1}Rl.exports=Ife});var os=W((s5e,B3)=>{"use strict";var d3=["nodebuffer","arraybuffer","fragments"],u3=typeof Blob<"u";u3&&d3.push("blob");B3.exports={BINARY_TYPES:d3,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:u3,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var XC=W((g5e,Rf)=>{"use strict";var{EMPTY_BUFFER:Efe}=os(),O_=Buffer[Symbol.species];function Cfe(n,r){if(n.length===0)return Efe;if(n.length===1)return n[0];let o=Buffer.allocUnsafe(r),i=0;for(let e=0;e{"use strict";var y3=Symbol("kDone"),M_=Symbol("kRun"),__=class{constructor(r){this[y3]=()=>{this.pending--,this[M_]()},this.concurrency=r||1/0,this.jobs=[],this.pending=0}add(r){this.jobs.push(r),this[M_]()}[M_](){if(this.pending!==this.concurrency&&this.jobs.length){let r=this.jobs.shift();this.pending++,r(this[y3])}}};m3.exports=__});var Fl=W((I5e,b3)=>{"use strict";var $C=We("zlib"),D3=XC(),dfe=S3(),{kStatusCode:w3}=os(),ufe=Buffer[Symbol.species],Bfe=Buffer.from([0,0,255,255]),vf=Symbol("permessage-deflate"),ns=Symbol("total-length"),Pl=Symbol("callback"),ag=Symbol("buffers"),Gl=Symbol("error"),kf,N_=class{constructor(r){if(this._options=r||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._maxPayload=this._options.maxPayload|0,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,!kf){let o=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;kf=new dfe(o)}}static get extensionName(){return"permessage-deflate"}offer(){let r={};return this._options.serverNoContextTakeover&&(r.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(r.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(r.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?r.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(r.client_max_window_bits=!0),r}accept(r){return r=this.normalizeParams(r),this.params=this._isServer?this.acceptAsServer(r):this.acceptAsClient(r),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let r=this._deflate[Pl];this._deflate.close(),this._deflate=null,r&&r(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(r){let o=this._options,i=r.find(e=>!(o.serverNoContextTakeover===!1&&e.server_no_context_takeover||e.server_max_window_bits&&(o.serverMaxWindowBits===!1||typeof o.serverMaxWindowBits=="number"&&o.serverMaxWindowBits>e.server_max_window_bits)||typeof o.clientMaxWindowBits=="number"&&(typeof e.client_max_window_bits=="number"?o.clientMaxWindowBits>e.client_max_window_bits:!e.client_max_window_bits)));if(!i)throw new Error("None of the extension offers can be accepted");return o.serverNoContextTakeover&&(i.server_no_context_takeover=!0),o.clientNoContextTakeover&&(i.client_no_context_takeover=!0),typeof o.serverMaxWindowBits=="number"&&(i.server_max_window_bits=o.serverMaxWindowBits),typeof o.clientMaxWindowBits=="number"?i.client_max_window_bits=o.clientMaxWindowBits:(i.client_max_window_bits===!0||o.clientMaxWindowBits===!1)&&delete i.client_max_window_bits,i}acceptAsClient(r){let o=r[0];if(this._options.clientNoContextTakeover===!1&&o.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!o.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(o.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&o.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return o}normalizeParams(r){return r.forEach(o=>{Object.keys(o).forEach(i=>{let e=o[i];if(e.length>1)throw new Error(`Parameter "${i}" must have only a single value`);if(e=e[0],i==="client_max_window_bits"){if(e!==!0){let a=+e;if(!Number.isInteger(a)||a<8||a>15)throw new TypeError(`Invalid value for parameter "${i}": ${e}`);e=a}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${i}": ${e}`)}else if(i==="server_max_window_bits"){let a=+e;if(!Number.isInteger(a)||a<8||a>15)throw new TypeError(`Invalid value for parameter "${i}": ${e}`);e=a}else if(i==="client_no_context_takeover"||i==="server_no_context_takeover"){if(e!==!0)throw new TypeError(`Invalid value for parameter "${i}": ${e}`)}else throw new Error(`Unknown parameter "${i}"`);o[i]=e})}),r}decompress(r,o,i){kf.add(e=>{this._decompress(r,o,(a,A)=>{e(),i(a,A)})})}compress(r,o,i){kf.add(e=>{this._compress(r,o,(a,A)=>{e(),i(a,A)})})}_decompress(r,o,i){let e=this._isServer?"client":"server";if(!this._inflate){let a=`${e}_max_window_bits`,A=typeof this.params[a]!="number"?$C.Z_DEFAULT_WINDOWBITS:this.params[a];this._inflate=$C.createInflateRaw({...this._options.zlibInflateOptions,windowBits:A}),this._inflate[vf]=this,this._inflate[ns]=0,this._inflate[ag]=[],this._inflate.on("error",Qfe),this._inflate.on("data",O3)}this._inflate[Pl]=i,this._inflate.write(r),o&&this._inflate.write(Bfe),this._inflate.flush(()=>{let a=this._inflate[Gl];if(a){this._inflate.close(),this._inflate=null,i(a);return}let A=D3.concat(this._inflate[ag],this._inflate[ns]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[ns]=0,this._inflate[ag]=[],o&&this.params[`${e}_no_context_takeover`]&&this._inflate.reset()),i(null,A)})}_compress(r,o,i){let e=this._isServer?"server":"client";if(!this._deflate){let a=`${e}_max_window_bits`,A=typeof this.params[a]!="number"?$C.Z_DEFAULT_WINDOWBITS:this.params[a];this._deflate=$C.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:A}),this._deflate[ns]=0,this._deflate[ag]=[],this._deflate.on("data",ffe)}this._deflate[Pl]=i,this._deflate.write(r),this._deflate.flush($C.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let a=D3.concat(this._deflate[ag],this._deflate[ns]);o&&(a=new ufe(a.buffer,a.byteOffset,a.length-4)),this._deflate[Pl]=null,this._deflate[ns]=0,this._deflate[ag]=[],o&&this.params[`${e}_no_context_takeover`]&&this._deflate.reset(),i(null,a)})}};b3.exports=N_;function ffe(n){this[ag].push(n),this[ns]+=n.length}function O3(n){if(this[ns]+=n.length,this[vf]._maxPayload<1||this[ns]<=this[vf]._maxPayload){this[ag].push(n);return}this[Gl]=new RangeError("Max payload size exceeded"),this[Gl].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Gl][w3]=1009,this.removeListener("data",O3),this.reset()}function Qfe(n){if(this[vf]._inflate=null,this[Gl]){this[Pl](this[Gl]);return}n[w3]=1007,this[Pl](n)}});var Ll=W((l5e,Pf)=>{"use strict";var{isUtf8:M3}=We("buffer"),{hasBlob:yfe}=os(),mfe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function Sfe(n){return n>=1e3&&n<=1014&&n!==1004&&n!==1005&&n!==1006||n>=3e3&&n<=4999}function T_(n){let r=n.length,o=0;for(;o=r||(n[o+1]&192)!==128||(n[o+2]&192)!==128||n[o]===224&&(n[o+1]&224)===128||n[o]===237&&(n[o+1]&224)===160)return!1;o+=3}else if((n[o]&248)===240){if(o+3>=r||(n[o+1]&192)!==128||(n[o+2]&192)!==128||(n[o+3]&192)!==128||n[o]===240&&(n[o+1]&240)===128||n[o]===244&&n[o+1]>143||n[o]>244)return!1;o+=4}else return!1;return!0}function Dfe(n){return yfe&&typeof n=="object"&&typeof n.arrayBuffer=="function"&&typeof n.type=="string"&&typeof n.stream=="function"&&(n[Symbol.toStringTag]==="Blob"||n[Symbol.toStringTag]==="File")}Pf.exports={isBlob:Dfe,isValidStatusCode:Sfe,isValidUTF8:T_,tokenChars:mfe};if(M3)Pf.exports.isValidUTF8=function(n){return n.length<24?T_(n):M3(n)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let n=We("utf-8-validate");Pf.exports.isValidUTF8=function(r){return r.length<32?T_(r):n(r)}}catch{}});var G_=W((p5e,P3)=>{"use strict";var{Writable:wfe}=We("stream"),_3=Fl(),{BINARY_TYPES:Ofe,EMPTY_BUFFER:N3,kStatusCode:bfe,kWebSocket:Mfe}=os(),{concat:R_,toArrayBuffer:_fe,unmask:Nfe}=XC(),{isValidStatusCode:Tfe,isValidUTF8:T3}=Ll(),Gf=Buffer[Symbol.species],Vi=0,R3=1,k3=2,v3=3,k_=4,v_=5,Ff=6,P_=class extends wfe{constructor(r={}){super(),this._allowSynchronousEvents=r.allowSynchronousEvents!==void 0?r.allowSynchronousEvents:!0,this._binaryType=r.binaryType||Ofe[0],this._extensions=r.extensions||{},this._isServer=!!r.isServer,this._maxBufferedChunks=r.maxBufferedChunks|0,this._maxFragments=r.maxFragments|0,this._maxPayload=r.maxPayload|0,this._skipUTF8Validation=!!r.skipUTF8Validation,this[Mfe]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._numFragments=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=Vi}_write(r,o,i){if(this._opcode===8&&this._state==Vi)return i();if(this._maxBufferedChunks>0&&this._buffers.length>=this._maxBufferedChunks){i(this.createError(RangeError,"Too many buffered chunks",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS"));return}this._bufferedBytes+=r.length,this._buffers.push(r),this.startLoop(i)}consume(r){if(this._bufferedBytes-=r,r===this._buffers[0].length)return this._buffers.shift();if(r=i.length?o.set(this._buffers.shift(),e):(o.set(new Uint8Array(i.buffer,i.byteOffset,r),e),this._buffers[0]=new Gf(i.buffer,i.byteOffset+r,i.length-r)),r-=i.length}while(r>0);return o}startLoop(r){this._loop=!0;do switch(this._state){case Vi:this.getInfo(r);break;case R3:this.getPayloadLength16(r);break;case k3:this.getPayloadLength64(r);break;case v3:this.getMask();break;case k_:this.getData(r);break;case v_:case Ff:this._loop=!1;return}while(this._loop);this._errored||r()}getInfo(r){if(this._bufferedBytes<2){this._loop=!1;return}let o=this.consume(2);if((o[0]&48)!==0){let e=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");r(e);return}let i=(o[0]&64)===64;if(i&&!this._extensions[_3.extensionName]){let e=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");r(e);return}if(this._fin=(o[0]&128)===128,this._opcode=o[0]&15,this._payloadLength=o[1]&127,this._opcode===0){if(i){let e=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");r(e);return}if(!this._fragmented){let e=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");r(e);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let e=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");r(e);return}this._compressed=i}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let e=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");r(e);return}if(i){let e=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");r(e);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let e=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");r(e);return}}else{let e=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");r(e);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(o[1]&128)===128,this._isServer){if(!this._masked){let e=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");r(e);return}}else if(this._masked){let e=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");r(e);return}this._payloadLength===126?this._state=R3:this._payloadLength===127?this._state=k3:this.haveLength(r)}getPayloadLength16(r){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(r)}getPayloadLength64(r){if(this._bufferedBytes<8){this._loop=!1;return}let o=this.consume(8),i=o.readUInt32BE(0);if(i>Math.pow(2,21)-1){let e=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");r(e);return}this._payloadLength=i*Math.pow(2,32)+o.readUInt32BE(4),this.haveLength(r)}haveLength(r){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let o=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");r(o);return}this._masked?this._state=v3:this._state=k_}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=k_}getData(r){let o=N3;if(this._payloadLength){if(this._bufferedBytes7){this.controlMessage(o,r);return}if(this._maxFragments>0&&++this._numFragments>this._maxFragments){let i=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");r(i);return}if(this._compressed){this._state=v_,this.decompress(o,r);return}o.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(o)),this.dataMessage(r)}decompress(r,o){this._extensions[_3.extensionName].decompress(r,this._fin,(e,a)=>{if(e)return o(e);if(a.length){if(this._messageLength+=a.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let A=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");o(A);return}this._fragments.push(a)}this.dataMessage(o),this._state===Vi&&this.startLoop(o)})}dataMessage(r){if(!this._fin){this._state=Vi;return}let o=this._messageLength,i=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._numFragments=0,this._fragments=[],this._opcode===2){let e;this._binaryType==="nodebuffer"?e=R_(i,o):this._binaryType==="arraybuffer"?e=_fe(R_(i,o)):this._binaryType==="blob"?e=new Blob(i):e=i,this._allowSynchronousEvents?(this.emit("message",e,!0),this._state=Vi):(this._state=Ff,setImmediate(()=>{this.emit("message",e,!0),this._state=Vi,this.startLoop(r)}))}else{let e=R_(i,o);if(!this._skipUTF8Validation&&!T3(e)){let a=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");r(a);return}this._state===v_||this._allowSynchronousEvents?(this.emit("message",e,!1),this._state=Vi):(this._state=Ff,setImmediate(()=>{this.emit("message",e,!1),this._state=Vi,this.startLoop(r)}))}}controlMessage(r,o){if(this._opcode===8){if(r.length===0)this._loop=!1,this.emit("conclude",1005,N3),this.end();else{let i=r.readUInt16BE(0);if(!Tfe(i)){let a=this.createError(RangeError,`invalid status code ${i}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");o(a);return}let e=new Gf(r.buffer,r.byteOffset+2,r.length-2);if(!this._skipUTF8Validation&&!T3(e)){let a=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");o(a);return}this._loop=!1,this.emit("conclude",i,e),this.end()}this._state=Vi;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",r),this._state=Vi):(this._state=Ff,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",r),this._state=Vi,this.startLoop(o)}))}createError(r,o,i,e,a){this._loop=!1,this._errored=!0;let A=new r(i?`Invalid WebSocket frame: ${o}`:o);return Error.captureStackTrace(A,this.createError),A.code=a,A[bfe]=e,A}};P3.exports=P_});var U_=W((C5e,L3)=>{"use strict";var{Duplex:E5e}=We("stream"),{randomFillSync:Rfe}=We("crypto"),{types:{isUint8Array:kfe}}=We("util"),G3=Fl(),{EMPTY_BUFFER:vfe,kWebSocket:Pfe,NOOP:Gfe}=os(),{isBlob:Ul,isValidStatusCode:Ffe}=Ll(),{mask:F3,toBuffer:Tc}=XC(),zi=Symbol("kByteLength"),Lfe=Buffer.alloc(4),Lf=8*1024,Rc,Hl=Lf,To=0,Ufe=1,Hfe=2,F_=class n{constructor(r,o,i){this._extensions=o||{},i&&(this._generateMask=i,this._maskBuffer=Buffer.alloc(4)),this._socket=r,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=To,this.onerror=Gfe,this[Pfe]=void 0}static frame(r,o){let i,e=!1,a=2,A=!1;o.mask&&(i=o.maskBuffer||Lfe,o.generateMask?o.generateMask(i):(Hl===Lf&&(Rc===void 0&&(Rc=Buffer.alloc(Lf)),Rfe(Rc,0,Lf),Hl=0),i[0]=Rc[Hl++],i[1]=Rc[Hl++],i[2]=Rc[Hl++],i[3]=Rc[Hl++]),A=(i[0]|i[1]|i[2]|i[3])===0,a=6);let t;typeof r=="string"?(!o.mask||A)&&o[zi]!==void 0?t=o[zi]:(r=Buffer.from(r),t=r.length):(t=r.length,e=o.mask&&o.readOnly&&!A);let s=t;t>=65536?(a+=8,s=127):t>125&&(a+=2,s=126);let g=Buffer.allocUnsafe(e?t+a:a);return g[0]=o.fin?o.opcode|128:o.opcode,o.rsv1&&(g[0]|=64),g[1]=s,s===126?g.writeUInt16BE(t,2):s===127&&(g[2]=g[3]=0,g.writeUIntBE(t,4,6)),o.mask?(g[1]|=128,g[a-4]=i[0],g[a-3]=i[1],g[a-2]=i[2],g[a-1]=i[3],A?[g,r]:e?(F3(r,i,g,a,t),[g]):(F3(r,i,r,0,t),[g,r])):[g,r]}close(r,o,i,e){let a;if(r===void 0)a=vfe;else{if(typeof r!="number"||!Ffe(r))throw new TypeError("First argument must be a valid error code number");if(o===void 0||!o.length)a=Buffer.allocUnsafe(2),a.writeUInt16BE(r,0);else{let t=Buffer.byteLength(o);if(t>123)throw new RangeError("The message must not be greater than 123 bytes");if(a=Buffer.allocUnsafe(2+t),a.writeUInt16BE(r,0),typeof o=="string")a.write(o,2);else if(kfe(o))a.set(o,2);else throw new TypeError("Second argument must be a string or a Uint8Array")}}let A={[zi]:a.length,fin:!0,generateMask:this._generateMask,mask:i,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==To?this.enqueue([this.dispatch,a,!1,A,e]):this.sendFrame(n.frame(a,A),e)}ping(r,o,i){let e,a;if(typeof r=="string"?(e=Buffer.byteLength(r),a=!1):Ul(r)?(e=r.size,a=!1):(r=Tc(r),e=r.length,a=Tc.readOnly),e>125)throw new RangeError("The data size must not be greater than 125 bytes");let A={[zi]:e,fin:!0,generateMask:this._generateMask,mask:o,maskBuffer:this._maskBuffer,opcode:9,readOnly:a,rsv1:!1};Ul(r)?this._state!==To?this.enqueue([this.getBlobData,r,!1,A,i]):this.getBlobData(r,!1,A,i):this._state!==To?this.enqueue([this.dispatch,r,!1,A,i]):this.sendFrame(n.frame(r,A),i)}pong(r,o,i){let e,a;if(typeof r=="string"?(e=Buffer.byteLength(r),a=!1):Ul(r)?(e=r.size,a=!1):(r=Tc(r),e=r.length,a=Tc.readOnly),e>125)throw new RangeError("The data size must not be greater than 125 bytes");let A={[zi]:e,fin:!0,generateMask:this._generateMask,mask:o,maskBuffer:this._maskBuffer,opcode:10,readOnly:a,rsv1:!1};Ul(r)?this._state!==To?this.enqueue([this.getBlobData,r,!1,A,i]):this.getBlobData(r,!1,A,i):this._state!==To?this.enqueue([this.dispatch,r,!1,A,i]):this.sendFrame(n.frame(r,A),i)}send(r,o,i){let e=this._extensions[G3.extensionName],a=o.binary?2:1,A=o.compress,t,s;typeof r=="string"?(t=Buffer.byteLength(r),s=!1):Ul(r)?(t=r.size,s=!1):(r=Tc(r),t=r.length,s=Tc.readOnly),this._firstFragment?(this._firstFragment=!1,A&&e&&e.params[e._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(A=t>=e._threshold),this._compress=A):(A=!1,a=0),o.fin&&(this._firstFragment=!0);let g={[zi]:t,fin:o.fin,generateMask:this._generateMask,mask:o.mask,maskBuffer:this._maskBuffer,opcode:a,readOnly:s,rsv1:A};Ul(r)?this._state!==To?this.enqueue([this.getBlobData,r,this._compress,g,i]):this.getBlobData(r,this._compress,g,i):this._state!==To?this.enqueue([this.dispatch,r,this._compress,g,i]):this.dispatch(r,this._compress,g,i)}getBlobData(r,o,i,e){this._bufferedBytes+=i[zi],this._state=Hfe,r.arrayBuffer().then(a=>{if(this._socket.destroyed){let t=new Error("The socket was closed while the blob was being read");process.nextTick(L_,this,t,e);return}this._bufferedBytes-=i[zi];let A=Tc(a);o?this.dispatch(A,o,i,e):(this._state=To,this.sendFrame(n.frame(A,i),e),this.dequeue())}).catch(a=>{process.nextTick(Kfe,this,a,e)})}dispatch(r,o,i,e){if(!o){this.sendFrame(n.frame(r,i),e);return}let a=this._extensions[G3.extensionName];this._bufferedBytes+=i[zi],this._state=Ufe,a.compress(r,i.fin,(A,t)=>{if(this._socket.destroyed){let s=new Error("The socket was closed while data was being compressed");L_(this,s,e);return}this._bufferedBytes-=i[zi],this._state=To,i.readOnly=!1,this.sendFrame(n.frame(t,i),e),this.dequeue()})}dequeue(){for(;this._state===To&&this._queue.length;){let r=this._queue.shift();this._bufferedBytes-=r[3][zi],Reflect.apply(r[0],this,r.slice(1))}}enqueue(r){this._bufferedBytes+=r[3][zi],this._queue.push(r)}sendFrame(r,o){r.length===2?(this._socket.cork(),this._socket.write(r[0]),this._socket.write(r[1],o),this._socket.uncork()):this._socket.write(r[0],o)}};L3.exports=F_;function L_(n,r,o){typeof o=="function"&&o(r);for(let i=0;i{"use strict";var{kForOnEventAttribute:eh,kListener:H_}=os(),U3=Symbol("kCode"),H3=Symbol("kData"),K3=Symbol("kError"),Y3=Symbol("kMessage"),x3=Symbol("kReason"),Kl=Symbol("kTarget"),j3=Symbol("kType"),J3=Symbol("kWasClean"),ss=class{constructor(r){this[Kl]=null,this[j3]=r}get target(){return this[Kl]}get type(){return this[j3]}};Object.defineProperty(ss.prototype,"target",{enumerable:!0});Object.defineProperty(ss.prototype,"type",{enumerable:!0});var kc=class extends ss{constructor(r,o={}){super(r),this[U3]=o.code===void 0?0:o.code,this[x3]=o.reason===void 0?"":o.reason,this[J3]=o.wasClean===void 0?!1:o.wasClean}get code(){return this[U3]}get reason(){return this[x3]}get wasClean(){return this[J3]}};Object.defineProperty(kc.prototype,"code",{enumerable:!0});Object.defineProperty(kc.prototype,"reason",{enumerable:!0});Object.defineProperty(kc.prototype,"wasClean",{enumerable:!0});var Yl=class extends ss{constructor(r,o={}){super(r),this[K3]=o.error===void 0?null:o.error,this[Y3]=o.message===void 0?"":o.message}get error(){return this[K3]}get message(){return this[Y3]}};Object.defineProperty(Yl.prototype,"error",{enumerable:!0});Object.defineProperty(Yl.prototype,"message",{enumerable:!0});var Ah=class extends ss{constructor(r,o={}){super(r),this[H3]=o.data===void 0?null:o.data}get data(){return this[H3]}};Object.defineProperty(Ah.prototype,"data",{enumerable:!0});var Yfe={addEventListener(n,r,o={}){for(let e of this.listeners(n))if(!o[eh]&&e[H_]===r&&!e[eh])return;let i;if(n==="message")i=function(a,A){let t=new Ah("message",{data:A?a:a.toString()});t[Kl]=this,Uf(r,this,t)};else if(n==="close")i=function(a,A){let t=new kc("close",{code:a,reason:A.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});t[Kl]=this,Uf(r,this,t)};else if(n==="error")i=function(a){let A=new Yl("error",{error:a,message:a.message});A[Kl]=this,Uf(r,this,A)};else if(n==="open")i=function(){let a=new ss("open");a[Kl]=this,Uf(r,this,a)};else return;i[eh]=!!o[eh],i[H_]=r,o.once?this.once(n,i):this.on(n,i)},removeEventListener(n,r){for(let o of this.listeners(n))if(o[H_]===r&&!o[eh]){this.removeListener(n,o);break}}};q3.exports={CloseEvent:kc,ErrorEvent:Yl,Event:ss,EventTarget:Yfe,MessageEvent:Ah};function Uf(n,r,o){typeof n=="object"&&n.handleEvent?n.handleEvent.call(n,o):n.call(r,o)}});var Hf=W((d5e,z3)=>{"use strict";var{tokenChars:th}=Ll();function ln(n,r,o){n[r]===void 0?n[r]=[o]:n[r].push(o)}function xfe(n){let r=Object.create(null),o=Object.create(null),i=!1,e=!1,a=!1,A,t,s=-1,g=-1,c=-1,I=0;for(;I{let o=n[r];return Array.isArray(o)||(o=[o]),o.map(i=>[r].concat(Object.keys(i).map(e=>{let a=i[e];return Array.isArray(a)||(a=[a]),a.map(A=>A===!0?e:`${e}=${A}`).join("; ")})).join("; ")).join(", ")}).join(", ")}z3.exports={format:jfe,parse:xfe}});var jf=W((f5e,nj)=>{"use strict";var Jfe=We("events"),qfe=We("https"),Vfe=We("http"),X3=We("net"),zfe=We("tls"),{randomBytes:Wfe,createHash:Zfe}=We("crypto"),{Duplex:u5e,Readable:B5e}=We("stream"),{URL:K_}=We("url"),ig=Fl(),Xfe=G_(),$fe=U_(),{isBlob:eQe}=Ll(),{BINARY_TYPES:W3,CLOSE_TIMEOUT:AQe,EMPTY_BUFFER:Kf,GUID:tQe,kForOnEventAttribute:Y_,kListener:rQe,kStatusCode:aQe,kWebSocket:Hr,NOOP:$3}=os(),{EventTarget:{addEventListener:iQe,removeEventListener:oQe}}=V3(),{format:nQe,parse:sQe}=Hf(),{toBuffer:gQe}=XC(),ej=Symbol("kAborted"),x_=[8,13],gs=["CONNECTING","OPEN","CLOSING","CLOSED"],cQe=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,Lt=class n extends Jfe{constructor(r,o,i){super(),this._binaryType=W3[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=Kf,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=n.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,r!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,o===void 0?o=[]:Array.isArray(o)||(typeof o=="object"&&o!==null?(i=o,o=[]):o=[o]),Aj(this,r,o,i)):(this._autoPong=i.autoPong,this._closeTimeout=i.closeTimeout,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(r){W3.includes(r)&&(this._binaryType=r,this._receiver&&(this._receiver._binaryType=r))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(r,o,i){let e=new Xfe({allowSynchronousEvents:i.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxBufferedChunks:i.maxBufferedChunks,maxFragments:i.maxFragments,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation}),a=new $fe(r,this._extensions,i.generateMask);this._receiver=e,this._sender=a,this._socket=r,e[Hr]=this,a[Hr]=this,r[Hr]=this,e.on("conclude",pQe),e.on("drain",EQe),e.on("error",CQe),e.on("message",hQe),e.on("ping",dQe),e.on("pong",uQe),a.onerror=BQe,r.setTimeout&&r.setTimeout(0),r.setNoDelay&&r.setNoDelay(),o.length>0&&r.unshift(o),r.on("close",aj),r.on("data",xf),r.on("end",ij),r.on("error",oj),this._readyState=n.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=n.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[ig.extensionName]&&this._extensions[ig.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=n.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(r,o){if(this.readyState!==n.CLOSED){if(this.readyState===n.CONNECTING){fi(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===n.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=n.CLOSING,this._sender.close(r,o,!this._isServer,i=>{i||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),rj(this)}}pause(){this.readyState===n.CONNECTING||this.readyState===n.CLOSED||(this._paused=!0,this._socket.pause())}ping(r,o,i){if(this.readyState===n.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof r=="function"?(i=r,r=o=void 0):typeof o=="function"&&(i=o,o=void 0),typeof r=="number"&&(r=r.toString()),this.readyState!==n.OPEN){j_(this,r,i);return}o===void 0&&(o=!this._isServer),this._sender.ping(r||Kf,o,i)}pong(r,o,i){if(this.readyState===n.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof r=="function"?(i=r,r=o=void 0):typeof o=="function"&&(i=o,o=void 0),typeof r=="number"&&(r=r.toString()),this.readyState!==n.OPEN){j_(this,r,i);return}o===void 0&&(o=!this._isServer),this._sender.pong(r||Kf,o,i)}resume(){this.readyState===n.CONNECTING||this.readyState===n.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(r,o,i){if(this.readyState===n.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof o=="function"&&(i=o,o={}),typeof r=="number"&&(r=r.toString()),this.readyState!==n.OPEN){j_(this,r,i);return}let e={binary:typeof r!="string",mask:!this._isServer,compress:!0,fin:!0,...o};this._extensions[ig.extensionName]||(e.compress=!1),this._sender.send(r||Kf,e,i)}terminate(){if(this.readyState!==n.CLOSED){if(this.readyState===n.CONNECTING){fi(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=n.CLOSING,this._socket.destroy())}}};Object.defineProperty(Lt,"CONNECTING",{enumerable:!0,value:gs.indexOf("CONNECTING")});Object.defineProperty(Lt.prototype,"CONNECTING",{enumerable:!0,value:gs.indexOf("CONNECTING")});Object.defineProperty(Lt,"OPEN",{enumerable:!0,value:gs.indexOf("OPEN")});Object.defineProperty(Lt.prototype,"OPEN",{enumerable:!0,value:gs.indexOf("OPEN")});Object.defineProperty(Lt,"CLOSING",{enumerable:!0,value:gs.indexOf("CLOSING")});Object.defineProperty(Lt.prototype,"CLOSING",{enumerable:!0,value:gs.indexOf("CLOSING")});Object.defineProperty(Lt,"CLOSED",{enumerable:!0,value:gs.indexOf("CLOSED")});Object.defineProperty(Lt.prototype,"CLOSED",{enumerable:!0,value:gs.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(n=>{Object.defineProperty(Lt.prototype,n,{enumerable:!0})});["open","error","close","message"].forEach(n=>{Object.defineProperty(Lt.prototype,`on${n}`,{enumerable:!0,get(){for(let r of this.listeners(n))if(r[Y_])return r[rQe];return null},set(r){for(let o of this.listeners(n))if(o[Y_]){this.removeListener(n,o);break}typeof r=="function"&&this.addEventListener(n,r,{[Y_]:!0})}})});Lt.prototype.addEventListener=iQe;Lt.prototype.removeEventListener=oQe;nj.exports=Lt;function Aj(n,r,o,i){let e={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:AQe,protocolVersion:x_[1],maxBufferedChunks:262144,maxFragments:16384,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...i,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(n._autoPong=e.autoPong,n._closeTimeout=e.closeTimeout,!x_.includes(e.protocolVersion))throw new RangeError(`Unsupported protocol version: ${e.protocolVersion} (supported versions: ${x_.join(", ")})`);let a;if(r instanceof K_)a=r;else try{a=new K_(r)}catch{throw new SyntaxError(`Invalid URL: ${r}`)}a.protocol==="http:"?a.protocol="ws:":a.protocol==="https:"&&(a.protocol="wss:"),n._url=a.href;let A=a.protocol==="wss:",t=a.protocol==="ws+unix:",s;if(a.protocol!=="ws:"&&!A&&!t?s=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:t&&!a.pathname?s="The URL's pathname is empty":a.hash&&(s="The URL contains a fragment identifier"),s){let Q=new SyntaxError(s);if(n._redirects===0)throw Q;Yf(n,Q);return}let g=A?443:80,c=Wfe(16).toString("base64"),I=A?qfe.request:Vfe.request,E=new Set,B;if(e.createConnection=e.createConnection||(A?lQe:IQe),e.defaultPort=e.defaultPort||g,e.port=a.port||g,e.host=a.hostname.startsWith("[")?a.hostname.slice(1,-1):a.hostname,e.headers={...e.headers,"Sec-WebSocket-Version":e.protocolVersion,"Sec-WebSocket-Key":c,Connection:"Upgrade",Upgrade:"websocket"},e.path=a.pathname+a.search,e.timeout=e.handshakeTimeout,e.perMessageDeflate&&(B=new ig({...e.perMessageDeflate,isServer:!1,maxPayload:e.maxPayload}),e.headers["Sec-WebSocket-Extensions"]=nQe({[ig.extensionName]:B.offer()})),o.length){for(let Q of o){if(typeof Q!="string"||!cQe.test(Q)||E.has(Q))throw new SyntaxError("An invalid or duplicated subprotocol was specified");E.add(Q)}e.headers["Sec-WebSocket-Protocol"]=o.join(",")}if(e.origin&&(e.protocolVersion<13?e.headers["Sec-WebSocket-Origin"]=e.origin:e.headers.Origin=e.origin),(a.username||a.password)&&(e.auth=`${a.username}:${a.password}`),t){let Q=e.path.split(":");e.socketPath=Q[0],e.path=Q[1]}let f;if(e.followRedirects){if(n._redirects===0){n._originalIpc=t,n._originalSecure=A,n._originalHostOrSocketPath=t?e.socketPath:a.host;let Q=i&&i.headers;if(i={...i,headers:{}},Q)for(let[y,m]of Object.entries(Q))i.headers[y.toLowerCase()]=m}else if(n.listenerCount("redirect")===0){let Q=t?n._originalIpc?e.socketPath===n._originalHostOrSocketPath:!1:n._originalIpc?!1:a.host===n._originalHostOrSocketPath;(!Q||n._originalSecure&&!A)&&(delete e.headers.authorization,delete e.headers.cookie,Q||delete e.headers.host,e.auth=void 0)}e.auth&&!i.headers.authorization&&(i.headers.authorization="Basic "+Buffer.from(e.auth).toString("base64")),f=n._req=I(e),n._redirects&&n.emit("redirect",n.url,f)}else f=n._req=I(e);e.timeout&&f.on("timeout",()=>{fi(n,f,"Opening handshake has timed out")}),f.on("error",Q=>{f===null||f[ej]||(f=n._req=null,Yf(n,Q))}),f.on("response",Q=>{let y=Q.headers.location,m=Q.statusCode;if(y&&e.followRedirects&&m>=300&&m<400){if(++n._redirects>e.maxRedirects){fi(n,f,"Maximum redirects exceeded");return}f.abort();let T;try{T=new K_(y,r)}catch{let P=new SyntaxError(`Invalid URL: ${y}`);Yf(n,P);return}Aj(n,T,o,i)}else n.emit("unexpected-response",f,Q)||fi(n,f,`Unexpected server response: ${Q.statusCode}`)}),f.on("upgrade",(Q,y,m)=>{if(n.emit("upgrade",Q),n.readyState!==Lt.CONNECTING)return;f=n._req=null;let T=Q.headers.upgrade;if(T===void 0||T.toLowerCase()!=="websocket"){fi(n,y,"Invalid Upgrade header");return}let _=Zfe("sha1").update(c+tQe).digest("base64");if(Q.headers["sec-websocket-accept"]!==_){fi(n,y,"Invalid Sec-WebSocket-Accept header");return}let P=Q.headers["sec-websocket-protocol"],Y;if(P!==void 0?E.size?E.has(P)||(Y="Server sent an invalid subprotocol"):Y="Server sent a subprotocol but none was requested":E.size&&(Y="Server sent no subprotocol"),Y){fi(n,y,Y);return}P&&(n._protocol=P);let j=Q.headers["sec-websocket-extensions"];if(j!==void 0){if(!B){fi(n,y,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let K;try{K=sQe(j)}catch{fi(n,y,"Invalid Sec-WebSocket-Extensions header");return}let q=Object.keys(K);if(q.length!==1||q[0]!==ig.extensionName){fi(n,y,"Server indicated an extension that was not requested");return}try{B.accept(K[ig.extensionName])}catch{fi(n,y,"Invalid Sec-WebSocket-Extensions header");return}n._extensions[ig.extensionName]=B}n.setSocket(y,m,{allowSynchronousEvents:e.allowSynchronousEvents,generateMask:e.generateMask,maxBufferedChunks:e.maxBufferedChunks,maxFragments:e.maxFragments,maxPayload:e.maxPayload,skipUTF8Validation:e.skipUTF8Validation})}),e.finishRequest?e.finishRequest(f,n):f.end()}function Yf(n,r){n._readyState=Lt.CLOSING,n._errorEmitted=!0,n.emit("error",r),n.emitClose()}function IQe(n){return n.path=n.socketPath,X3.connect(n)}function lQe(n){return n.path=void 0,!n.servername&&n.servername!==""&&(n.servername=X3.isIP(n.host)?"":n.host),zfe.connect(n)}function fi(n,r,o){n._readyState=Lt.CLOSING;let i=new Error(o);Error.captureStackTrace(i,fi),r.setHeader?(r[ej]=!0,r.abort(),r.socket&&!r.socket.destroyed&&r.socket.destroy(),process.nextTick(Yf,n,i)):(r.destroy(i),r.once("error",n.emit.bind(n,"error")),r.once("close",n.emitClose.bind(n)))}function j_(n,r,o){if(r){let i=eQe(r)?r.size:gQe(r).length;n._socket?n._sender._bufferedBytes+=i:n._bufferedAmount+=i}if(o){let i=new Error(`WebSocket is not open: readyState ${n.readyState} (${gs[n.readyState]})`);process.nextTick(o,i)}}function pQe(n,r){let o=this[Hr];o._closeFrameReceived=!0,o._closeMessage=r,o._closeCode=n,o._socket[Hr]!==void 0&&(o._socket.removeListener("data",xf),process.nextTick(tj,o._socket),n===1005?o.close():o.close(n,r))}function EQe(){let n=this[Hr];n.isPaused||n._socket.resume()}function CQe(n){let r=this[Hr];r._socket[Hr]!==void 0&&(r._socket.removeListener("data",xf),process.nextTick(tj,r._socket),r.close(n[aQe])),r._errorEmitted||(r._errorEmitted=!0,r.emit("error",n))}function Z3(){this[Hr].emitClose()}function hQe(n,r){this[Hr].emit("message",n,r)}function dQe(n){let r=this[Hr];r._autoPong&&r.pong(n,!this._isServer,$3),r.emit("ping",n)}function uQe(n){this[Hr].emit("pong",n)}function tj(n){n.resume()}function BQe(n){let r=this[Hr];r.readyState!==Lt.CLOSED&&(r.readyState===Lt.OPEN&&(r._readyState=Lt.CLOSING,rj(r)),this._socket.end(),r._errorEmitted||(r._errorEmitted=!0,r.emit("error",n)))}function rj(n){n._closeTimer=setTimeout(n._socket.destroy.bind(n._socket),n._closeTimeout)}function aj(){let n=this[Hr];if(this.removeListener("close",aj),this.removeListener("data",xf),this.removeListener("end",ij),n._readyState=Lt.CLOSING,!this._readableState.endEmitted&&!n._closeFrameReceived&&!n._receiver._writableState.errorEmitted&&this._readableState.length!==0){let r=this.read(this._readableState.length);n._receiver.write(r)}n._receiver.end(),this[Hr]=void 0,clearTimeout(n._closeTimer),n._receiver._writableState.finished||n._receiver._writableState.errorEmitted?n.emitClose():(n._receiver.on("error",Z3),n._receiver.on("finish",Z3))}function xf(n){this[Hr]._receiver.write(n)||this.pause()}function ij(){let n=this[Hr];n._readyState=Lt.CLOSING,n._receiver.end(),this.end()}function oj(){let n=this[Hr];this.removeListener("error",oj),this.on("error",$3),n&&(n._readyState=Lt.CLOSING,this.destroy())}});var Ij=W((y5e,cj)=>{"use strict";var Q5e=jf(),{Duplex:fQe}=We("stream");function sj(n){n.emit("close")}function QQe(){!this.destroyed&&this._writableState.finished&&this.destroy()}function gj(n){this.removeListener("error",gj),this.destroy(),this.listenerCount("error")===0&&this.emit("error",n)}function yQe(n,r){let o=!0,i=new fQe({...r,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return n.on("message",function(a,A){let t=!A&&i._readableState.objectMode?a.toString():a;i.push(t)||n.pause()}),n.once("error",function(a){i.destroyed||(o=!1,i.destroy(a))}),n.once("close",function(){i.destroyed||i.push(null)}),i._destroy=function(e,a){if(n.readyState===n.CLOSED){a(e),process.nextTick(sj,i);return}let A=!1;n.once("error",function(s){A=!0,a(s)}),n.once("close",function(){A||a(e),process.nextTick(sj,i)}),o&&n.terminate()},i._final=function(e){if(n.readyState===n.CONNECTING){n.once("open",function(){i._final(e)});return}n._socket!==null&&(n._socket._writableState.finished?(e(),i._readableState.endEmitted&&i.destroy()):(n._socket.once("finish",function(){e()}),n.close()))},i._read=function(){n.isPaused&&n.resume()},i._write=function(e,a,A){if(n.readyState===n.CONNECTING){n.once("open",function(){i._write(e,a,A)});return}n.send(e,A)},i.on("end",QQe),i.on("error",gj),i}cj.exports=yQe});var J_=W((m5e,lj)=>{"use strict";var{tokenChars:mQe}=Ll();function SQe(n){let r=new Set,o=-1,i=-1,e=0;for(e;e{"use strict";var DQe=We("events"),Jf=We("http"),{Duplex:S5e}=We("stream"),{createHash:wQe}=We("crypto"),pj=Hf(),vc=Fl(),OQe=J_(),bQe=jf(),{CLOSE_TIMEOUT:MQe,GUID:_Qe,kWebSocket:NQe}=os(),TQe=/^[+/0-9A-Za-z]{22}==$/,Ej=0,Cj=1,dj=2,q_=class extends DQe{constructor(r,o){if(super(),r={allowSynchronousEvents:!0,autoPong:!0,maxBufferedChunks:256*1024,maxFragments:16*1024,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:MQe,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:bQe,...r},r.port==null&&!r.server&&!r.noServer||r.port!=null&&(r.server||r.noServer)||r.server&&r.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(r.port!=null?(this._server=Jf.createServer((i,e)=>{let a=Jf.STATUS_CODES[426];e.writeHead(426,{"Content-Length":a.length,"Content-Type":"text/plain"}),e.end(a)}),this._server.listen(r.port,r.host,r.backlog,o)):r.server&&(this._server=r.server),this._server){let i=this.emit.bind(this,"connection");this._removeListeners=RQe(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(e,a,A)=>{this.handleUpgrade(e,a,A,i)}})}r.perMessageDeflate===!0&&(r.perMessageDeflate={}),r.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=r,this._state=Ej}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(r){if(this._state===dj){r&&this.once("close",()=>{r(new Error("The server is not running"))}),process.nextTick(rh,this);return}if(r&&this.once("close",r),this._state!==Cj)if(this._state=Cj,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(rh,this):process.nextTick(rh,this);else{let o=this._server;this._removeListeners(),this._removeListeners=this._server=null,o.close(()=>{rh(this)})}}shouldHandle(r){if(this.options.path){let o=r.url.indexOf("?");if((o!==-1?r.url.slice(0,o):r.url)!==this.options.path)return!1}return!0}handleUpgrade(r,o,i,e){o.on("error",hj);let a=r.headers["sec-websocket-key"],A=r.headers.upgrade,t=+r.headers["sec-websocket-version"];if(r.method!=="GET"){Pc(this,r,o,405,"Invalid HTTP method");return}if(A===void 0||A.toLowerCase()!=="websocket"){Pc(this,r,o,400,"Invalid Upgrade header");return}if(a===void 0||!TQe.test(a)){Pc(this,r,o,400,"Missing or invalid Sec-WebSocket-Key header");return}if(t!==13&&t!==8){Pc(this,r,o,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle(r)){ah(o,400);return}let s=r.headers["sec-websocket-protocol"],g=new Set;if(s!==void 0)try{g=OQe.parse(s)}catch{Pc(this,r,o,400,"Invalid Sec-WebSocket-Protocol header");return}let c=r.headers["sec-websocket-extensions"],I={};if(this.options.perMessageDeflate&&c!==void 0){let E=new vc({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let B=pj.parse(c);B[vc.extensionName]&&(E.accept(B[vc.extensionName]),I[vc.extensionName]=E)}catch{Pc(this,r,o,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let E={origin:r.headers[`${t===8?"sec-websocket-origin":"origin"}`],secure:!!(r.socket.authorized||r.socket.encrypted),req:r};if(this.options.verifyClient.length===2){this.options.verifyClient(E,(B,f,Q,y)=>{if(!B)return ah(o,f||401,Q,y);this.completeUpgrade(I,a,g,r,o,i,e)});return}if(!this.options.verifyClient(E))return ah(o,401)}this.completeUpgrade(I,a,g,r,o,i,e)}completeUpgrade(r,o,i,e,a,A,t){if(!a.readable||!a.writable)return a.destroy();if(a[NQe])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>Ej)return ah(a,503);let g=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${wQe("sha1").update(o+_Qe).digest("base64")}`],c=new this.options.WebSocket(null,void 0,this.options);if(i.size){let I=this.options.handleProtocols?this.options.handleProtocols(i,e):i.values().next().value;I&&(g.push(`Sec-WebSocket-Protocol: ${I}`),c._protocol=I)}if(r[vc.extensionName]){let I=r[vc.extensionName].params,E=pj.format({[vc.extensionName]:[I]});g.push(`Sec-WebSocket-Extensions: ${E}`),c._extensions=r}this.emit("headers",g,e),a.write(g.concat(`\r +`+r.prev}function ef(n,r){var o=FM(n),i=[];if(o){i.length=n.length;for(var e=0;e{"use strict";var _Ce=LC(),NCe=zs(),rf=function(n,r,o){for(var i=n,e;(e=i.next)!=null;i=e)if(e.key===r)return i.next=e.next,o||(e.next=n.next,n.next=e),e},TCe=function(n,r){if(n){var o=rf(n,r);return o&&o.value}},RCe=function(n,r,o){var i=rf(n,r);i?i.value=o:n.next={key:r,next:n.next,value:o}},kCe=function(n,r){return n?!!rf(n,r):!1},vCe=function(n,r){if(n)return rf(n,r,!0)};Tx.exports=function(){var r,o={assert:function(i){if(!o.has(i))throw new NCe("Side channel does not contain "+_Ce(i))},delete:function(i){var e=vCe(r,i);return e&&r&&!r.next&&(r=void 0),!!e},get:function(i){return TCe(r,i)},has:function(i){return kCe(r,i)},set:function(i,e){r||(r={next:void 0}),RCe(r,i,e)}};return o}});var YM=W((A5e,Px)=>{"use strict";var kx=uC(),vx=ub(),PCe=vx([kx("%String.prototype.indexOf%")]);Px.exports=function(r,o){var i=kx(r,!!o);return typeof i=="function"&&PCe(r,".prototype.")>-1?vx([i]):i}});var xM=W((t5e,Fx)=>{"use strict";var GCe=uC(),UC=YM(),FCe=LC(),LCe=zs(),Gx=GCe("%Map%",!0),UCe=UC("Map.prototype.get",!0),HCe=UC("Map.prototype.set",!0),KCe=UC("Map.prototype.has",!0),YCe=UC("Map.prototype.delete",!0),xCe=UC("Map.prototype.size",!0);Fx.exports=!!Gx&&function(){var r,o={assert:function(i){if(!o.has(i))throw new LCe("Side channel does not contain "+FCe(i))},delete:function(i){if(r){var e=YCe(r,i);return xCe(r)===0&&(r=void 0),e}return!1},get:function(i){if(r)return UCe(r,i)},has:function(i){return r?KCe(r,i):!1},set:function(i,e){r||(r=new Gx),HCe(r,i,e)}};return o}});var Ux=W((r5e,Lx)=>{"use strict";var jCe=uC(),of=YM(),JCe=LC(),af=xM(),qCe=zs(),wl=jCe("%WeakMap%",!0),VCe=of("WeakMap.prototype.get",!0),zCe=of("WeakMap.prototype.set",!0),WCe=of("WeakMap.prototype.has",!0),ZCe=of("WeakMap.prototype.delete",!0);Lx.exports=wl?function(){var r,o,i={assert:function(e){if(!i.has(e))throw new qCe("Side channel does not contain "+JCe(e))},delete:function(e){if(wl&&e&&(typeof e=="object"||typeof e=="function")){if(r)return ZCe(r,e)}else if(af&&o)return o.delete(e);return!1},get:function(e){return wl&&e&&(typeof e=="object"||typeof e=="function")&&r?VCe(r,e):o&&o.get(e)},has:function(e){return wl&&e&&(typeof e=="object"||typeof e=="function")&&r?WCe(r,e):!!o&&o.has(e)},set:function(e,a){wl&&e&&(typeof e=="object"||typeof e=="function")?(r||(r=new wl),zCe(r,e,a)):af&&(o||(o=af()),o.set(e,a))}};return i}:af});var jM=W((a5e,Hx)=>{"use strict";var XCe=zs(),$Ce=LC(),ehe=Rx(),Ahe=xM(),the=Ux(),rhe=the||Ahe||ehe;Hx.exports=function(){var r,o={assert:function(i){if(!o.has(i)){var e=i&&Object(i)===i?"the given object key":$Ce(i);throw new XCe("Side channel does not contain "+e)}},delete:function(i){return!!r&&r.delete(i)},get:function(i){return r&&r.get(i)},has:function(i){return!!r&&r.has(i)},set:function(i,e){r||(r=rhe()),r.set(i,e)}};return o}});var nf=W((i5e,Kx)=>{"use strict";var ahe=String.prototype.replace,ihe=/%20/g,JM={RFC1738:"RFC1738",RFC3986:"RFC3986"};Kx.exports={default:JM.RFC3986,formatters:{RFC1738:function(n){return ahe.call(n,ihe,"+")},RFC3986:function(n){return String(n)}},RFC1738:JM.RFC1738,RFC3986:JM.RFC3986}});var WM=W((o5e,jx)=>{"use strict";var ohe=nf(),xx=jM(),Yx=pb(),qM=Object.prototype.hasOwnProperty,Sc=Array.isArray,gf=xx(),Dc=function(r,o){return gf.set(r,o),r},wc=function(r){return gf.has(r)},HC=function(r){return gf.get(r)},VM=function(r,o){gf.set(r,o)},sn=(function(){for(var n=[],r=0;r<256;++r)n[n.length]="%"+((r<16?"0":"")+r.toString(16)).toUpperCase();return n})(),nhe=function(r){for(;r.length>1;){var o=r.pop(),i=o.obj[o.prop];if(Sc(i)){for(var e=[],a=0;a=i.arrayLimit){if(i.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+i.arrayLimit+" element"+(i.arrayLimit===1?"":"s")+" allowed in an array.");return Dc(Ol(r.concat(o),i),e)}r[e]=o}else if(r&&typeof r=="object")if(wc(r)){var a=HC(r)+1;r[a]=o,VM(r,a)}else{if(i&&i.strictMerge)return[r,o];(i&&(i.plainObjects||i.allowPrototypes)||!qM.call(Object.prototype,o))&&(r[o]=!0)}else return[r,o];return r}if(!r||typeof r!="object"){if(wc(o)){for(var A=Object.keys(o),t=i&&i.plainObjects?{__proto__:null,0:r}:{0:r},s=0;si.arrayLimit){if(i.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+i.arrayLimit+" element"+(i.arrayLimit===1?"":"s")+" allowed in an array.");return Dc(Ol(c,i),c.length-1)}return c}var I=r;if(Sc(r)&&!Sc(o)&&(I=Ol(r,i)),Sc(r)&&Sc(o)){if(o.forEach(function(E,B){if(qM.call(r,B)){var f=r[B];f&&typeof f=="object"&&E&&typeof E=="object"?r[B]=n(f,E,i):r[r.length]=E}else r[B]=E}),i&&typeof i.arrayLimit=="number"&&r.length>i.arrayLimit){if(i.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+i.arrayLimit+" element"+(i.arrayLimit===1?"":"s")+" allowed in an array.");return Dc(Ol(r,i),r.length-1)}return r}return Object.keys(o).reduce(function(E,B){var f=o[B];if(qM.call(E,B)?zM(E,B,n(E[B],f,i)):zM(E,B,f),wc(o)&&!wc(E)&&Dc(E,HC(o)),wc(E)){var Q=parseInt(B,10);String(Q)===B&&Q>=0&&Q>HC(E)&&VM(E,Q)}return E},I)},ghe=function(r,o){return Object.keys(o).reduce(function(i,e){return zM(i,e,o[e]),i},r)},che=function(n,r,o){var i=n.replace(/\+/g," ");if(o==="iso-8859-1")return i.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(i)}catch{return i}},sf=1024,Ihe=function(r,o,i,e,a){if(r.length===0)return r;var A=r;if(typeof r=="symbol"?A=Symbol.prototype.toString.call(r):typeof r!="string"&&(A=String(r)),i==="iso-8859-1")return escape(A).replace(/%u[0-9a-f]{4}/gi,function(f){return"%26%23"+parseInt(f.slice(2),16)+"%3B"});for(var t="",s=0;s=sf?A.slice(s,s+sf):A;if(s+sf=55296&&c<=56319&&(g=g.slice(0,-1),s-=1)}for(var I=[],E=0;E=48&&B<=57||B>=65&&B<=90||B>=97&&B<=122||a===ohe.RFC1738&&(B===40||B===41)){I[I.length]=g.charAt(E);continue}if(B<128){I[I.length]=sn[B];continue}if(B<2048){I[I.length]=sn[192|B>>6]+sn[128|B&63];continue}if(B<55296||B>=57344){I[I.length]=sn[224|B>>12]+sn[128|B>>6&63]+sn[128|B&63];continue}E+=1,B=65536+((B&1023)<<10|g.charCodeAt(E)&1023),I[I.length]=sn[240|B>>18]+sn[128|B>>12&63]+sn[128|B>>6&63]+sn[128|B&63]}t+=I.join("")}return t},lhe=function(r){for(var o=[{obj:{o:r},prop:"o"}],i=xx(),e=0;ei){if(a)throw new RangeError("Array limit exceeded. Only "+i+" element"+(i===1?"":"s")+" allowed in an array.");return Dc(Ol(t,{plainObjects:e}),t.length-1)}return t},hhe=function(r,o){if(Sc(r)){for(var i=[],e=0;e{"use strict";var qx=jM(),cf=WM(),KC=nf(),dhe=Object.prototype.hasOwnProperty,Vx={brackets:function(r){return r+"[]"},comma:"comma",indices:function(r,o){return r+"["+o+"]"},repeat:function(r){return r}},gn=Array.isArray,uhe=Array.prototype.push,zx=function(n,r){uhe.apply(n,gn(r)?r:[r])},Bhe=Date.prototype.toISOString,Jx=KC.default,yr={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:cf.encode,encodeValuesOnly:!1,filter:void 0,format:Jx,formatter:KC.formatters[Jx],indices:!1,serializeDate:function(r){return Bhe.call(r)},skipNulls:!1,strictNullHandling:!1},fhe=function(r){return typeof r=="string"||typeof r=="number"||typeof r=="boolean"||typeof r=="symbol"||typeof r=="bigint"},ZM={},Qhe=function n(r,o,i,e,a,A,t,s,g,c,I,E,B,f,Q,y,m,T){for(var _=r,P=T,Y=0,j=!1;(P=P.get(ZM))!==void 0&&!j;){var K=P.get(r);if(Y+=1,typeof K<"u"){if(K===Y)throw new RangeError("Cyclic object value");j=!0}typeof P.get(ZM)>"u"&&(Y=0)}if(typeof c=="function"?_=c(o,_):_ instanceof Date?_=B(_):i==="comma"&&gn(_)&&(_=cf.maybeMap(_,function(Ee){return Ee instanceof Date?B(Ee):Ee})),_===null){if(A)return Q(g&&!y?g(o,yr.encoder,m,"key",f):o);_=""}if(fhe(_)||cf.isBuffer(_)){if(g){var q=y?o:g(o,yr.encoder,m,"key",f);return[Q(q)+"="+Q(g(_,yr.encoder,m,"value",f))]}return[Q(o)+"="+Q(String(_))]}var V=[];if(typeof _>"u")return V;var H;if(i==="comma"&&gn(_))y&&g&&(_=cf.maybeMap(_,function(Ee){return Ee==null?Ee:g(Ee)})),H=[{value:_.length>0?_.join(",")||null:void 0}];else if(gn(c))H=c;else{var v=Object.keys(_);H=I?v.sort(I):v}var Z=s?String(o).replace(/\./g,"%2E"):String(o),U=e&&gn(_)&&_.length===1?Z+"[]":Z;if(a&&gn(_)&&_.length===0)return U+"[]";for(var M=0;M"u"?r.encodeDotInKeys===!0?!0:yr.allowDots:!!r.allowDots;return{addQueryPrefix:typeof r.addQueryPrefix=="boolean"?r.addQueryPrefix:yr.addQueryPrefix,allowDots:t,allowEmptyArrays:typeof r.allowEmptyArrays=="boolean"?!!r.allowEmptyArrays:yr.allowEmptyArrays,arrayFormat:A,charset:o,charsetSentinel:typeof r.charsetSentinel=="boolean"?r.charsetSentinel:yr.charsetSentinel,commaRoundTrip:!!r.commaRoundTrip,delimiter:typeof r.delimiter>"u"?yr.delimiter:r.delimiter,encode:typeof r.encode=="boolean"?r.encode:yr.encode,encodeDotInKeys:typeof r.encodeDotInKeys=="boolean"?r.encodeDotInKeys:yr.encodeDotInKeys,encoder:typeof r.encoder=="function"?r.encoder:yr.encoder,encodeValuesOnly:typeof r.encodeValuesOnly=="boolean"?r.encodeValuesOnly:yr.encodeValuesOnly,filter:a,format:i,formatter:e,serializeDate:typeof r.serializeDate=="function"?r.serializeDate:yr.serializeDate,skipNulls:typeof r.skipNulls=="boolean"?r.skipNulls:yr.skipNulls,sort:typeof r.sort=="function"?r.sort:null,strictNullHandling:typeof r.strictNullHandling=="boolean"?r.strictNullHandling:yr.strictNullHandling}};Wx.exports=function(n,r){var o=n,i=yhe(r),e,a;typeof i.filter=="function"?(a=i.filter,o=a("",o)):gn(i.filter)&&(a=i.filter,e=a);var A=[];if(typeof o!="object"||o===null)return"";var t=Vx[i.arrayFormat],s=t==="comma"&&i.commaRoundTrip;e||(e=Object.keys(o)),i.sort&&e.sort(i.sort);for(var g=qx(),c=0;c"u"||I===null)){var E=o[I];i.skipNulls&&E===null||zx(A,Qhe(E,I,t,s,i.allowEmptyArrays,i.strictNullHandling,i.skipNulls,i.encodeDotInKeys,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,g))}}var B=A.join(i.delimiter),f=i.addQueryPrefix===!0?"?":"";return i.charsetSentinel&&(i.charset==="iso-8859-1"?f+="utf8=%26%2310003%3B"+i.delimiter:f+="utf8=%E2%9C%93"+i.delimiter),B.length>0?f+B:""}});var e1=W((s5e,$x)=>{"use strict";var cn=WM(),If=Object.prototype.hasOwnProperty,XM=Array.isArray,Wt={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:cn.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},mhe=function(n){return n.replace(/&#(\d+);/g,function(r,o){return String.fromCharCode(parseInt(o,10))})},Xx=function(n,r,o,i){if(n&&typeof n=="string"&&r.comma&&n.indexOf(",")>-1){if(i&&r.throwOnLimitExceeded)for(var e=0,a=n.indexOf(",");a>-1;){if(e+=1,e>=r.arrayLimit)throw new RangeError("Array limit exceeded. Only "+r.arrayLimit+" element"+(r.arrayLimit===1?"":"s")+" allowed in an array.");a=n.indexOf(",",a+1)}return n.split(",")}if(r.throwOnLimitExceeded&&o>=r.arrayLimit)throw new RangeError("Array limit exceeded. Only "+r.arrayLimit+" element"+(r.arrayLimit===1?"":"s")+" allowed in an array.");return n},She="utf8=%26%2310003%3B",Dhe="utf8=%E2%9C%93",whe=function(r,o){var i={__proto__:null},e=o.ignoreQueryPrefix?r.replace(/^\?/,""):r;e=e.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=o.parameterLimit===1/0?void 0:o.parameterLimit,A=e.split(o.delimiter,o.throwOnLimitExceeded&&typeof a<"u"?a+1:a);if(o.throwOnLimitExceeded&&typeof a<"u"&&A.length>a)throw new RangeError("Parameter limit exceeded. Only "+a+" parameter"+(a===1?"":"s")+" allowed.");var t=-1,s,g=o.charset;if(o.charsetSentinel)for(s=0;s-1&&(f=XM(f)?[f]:f),o.comma&&XM(f)&&f.length>o.arrayLimit&&(f=cn.combine([],f,o.arrayLimit,o.plainObjects,o.throwOnLimitExceeded)),B!==null){var Q=If.call(i,B);Q&&(o.duplicates==="combine"||c.indexOf("[]=")>-1)?i[B]=cn.combine(i[B],f,o.arrayLimit,o.plainObjects,o.throwOnLimitExceeded):(!Q||o.duplicates==="last")&&(i[B]=f)}}return i},Ohe=function(n,r,o,i){var e=0;if(n.length>0&&n[n.length-1]==="[]"){var a=n.slice(0,-1).join("");e=Array.isArray(r)&&r[a]?r[a].length:0}for(var A=i?r:Xx(r,o,e),t=n.length-1;t>=0;--t){var s,g=n[t];if(g==="[]"&&o.parseArrays)cn.isOverflow(A)?s=A:s=o.allowEmptyArrays&&(A===""||o.strictNullHandling&&A===null)?[]:cn.combine([],A,o.arrayLimit,o.plainObjects,o.throwOnLimitExceeded);else{s=o.plainObjects?{__proto__:null}:{};var c=g.charAt(0)==="["&&g.charAt(g.length-1)==="]"?g.slice(1,-1):g,I=o.decodeDotInKeys?c.replace(/%2E/g,"."):c,E=parseInt(I,10),B=!isNaN(E)&&g!==I&&String(E)===I&&E>=0&&o.parseArrays;if(!o.parseArrays&&I==="")s={0:A};else if(B&&E=0?i.slice(0,a):i;if(A){if(!o.plainObjects&&If.call(Object.prototype,A)&&!o.allowPrototypes)return;e[e.length]=A}for(var t=i.length,s=a,g=0;s>=0&&g=0){if(o.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+o.depth+" and strictDepth is true");e[e.length]="["+i.slice(s)+"]"}return e},Mhe=function(r,o,i,e){if(r){var a=bhe(r,i);if(a)return Ohe(a,o,i,e)}},_he=function(r){if(!r)return Wt;if(typeof r.allowEmptyArrays<"u"&&typeof r.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof r.decodeDotInKeys<"u"&&typeof r.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(r.decoder!==null&&typeof r.decoder<"u"&&typeof r.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof r.charset<"u"&&r.charset!=="utf-8"&&r.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof r.throwOnLimitExceeded<"u"&&typeof r.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var o=typeof r.charset>"u"?Wt.charset:r.charset,i=typeof r.duplicates>"u"?Wt.duplicates:r.duplicates;if(i!=="combine"&&i!=="first"&&i!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var e=typeof r.allowDots>"u"?r.decodeDotInKeys===!0?!0:Wt.allowDots:!!r.allowDots;return{allowDots:e,allowEmptyArrays:typeof r.allowEmptyArrays=="boolean"?!!r.allowEmptyArrays:Wt.allowEmptyArrays,allowPrototypes:typeof r.allowPrototypes=="boolean"?r.allowPrototypes:Wt.allowPrototypes,allowSparse:typeof r.allowSparse=="boolean"?r.allowSparse:Wt.allowSparse,arrayLimit:typeof r.arrayLimit=="number"?r.arrayLimit:Wt.arrayLimit,charset:o,charsetSentinel:typeof r.charsetSentinel=="boolean"?r.charsetSentinel:Wt.charsetSentinel,comma:typeof r.comma=="boolean"?r.comma:Wt.comma,decodeDotInKeys:typeof r.decodeDotInKeys=="boolean"?r.decodeDotInKeys:Wt.decodeDotInKeys,decoder:typeof r.decoder=="function"?r.decoder:Wt.decoder,delimiter:typeof r.delimiter=="string"||cn.isRegExp(r.delimiter)?r.delimiter:Wt.delimiter,depth:typeof r.depth=="number"||r.depth===!1?+r.depth:Wt.depth,duplicates:i,ignoreQueryPrefix:r.ignoreQueryPrefix===!0,interpretNumericEntities:typeof r.interpretNumericEntities=="boolean"?r.interpretNumericEntities:Wt.interpretNumericEntities,parameterLimit:typeof r.parameterLimit=="number"?r.parameterLimit:Wt.parameterLimit,parseArrays:r.parseArrays!==!1,plainObjects:typeof r.plainObjects=="boolean"?r.plainObjects:Wt.plainObjects,strictDepth:typeof r.strictDepth=="boolean"?!!r.strictDepth:Wt.strictDepth,strictMerge:typeof r.strictMerge=="boolean"?!!r.strictMerge:Wt.strictMerge,strictNullHandling:typeof r.strictNullHandling=="boolean"?r.strictNullHandling:Wt.strictNullHandling,throwOnLimitExceeded:typeof r.throwOnLimitExceeded=="boolean"?r.throwOnLimitExceeded:!1}};$x.exports=function(n,r){var o=_he(r);if(n===""||n===null||typeof n>"u")return o.plainObjects?{__proto__:null}:{};for(var i=typeof n=="string"?whe(n,o):n,e=o.plainObjects?{__proto__:null}:{},a=Object.keys(i),A=0;A{"use strict";var Nhe=Zx(),The=e1(),Rhe=nf();A1.exports={formats:Rhe,parse:The,stringify:Nhe}});var a1=W((c5e,r1)=>{function khe(n){return n}r1.exports=khe});var H1=W((YC,Ml)=>{var vhe=200,Phe="Expected a function",c_="__lodash_hash_undefined__",uf=1,_l=2,E1=1/0,C1=9007199254740991,lf="[object Arguments]",A_="[object Array]",h1="[object Boolean]",d1="[object Date]",u1="[object Error]",B1="[object Function]",Ghe="[object GeneratorFunction]",pf="[object Map]",f1="[object Number]",bl="[object Object]",i1="[object Promise]",Q1="[object RegExp]",Ef="[object Set]",y1="[object String]",m1="[object Symbol]",t_="[object WeakMap]",S1="[object ArrayBuffer]",Cf="[object DataView]",Fhe="[object Float32Array]",Lhe="[object Float64Array]",Uhe="[object Int8Array]",Hhe="[object Int16Array]",Khe="[object Int32Array]",Yhe="[object Uint8Array]",xhe="[object Uint8ClampedArray]",jhe="[object Uint16Array]",Jhe="[object Uint32Array]",qhe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Vhe=/^\w*$/,zhe=/^\./,Whe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Zhe=/[\\^$.*+?()[\]{}|]/g,Xhe=/\\(\\)?/g,$he=/^\[object .+?Constructor\]$/,ede=/^(?:0|[1-9]\d*)$/,Nt={};Nt[Fhe]=Nt[Lhe]=Nt[Uhe]=Nt[Hhe]=Nt[Khe]=Nt[Yhe]=Nt[xhe]=Nt[jhe]=Nt[Jhe]=!0;Nt[lf]=Nt[A_]=Nt[S1]=Nt[h1]=Nt[Cf]=Nt[d1]=Nt[u1]=Nt[B1]=Nt[pf]=Nt[f1]=Nt[bl]=Nt[Q1]=Nt[Ef]=Nt[y1]=Nt[t_]=!1;var D1=typeof global=="object"&&global&&global.Object===Object&&global,Ade=typeof self=="object"&&self&&self.Object===Object&&self,rg=D1||Ade||Function("return this")(),w1=typeof YC=="object"&&YC&&!YC.nodeType&&YC,o1=w1&&typeof Ml=="object"&&Ml&&!Ml.nodeType&&Ml,tde=o1&&o1.exports===w1,n1=tde&&D1.process,s1=(function(){try{return n1&&n1.binding("util")}catch{}})(),g1=s1&&s1.isTypedArray;function O1(n,r){for(var o=-1,i=r.length,e=n.length;++o-1}function Nde(n,r){var o=this.__data__,i=ff(o,n);return i<0?o.push([n,r]):o[i][1]=r,this}ts.prototype.clear=Ode;ts.prototype.delete=bde;ts.prototype.get=Mde;ts.prototype.has=_de;ts.prototype.set=Nde;function rs(n){var r=-1,o=n?n.length:0;for(this.clear();++rt))return!1;var g=a.get(n);if(g&&a.get(r))return g==r;var c=-1,I=!0,E=e&uf?new df:void 0;for(a.set(n,r),a.set(r,n);++c-1&&n%1==0&&n-1&&n%1==0&&n<=C1}function JC(n){var r=typeof n;return!!n&&(r=="object"||r=="function")}function Sf(n){return!!n&&typeof n=="object"}function h_(n){return typeof n=="symbol"||Sf(n)&&Nl.call(n)==m1}var due=g1?ode(g1):Wde;function uue(n){return n==null?"":aue(n)}function Bue(n,r,o){var i=n==null?void 0:_1(n,r);return i===void 0?o:i}function fue(n,r){return n!=null&&Iue(n,r,Jde)}function g_(n){return E_(n)?M1(n):Xde(n)}function Que(n){return E_(n)?M1(n,!0):$de(n)}function yue(n,r){return n==null?{}:tue(n,nue(n),Zde(r))}function mue(n){return n}function Sue(n){return yf(n)?ade(mf(n)):rue(n)}function U1(){return[]}Ml.exports=yue});var h3=W((qC,Rl)=>{var Due=200,Z1="__lodash_hash_undefined__",wue=800,Oue=16,X1=9007199254740991,$1="[object Arguments]",bue="[object Array]",Mue="[object AsyncFunction]",_ue="[object Boolean]",Nue="[object Date]",Tue="[object Error]",e3="[object Function]",Rue="[object GeneratorFunction]",kue="[object Map]",vue="[object Number]",Pue="[object Null]",A3="[object Object]",Gue="[object Proxy]",Fue="[object RegExp]",Lue="[object Set]",Uue="[object String]",Hue="[object Undefined]",Kue="[object WeakMap]",Yue="[object ArrayBuffer]",xue="[object DataView]",jue="[object Float32Array]",Jue="[object Float64Array]",que="[object Int8Array]",Vue="[object Int16Array]",zue="[object Int32Array]",Wue="[object Uint8Array]",Zue="[object Uint8ClampedArray]",Xue="[object Uint16Array]",$ue="[object Uint32Array]",eBe=/[\\^$.*+?()[\]{}|]/g,ABe=/^\[object .+?Constructor\]$/,tBe=/^(?:0|[1-9]\d*)$/,Tt={};Tt[jue]=Tt[Jue]=Tt[que]=Tt[Vue]=Tt[zue]=Tt[Wue]=Tt[Zue]=Tt[Xue]=Tt[$ue]=!0;Tt[$1]=Tt[bue]=Tt[Yue]=Tt[_ue]=Tt[xue]=Tt[Nue]=Tt[Tue]=Tt[e3]=Tt[kue]=Tt[vue]=Tt[A3]=Tt[Fue]=Tt[Lue]=Tt[Uue]=Tt[Kue]=!1;var t3=typeof global=="object"&&global&&global.Object===Object&&global,rBe=typeof self=="object"&&self&&self.Object===Object&&self,WC=t3||rBe||Function("return this")(),r3=typeof qC=="object"&&qC&&!qC.nodeType&&qC,VC=r3&&typeof Rl=="object"&&Rl&&!Rl.nodeType&&Rl,a3=VC&&VC.exports===r3,d_=a3&&t3.process,K1=(function(){try{var n=VC&&VC.require&&VC.require("util").types;return n||d_&&d_.binding&&d_.binding("util")}catch{}})(),Y1=K1&&K1.isTypedArray;function aBe(n,r,o){switch(o.length){case 0:return n.call(r);case 1:return n.call(r,o[0]);case 2:return n.call(r,o[0],o[1]);case 3:return n.call(r,o[0],o[1],o[2])}return n.apply(r,o)}function iBe(n,r){for(var o=-1,i=Array(n);++o-1}function OBe(n,r){var o=this.__data__,i=Mf(o,n);return i<0?(++this.size,o.push([n,r])):o[i][1]=r,this}is.prototype.clear=mBe;is.prototype.delete=SBe;is.prototype.get=DBe;is.prototype.has=wBe;is.prototype.set=OBe;function kl(n){var r=-1,o=n==null?0:n.length;for(this.clear();++r1?o[e-1]:void 0,A=e>2?o[2]:void 0;for(a=n.length>3&&typeof a=="function"?(e--,a):void 0,A&&tfe(o[0],o[1],A)&&(a=e<3?void 0:a,e=1),r=Object(r);++i-1&&n%1==0&&n0){if(++r>=wue)return arguments[0]}else r=0;return n.apply(void 0,arguments)}}function cfe(n){if(n!=null){try{return bf.call(n)}catch{}try{return n+""}catch{}}return""}function Tf(n,r){return n===r||n!==n&&r!==r}var Q_=W1((function(){return arguments})())?W1:function(n){return ZC(n)&&as.call(n,"callee")&&!pBe.call(n,"callee")},y_=Array.isArray;function D_(n){return n!=null&&l3(n.length)&&!w_(n)}function Ife(n){return ZC(n)&&D_(n)}var I3=CBe||hfe;function w_(n){if(!Nc(n))return!1;var r=_f(n);return r==e3||r==Rue||r==Mue||r==Gue}function l3(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=X1}function Nc(n){var r=typeof n;return n!=null&&(r=="object"||r=="function")}function ZC(n){return n!=null&&typeof n=="object"}function lfe(n){if(!ZC(n)||_f(n)!=A3)return!1;var r=o3(n);if(r===null)return!0;var o=as.call(r,"constructor")&&r.constructor;return typeof o=="function"&&o instanceof o&&bf.call(o)==IBe}var p3=Y1?oBe(Y1):KBe;function pfe(n){return ZBe(n,E3(n))}function E3(n){return D_(n)?FBe(n,!0):YBe(n)}var Efe=XBe(function(n,r,o){s3(n,r,o)});function Cfe(n){return function(){return n}}function C3(n){return n}function hfe(){return!1}Rl.exports=Efe});var os=W((I5e,B3)=>{"use strict";var d3=["nodebuffer","arraybuffer","fragments"],u3=typeof Blob<"u";u3&&d3.push("blob");B3.exports={BINARY_TYPES:d3,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:u3,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var XC=W((l5e,Rf)=>{"use strict";var{EMPTY_BUFFER:dfe}=os(),O_=Buffer[Symbol.species];function ufe(n,r){if(n.length===0)return dfe;if(n.length===1)return n[0];let o=Buffer.allocUnsafe(r),i=0;for(let e=0;e{"use strict";var y3=Symbol("kDone"),M_=Symbol("kRun"),__=class{constructor(r){this[y3]=()=>{this.pending--,this[M_]()},this.concurrency=r||1/0,this.jobs=[],this.pending=0}add(r){this.jobs.push(r),this[M_]()}[M_](){if(this.pending!==this.concurrency&&this.jobs.length){let r=this.jobs.shift();this.pending++,r(this[y3])}}};m3.exports=__});var Fl=W((E5e,b3)=>{"use strict";var $C=We("zlib"),D3=XC(),ffe=S3(),{kStatusCode:w3}=os(),Qfe=Buffer[Symbol.species],yfe=Buffer.from([0,0,255,255]),vf=Symbol("permessage-deflate"),ns=Symbol("total-length"),Pl=Symbol("callback"),ag=Symbol("buffers"),Gl=Symbol("error"),kf,N_=class{constructor(r){if(this._options=r||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._maxPayload=this._options.maxPayload|0,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,!kf){let o=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;kf=new ffe(o)}}static get extensionName(){return"permessage-deflate"}offer(){let r={};return this._options.serverNoContextTakeover&&(r.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(r.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(r.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?r.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(r.client_max_window_bits=!0),r}accept(r){return r=this.normalizeParams(r),this.params=this._isServer?this.acceptAsServer(r):this.acceptAsClient(r),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let r=this._deflate[Pl];this._deflate.close(),this._deflate=null,r&&r(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(r){let o=this._options,i=r.find(e=>!(o.serverNoContextTakeover===!1&&e.server_no_context_takeover||e.server_max_window_bits&&(o.serverMaxWindowBits===!1||typeof o.serverMaxWindowBits=="number"&&o.serverMaxWindowBits>e.server_max_window_bits)||typeof o.clientMaxWindowBits=="number"&&(typeof e.client_max_window_bits=="number"?o.clientMaxWindowBits>e.client_max_window_bits:!e.client_max_window_bits)));if(!i)throw new Error("None of the extension offers can be accepted");return o.serverNoContextTakeover&&(i.server_no_context_takeover=!0),o.clientNoContextTakeover&&(i.client_no_context_takeover=!0),typeof o.serverMaxWindowBits=="number"&&(i.server_max_window_bits=o.serverMaxWindowBits),typeof o.clientMaxWindowBits=="number"?i.client_max_window_bits=o.clientMaxWindowBits:(i.client_max_window_bits===!0||o.clientMaxWindowBits===!1)&&delete i.client_max_window_bits,i}acceptAsClient(r){let o=r[0];if(this._options.clientNoContextTakeover===!1&&o.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!o.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(o.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&o.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return o}normalizeParams(r){return r.forEach(o=>{Object.keys(o).forEach(i=>{let e=o[i];if(e.length>1)throw new Error(`Parameter "${i}" must have only a single value`);if(e=e[0],i==="client_max_window_bits"){if(e!==!0){let a=+e;if(!Number.isInteger(a)||a<8||a>15)throw new TypeError(`Invalid value for parameter "${i}": ${e}`);e=a}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${i}": ${e}`)}else if(i==="server_max_window_bits"){let a=+e;if(!Number.isInteger(a)||a<8||a>15)throw new TypeError(`Invalid value for parameter "${i}": ${e}`);e=a}else if(i==="client_no_context_takeover"||i==="server_no_context_takeover"){if(e!==!0)throw new TypeError(`Invalid value for parameter "${i}": ${e}`)}else throw new Error(`Unknown parameter "${i}"`);o[i]=e})}),r}decompress(r,o,i){kf.add(e=>{this._decompress(r,o,(a,A)=>{e(),i(a,A)})})}compress(r,o,i){kf.add(e=>{this._compress(r,o,(a,A)=>{e(),i(a,A)})})}_decompress(r,o,i){let e=this._isServer?"client":"server";if(!this._inflate){let a=`${e}_max_window_bits`,A=typeof this.params[a]!="number"?$C.Z_DEFAULT_WINDOWBITS:this.params[a];this._inflate=$C.createInflateRaw({...this._options.zlibInflateOptions,windowBits:A}),this._inflate[vf]=this,this._inflate[ns]=0,this._inflate[ag]=[],this._inflate.on("error",Sfe),this._inflate.on("data",O3)}this._inflate[Pl]=i,this._inflate.write(r),o&&this._inflate.write(yfe),this._inflate.flush(()=>{let a=this._inflate[Gl];if(a){this._inflate.close(),this._inflate=null,i(a);return}let A=D3.concat(this._inflate[ag],this._inflate[ns]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[ns]=0,this._inflate[ag]=[],o&&this.params[`${e}_no_context_takeover`]&&this._inflate.reset()),i(null,A)})}_compress(r,o,i){let e=this._isServer?"server":"client";if(!this._deflate){let a=`${e}_max_window_bits`,A=typeof this.params[a]!="number"?$C.Z_DEFAULT_WINDOWBITS:this.params[a];this._deflate=$C.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:A}),this._deflate[ns]=0,this._deflate[ag]=[],this._deflate.on("data",mfe)}this._deflate[Pl]=i,this._deflate.write(r),this._deflate.flush($C.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let a=D3.concat(this._deflate[ag],this._deflate[ns]);o&&(a=new Qfe(a.buffer,a.byteOffset,a.length-4)),this._deflate[Pl]=null,this._deflate[ns]=0,this._deflate[ag]=[],o&&this.params[`${e}_no_context_takeover`]&&this._deflate.reset(),i(null,a)})}};b3.exports=N_;function mfe(n){this[ag].push(n),this[ns]+=n.length}function O3(n){if(this[ns]+=n.length,this[vf]._maxPayload<1||this[ns]<=this[vf]._maxPayload){this[ag].push(n);return}this[Gl]=new RangeError("Max payload size exceeded"),this[Gl].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Gl][w3]=1009,this.removeListener("data",O3),this.reset()}function Sfe(n){if(this[vf]._inflate=null,this[Gl]){this[Pl](this[Gl]);return}n[w3]=1007,this[Pl](n)}});var Ll=W((C5e,Pf)=>{"use strict";var{isUtf8:M3}=We("buffer"),{hasBlob:Dfe}=os(),wfe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function Ofe(n){return n>=1e3&&n<=1014&&n!==1004&&n!==1005&&n!==1006||n>=3e3&&n<=4999}function T_(n){let r=n.length,o=0;for(;o=r||(n[o+1]&192)!==128||(n[o+2]&192)!==128||n[o]===224&&(n[o+1]&224)===128||n[o]===237&&(n[o+1]&224)===160)return!1;o+=3}else if((n[o]&248)===240){if(o+3>=r||(n[o+1]&192)!==128||(n[o+2]&192)!==128||(n[o+3]&192)!==128||n[o]===240&&(n[o+1]&240)===128||n[o]===244&&n[o+1]>143||n[o]>244)return!1;o+=4}else return!1;return!0}function bfe(n){return Dfe&&typeof n=="object"&&typeof n.arrayBuffer=="function"&&typeof n.type=="string"&&typeof n.stream=="function"&&(n[Symbol.toStringTag]==="Blob"||n[Symbol.toStringTag]==="File")}Pf.exports={isBlob:bfe,isValidStatusCode:Ofe,isValidUTF8:T_,tokenChars:wfe};if(M3)Pf.exports.isValidUTF8=function(n){return n.length<24?T_(n):M3(n)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let n=We("utf-8-validate");Pf.exports.isValidUTF8=function(r){return r.length<32?T_(r):n(r)}}catch{}});var G_=W((h5e,P3)=>{"use strict";var{Writable:Mfe}=We("stream"),_3=Fl(),{BINARY_TYPES:_fe,EMPTY_BUFFER:N3,kStatusCode:Nfe,kWebSocket:Tfe}=os(),{concat:R_,toArrayBuffer:Rfe,unmask:kfe}=XC(),{isValidStatusCode:vfe,isValidUTF8:T3}=Ll(),Gf=Buffer[Symbol.species],Vi=0,R3=1,k3=2,v3=3,k_=4,v_=5,Ff=6,P_=class extends Mfe{constructor(r={}){super(),this._allowSynchronousEvents=r.allowSynchronousEvents!==void 0?r.allowSynchronousEvents:!0,this._binaryType=r.binaryType||_fe[0],this._extensions=r.extensions||{},this._isServer=!!r.isServer,this._maxBufferedChunks=r.maxBufferedChunks|0,this._maxFragments=r.maxFragments|0,this._maxPayload=r.maxPayload|0,this._skipUTF8Validation=!!r.skipUTF8Validation,this[Tfe]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._numFragments=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=Vi}_write(r,o,i){if(this._opcode===8&&this._state==Vi)return i();if(this._maxBufferedChunks>0&&this._buffers.length>=this._maxBufferedChunks){i(this.createError(RangeError,"Too many buffered chunks",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS"));return}this._bufferedBytes+=r.length,this._buffers.push(r),this.startLoop(i)}consume(r){if(this._bufferedBytes-=r,r===this._buffers[0].length)return this._buffers.shift();if(r=i.length?o.set(this._buffers.shift(),e):(o.set(new Uint8Array(i.buffer,i.byteOffset,r),e),this._buffers[0]=new Gf(i.buffer,i.byteOffset+r,i.length-r)),r-=i.length}while(r>0);return o}startLoop(r){this._loop=!0;do switch(this._state){case Vi:this.getInfo(r);break;case R3:this.getPayloadLength16(r);break;case k3:this.getPayloadLength64(r);break;case v3:this.getMask();break;case k_:this.getData(r);break;case v_:case Ff:this._loop=!1;return}while(this._loop);this._errored||r()}getInfo(r){if(this._bufferedBytes<2){this._loop=!1;return}let o=this.consume(2);if((o[0]&48)!==0){let e=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");r(e);return}let i=(o[0]&64)===64;if(i&&!this._extensions[_3.extensionName]){let e=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");r(e);return}if(this._fin=(o[0]&128)===128,this._opcode=o[0]&15,this._payloadLength=o[1]&127,this._opcode===0){if(i){let e=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");r(e);return}if(!this._fragmented){let e=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");r(e);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let e=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");r(e);return}this._compressed=i}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let e=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");r(e);return}if(i){let e=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");r(e);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let e=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");r(e);return}}else{let e=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");r(e);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(o[1]&128)===128,this._isServer){if(!this._masked){let e=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");r(e);return}}else if(this._masked){let e=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");r(e);return}this._payloadLength===126?this._state=R3:this._payloadLength===127?this._state=k3:this.haveLength(r)}getPayloadLength16(r){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(r)}getPayloadLength64(r){if(this._bufferedBytes<8){this._loop=!1;return}let o=this.consume(8),i=o.readUInt32BE(0);if(i>Math.pow(2,21)-1){let e=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");r(e);return}this._payloadLength=i*Math.pow(2,32)+o.readUInt32BE(4),this.haveLength(r)}haveLength(r){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let o=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");r(o);return}this._masked?this._state=v3:this._state=k_}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=k_}getData(r){let o=N3;if(this._payloadLength){if(this._bufferedBytes7){this.controlMessage(o,r);return}if(this._maxFragments>0&&++this._numFragments>this._maxFragments){let i=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");r(i);return}if(this._compressed){this._state=v_,this.decompress(o,r);return}o.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(o)),this.dataMessage(r)}decompress(r,o){this._extensions[_3.extensionName].decompress(r,this._fin,(e,a)=>{if(e)return o(e);if(a.length){if(this._messageLength+=a.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let A=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");o(A);return}this._fragments.push(a)}this.dataMessage(o),this._state===Vi&&this.startLoop(o)})}dataMessage(r){if(!this._fin){this._state=Vi;return}let o=this._messageLength,i=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._numFragments=0,this._fragments=[],this._opcode===2){let e;this._binaryType==="nodebuffer"?e=R_(i,o):this._binaryType==="arraybuffer"?e=Rfe(R_(i,o)):this._binaryType==="blob"?e=new Blob(i):e=i,this._allowSynchronousEvents?(this.emit("message",e,!0),this._state=Vi):(this._state=Ff,setImmediate(()=>{this.emit("message",e,!0),this._state=Vi,this.startLoop(r)}))}else{let e=R_(i,o);if(!this._skipUTF8Validation&&!T3(e)){let a=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");r(a);return}this._state===v_||this._allowSynchronousEvents?(this.emit("message",e,!1),this._state=Vi):(this._state=Ff,setImmediate(()=>{this.emit("message",e,!1),this._state=Vi,this.startLoop(r)}))}}controlMessage(r,o){if(this._opcode===8){if(r.length===0)this._loop=!1,this.emit("conclude",1005,N3),this.end();else{let i=r.readUInt16BE(0);if(!vfe(i)){let a=this.createError(RangeError,`invalid status code ${i}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");o(a);return}let e=new Gf(r.buffer,r.byteOffset+2,r.length-2);if(!this._skipUTF8Validation&&!T3(e)){let a=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");o(a);return}this._loop=!1,this.emit("conclude",i,e),this.end()}this._state=Vi;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",r),this._state=Vi):(this._state=Ff,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",r),this._state=Vi,this.startLoop(o)}))}createError(r,o,i,e,a){this._loop=!1,this._errored=!0;let A=new r(i?`Invalid WebSocket frame: ${o}`:o);return Error.captureStackTrace(A,this.createError),A.code=a,A[Nfe]=e,A}};P3.exports=P_});var U_=W((u5e,L3)=>{"use strict";var{Duplex:d5e}=We("stream"),{randomFillSync:Pfe}=We("crypto"),{types:{isUint8Array:Gfe}}=We("util"),G3=Fl(),{EMPTY_BUFFER:Ffe,kWebSocket:Lfe,NOOP:Ufe}=os(),{isBlob:Ul,isValidStatusCode:Hfe}=Ll(),{mask:F3,toBuffer:Tc}=XC(),zi=Symbol("kByteLength"),Kfe=Buffer.alloc(4),Lf=8*1024,Rc,Hl=Lf,To=0,Yfe=1,xfe=2,F_=class n{constructor(r,o,i){this._extensions=o||{},i&&(this._generateMask=i,this._maskBuffer=Buffer.alloc(4)),this._socket=r,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=To,this.onerror=Ufe,this[Lfe]=void 0}static frame(r,o){let i,e=!1,a=2,A=!1;o.mask&&(i=o.maskBuffer||Kfe,o.generateMask?o.generateMask(i):(Hl===Lf&&(Rc===void 0&&(Rc=Buffer.alloc(Lf)),Pfe(Rc,0,Lf),Hl=0),i[0]=Rc[Hl++],i[1]=Rc[Hl++],i[2]=Rc[Hl++],i[3]=Rc[Hl++]),A=(i[0]|i[1]|i[2]|i[3])===0,a=6);let t;typeof r=="string"?(!o.mask||A)&&o[zi]!==void 0?t=o[zi]:(r=Buffer.from(r),t=r.length):(t=r.length,e=o.mask&&o.readOnly&&!A);let s=t;t>=65536?(a+=8,s=127):t>125&&(a+=2,s=126);let g=Buffer.allocUnsafe(e?t+a:a);return g[0]=o.fin?o.opcode|128:o.opcode,o.rsv1&&(g[0]|=64),g[1]=s,s===126?g.writeUInt16BE(t,2):s===127&&(g[2]=g[3]=0,g.writeUIntBE(t,4,6)),o.mask?(g[1]|=128,g[a-4]=i[0],g[a-3]=i[1],g[a-2]=i[2],g[a-1]=i[3],A?[g,r]:e?(F3(r,i,g,a,t),[g]):(F3(r,i,r,0,t),[g,r])):[g,r]}close(r,o,i,e){let a;if(r===void 0)a=Ffe;else{if(typeof r!="number"||!Hfe(r))throw new TypeError("First argument must be a valid error code number");if(o===void 0||!o.length)a=Buffer.allocUnsafe(2),a.writeUInt16BE(r,0);else{let t=Buffer.byteLength(o);if(t>123)throw new RangeError("The message must not be greater than 123 bytes");if(a=Buffer.allocUnsafe(2+t),a.writeUInt16BE(r,0),typeof o=="string")a.write(o,2);else if(Gfe(o))a.set(o,2);else throw new TypeError("Second argument must be a string or a Uint8Array")}}let A={[zi]:a.length,fin:!0,generateMask:this._generateMask,mask:i,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==To?this.enqueue([this.dispatch,a,!1,A,e]):this.sendFrame(n.frame(a,A),e)}ping(r,o,i){let e,a;if(typeof r=="string"?(e=Buffer.byteLength(r),a=!1):Ul(r)?(e=r.size,a=!1):(r=Tc(r),e=r.length,a=Tc.readOnly),e>125)throw new RangeError("The data size must not be greater than 125 bytes");let A={[zi]:e,fin:!0,generateMask:this._generateMask,mask:o,maskBuffer:this._maskBuffer,opcode:9,readOnly:a,rsv1:!1};Ul(r)?this._state!==To?this.enqueue([this.getBlobData,r,!1,A,i]):this.getBlobData(r,!1,A,i):this._state!==To?this.enqueue([this.dispatch,r,!1,A,i]):this.sendFrame(n.frame(r,A),i)}pong(r,o,i){let e,a;if(typeof r=="string"?(e=Buffer.byteLength(r),a=!1):Ul(r)?(e=r.size,a=!1):(r=Tc(r),e=r.length,a=Tc.readOnly),e>125)throw new RangeError("The data size must not be greater than 125 bytes");let A={[zi]:e,fin:!0,generateMask:this._generateMask,mask:o,maskBuffer:this._maskBuffer,opcode:10,readOnly:a,rsv1:!1};Ul(r)?this._state!==To?this.enqueue([this.getBlobData,r,!1,A,i]):this.getBlobData(r,!1,A,i):this._state!==To?this.enqueue([this.dispatch,r,!1,A,i]):this.sendFrame(n.frame(r,A),i)}send(r,o,i){let e=this._extensions[G3.extensionName],a=o.binary?2:1,A=o.compress,t,s;typeof r=="string"?(t=Buffer.byteLength(r),s=!1):Ul(r)?(t=r.size,s=!1):(r=Tc(r),t=r.length,s=Tc.readOnly),this._firstFragment?(this._firstFragment=!1,A&&e&&e.params[e._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(A=t>=e._threshold),this._compress=A):(A=!1,a=0),o.fin&&(this._firstFragment=!0);let g={[zi]:t,fin:o.fin,generateMask:this._generateMask,mask:o.mask,maskBuffer:this._maskBuffer,opcode:a,readOnly:s,rsv1:A};Ul(r)?this._state!==To?this.enqueue([this.getBlobData,r,this._compress,g,i]):this.getBlobData(r,this._compress,g,i):this._state!==To?this.enqueue([this.dispatch,r,this._compress,g,i]):this.dispatch(r,this._compress,g,i)}getBlobData(r,o,i,e){this._bufferedBytes+=i[zi],this._state=xfe,r.arrayBuffer().then(a=>{if(this._socket.destroyed){let t=new Error("The socket was closed while the blob was being read");process.nextTick(L_,this,t,e);return}this._bufferedBytes-=i[zi];let A=Tc(a);o?this.dispatch(A,o,i,e):(this._state=To,this.sendFrame(n.frame(A,i),e),this.dequeue())}).catch(a=>{process.nextTick(jfe,this,a,e)})}dispatch(r,o,i,e){if(!o){this.sendFrame(n.frame(r,i),e);return}let a=this._extensions[G3.extensionName];this._bufferedBytes+=i[zi],this._state=Yfe,a.compress(r,i.fin,(A,t)=>{if(this._socket.destroyed){let s=new Error("The socket was closed while data was being compressed");L_(this,s,e);return}this._bufferedBytes-=i[zi],this._state=To,i.readOnly=!1,this.sendFrame(n.frame(t,i),e),this.dequeue()})}dequeue(){for(;this._state===To&&this._queue.length;){let r=this._queue.shift();this._bufferedBytes-=r[3][zi],Reflect.apply(r[0],this,r.slice(1))}}enqueue(r){this._bufferedBytes+=r[3][zi],this._queue.push(r)}sendFrame(r,o){r.length===2?(this._socket.cork(),this._socket.write(r[0]),this._socket.write(r[1],o),this._socket.uncork()):this._socket.write(r[0],o)}};L3.exports=F_;function L_(n,r,o){typeof o=="function"&&o(r);for(let i=0;i{"use strict";var{kForOnEventAttribute:eh,kListener:H_}=os(),U3=Symbol("kCode"),H3=Symbol("kData"),K3=Symbol("kError"),Y3=Symbol("kMessage"),x3=Symbol("kReason"),Kl=Symbol("kTarget"),j3=Symbol("kType"),J3=Symbol("kWasClean"),ss=class{constructor(r){this[Kl]=null,this[j3]=r}get target(){return this[Kl]}get type(){return this[j3]}};Object.defineProperty(ss.prototype,"target",{enumerable:!0});Object.defineProperty(ss.prototype,"type",{enumerable:!0});var kc=class extends ss{constructor(r,o={}){super(r),this[U3]=o.code===void 0?0:o.code,this[x3]=o.reason===void 0?"":o.reason,this[J3]=o.wasClean===void 0?!1:o.wasClean}get code(){return this[U3]}get reason(){return this[x3]}get wasClean(){return this[J3]}};Object.defineProperty(kc.prototype,"code",{enumerable:!0});Object.defineProperty(kc.prototype,"reason",{enumerable:!0});Object.defineProperty(kc.prototype,"wasClean",{enumerable:!0});var Yl=class extends ss{constructor(r,o={}){super(r),this[K3]=o.error===void 0?null:o.error,this[Y3]=o.message===void 0?"":o.message}get error(){return this[K3]}get message(){return this[Y3]}};Object.defineProperty(Yl.prototype,"error",{enumerable:!0});Object.defineProperty(Yl.prototype,"message",{enumerable:!0});var Ah=class extends ss{constructor(r,o={}){super(r),this[H3]=o.data===void 0?null:o.data}get data(){return this[H3]}};Object.defineProperty(Ah.prototype,"data",{enumerable:!0});var Jfe={addEventListener(n,r,o={}){for(let e of this.listeners(n))if(!o[eh]&&e[H_]===r&&!e[eh])return;let i;if(n==="message")i=function(a,A){let t=new Ah("message",{data:A?a:a.toString()});t[Kl]=this,Uf(r,this,t)};else if(n==="close")i=function(a,A){let t=new kc("close",{code:a,reason:A.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});t[Kl]=this,Uf(r,this,t)};else if(n==="error")i=function(a){let A=new Yl("error",{error:a,message:a.message});A[Kl]=this,Uf(r,this,A)};else if(n==="open")i=function(){let a=new ss("open");a[Kl]=this,Uf(r,this,a)};else return;i[eh]=!!o[eh],i[H_]=r,o.once?this.once(n,i):this.on(n,i)},removeEventListener(n,r){for(let o of this.listeners(n))if(o[H_]===r&&!o[eh]){this.removeListener(n,o);break}}};q3.exports={CloseEvent:kc,ErrorEvent:Yl,Event:ss,EventTarget:Jfe,MessageEvent:Ah};function Uf(n,r,o){typeof n=="object"&&n.handleEvent?n.handleEvent.call(n,o):n.call(r,o)}});var Hf=W((f5e,z3)=>{"use strict";var{tokenChars:th}=Ll();function ln(n,r,o){n[r]===void 0?n[r]=[o]:n[r].push(o)}function qfe(n){let r=Object.create(null),o=Object.create(null),i=!1,e=!1,a=!1,A,t,s=-1,g=-1,c=-1,I=0;for(;I{let o=n[r];return Array.isArray(o)||(o=[o]),o.map(i=>[r].concat(Object.keys(i).map(e=>{let a=i[e];return Array.isArray(a)||(a=[a]),a.map(A=>A===!0?e:`${e}=${A}`).join("; ")})).join("; ")).join(", ")}).join(", ")}z3.exports={format:Vfe,parse:qfe}});var jf=W((m5e,nj)=>{"use strict";var zfe=We("events"),Wfe=We("https"),Zfe=We("http"),X3=We("net"),Xfe=We("tls"),{randomBytes:$fe,createHash:eQe}=We("crypto"),{Duplex:Q5e,Readable:y5e}=We("stream"),{URL:K_}=We("url"),ig=Fl(),AQe=G_(),tQe=U_(),{isBlob:rQe}=Ll(),{BINARY_TYPES:W3,CLOSE_TIMEOUT:aQe,EMPTY_BUFFER:Kf,GUID:iQe,kForOnEventAttribute:Y_,kListener:oQe,kStatusCode:nQe,kWebSocket:Hr,NOOP:$3}=os(),{EventTarget:{addEventListener:sQe,removeEventListener:gQe}}=V3(),{format:cQe,parse:IQe}=Hf(),{toBuffer:lQe}=XC(),ej=Symbol("kAborted"),x_=[8,13],gs=["CONNECTING","OPEN","CLOSING","CLOSED"],pQe=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,Lt=class n extends zfe{constructor(r,o,i){super(),this._binaryType=W3[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=Kf,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=n.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,r!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,o===void 0?o=[]:Array.isArray(o)||(typeof o=="object"&&o!==null?(i=o,o=[]):o=[o]),Aj(this,r,o,i)):(this._autoPong=i.autoPong,this._closeTimeout=i.closeTimeout,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(r){W3.includes(r)&&(this._binaryType=r,this._receiver&&(this._receiver._binaryType=r))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(r,o,i){let e=new AQe({allowSynchronousEvents:i.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxBufferedChunks:i.maxBufferedChunks,maxFragments:i.maxFragments,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation}),a=new tQe(r,this._extensions,i.generateMask);this._receiver=e,this._sender=a,this._socket=r,e[Hr]=this,a[Hr]=this,r[Hr]=this,e.on("conclude",hQe),e.on("drain",dQe),e.on("error",uQe),e.on("message",BQe),e.on("ping",fQe),e.on("pong",QQe),a.onerror=yQe,r.setTimeout&&r.setTimeout(0),r.setNoDelay&&r.setNoDelay(),o.length>0&&r.unshift(o),r.on("close",aj),r.on("data",xf),r.on("end",ij),r.on("error",oj),this._readyState=n.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=n.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[ig.extensionName]&&this._extensions[ig.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=n.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(r,o){if(this.readyState!==n.CLOSED){if(this.readyState===n.CONNECTING){fi(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===n.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=n.CLOSING,this._sender.close(r,o,!this._isServer,i=>{i||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),rj(this)}}pause(){this.readyState===n.CONNECTING||this.readyState===n.CLOSED||(this._paused=!0,this._socket.pause())}ping(r,o,i){if(this.readyState===n.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof r=="function"?(i=r,r=o=void 0):typeof o=="function"&&(i=o,o=void 0),typeof r=="number"&&(r=r.toString()),this.readyState!==n.OPEN){j_(this,r,i);return}o===void 0&&(o=!this._isServer),this._sender.ping(r||Kf,o,i)}pong(r,o,i){if(this.readyState===n.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof r=="function"?(i=r,r=o=void 0):typeof o=="function"&&(i=o,o=void 0),typeof r=="number"&&(r=r.toString()),this.readyState!==n.OPEN){j_(this,r,i);return}o===void 0&&(o=!this._isServer),this._sender.pong(r||Kf,o,i)}resume(){this.readyState===n.CONNECTING||this.readyState===n.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(r,o,i){if(this.readyState===n.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof o=="function"&&(i=o,o={}),typeof r=="number"&&(r=r.toString()),this.readyState!==n.OPEN){j_(this,r,i);return}let e={binary:typeof r!="string",mask:!this._isServer,compress:!0,fin:!0,...o};this._extensions[ig.extensionName]||(e.compress=!1),this._sender.send(r||Kf,e,i)}terminate(){if(this.readyState!==n.CLOSED){if(this.readyState===n.CONNECTING){fi(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=n.CLOSING,this._socket.destroy())}}};Object.defineProperty(Lt,"CONNECTING",{enumerable:!0,value:gs.indexOf("CONNECTING")});Object.defineProperty(Lt.prototype,"CONNECTING",{enumerable:!0,value:gs.indexOf("CONNECTING")});Object.defineProperty(Lt,"OPEN",{enumerable:!0,value:gs.indexOf("OPEN")});Object.defineProperty(Lt.prototype,"OPEN",{enumerable:!0,value:gs.indexOf("OPEN")});Object.defineProperty(Lt,"CLOSING",{enumerable:!0,value:gs.indexOf("CLOSING")});Object.defineProperty(Lt.prototype,"CLOSING",{enumerable:!0,value:gs.indexOf("CLOSING")});Object.defineProperty(Lt,"CLOSED",{enumerable:!0,value:gs.indexOf("CLOSED")});Object.defineProperty(Lt.prototype,"CLOSED",{enumerable:!0,value:gs.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(n=>{Object.defineProperty(Lt.prototype,n,{enumerable:!0})});["open","error","close","message"].forEach(n=>{Object.defineProperty(Lt.prototype,`on${n}`,{enumerable:!0,get(){for(let r of this.listeners(n))if(r[Y_])return r[oQe];return null},set(r){for(let o of this.listeners(n))if(o[Y_]){this.removeListener(n,o);break}typeof r=="function"&&this.addEventListener(n,r,{[Y_]:!0})}})});Lt.prototype.addEventListener=sQe;Lt.prototype.removeEventListener=gQe;nj.exports=Lt;function Aj(n,r,o,i){let e={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:aQe,protocolVersion:x_[1],maxBufferedChunks:262144,maxFragments:16384,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...i,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(n._autoPong=e.autoPong,n._closeTimeout=e.closeTimeout,!x_.includes(e.protocolVersion))throw new RangeError(`Unsupported protocol version: ${e.protocolVersion} (supported versions: ${x_.join(", ")})`);let a;if(r instanceof K_)a=r;else try{a=new K_(r)}catch{throw new SyntaxError(`Invalid URL: ${r}`)}a.protocol==="http:"?a.protocol="ws:":a.protocol==="https:"&&(a.protocol="wss:"),n._url=a.href;let A=a.protocol==="wss:",t=a.protocol==="ws+unix:",s;if(a.protocol!=="ws:"&&!A&&!t?s=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:t&&!a.pathname?s="The URL's pathname is empty":a.hash&&(s="The URL contains a fragment identifier"),s){let Q=new SyntaxError(s);if(n._redirects===0)throw Q;Yf(n,Q);return}let g=A?443:80,c=$fe(16).toString("base64"),I=A?Wfe.request:Zfe.request,E=new Set,B;if(e.createConnection=e.createConnection||(A?CQe:EQe),e.defaultPort=e.defaultPort||g,e.port=a.port||g,e.host=a.hostname.startsWith("[")?a.hostname.slice(1,-1):a.hostname,e.headers={...e.headers,"Sec-WebSocket-Version":e.protocolVersion,"Sec-WebSocket-Key":c,Connection:"Upgrade",Upgrade:"websocket"},e.path=a.pathname+a.search,e.timeout=e.handshakeTimeout,e.perMessageDeflate&&(B=new ig({...e.perMessageDeflate,isServer:!1,maxPayload:e.maxPayload}),e.headers["Sec-WebSocket-Extensions"]=cQe({[ig.extensionName]:B.offer()})),o.length){for(let Q of o){if(typeof Q!="string"||!pQe.test(Q)||E.has(Q))throw new SyntaxError("An invalid or duplicated subprotocol was specified");E.add(Q)}e.headers["Sec-WebSocket-Protocol"]=o.join(",")}if(e.origin&&(e.protocolVersion<13?e.headers["Sec-WebSocket-Origin"]=e.origin:e.headers.Origin=e.origin),(a.username||a.password)&&(e.auth=`${a.username}:${a.password}`),t){let Q=e.path.split(":");e.socketPath=Q[0],e.path=Q[1]}let f;if(e.followRedirects){if(n._redirects===0){n._originalIpc=t,n._originalSecure=A,n._originalHostOrSocketPath=t?e.socketPath:a.host;let Q=i&&i.headers;if(i={...i,headers:{}},Q)for(let[y,m]of Object.entries(Q))i.headers[y.toLowerCase()]=m}else if(n.listenerCount("redirect")===0){let Q=t?n._originalIpc?e.socketPath===n._originalHostOrSocketPath:!1:n._originalIpc?!1:a.host===n._originalHostOrSocketPath;(!Q||n._originalSecure&&!A)&&(delete e.headers.authorization,delete e.headers.cookie,Q||delete e.headers.host,e.auth=void 0)}e.auth&&!i.headers.authorization&&(i.headers.authorization="Basic "+Buffer.from(e.auth).toString("base64")),f=n._req=I(e),n._redirects&&n.emit("redirect",n.url,f)}else f=n._req=I(e);e.timeout&&f.on("timeout",()=>{fi(n,f,"Opening handshake has timed out")}),f.on("error",Q=>{f===null||f[ej]||(f=n._req=null,Yf(n,Q))}),f.on("response",Q=>{let y=Q.headers.location,m=Q.statusCode;if(y&&e.followRedirects&&m>=300&&m<400){if(++n._redirects>e.maxRedirects){fi(n,f,"Maximum redirects exceeded");return}f.abort();let T;try{T=new K_(y,r)}catch{let P=new SyntaxError(`Invalid URL: ${y}`);Yf(n,P);return}Aj(n,T,o,i)}else n.emit("unexpected-response",f,Q)||fi(n,f,`Unexpected server response: ${Q.statusCode}`)}),f.on("upgrade",(Q,y,m)=>{if(n.emit("upgrade",Q),n.readyState!==Lt.CONNECTING)return;f=n._req=null;let T=Q.headers.upgrade;if(T===void 0||T.toLowerCase()!=="websocket"){fi(n,y,"Invalid Upgrade header");return}let _=eQe("sha1").update(c+iQe).digest("base64");if(Q.headers["sec-websocket-accept"]!==_){fi(n,y,"Invalid Sec-WebSocket-Accept header");return}let P=Q.headers["sec-websocket-protocol"],Y;if(P!==void 0?E.size?E.has(P)||(Y="Server sent an invalid subprotocol"):Y="Server sent a subprotocol but none was requested":E.size&&(Y="Server sent no subprotocol"),Y){fi(n,y,Y);return}P&&(n._protocol=P);let j=Q.headers["sec-websocket-extensions"];if(j!==void 0){if(!B){fi(n,y,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let K;try{K=IQe(j)}catch{fi(n,y,"Invalid Sec-WebSocket-Extensions header");return}let q=Object.keys(K);if(q.length!==1||q[0]!==ig.extensionName){fi(n,y,"Server indicated an extension that was not requested");return}try{B.accept(K[ig.extensionName])}catch{fi(n,y,"Invalid Sec-WebSocket-Extensions header");return}n._extensions[ig.extensionName]=B}n.setSocket(y,m,{allowSynchronousEvents:e.allowSynchronousEvents,generateMask:e.generateMask,maxBufferedChunks:e.maxBufferedChunks,maxFragments:e.maxFragments,maxPayload:e.maxPayload,skipUTF8Validation:e.skipUTF8Validation})}),e.finishRequest?e.finishRequest(f,n):f.end()}function Yf(n,r){n._readyState=Lt.CLOSING,n._errorEmitted=!0,n.emit("error",r),n.emitClose()}function EQe(n){return n.path=n.socketPath,X3.connect(n)}function CQe(n){return n.path=void 0,!n.servername&&n.servername!==""&&(n.servername=X3.isIP(n.host)?"":n.host),Xfe.connect(n)}function fi(n,r,o){n._readyState=Lt.CLOSING;let i=new Error(o);Error.captureStackTrace(i,fi),r.setHeader?(r[ej]=!0,r.abort(),r.socket&&!r.socket.destroyed&&r.socket.destroy(),process.nextTick(Yf,n,i)):(r.destroy(i),r.once("error",n.emit.bind(n,"error")),r.once("close",n.emitClose.bind(n)))}function j_(n,r,o){if(r){let i=rQe(r)?r.size:lQe(r).length;n._socket?n._sender._bufferedBytes+=i:n._bufferedAmount+=i}if(o){let i=new Error(`WebSocket is not open: readyState ${n.readyState} (${gs[n.readyState]})`);process.nextTick(o,i)}}function hQe(n,r){let o=this[Hr];o._closeFrameReceived=!0,o._closeMessage=r,o._closeCode=n,o._socket[Hr]!==void 0&&(o._socket.removeListener("data",xf),process.nextTick(tj,o._socket),n===1005?o.close():o.close(n,r))}function dQe(){let n=this[Hr];n.isPaused||n._socket.resume()}function uQe(n){let r=this[Hr];r._socket[Hr]!==void 0&&(r._socket.removeListener("data",xf),process.nextTick(tj,r._socket),r.close(n[nQe])),r._errorEmitted||(r._errorEmitted=!0,r.emit("error",n))}function Z3(){this[Hr].emitClose()}function BQe(n,r){this[Hr].emit("message",n,r)}function fQe(n){let r=this[Hr];r._autoPong&&r.pong(n,!this._isServer,$3),r.emit("ping",n)}function QQe(n){this[Hr].emit("pong",n)}function tj(n){n.resume()}function yQe(n){let r=this[Hr];r.readyState!==Lt.CLOSED&&(r.readyState===Lt.OPEN&&(r._readyState=Lt.CLOSING,rj(r)),this._socket.end(),r._errorEmitted||(r._errorEmitted=!0,r.emit("error",n)))}function rj(n){n._closeTimer=setTimeout(n._socket.destroy.bind(n._socket),n._closeTimeout)}function aj(){let n=this[Hr];if(this.removeListener("close",aj),this.removeListener("data",xf),this.removeListener("end",ij),n._readyState=Lt.CLOSING,!this._readableState.endEmitted&&!n._closeFrameReceived&&!n._receiver._writableState.errorEmitted&&this._readableState.length!==0){let r=this.read(this._readableState.length);n._receiver.write(r)}n._receiver.end(),this[Hr]=void 0,clearTimeout(n._closeTimer),n._receiver._writableState.finished||n._receiver._writableState.errorEmitted?n.emitClose():(n._receiver.on("error",Z3),n._receiver.on("finish",Z3))}function xf(n){this[Hr]._receiver.write(n)||this.pause()}function ij(){let n=this[Hr];n._readyState=Lt.CLOSING,n._receiver.end(),this.end()}function oj(){let n=this[Hr];this.removeListener("error",oj),this.on("error",$3),n&&(n._readyState=Lt.CLOSING,this.destroy())}});var Ij=W((D5e,cj)=>{"use strict";var S5e=jf(),{Duplex:mQe}=We("stream");function sj(n){n.emit("close")}function SQe(){!this.destroyed&&this._writableState.finished&&this.destroy()}function gj(n){this.removeListener("error",gj),this.destroy(),this.listenerCount("error")===0&&this.emit("error",n)}function DQe(n,r){let o=!0,i=new mQe({...r,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return n.on("message",function(a,A){let t=!A&&i._readableState.objectMode?a.toString():a;i.push(t)||n.pause()}),n.once("error",function(a){i.destroyed||(o=!1,i.destroy(a))}),n.once("close",function(){i.destroyed||i.push(null)}),i._destroy=function(e,a){if(n.readyState===n.CLOSED){a(e),process.nextTick(sj,i);return}let A=!1;n.once("error",function(s){A=!0,a(s)}),n.once("close",function(){A||a(e),process.nextTick(sj,i)}),o&&n.terminate()},i._final=function(e){if(n.readyState===n.CONNECTING){n.once("open",function(){i._final(e)});return}n._socket!==null&&(n._socket._writableState.finished?(e(),i._readableState.endEmitted&&i.destroy()):(n._socket.once("finish",function(){e()}),n.close()))},i._read=function(){n.isPaused&&n.resume()},i._write=function(e,a,A){if(n.readyState===n.CONNECTING){n.once("open",function(){i._write(e,a,A)});return}n.send(e,A)},i.on("end",SQe),i.on("error",gj),i}cj.exports=DQe});var J_=W((w5e,lj)=>{"use strict";var{tokenChars:wQe}=Ll();function OQe(n){let r=new Set,o=-1,i=-1,e=0;for(e;e{"use strict";var bQe=We("events"),Jf=We("http"),{Duplex:O5e}=We("stream"),{createHash:MQe}=We("crypto"),pj=Hf(),vc=Fl(),_Qe=J_(),NQe=jf(),{CLOSE_TIMEOUT:TQe,GUID:RQe,kWebSocket:kQe}=os(),vQe=/^[+/0-9A-Za-z]{22}==$/,Ej=0,Cj=1,dj=2,q_=class extends bQe{constructor(r,o){if(super(),r={allowSynchronousEvents:!0,autoPong:!0,maxBufferedChunks:256*1024,maxFragments:16*1024,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:TQe,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:NQe,...r},r.port==null&&!r.server&&!r.noServer||r.port!=null&&(r.server||r.noServer)||r.server&&r.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(r.port!=null?(this._server=Jf.createServer((i,e)=>{let a=Jf.STATUS_CODES[426];e.writeHead(426,{"Content-Length":a.length,"Content-Type":"text/plain"}),e.end(a)}),this._server.listen(r.port,r.host,r.backlog,o)):r.server&&(this._server=r.server),this._server){let i=this.emit.bind(this,"connection");this._removeListeners=PQe(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(e,a,A)=>{this.handleUpgrade(e,a,A,i)}})}r.perMessageDeflate===!0&&(r.perMessageDeflate={}),r.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=r,this._state=Ej}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(r){if(this._state===dj){r&&this.once("close",()=>{r(new Error("The server is not running"))}),process.nextTick(rh,this);return}if(r&&this.once("close",r),this._state!==Cj)if(this._state=Cj,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(rh,this):process.nextTick(rh,this);else{let o=this._server;this._removeListeners(),this._removeListeners=this._server=null,o.close(()=>{rh(this)})}}shouldHandle(r){if(this.options.path){let o=r.url.indexOf("?");if((o!==-1?r.url.slice(0,o):r.url)!==this.options.path)return!1}return!0}handleUpgrade(r,o,i,e){o.on("error",hj);let a=r.headers["sec-websocket-key"],A=r.headers.upgrade,t=+r.headers["sec-websocket-version"];if(r.method!=="GET"){Pc(this,r,o,405,"Invalid HTTP method");return}if(A===void 0||A.toLowerCase()!=="websocket"){Pc(this,r,o,400,"Invalid Upgrade header");return}if(a===void 0||!vQe.test(a)){Pc(this,r,o,400,"Missing or invalid Sec-WebSocket-Key header");return}if(t!==13&&t!==8){Pc(this,r,o,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle(r)){ah(o,400);return}let s=r.headers["sec-websocket-protocol"],g=new Set;if(s!==void 0)try{g=_Qe.parse(s)}catch{Pc(this,r,o,400,"Invalid Sec-WebSocket-Protocol header");return}let c=r.headers["sec-websocket-extensions"],I={};if(this.options.perMessageDeflate&&c!==void 0){let E=new vc({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let B=pj.parse(c);B[vc.extensionName]&&(E.accept(B[vc.extensionName]),I[vc.extensionName]=E)}catch{Pc(this,r,o,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let E={origin:r.headers[`${t===8?"sec-websocket-origin":"origin"}`],secure:!!(r.socket.authorized||r.socket.encrypted),req:r};if(this.options.verifyClient.length===2){this.options.verifyClient(E,(B,f,Q,y)=>{if(!B)return ah(o,f||401,Q,y);this.completeUpgrade(I,a,g,r,o,i,e)});return}if(!this.options.verifyClient(E))return ah(o,401)}this.completeUpgrade(I,a,g,r,o,i,e)}completeUpgrade(r,o,i,e,a,A,t){if(!a.readable||!a.writable)return a.destroy();if(a[kQe])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>Ej)return ah(a,503);let g=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${MQe("sha1").update(o+RQe).digest("base64")}`],c=new this.options.WebSocket(null,void 0,this.options);if(i.size){let I=this.options.handleProtocols?this.options.handleProtocols(i,e):i.values().next().value;I&&(g.push(`Sec-WebSocket-Protocol: ${I}`),c._protocol=I)}if(r[vc.extensionName]){let I=r[vc.extensionName].params,E=pj.format({[vc.extensionName]:[I]});g.push(`Sec-WebSocket-Extensions: ${E}`),c._extensions=r}this.emit("headers",g,e),a.write(g.concat(`\r `).join(`\r -`)),a.removeListener("error",hj),c.setSocket(a,A,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxBufferedChunks:this.options.maxBufferedChunks,maxFragments:this.options.maxFragments,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(c),c.on("close",()=>{this.clients.delete(c),this._shouldEmitClose&&!this.clients.size&&process.nextTick(rh,this)})),t(c,e)}};uj.exports=q_;function RQe(n,r){for(let o of Object.keys(r))n.on(o,r[o]);return function(){for(let i of Object.keys(r))n.removeListener(i,r[i])}}function rh(n){n._state=dj,n.emit("close")}function hj(){this.destroy()}function ah(n,r,o,i){o=o||Jf.STATUS_CODES[r],i={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(o),...i},n.once("finish",n.destroy),n.end(`HTTP/1.1 ${r} ${Jf.STATUS_CODES[r]}\r +`)),a.removeListener("error",hj),c.setSocket(a,A,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxBufferedChunks:this.options.maxBufferedChunks,maxFragments:this.options.maxFragments,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(c),c.on("close",()=>{this.clients.delete(c),this._shouldEmitClose&&!this.clients.size&&process.nextTick(rh,this)})),t(c,e)}};uj.exports=q_;function PQe(n,r){for(let o of Object.keys(r))n.on(o,r[o]);return function(){for(let i of Object.keys(r))n.removeListener(i,r[i])}}function rh(n){n._state=dj,n.emit("close")}function hj(){this.destroy()}function ah(n,r,o,i){o=o||Jf.STATUS_CODES[r],i={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(o),...i},n.once("finish",n.destroy),n.end(`HTTP/1.1 ${r} ${Jf.STATUS_CODES[r]}\r `+Object.keys(i).map(e=>`${e}: ${i[e]}`).join(`\r `)+`\r \r -`+o)}function Pc(n,r,o,i,e,a){if(n.listenerCount("wsClientError")){let A=new Error(e);Error.captureStackTrace(A,Pc),n.emit("wsClientError",A,o,r)}else ah(o,i,e,a)}});var yj=W((O5e,Qj)=>{"use strict";Qj.exports=HQe;function HQe(n,r){for(var o=new Array(arguments.length-1),i=0,e=2,a=!0;e{"use strict";var qf=Dj;qf.length=function(r){var o=r.length;if(!o)return 0;for(var i=0;--o%4>1&&r.charAt(o)==="=";)++i;return Math.ceil(r.length*3)/4-i};var xl=new Array(64),Sj=new Array(123);for(ko=0;ko<64;)Sj[xl[ko]=ko<26?ko+65:ko<52?ko+71:ko<62?ko-4:ko-59|43]=ko++;var ko;qf.encode=function(r,o,i){for(var e=null,a=[],A=0,t=0,s;o>2],s=(g&3)<<4,t=1;break;case 1:a[A++]=xl[s|g>>4],s=(g&15)<<2,t=2;break;case 2:a[A++]=xl[s|g>>6],a[A++]=xl[g&63],t=0;break}A>8191&&((e||(e=[])).push(String.fromCharCode.apply(String,a)),A=0)}return t&&(a[A++]=xl[s],a[A++]=61,t===1&&(a[A++]=61)),e?(A&&e.push(String.fromCharCode.apply(String,a.slice(0,A))),e.join("")):String.fromCharCode.apply(String,a.slice(0,A))};var mj="invalid encoding";qf.decode=function(r,o,i){for(var e=i,a=0,A,t=0;t1)break;if((s=Sj[s])===void 0)throw Error(mj);switch(a){case 0:A=s,a=1;break;case 1:o[i++]=A<<2|(s&48)>>4,A=s,a=2;break;case 2:o[i++]=(A&15)<<4|(s&60)>>2,A=s,a=3;break;case 3:o[i++]=(A&3)<<6|s,a=0;break}}if(a===1)throw Error(mj);return i-e};qf.test=function(r){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(r)}});var bj=W((M5e,Oj)=>{"use strict";Oj.exports=Vf;function Vf(){this._listeners=Object.create(null)}Vf.prototype.on=function(r,o,i){return(this._listeners[r]||(this._listeners[r]=[])).push({fn:o,ctx:i||this}),this};Vf.prototype.off=function(r,o){if(r===void 0)this._listeners=Object.create(null);else if(o===void 0)this._listeners[r]=[];else{var i=this._listeners[r];if(!i)return this;for(var e=0;e{"use strict";kj.exports=Mj(Mj);function Mj(n){return typeof Float32Array<"u"?(function(){var r=new Float32Array([-0]),o=new Uint8Array(r.buffer),i=o[3]===128;function e(s,g,c){r[0]=s,g[c]=o[0],g[c+1]=o[1],g[c+2]=o[2],g[c+3]=o[3]}function a(s,g,c){r[0]=s,g[c]=o[3],g[c+1]=o[2],g[c+2]=o[1],g[c+3]=o[0]}n.writeFloatLE=i?e:a,n.writeFloatBE=i?a:e;function A(s,g){return o[0]=s[g],o[1]=s[g+1],o[2]=s[g+2],o[3]=s[g+3],r[0]}function t(s,g){return o[3]=s[g],o[2]=s[g+1],o[1]=s[g+2],o[0]=s[g+3],r[0]}n.readFloatLE=i?A:t,n.readFloatBE=i?t:A})():(function(){function r(i,e,a,A){var t=e<0?1:0;if(t&&(e=-e),e===0)i(1/e>0?0:2147483648,a,A);else if(isNaN(e))i(2143289344,a,A);else if(e>34028234663852886e22)i((t<<31|2139095040)>>>0,a,A);else if(e<11754943508222875e-54)i((t<<31|Math.round(e/1401298464324817e-60))>>>0,a,A);else{var s=Math.floor(Math.log(e)/Math.LN2),g=Math.round(e*Math.pow(2,-s)*8388608)&8388607;i((t<<31|s+127<<23|g)>>>0,a,A)}}n.writeFloatLE=r.bind(null,_j),n.writeFloatBE=r.bind(null,Nj);function o(i,e,a){var A=i(e,a),t=(A>>31)*2+1,s=A>>>23&255,g=A&8388607;return s===255?g?NaN:t*(1/0):s===0?t*1401298464324817e-60*g:t*Math.pow(2,s-150)*(g+8388608)}n.readFloatLE=o.bind(null,Tj),n.readFloatBE=o.bind(null,Rj)})(),typeof Float64Array<"u"?(function(){var r=new Float64Array([-0]),o=new Uint8Array(r.buffer),i=o[7]===128;function e(s,g,c){r[0]=s,g[c]=o[0],g[c+1]=o[1],g[c+2]=o[2],g[c+3]=o[3],g[c+4]=o[4],g[c+5]=o[5],g[c+6]=o[6],g[c+7]=o[7]}function a(s,g,c){r[0]=s,g[c]=o[7],g[c+1]=o[6],g[c+2]=o[5],g[c+3]=o[4],g[c+4]=o[3],g[c+5]=o[2],g[c+6]=o[1],g[c+7]=o[0]}n.writeDoubleLE=i?e:a,n.writeDoubleBE=i?a:e;function A(s,g){return o[0]=s[g],o[1]=s[g+1],o[2]=s[g+2],o[3]=s[g+3],o[4]=s[g+4],o[5]=s[g+5],o[6]=s[g+6],o[7]=s[g+7],r[0]}function t(s,g){return o[7]=s[g],o[6]=s[g+1],o[5]=s[g+2],o[4]=s[g+3],o[3]=s[g+4],o[2]=s[g+5],o[1]=s[g+6],o[0]=s[g+7],r[0]}n.readDoubleLE=i?A:t,n.readDoubleBE=i?t:A})():(function(){function r(i,e,a,A,t,s){var g=A<0?1:0;if(g&&(A=-A),A===0)i(0,t,s+e),i(1/A>0?0:2147483648,t,s+a);else if(isNaN(A))i(0,t,s+e),i(2146959360,t,s+a);else if(A>17976931348623157e292)i(0,t,s+e),i((g<<31|2146435072)>>>0,t,s+a);else{var c;if(A<22250738585072014e-324)c=A/5e-324,i(c>>>0,t,s+e),i((g<<31|c/4294967296)>>>0,t,s+a);else{var I=Math.floor(Math.log(A)/Math.LN2);I===1024&&(I=1023),c=A*Math.pow(2,-I),i(c*4503599627370496>>>0,t,s+e),i((g<<31|I+1023<<20|c*1048576&1048575)>>>0,t,s+a)}}}n.writeDoubleLE=r.bind(null,_j,0,4),n.writeDoubleBE=r.bind(null,Nj,4,0);function o(i,e,a,A,t){var s=i(A,t+e),g=i(A,t+a),c=(g>>31)*2+1,I=g>>>20&2047,E=4294967296*(g&1048575)+s;return I===2047?E?NaN:c*(1/0):I===0?c*5e-324*E:c*Math.pow(2,I-1075)*(E+4503599627370496)}n.readDoubleLE=o.bind(null,Tj,0,4),n.readDoubleBE=o.bind(null,Rj,4,0)})(),n}function _j(n,r,o){r[o]=n&255,r[o+1]=n>>>8&255,r[o+2]=n>>>16&255,r[o+3]=n>>>24}function Nj(n,r,o){r[o]=n>>>24,r[o+1]=n>>>16&255,r[o+2]=n>>>8&255,r[o+3]=n&255}function Tj(n,r){return(n[r]|n[r+1]<<8|n[r+2]<<16|n[r+3]<<24)>>>0}function Rj(n,r){return(n[r]<<24|n[r+1]<<16|n[r+2]<<8|n[r+3])>>>0}});var Gj=W(Pj=>{"use strict";var z_=Pj,V_=65533;z_.length=function(r){for(var o=0,i=0,e=0;e=192&&t<224?(g=(t&31)<<6|r[o++]&63,a[A++]=g>=128?g:V_):t>=224&&t<240?(c=(t&15)<<12|(r[o++]&63)<<6|r[o++]&63,a[A++]=c>=2048?c:V_):t>=240&&(s=(t&7)<<18|(r[o++]&63)<<12|(r[o++]&63)<<6|r[o++]&63,s<65536||s>1114111?a[A++]=V_:(s-=65536,a[A++]=55296+(s>>10),a[A++]=56320+(s&1023))),A>8191&&((e||(e=[])).push(String.fromCharCode.apply(String,a.slice(0,A))),A=0);return e?(A&&e.push(String.fromCharCode.apply(String,a.slice(0,A))),e.join("")):String.fromCharCode.apply(String,a.slice(0,A))};z_.write=function(r,o,i){for(var e=i,a,A,t=0;t>6|192,o[i++]=a&63|128):(a&64512)===55296&&((A=r.charCodeAt(t+1))&64512)===56320?(a=65536+((a&1023)<<10)+(A&1023),++t,o[i++]=a>>18|240,o[i++]=a>>12&63|128,o[i++]=a>>6&63|128,o[i++]=a&63|128):(o[i++]=a>>12|224,o[i++]=a>>6&63|128,o[i++]=a&63|128);return i-e}});var Lj=W((T5e,Fj)=>{"use strict";Fj.exports=KQe;function KQe(n,r,o){var i=o||8192,e=i>>>1,a=null,A=i;return function(s){if(s<1||s>e)return n(s);A+s>i&&(a=n(i),A=0);var g=r.call(a,A,A+=s);return A&7&&(A=(A|7)+1),g}}});var Hj=W((R5e,Uj)=>{"use strict";Uj.exports=Kr;var ih=ng();function Kr(n,r){this.lo=n>>>0,this.hi=r>>>0}var Gc=Kr.zero=new Kr(0,0);Gc.toNumber=function(){return 0};Gc.zzEncode=Gc.zzDecode=function(){return this};Gc.length=function(){return 1};var YQe=Kr.zeroHash="\0\0\0\0\0\0\0\0";Kr.fromNumber=function(r){if(r===0)return Gc;var o=r<0;o&&(r=-r);var i=r>>>0,e=(r-i)/4294967296>>>0;return o&&(e=~e>>>0,i=~i>>>0,++i>4294967295&&(i=0,++e>4294967295&&(e=0))),new Kr(i,e)};Kr.from=function(r){if(typeof r=="number")return Kr.fromNumber(r);if(ih.isString(r))if(ih.Long)r=ih.Long.fromString(r);else return Kr.fromNumber(parseInt(r,10));return r.low||r.high?new Kr(r.low>>>0,r.high>>>0):Gc};Kr.prototype.toNumber=function(r){if(!r&&this.hi>>>31){var o=~this.lo+1>>>0,i=~this.hi>>>0;return o||(i=i+1>>>0),-(o+i*4294967296)}return this.lo+this.hi*4294967296};Kr.prototype.toLong=function(r){return ih.Long?new ih.Long(this.lo|0,this.hi|0,!!r):{low:this.lo|0,high:this.hi|0,unsigned:!!r}};var og=String.prototype.charCodeAt;Kr.fromHash=function(r){return r===YQe?Gc:new Kr((og.call(r,0)|og.call(r,1)<<8|og.call(r,2)<<16|og.call(r,3)<<24)>>>0,(og.call(r,4)|og.call(r,5)<<8|og.call(r,6)<<16|og.call(r,7)<<24)>>>0)};Kr.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};Kr.prototype.zzEncode=function(){var r=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^r)>>>0,this.lo=(this.lo<<1^r)>>>0,this};Kr.prototype.zzDecode=function(){var r=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^r)>>>0,this.hi=(this.hi>>>1^r)>>>0,this};Kr.prototype.length=function(){var r=this.lo,o=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return i===0?o===0?r<16384?r<128?1:2:r<2097152?3:4:o<16384?o<128?5:6:o<2097152?7:8:i<128?9:10}});var Kj=W((oh,W_)=>{(function(n,r){function o(i){return i.default||i}typeof define=="function"&&define.amd?define([],function(){var i={};return r(i),o(i)}):typeof oh=="object"?(r(oh),typeof W_=="object"&&(W_.exports=o(oh))):(function(){var i={};r(i),n.Long=o(i)})()})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:oh,function(n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=null;try{r=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function o(U,M,G){this.low=U|0,this.high=M|0,this.unsigned=!!G}o.prototype.__isLong__,Object.defineProperty(o.prototype,"__isLong__",{value:!0});function i(U){return(U&&U.__isLong__)===!0}function e(U){var M=Math.clz32(U&-U);return U?31-M:M}o.isLong=i;var a={},A={};function t(U,M){var G,te,Be;return M?(U>>>=0,(Be=0<=U&&U<256)&&(te=A[U],te)?te:(G=g(U,0,!0),Be&&(A[U]=G),G)):(U|=0,(Be=-128<=U&&U<128)&&(te=a[U],te)?te:(G=g(U,U<0?-1:0,!1),Be&&(a[U]=G),G))}o.fromInt=t;function s(U,M){if(isNaN(U))return M?P:_;if(M){if(U<0)return P;if(U>=y)return V}else{if(U<=-m)return H;if(U+1>=m)return q}return U<0?s(-U,M).neg():g(U%Q|0,U/Q|0,M)}o.fromNumber=s;function g(U,M,G){return new o(U,M,G)}o.fromBits=g;var c=Math.pow;function I(U,M,G){if(U.length===0)throw Error("empty string");if(typeof M=="number"?(G=M,M=!1):M=!!M,U==="NaN"||U==="Infinity"||U==="+Infinity"||U==="-Infinity")return M?P:_;if(G=G||10,G<2||360)throw Error("interior hyphen");if(te===0)return I(U.substring(1),M,G).neg();for(var Be=s(c(G,8)),Ce=_,ke=0;ke>>0:this.low},v.toNumber=function(){return this.unsigned?(this.high>>>0)*Q+(this.low>>>0):this.high*Q+(this.low>>>0)},v.toString=function(M){if(M=M||10,M<2||36>>0,Ve=_e.toString(M);if(ke=me,ke.isZero())return Ve+Ee;for(;Ve.length<6;)Ve="0"+Ve;Ee=""+Ve+Ee}},v.getHighBits=function(){return this.high},v.getHighBitsUnsigned=function(){return this.high>>>0},v.getLowBits=function(){return this.low},v.getLowBitsUnsigned=function(){return this.low>>>0},v.getNumBitsAbs=function(){if(this.isNegative())return this.eq(H)?64:this.neg().getNumBitsAbs();for(var M=this.high!=0?this.high:this.low,G=31;G>0&&(M&1<>21;return M?this.unsigned?!1:M===-1&&!(this.low===0&&this.high===-2097152):!0},v.isZero=function(){return this.high===0&&this.low===0},v.eqz=v.isZero,v.isNegative=function(){return!this.unsigned&&this.high<0},v.isPositive=function(){return this.unsigned||this.high>=0},v.isOdd=function(){return(this.low&1)===1},v.isEven=function(){return(this.low&1)===0},v.equals=function(M){return i(M)||(M=E(M)),this.unsigned!==M.unsigned&&this.high>>>31===1&&M.high>>>31===1?!1:this.high===M.high&&this.low===M.low},v.eq=v.equals,v.notEquals=function(M){return!this.eq(M)},v.neq=v.notEquals,v.ne=v.notEquals,v.lessThan=function(M){return this.comp(M)<0},v.lt=v.lessThan,v.lessThanOrEqual=function(M){return this.comp(M)<=0},v.lte=v.lessThanOrEqual,v.le=v.lessThanOrEqual,v.greaterThan=function(M){return this.comp(M)>0},v.gt=v.greaterThan,v.greaterThanOrEqual=function(M){return this.comp(M)>=0},v.gte=v.greaterThanOrEqual,v.ge=v.greaterThanOrEqual,v.compare=function(M){if(i(M)||(M=E(M)),this.eq(M))return 0;var G=this.isNegative(),te=M.isNegative();return G&&!te?-1:!G&&te?1:this.unsigned?M.high>>>0>this.high>>>0||M.high===this.high&&M.low>>>0>this.low>>>0?-1:1:this.sub(M).isNegative()?-1:1},v.comp=v.compare,v.negate=function(){return!this.unsigned&&this.eq(H)?H:this.not().add(Y)},v.neg=v.negate,v.add=function(M){i(M)||(M=E(M));var G=this.high>>>16,te=this.high&65535,Be=this.low>>>16,Ce=this.low&65535,ke=M.high>>>16,Ee=M.high&65535,me=M.low>>>16,_e=M.low&65535,Ve=0,oA=0,tA=0,Pe=0;return Pe+=Ce+_e,tA+=Pe>>>16,Pe&=65535,tA+=Be+me,oA+=tA>>>16,tA&=65535,oA+=te+Ee,Ve+=oA>>>16,oA&=65535,Ve+=G+ke,Ve&=65535,g(tA<<16|Pe,Ve<<16|oA,this.unsigned)},v.subtract=function(M){return i(M)||(M=E(M)),this.add(M.neg())},v.sub=v.subtract,v.multiply=function(M){if(this.isZero())return this;if(i(M)||(M=E(M)),r){var G=r.mul(this.low,this.high,M.low,M.high);return g(G,r.get_high(),this.unsigned)}if(M.isZero())return this.unsigned?P:_;if(this.eq(H))return M.isOdd()?H:_;if(M.eq(H))return this.isOdd()?H:_;if(this.isNegative())return M.isNegative()?this.neg().mul(M.neg()):this.neg().mul(M).neg();if(M.isNegative())return this.mul(M.neg()).neg();if(this.lt(T)&&M.lt(T))return s(this.toNumber()*M.toNumber(),this.unsigned);var te=this.high>>>16,Be=this.high&65535,Ce=this.low>>>16,ke=this.low&65535,Ee=M.high>>>16,me=M.high&65535,_e=M.low>>>16,Ve=M.low&65535,oA=0,tA=0,Pe=0,gA=0;return gA+=ke*Ve,Pe+=gA>>>16,gA&=65535,Pe+=Ce*Ve,tA+=Pe>>>16,Pe&=65535,Pe+=ke*_e,tA+=Pe>>>16,Pe&=65535,tA+=Be*Ve,oA+=tA>>>16,tA&=65535,tA+=Ce*_e,oA+=tA>>>16,tA&=65535,tA+=ke*me,oA+=tA>>>16,tA&=65535,oA+=te*Ve+Be*_e+Ce*me+ke*Ee,oA&=65535,g(Pe<<16|gA,oA<<16|tA,this.unsigned)},v.mul=v.multiply,v.divide=function(M){if(i(M)||(M=E(M)),M.isZero())throw Error("division by zero");if(r){if(!this.unsigned&&this.high===-2147483648&&M.low===-1&&M.high===-1)return this;var G=(this.unsigned?r.div_u:r.div_s)(this.low,this.high,M.low,M.high);return g(G,r.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?P:_;var te,Be,Ce;if(this.unsigned){if(M.unsigned||(M=M.toUnsigned()),M.gt(this))return P;if(M.gt(this.shru(1)))return j;Ce=P}else{if(this.eq(H)){if(M.eq(Y)||M.eq(K))return H;if(M.eq(H))return Y;var ke=this.shr(1);return te=ke.div(M).shl(1),te.eq(_)?M.isNegative()?Y:K:(Be=this.sub(M.mul(te)),Ce=te.add(Be.div(M)),Ce)}else if(M.eq(H))return this.unsigned?P:_;if(this.isNegative())return M.isNegative()?this.neg().div(M.neg()):this.neg().div(M).neg();if(M.isNegative())return this.div(M.neg()).neg();Ce=_}for(Be=this;Be.gte(M);){te=Math.max(1,Math.floor(Be.toNumber()/M.toNumber()));for(var Ee=Math.ceil(Math.log(te)/Math.LN2),me=Ee<=48?1:c(2,Ee-48),_e=s(te),Ve=_e.mul(M);Ve.isNegative()||Ve.gt(Be);)te-=me,_e=s(te,this.unsigned),Ve=_e.mul(M);_e.isZero()&&(_e=Y),Ce=Ce.add(_e),Be=Be.sub(Ve)}return Ce},v.div=v.divide,v.modulo=function(M){if(i(M)||(M=E(M)),r){var G=(this.unsigned?r.rem_u:r.rem_s)(this.low,this.high,M.low,M.high);return g(G,r.get_high(),this.unsigned)}return this.sub(this.div(M).mul(M))},v.mod=v.modulo,v.rem=v.modulo,v.not=function(){return g(~this.low,~this.high,this.unsigned)},v.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},v.clz=v.countLeadingZeros,v.countTrailingZeros=function(){return this.low?e(this.low):e(this.high)+32},v.ctz=v.countTrailingZeros,v.and=function(M){return i(M)||(M=E(M)),g(this.low&M.low,this.high&M.high,this.unsigned)},v.or=function(M){return i(M)||(M=E(M)),g(this.low|M.low,this.high|M.high,this.unsigned)},v.xor=function(M){return i(M)||(M=E(M)),g(this.low^M.low,this.high^M.high,this.unsigned)},v.shiftLeft=function(M){return i(M)&&(M=M.toInt()),(M&=63)===0?this:M<32?g(this.low<>>32-M,this.unsigned):g(0,this.low<>>M|this.high<<32-M,this.high>>M,this.unsigned):g(this.high>>M-32,this.high>=0?0:-1,this.unsigned)},v.shr=v.shiftRight,v.shiftRightUnsigned=function(M){return i(M)&&(M=M.toInt()),(M&=63)===0?this:M<32?g(this.low>>>M|this.high<<32-M,this.high>>>M,this.unsigned):M===32?g(this.high,0,this.unsigned):g(this.high>>>M-32,0,this.unsigned)},v.shru=v.shiftRightUnsigned,v.shr_u=v.shiftRightUnsigned,v.rotateLeft=function(M){var G;return i(M)&&(M=M.toInt()),(M&=63)===0?this:M===32?g(this.high,this.low,this.unsigned):M<32?(G=32-M,g(this.low<>>G,this.high<>>G,this.unsigned)):(M-=32,G=32-M,g(this.high<>>G,this.low<>>G,this.unsigned))},v.rotl=v.rotateLeft,v.rotateRight=function(M){var G;return i(M)&&(M=M.toInt()),(M&=63)===0?this:M===32?g(this.high,this.low,this.unsigned):M<32?(G=32-M,g(this.high<>>M,this.low<>>M,this.unsigned)):(M-=32,G=32-M,g(this.low<>>M,this.high<>>M,this.unsigned))},v.rotr=v.rotateRight,v.toSigned=function(){return this.unsigned?g(this.low,this.high,!1):this},v.toUnsigned=function(){return this.unsigned?this:g(this.low,this.high,!0)},v.toBytes=function(M){return M?this.toBytesLE():this.toBytesBE()},v.toBytesLE=function(){var M=this.high,G=this.low;return[G&255,G>>>8&255,G>>>16&255,G>>>24,M&255,M>>>8&255,M>>>16&255,M>>>24]},v.toBytesBE=function(){var M=this.high,G=this.low;return[M>>>24,M>>>16&255,M>>>8&255,M&255,G>>>24,G>>>16&255,G>>>8&255,G&255]},o.fromBytes=function(M,G,te){return te?o.fromBytesLE(M,G):o.fromBytesBE(M,G)},o.fromBytesLE=function(M,G){return new o(M[0]|M[1]<<8|M[2]<<16|M[3]<<24,M[4]|M[5]<<8|M[6]<<16|M[7]<<24,G)},o.fromBytesBE=function(M,G){return new o(M[4]<<24|M[5]<<16|M[6]<<8|M[7],M[0]<<24|M[1]<<16|M[2]<<8|M[3],G)},typeof BigInt=="function"&&(o.fromBigInt=function(M,G){var te=Number(BigInt.asIntN(32,M)),Be=Number(BigInt.asIntN(32,M>>BigInt(32)));return g(te,Be,G)},o.fromValue=function(M,G){return typeof M=="bigint"?o.fromBigInt(M,G):E(M,G)},v.toBigInt=function(){var M=BigInt(this.low>>>0),G=BigInt(this.unsigned?this.high>>>0:this.high);return G<{"use strict";var dA=Z_;dA.asPromise=yj();dA.base64=wj();dA.EventEmitter=bj();dA.float=vj();dA.utf8=Gj();dA.pool=Lj();dA.LongBits=Hj();function Yj(n){return n==="__proto__"||n==="prototype"||n==="constructor"}dA.isUnsafeProperty=Yj;dA.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);dA.global=dA.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||Z_;dA.emptyArray=Object.freeze?Object.freeze([]):[];dA.emptyObject=Object.freeze?Object.freeze({}):{};dA.isInteger=Number.isInteger||function(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r};dA.isString=function(r){return typeof r=="string"||r instanceof String};dA.isObject=function(r){return r&&typeof r=="object"};dA.isset=dA.isSet=function(r,o){var i=r[o];return i!=null&&Object.hasOwnProperty.call(r,o)?typeof i!="object"||(Array.isArray(i)?i.length:Object.keys(i).length)>0:!1};dA.Buffer=(function(){try{var n=dA.global.Buffer;return n.prototype.utf8Write?n:null}catch{return null}})();dA._Buffer_from=null;dA._Buffer_allocUnsafe=null;dA.newBuffer=function(r){return typeof r=="number"?dA.Buffer?dA._Buffer_allocUnsafe(r):new dA.Array(r):dA.Buffer?dA._Buffer_from(r):typeof Uint8Array>"u"?r:new Uint8Array(r)};dA.Array=typeof Uint8Array<"u"?Uint8Array:Array;dA.Long=dA.global.dcodeIO&&dA.global.dcodeIO.Long||dA.global.Long||(function(){try{var n=Kj();return n&&n.isLong?n:null}catch{return null}})();dA.key2Re=/^true|false|0|1$/;dA.key32Re=/^-?(?:0|[1-9][0-9]*)$/;dA.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;dA.longToHash=function(r){return r?dA.LongBits.from(r).toHash():dA.LongBits.zeroHash};dA.longFromHash=function(r,o){var i=dA.LongBits.fromHash(r);return dA.Long?dA.Long.fromBits(i.lo,i.hi,o):i.toNumber(!!o)};function xj(n){var r=typeof arguments[arguments.length-1]=="boolean",o=r?arguments.length-1:arguments.length;r=r&&arguments[arguments.length-1];for(var i=1;i-1;--a)if(o[e[a]]===1&&this[e[a]]!==void 0&&this[e[a]]!==null)return e[a]}};dA.oneOfSetter=function(r){return function(o){for(var i=0;i{"use strict";zj.exports=lt;var Wi=ng(),X_,zf=Wi.LongBits,Jj=Wi.base64,qj=Wi.utf8;function nh(n,r,o){this.fn=n,this.len=r,this.next=void 0,this.val=o}function eN(){}function xQe(n){this.head=n.head,this.tail=n.tail,this.len=n.len,this.next=n.states}function lt(){this.len=0,this.head=new nh(eN,0,0),this.tail=this.head,this.states=null}var Vj=function(){return Wi.Buffer?function(){return(lt.create=function(){return new X_})()}:function(){return new lt}};lt.create=Vj();lt.alloc=function(r){return new Wi.Array(r)};Wi.Array!==Array&&(lt.alloc=Wi.pool(lt.alloc,Wi.Array.prototype.subarray));lt.prototype._push=function(r,o,i){return this.tail=this.tail.next=new nh(r,o,i),this.len+=o,this};function AN(n,r,o){r[o]=n&255}function jQe(n,r,o){for(;n>127;)r[o++]=n&127|128,n>>>=7;r[o]=n}function tN(n,r){this.len=n,this.next=void 0,this.val=r}tN.prototype=Object.create(nh.prototype);tN.prototype.fn=jQe;lt.prototype.uint32=function(r){return this.len+=(this.tail=this.tail.next=new tN((r=r>>>0)<128?1:r<16384?2:r<2097152?3:r<268435456?4:5,r)).len,this};lt.prototype.int32=function(r){return(r|=0)<0?this._push(rN,10,zf.fromNumber(r)):this.uint32(r)};lt.prototype.sint32=function(r){return this.uint32((r<<1^r>>31)>>>0)};function rN(n,r,o){for(var i=n.lo,e=n.hi;e;)r[o++]=i&127|128,i=(i>>>7|e<<25)>>>0,e>>>=7;for(;i>127;)r[o++]=i&127|128,i=i>>>7;r[o++]=i}lt.prototype.uint64=function(r){var o=zf.from(r);return this._push(rN,o.length(),o)};lt.prototype.int64=lt.prototype.uint64;lt.prototype.sint64=function(r){var o=zf.from(r).zzEncode();return this._push(rN,o.length(),o)};lt.prototype.bool=function(r){return this._push(AN,1,r?1:0)};function $_(n,r,o){r[o]=n&255,r[o+1]=n>>>8&255,r[o+2]=n>>>16&255,r[o+3]=n>>>24}lt.prototype.fixed32=function(r){return this._push($_,4,r>>>0)};lt.prototype.sfixed32=lt.prototype.fixed32;lt.prototype.fixed64=function(r){var o=zf.from(r);return this._push($_,4,o.lo)._push($_,4,o.hi)};lt.prototype.sfixed64=lt.prototype.fixed64;lt.prototype.float=function(r){return this._push(Wi.float.writeFloatLE,4,r)};lt.prototype.double=function(r){return this._push(Wi.float.writeDoubleLE,8,r)};var JQe=Wi.Array.prototype.set?function(r,o,i){o.set(r,i)}:function(r,o,i){for(var e=0;e>>0;if(!o)return this._push(AN,1,0);if(Wi.isString(r)){var i=lt.alloc(o=Jj.length(r));Jj.decode(r,i,0),r=i}return this.uint32(o)._push(JQe,o,r)};lt.prototype.string=function(r){var o=qj.length(r);return o?this.uint32(o)._push(qj.write,o,r):this._push(AN,1,0)};lt.prototype.fork=function(){return this.states=new xQe(this),this.head=this.tail=new nh(eN,0,0),this.len=0,this};lt.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new nh(eN,0,0),this.len=0),this};lt.prototype.ldelim=function(){var r=this.head,o=this.tail,i=this.len;return this.reset().uint32(i),i&&(this.tail.next=r.next,this.tail=o,this.len+=i),this};lt.prototype.finish=function(){for(var r=this.head.next,o=this.constructor.alloc(this.len),i=0;r;)r.fn(r.val,o,i),i+=r.len,r=r.next;return o};lt._configure=function(n){X_=n,lt.create=Vj(),X_._configure()}});var Xj=W((P5e,Zj)=>{"use strict";Zj.exports=pn;var Wj=aN();(pn.prototype=Object.create(Wj.prototype)).constructor=pn;var sg=ng();function pn(){Wj.call(this)}pn._configure=function(){pn.alloc=sg._Buffer_allocUnsafe,pn.writeBytesBuffer=sg.Buffer&&sg.Buffer.prototype instanceof Uint8Array&&sg.Buffer.prototype.set.name==="set"?function(r,o,i){o.set(r,i)}:function(r,o,i){if(r.copy)r.copy(o,i,0,r.length);else for(var e=0;e>>0;return this.uint32(o),o&&this._push(pn.writeBytesBuffer,o,r),this};function qQe(n,r,o){n.length<40?sg.utf8.write(n,r,o):r.utf8Write?r.utf8Write(n,o):r.write(n,o)}pn.prototype.string=function(r){var o=sg.Buffer.byteLength(r);return this.uint32(o),o&&this._push(qQe,o,r),this};pn._configure()});var nN=W((G5e,rJ)=>{"use strict";rJ.exports=Zt;var Zi=ng(),oN,AJ=Zi.LongBits,VQe=Zi.utf8;function vo(n,r){return RangeError("index out of range: "+n.pos+" + "+(r||1)+" > "+n.len)}function Zt(n){this.buf=n,this.pos=0,this.len=n.length}var $j=typeof Uint8Array<"u"?function(r){if(r instanceof Uint8Array||Array.isArray(r))return new Zt(r);throw Error("illegal buffer")}:function(r){if(Array.isArray(r))return new Zt(r);throw Error("illegal buffer")},tJ=function(){return Zi.Buffer?function(o){return(Zt.create=function(e){return Zi.Buffer.isBuffer(e)?new oN(e):$j(e)})(o)}:$j};Zt.create=tJ();Zt.prototype._slice=Zi.Array.prototype.subarray||Zi.Array.prototype.slice;Zt.prototype.uint32=(function(){var r=4294967295;return function(){if(r=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(r=(r|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(r=(r|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(r=(r|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(r=(r|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return r;if((this.pos+=5)>this.len)throw this.pos=this.len,vo(this,10);return r}})();Zt.prototype.int32=function(){return this.uint32()|0};Zt.prototype.sint32=function(){var r=this.uint32();return r>>>1^-(r&1)|0};function iN(){var n=new AJ(0,0),r=0;if(this.len-this.pos>4){for(;r<4;++r)if(n.lo=(n.lo|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return n;if(n.lo=(n.lo|(this.buf[this.pos]&127)<<28)>>>0,n.hi=(n.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return n;r=0}else{for(;r<3;++r){if(this.pos>=this.len)throw vo(this);if(n.lo=(n.lo|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return n}return n.lo=(n.lo|(this.buf[this.pos++]&127)<>>0,n}if(this.len-this.pos>4){for(;r<5;++r)if(n.hi=(n.hi|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return n}else for(;r<5;++r){if(this.pos>=this.len)throw vo(this);if(n.hi=(n.hi|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return n}throw Error("invalid varint encoding")}Zt.prototype.bool=function(){return this.uint32()!==0};function Wf(n,r){return(n[r-4]|n[r-3]<<8|n[r-2]<<16|n[r-1]<<24)>>>0}Zt.prototype.fixed32=function(){if(this.pos+4>this.len)throw vo(this,4);return Wf(this.buf,this.pos+=4)};Zt.prototype.sfixed32=function(){if(this.pos+4>this.len)throw vo(this,4);return Wf(this.buf,this.pos+=4)|0};function eJ(){if(this.pos+8>this.len)throw vo(this,8);return new AJ(Wf(this.buf,this.pos+=4),Wf(this.buf,this.pos+=4))}Zt.prototype.float=function(){if(this.pos+4>this.len)throw vo(this,4);var r=Zi.float.readFloatLE(this.buf,this.pos);return this.pos+=4,r};Zt.prototype.double=function(){if(this.pos+8>this.len)throw vo(this,4);var r=Zi.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,r};Zt.prototype.bytes=function(){var r=this.uint32(),o=this.pos,i=this.pos+r;if(i>this.len)throw vo(this,r);if(this.pos+=r,Array.isArray(this.buf))return this.buf.slice(o,i);if(o===i){var e=Zi.Buffer;return e?e.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,o,i)};Zt.prototype.string=function(){var r=this.bytes();return VQe.read(r,0,r.length)};Zt.prototype.skip=function(r){if(typeof r=="number"){if(this.pos+r>this.len)throw vo(this,r);this.pos+=r}else do if(this.pos>=this.len)throw vo(this);while(this.buf[this.pos++]&128);return this};Zt.recursionLimit=Zi.recursionLimit;Zt.prototype.skipType=function(n,r){if(r===void 0&&(r=0),r>Zt.recursionLimit)throw Error("maximum nesting depth exceeded");switch(n){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(n=this.uint32()&7)!==4;)this.skipType(n,r+1);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+n+" at offset "+this.pos)}return this};Zt._configure=function(n){oN=n,Zt.create=tJ(),oN._configure();var r=Zi.Long?"toLong":"toNumber";Zi.merge(Zt.prototype,{int64:function(){return iN.call(this)[r](!1)},uint64:function(){return iN.call(this)[r](!0)},sint64:function(){return iN.call(this).zzDecode()[r](!1)},fixed64:function(){return eJ.call(this)[r](!0)},sfixed64:function(){return eJ.call(this)[r](!1)}})}});var nJ=W((F5e,oJ)=>{"use strict";oJ.exports=Fc;var iJ=nN();(Fc.prototype=Object.create(iJ.prototype)).constructor=Fc;var aJ=ng();function Fc(n){iJ.call(this,n)}Fc._configure=function(){aJ.Buffer&&(Fc.prototype._slice=aJ.Buffer.prototype.slice)};Fc.prototype.string=function(){var r=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+r,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+r,this.len))};Fc._configure()});var gJ=W((L5e,sJ)=>{"use strict";sJ.exports=sh;var sN=ng();(sh.prototype=Object.create(sN.EventEmitter.prototype)).constructor=sh;function sh(n,r,o){if(typeof n!="function")throw TypeError("rpcImpl must be a function");sN.EventEmitter.call(this),this.rpcImpl=n,this.requestDelimited=!!r,this.responseDelimited=!!o}sh.prototype.rpcCall=function n(r,o,i,e,a){if(!e)throw TypeError("request must be specified");var A=this;if(!a)return sN.asPromise(n,A,r,o,i,e);if(!A.rpcImpl){setTimeout(function(){a(Error("already ended"))},0);return}try{return A.rpcImpl(r,o[A.requestDelimited?"encodeDelimited":"encode"](e).finish(),function(s,g){if(s)return A.emit("error",s,r),a(s);if(g===null){A.end(!0);return}if(!(g instanceof i))try{g=i[A.responseDelimited?"decodeDelimited":"decode"](g)}catch(c){return A.emit("error",c,r),a(c)}return A.emit("data",g,r),a(null,g)})}catch(t){A.emit("error",t,r),setTimeout(function(){a(t)},0);return}};sh.prototype.end=function(r){return this.rpcImpl&&(r||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var IJ=W(cJ=>{"use strict";var zQe=cJ;zQe.Service=gJ()});var pJ=W((H5e,lJ)=>{"use strict";lJ.exports=Object.create(null)});var hJ=W(CJ=>{"use strict";var Ai=CJ;Ai.build="minimal";Ai.Writer=aN();Ai.BufferWriter=Xj();Ai.Reader=nN();Ai.BufferReader=nJ();Ai.util=ng();Ai.rpc=IJ();Ai.roots=pJ();Ai.configure=EJ;function EJ(){Ai.util._configure(),Ai.Writer._configure(Ai.BufferWriter),Ai.Reader._configure(Ai.BufferReader)}EJ()});var Zf=W((Y5e,dJ)=>{"use strict";dJ.exports=hJ()});var Zq=W(At=>{"use strict";var Oh=Symbol.for("react.element"),RDe=Symbol.for("react.portal"),kDe=Symbol.for("react.fragment"),vDe=Symbol.for("react.strict_mode"),PDe=Symbol.for("react.profiler"),GDe=Symbol.for("react.provider"),FDe=Symbol.for("react.context"),LDe=Symbol.for("react.forward_ref"),UDe=Symbol.for("react.suspense"),HDe=Symbol.for("react.memo"),KDe=Symbol.for("react.lazy"),Uq=Symbol.iterator;function YDe(n){return n===null||typeof n!="object"?null:(n=Uq&&n[Uq]||n["@@iterator"],typeof n=="function"?n:null)}var Yq={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},xq=Object.assign,jq={};function Xl(n,r,o){this.props=n,this.context=r,this.refs=jq,this.updater=o||Yq}Xl.prototype.isReactComponent={};Xl.prototype.setState=function(n,r){if(typeof n!="object"&&typeof n!="function"&&n!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,n,r,"setState")};Xl.prototype.forceUpdate=function(n){this.updater.enqueueForceUpdate(this,n,"forceUpdate")};function Jq(){}Jq.prototype=Xl.prototype;function lR(n,r,o){this.props=n,this.context=r,this.refs=jq,this.updater=o||Yq}var pR=lR.prototype=new Jq;pR.constructor=lR;xq(pR,Xl.prototype);pR.isPureReactComponent=!0;var Hq=Array.isArray,qq=Object.prototype.hasOwnProperty,ER={current:null},Vq={key:!0,ref:!0,__self:!0,__source:!0};function zq(n,r,o){var i,e={},a=null,A=null;if(r!=null)for(i in r.ref!==void 0&&(A=r.ref),r.key!==void 0&&(a=""+r.key),r)qq.call(r,i)&&!Vq.hasOwnProperty(i)&&(e[i]=r[i]);var t=arguments.length-2;if(t===1)e.children=o;else if(1{"use strict";process.env.NODE_ENV!=="production"&&(function(){"use strict";typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var n="18.3.1",r=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),e=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),A=Symbol.for("react.provider"),t=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),B=Symbol.for("react.offscreen"),f=Symbol.iterator,Q="@@iterator";function y(k){if(k===null||typeof k!="object")return null;var $=f&&k[f]||k[Q];return typeof $=="function"?$:null}var m={current:null},T={transition:null},_={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},P={current:null},Y={},j=null;function K(k){j=k}Y.setExtraStackFrame=function(k){j=k},Y.getCurrentStack=null,Y.getStackAddendum=function(){var k="";j&&(k+=j);var $=Y.getCurrentStack;return $&&(k+=$()||""),k};var q=!1,V=!1,H=!1,v=!1,Z=!1,U={ReactCurrentDispatcher:m,ReactCurrentBatchConfig:T,ReactCurrentOwner:P};U.ReactDebugCurrentFrame=Y,U.ReactCurrentActQueue=_;function M(k){{for(var $=arguments.length,ge=new Array($>1?$-1:0),fe=1;fe<$;fe++)ge[fe-1]=arguments[fe];te("warn",k,ge)}}function G(k){{for(var $=arguments.length,ge=new Array($>1?$-1:0),fe=1;fe<$;fe++)ge[fe-1]=arguments[fe];te("error",k,ge)}}function te(k,$,ge){{var fe=U.ReactDebugCurrentFrame,xe=fe.getStackAddendum();xe!==""&&($+="%s",ge=ge.concat([xe]));var MA=ge.map(function(CA){return String(CA)});MA.unshift("Warning: "+$),Function.prototype.apply.call(console[k],console,MA)}}var Be={};function Ce(k,$){{var ge=k.constructor,fe=ge&&(ge.displayName||ge.name)||"ReactClass",xe=fe+"."+$;if(Be[xe])return;G("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",$,fe),Be[xe]=!0}}var ke={isMounted:function(k){return!1},enqueueForceUpdate:function(k,$,ge){Ce(k,"forceUpdate")},enqueueReplaceState:function(k,$,ge,fe){Ce(k,"replaceState")},enqueueSetState:function(k,$,ge,fe){Ce(k,"setState")}},Ee=Object.assign,me={};Object.freeze(me);function _e(k,$,ge){this.props=k,this.context=$,this.refs=me,this.updater=ge||ke}_e.prototype.isReactComponent={},_e.prototype.setState=function(k,$){if(typeof k!="object"&&typeof k!="function"&&k!=null)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,k,$,"setState")},_e.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};{var Ve={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},oA=function(k,$){Object.defineProperty(_e.prototype,k,{get:function(){M("%s(...) is deprecated in plain JavaScript React classes. %s",$[0],$[1])}})};for(var tA in Ve)Ve.hasOwnProperty(tA)&&oA(tA,Ve[tA])}function Pe(){}Pe.prototype=_e.prototype;function gA(k,$,ge){this.props=k,this.context=$,this.refs=me,this.updater=ge||ke}var Qe=gA.prototype=new Pe;Qe.constructor=gA,Ee(Qe,_e.prototype),Qe.isPureReactComponent=!0;function he(){var k={current:null};return Object.seal(k),k}var ze=Array.isArray;function Ke(k){return ze(k)}function De(k){{var $=typeof Symbol=="function"&&Symbol.toStringTag,ge=$&&k[Symbol.toStringTag]||k.constructor.name||"Object";return ge}}function EA(k){try{return pA(k),!1}catch{return!0}}function pA(k){return""+k}function AA(k){if(EA(k))return G("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",De(k)),pA(k)}function qe(k,$,ge){var fe=k.displayName;if(fe)return fe;var xe=$.displayName||$.name||"";return xe!==""?ge+"("+xe+")":ge}function wA(k){return k.displayName||"Context"}function pe(k){if(k==null)return null;if(typeof k.tag=="number"&&G("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof k=="function")return k.displayName||k.name||null;if(typeof k=="string")return k;switch(k){case i:return"Fragment";case o:return"Portal";case a:return"Profiler";case e:return"StrictMode";case g:return"Suspense";case c:return"SuspenseList"}if(typeof k=="object")switch(k.$$typeof){case t:var $=k;return wA($)+".Consumer";case A:var ge=k;return wA(ge._context)+".Provider";case s:return qe(k,k.render,"ForwardRef");case I:var fe=k.displayName||null;return fe!==null?fe:pe(k.type)||"Memo";case E:{var xe=k,MA=xe._payload,CA=xe._init;try{return pe(CA(MA))}catch{return null}}}return null}var Me=Object.prototype.hasOwnProperty,Ge={key:!0,ref:!0,__self:!0,__source:!0},OA,Le,bA;bA={};function $A(k){if(Me.call(k,"ref")){var $=Object.getOwnPropertyDescriptor(k,"ref").get;if($&&$.isReactWarning)return!1}return k.ref!==void 0}function mA(k){if(Me.call(k,"key")){var $=Object.getOwnPropertyDescriptor(k,"key").get;if($&&$.isReactWarning)return!1}return k.key!==void 0}function nt(k,$){var ge=function(){OA||(OA=!0,G("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",$))};ge.isReactWarning=!0,Object.defineProperty(k,"key",{get:ge,configurable:!0})}function Ar(k,$){var ge=function(){Le||(Le=!0,G("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",$))};ge.isReactWarning=!0,Object.defineProperty(k,"ref",{get:ge,configurable:!0})}function GA(k){if(typeof k.ref=="string"&&P.current&&k.__self&&P.current.stateNode!==k.__self){var $=pe(P.current.type);bA[$]||(G('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',$,k.ref),bA[$]=!0)}}var se=function(k,$,ge,fe,xe,MA,CA){var UA={$$typeof:r,type:k,key:$,ref:ge,props:CA,_owner:MA};return UA._store={},Object.defineProperty(UA._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(UA,"_self",{configurable:!1,enumerable:!1,writable:!1,value:fe}),Object.defineProperty(UA,"_source",{configurable:!1,enumerable:!1,writable:!1,value:xe}),Object.freeze&&(Object.freeze(UA.props),Object.freeze(UA)),UA};function de(k,$,ge){var fe,xe={},MA=null,CA=null,UA=null,st=null;if($!=null){$A($)&&(CA=$.ref,GA($)),mA($)&&(AA($.key),MA=""+$.key),UA=$.__self===void 0?null:$.__self,st=$.__source===void 0?null:$.__source;for(fe in $)Me.call($,fe)&&!Ge.hasOwnProperty(fe)&&(xe[fe]=$[fe])}var mt=arguments.length-2;if(mt===1)xe.children=ge;else if(mt>1){for(var Pt=Array(mt),Gt=0;Gt1){for(var Jt=Array(Gt),pr=0;pr is not supported and will be removed in a future major release. Did you mean to render instead?")),$.Provider},set:function(CA){$.Provider=CA}},_currentValue:{get:function(){return $._currentValue},set:function(CA){$._currentValue=CA}},_currentValue2:{get:function(){return $._currentValue2},set:function(CA){$._currentValue2=CA}},_threadCount:{get:function(){return $._threadCount},set:function(CA){$._threadCount=CA}},Consumer:{get:function(){return ge||(ge=!0,G("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?")),$.Consumer}},displayName:{get:function(){return $.displayName},set:function(CA){xe||(M("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",CA),xe=!0)}}}),$.Consumer=MA}return $._currentRenderer=null,$._currentRenderer2=null,$}var ce=-1,ue=0,Ye=1,cA=2;function BA(k){if(k._status===ce){var $=k._result,ge=$();if(ge.then(function(MA){if(k._status===ue||k._status===ce){var CA=k;CA._status=Ye,CA._result=MA}},function(MA){if(k._status===ue||k._status===ce){var CA=k;CA._status=cA,CA._result=MA}}),k._status===ce){var fe=k;fe._status=ue,fe._result=ge}}if(k._status===Ye){var xe=k._result;return xe===void 0&&G(`lazy: Expected the result of a dynamic import() call. Instead received: %s +`+o)}function Pc(n,r,o,i,e,a){if(n.listenerCount("wsClientError")){let A=new Error(e);Error.captureStackTrace(A,Pc),n.emit("wsClientError",A,o,r)}else ah(o,i,e,a)}});var yj=W((_5e,Qj)=>{"use strict";Qj.exports=xQe;function xQe(n,r){for(var o=new Array(arguments.length-1),i=0,e=2,a=!0;e{"use strict";var qf=Dj;qf.length=function(r){var o=r.length;if(!o)return 0;for(var i=0;--o%4>1&&r.charAt(o)==="=";)++i;return Math.ceil(r.length*3)/4-i};var xl=new Array(64),Sj=new Array(123);for(ko=0;ko<64;)Sj[xl[ko]=ko<26?ko+65:ko<52?ko+71:ko<62?ko-4:ko-59|43]=ko++;var ko;qf.encode=function(r,o,i){for(var e=null,a=[],A=0,t=0,s;o>2],s=(g&3)<<4,t=1;break;case 1:a[A++]=xl[s|g>>4],s=(g&15)<<2,t=2;break;case 2:a[A++]=xl[s|g>>6],a[A++]=xl[g&63],t=0;break}A>8191&&((e||(e=[])).push(String.fromCharCode.apply(String,a)),A=0)}return t&&(a[A++]=xl[s],a[A++]=61,t===1&&(a[A++]=61)),e?(A&&e.push(String.fromCharCode.apply(String,a.slice(0,A))),e.join("")):String.fromCharCode.apply(String,a.slice(0,A))};var mj="invalid encoding";qf.decode=function(r,o,i){for(var e=i,a=0,A,t=0;t1)break;if((s=Sj[s])===void 0)throw Error(mj);switch(a){case 0:A=s,a=1;break;case 1:o[i++]=A<<2|(s&48)>>4,A=s,a=2;break;case 2:o[i++]=(A&15)<<4|(s&60)>>2,A=s,a=3;break;case 3:o[i++]=(A&3)<<6|s,a=0;break}}if(a===1)throw Error(mj);return i-e};qf.test=function(r){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(r)}});var bj=W((T5e,Oj)=>{"use strict";Oj.exports=Vf;function Vf(){this._listeners=Object.create(null)}Vf.prototype.on=function(r,o,i){return(this._listeners[r]||(this._listeners[r]=[])).push({fn:o,ctx:i||this}),this};Vf.prototype.off=function(r,o){if(r===void 0)this._listeners=Object.create(null);else if(o===void 0)this._listeners[r]=[];else{var i=this._listeners[r];if(!i)return this;for(var e=0;e{"use strict";kj.exports=Mj(Mj);function Mj(n){return typeof Float32Array<"u"?(function(){var r=new Float32Array([-0]),o=new Uint8Array(r.buffer),i=o[3]===128;function e(s,g,c){r[0]=s,g[c]=o[0],g[c+1]=o[1],g[c+2]=o[2],g[c+3]=o[3]}function a(s,g,c){r[0]=s,g[c]=o[3],g[c+1]=o[2],g[c+2]=o[1],g[c+3]=o[0]}n.writeFloatLE=i?e:a,n.writeFloatBE=i?a:e;function A(s,g){return o[0]=s[g],o[1]=s[g+1],o[2]=s[g+2],o[3]=s[g+3],r[0]}function t(s,g){return o[3]=s[g],o[2]=s[g+1],o[1]=s[g+2],o[0]=s[g+3],r[0]}n.readFloatLE=i?A:t,n.readFloatBE=i?t:A})():(function(){function r(i,e,a,A){var t=e<0?1:0;if(t&&(e=-e),e===0)i(1/e>0?0:2147483648,a,A);else if(isNaN(e))i(2143289344,a,A);else if(e>34028234663852886e22)i((t<<31|2139095040)>>>0,a,A);else if(e<11754943508222875e-54)i((t<<31|Math.round(e/1401298464324817e-60))>>>0,a,A);else{var s=Math.floor(Math.log(e)/Math.LN2),g=Math.round(e*Math.pow(2,-s)*8388608)&8388607;i((t<<31|s+127<<23|g)>>>0,a,A)}}n.writeFloatLE=r.bind(null,_j),n.writeFloatBE=r.bind(null,Nj);function o(i,e,a){var A=i(e,a),t=(A>>31)*2+1,s=A>>>23&255,g=A&8388607;return s===255?g?NaN:t*(1/0):s===0?t*1401298464324817e-60*g:t*Math.pow(2,s-150)*(g+8388608)}n.readFloatLE=o.bind(null,Tj),n.readFloatBE=o.bind(null,Rj)})(),typeof Float64Array<"u"?(function(){var r=new Float64Array([-0]),o=new Uint8Array(r.buffer),i=o[7]===128;function e(s,g,c){r[0]=s,g[c]=o[0],g[c+1]=o[1],g[c+2]=o[2],g[c+3]=o[3],g[c+4]=o[4],g[c+5]=o[5],g[c+6]=o[6],g[c+7]=o[7]}function a(s,g,c){r[0]=s,g[c]=o[7],g[c+1]=o[6],g[c+2]=o[5],g[c+3]=o[4],g[c+4]=o[3],g[c+5]=o[2],g[c+6]=o[1],g[c+7]=o[0]}n.writeDoubleLE=i?e:a,n.writeDoubleBE=i?a:e;function A(s,g){return o[0]=s[g],o[1]=s[g+1],o[2]=s[g+2],o[3]=s[g+3],o[4]=s[g+4],o[5]=s[g+5],o[6]=s[g+6],o[7]=s[g+7],r[0]}function t(s,g){return o[7]=s[g],o[6]=s[g+1],o[5]=s[g+2],o[4]=s[g+3],o[3]=s[g+4],o[2]=s[g+5],o[1]=s[g+6],o[0]=s[g+7],r[0]}n.readDoubleLE=i?A:t,n.readDoubleBE=i?t:A})():(function(){function r(i,e,a,A,t,s){var g=A<0?1:0;if(g&&(A=-A),A===0)i(0,t,s+e),i(1/A>0?0:2147483648,t,s+a);else if(isNaN(A))i(0,t,s+e),i(2146959360,t,s+a);else if(A>17976931348623157e292)i(0,t,s+e),i((g<<31|2146435072)>>>0,t,s+a);else{var c;if(A<22250738585072014e-324)c=A/5e-324,i(c>>>0,t,s+e),i((g<<31|c/4294967296)>>>0,t,s+a);else{var I=Math.floor(Math.log(A)/Math.LN2);I===1024&&(I=1023),c=A*Math.pow(2,-I),i(c*4503599627370496>>>0,t,s+e),i((g<<31|I+1023<<20|c*1048576&1048575)>>>0,t,s+a)}}}n.writeDoubleLE=r.bind(null,_j,0,4),n.writeDoubleBE=r.bind(null,Nj,4,0);function o(i,e,a,A,t){var s=i(A,t+e),g=i(A,t+a),c=(g>>31)*2+1,I=g>>>20&2047,E=4294967296*(g&1048575)+s;return I===2047?E?NaN:c*(1/0):I===0?c*5e-324*E:c*Math.pow(2,I-1075)*(E+4503599627370496)}n.readDoubleLE=o.bind(null,Tj,0,4),n.readDoubleBE=o.bind(null,Rj,4,0)})(),n}function _j(n,r,o){r[o]=n&255,r[o+1]=n>>>8&255,r[o+2]=n>>>16&255,r[o+3]=n>>>24}function Nj(n,r,o){r[o]=n>>>24,r[o+1]=n>>>16&255,r[o+2]=n>>>8&255,r[o+3]=n&255}function Tj(n,r){return(n[r]|n[r+1]<<8|n[r+2]<<16|n[r+3]<<24)>>>0}function Rj(n,r){return(n[r]<<24|n[r+1]<<16|n[r+2]<<8|n[r+3])>>>0}});var Gj=W(Pj=>{"use strict";var z_=Pj,V_=65533;z_.length=function(r){for(var o=0,i=0,e=0;e=192&&t<224?(g=(t&31)<<6|r[o++]&63,a[A++]=g>=128?g:V_):t>=224&&t<240?(c=(t&15)<<12|(r[o++]&63)<<6|r[o++]&63,a[A++]=c>=2048?c:V_):t>=240&&(s=(t&7)<<18|(r[o++]&63)<<12|(r[o++]&63)<<6|r[o++]&63,s<65536||s>1114111?a[A++]=V_:(s-=65536,a[A++]=55296+(s>>10),a[A++]=56320+(s&1023))),A>8191&&((e||(e=[])).push(String.fromCharCode.apply(String,a.slice(0,A))),A=0);return e?(A&&e.push(String.fromCharCode.apply(String,a.slice(0,A))),e.join("")):String.fromCharCode.apply(String,a.slice(0,A))};z_.write=function(r,o,i){for(var e=i,a,A,t=0;t>6|192,o[i++]=a&63|128):(a&64512)===55296&&((A=r.charCodeAt(t+1))&64512)===56320?(a=65536+((a&1023)<<10)+(A&1023),++t,o[i++]=a>>18|240,o[i++]=a>>12&63|128,o[i++]=a>>6&63|128,o[i++]=a&63|128):(o[i++]=a>>12|224,o[i++]=a>>6&63|128,o[i++]=a&63|128);return i-e}});var Lj=W((v5e,Fj)=>{"use strict";Fj.exports=jQe;function jQe(n,r,o){var i=o||8192,e=i>>>1,a=null,A=i;return function(s){if(s<1||s>e)return n(s);A+s>i&&(a=n(i),A=0);var g=r.call(a,A,A+=s);return A&7&&(A=(A|7)+1),g}}});var Hj=W((P5e,Uj)=>{"use strict";Uj.exports=Kr;var ih=ng();function Kr(n,r){this.lo=n>>>0,this.hi=r>>>0}var Gc=Kr.zero=new Kr(0,0);Gc.toNumber=function(){return 0};Gc.zzEncode=Gc.zzDecode=function(){return this};Gc.length=function(){return 1};var JQe=Kr.zeroHash="\0\0\0\0\0\0\0\0";Kr.fromNumber=function(r){if(r===0)return Gc;var o=r<0;o&&(r=-r);var i=r>>>0,e=(r-i)/4294967296>>>0;return o&&(e=~e>>>0,i=~i>>>0,++i>4294967295&&(i=0,++e>4294967295&&(e=0))),new Kr(i,e)};Kr.from=function(r){if(typeof r=="number")return Kr.fromNumber(r);if(ih.isString(r))if(ih.Long)r=ih.Long.fromString(r);else return Kr.fromNumber(parseInt(r,10));return r.low||r.high?new Kr(r.low>>>0,r.high>>>0):Gc};Kr.prototype.toNumber=function(r){if(!r&&this.hi>>>31){var o=~this.lo+1>>>0,i=~this.hi>>>0;return o||(i=i+1>>>0),-(o+i*4294967296)}return this.lo+this.hi*4294967296};Kr.prototype.toLong=function(r){return ih.Long?new ih.Long(this.lo|0,this.hi|0,!!r):{low:this.lo|0,high:this.hi|0,unsigned:!!r}};var og=String.prototype.charCodeAt;Kr.fromHash=function(r){return r===JQe?Gc:new Kr((og.call(r,0)|og.call(r,1)<<8|og.call(r,2)<<16|og.call(r,3)<<24)>>>0,(og.call(r,4)|og.call(r,5)<<8|og.call(r,6)<<16|og.call(r,7)<<24)>>>0)};Kr.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};Kr.prototype.zzEncode=function(){var r=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^r)>>>0,this.lo=(this.lo<<1^r)>>>0,this};Kr.prototype.zzDecode=function(){var r=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^r)>>>0,this.hi=(this.hi>>>1^r)>>>0,this};Kr.prototype.length=function(){var r=this.lo,o=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return i===0?o===0?r<16384?r<128?1:2:r<2097152?3:4:o<16384?o<128?5:6:o<2097152?7:8:i<128?9:10}});var Kj=W((oh,W_)=>{(function(n,r){function o(i){return i.default||i}typeof define=="function"&&define.amd?define([],function(){var i={};return r(i),o(i)}):typeof oh=="object"?(r(oh),typeof W_=="object"&&(W_.exports=o(oh))):(function(){var i={};r(i),n.Long=o(i)})()})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:oh,function(n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=null;try{r=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function o(U,M,G){this.low=U|0,this.high=M|0,this.unsigned=!!G}o.prototype.__isLong__,Object.defineProperty(o.prototype,"__isLong__",{value:!0});function i(U){return(U&&U.__isLong__)===!0}function e(U){var M=Math.clz32(U&-U);return U?31-M:M}o.isLong=i;var a={},A={};function t(U,M){var G,te,Be;return M?(U>>>=0,(Be=0<=U&&U<256)&&(te=A[U],te)?te:(G=g(U,0,!0),Be&&(A[U]=G),G)):(U|=0,(Be=-128<=U&&U<128)&&(te=a[U],te)?te:(G=g(U,U<0?-1:0,!1),Be&&(a[U]=G),G))}o.fromInt=t;function s(U,M){if(isNaN(U))return M?P:_;if(M){if(U<0)return P;if(U>=y)return V}else{if(U<=-m)return H;if(U+1>=m)return q}return U<0?s(-U,M).neg():g(U%Q|0,U/Q|0,M)}o.fromNumber=s;function g(U,M,G){return new o(U,M,G)}o.fromBits=g;var c=Math.pow;function I(U,M,G){if(U.length===0)throw Error("empty string");if(typeof M=="number"?(G=M,M=!1):M=!!M,U==="NaN"||U==="Infinity"||U==="+Infinity"||U==="-Infinity")return M?P:_;if(G=G||10,G<2||360)throw Error("interior hyphen");if(te===0)return I(U.substring(1),M,G).neg();for(var Be=s(c(G,8)),Ce=_,ke=0;ke>>0:this.low},v.toNumber=function(){return this.unsigned?(this.high>>>0)*Q+(this.low>>>0):this.high*Q+(this.low>>>0)},v.toString=function(M){if(M=M||10,M<2||36>>0,Ve=_e.toString(M);if(ke=me,ke.isZero())return Ve+Ee;for(;Ve.length<6;)Ve="0"+Ve;Ee=""+Ve+Ee}},v.getHighBits=function(){return this.high},v.getHighBitsUnsigned=function(){return this.high>>>0},v.getLowBits=function(){return this.low},v.getLowBitsUnsigned=function(){return this.low>>>0},v.getNumBitsAbs=function(){if(this.isNegative())return this.eq(H)?64:this.neg().getNumBitsAbs();for(var M=this.high!=0?this.high:this.low,G=31;G>0&&(M&1<>21;return M?this.unsigned?!1:M===-1&&!(this.low===0&&this.high===-2097152):!0},v.isZero=function(){return this.high===0&&this.low===0},v.eqz=v.isZero,v.isNegative=function(){return!this.unsigned&&this.high<0},v.isPositive=function(){return this.unsigned||this.high>=0},v.isOdd=function(){return(this.low&1)===1},v.isEven=function(){return(this.low&1)===0},v.equals=function(M){return i(M)||(M=E(M)),this.unsigned!==M.unsigned&&this.high>>>31===1&&M.high>>>31===1?!1:this.high===M.high&&this.low===M.low},v.eq=v.equals,v.notEquals=function(M){return!this.eq(M)},v.neq=v.notEquals,v.ne=v.notEquals,v.lessThan=function(M){return this.comp(M)<0},v.lt=v.lessThan,v.lessThanOrEqual=function(M){return this.comp(M)<=0},v.lte=v.lessThanOrEqual,v.le=v.lessThanOrEqual,v.greaterThan=function(M){return this.comp(M)>0},v.gt=v.greaterThan,v.greaterThanOrEqual=function(M){return this.comp(M)>=0},v.gte=v.greaterThanOrEqual,v.ge=v.greaterThanOrEqual,v.compare=function(M){if(i(M)||(M=E(M)),this.eq(M))return 0;var G=this.isNegative(),te=M.isNegative();return G&&!te?-1:!G&&te?1:this.unsigned?M.high>>>0>this.high>>>0||M.high===this.high&&M.low>>>0>this.low>>>0?-1:1:this.sub(M).isNegative()?-1:1},v.comp=v.compare,v.negate=function(){return!this.unsigned&&this.eq(H)?H:this.not().add(Y)},v.neg=v.negate,v.add=function(M){i(M)||(M=E(M));var G=this.high>>>16,te=this.high&65535,Be=this.low>>>16,Ce=this.low&65535,ke=M.high>>>16,Ee=M.high&65535,me=M.low>>>16,_e=M.low&65535,Ve=0,oA=0,tA=0,Pe=0;return Pe+=Ce+_e,tA+=Pe>>>16,Pe&=65535,tA+=Be+me,oA+=tA>>>16,tA&=65535,oA+=te+Ee,Ve+=oA>>>16,oA&=65535,Ve+=G+ke,Ve&=65535,g(tA<<16|Pe,Ve<<16|oA,this.unsigned)},v.subtract=function(M){return i(M)||(M=E(M)),this.add(M.neg())},v.sub=v.subtract,v.multiply=function(M){if(this.isZero())return this;if(i(M)||(M=E(M)),r){var G=r.mul(this.low,this.high,M.low,M.high);return g(G,r.get_high(),this.unsigned)}if(M.isZero())return this.unsigned?P:_;if(this.eq(H))return M.isOdd()?H:_;if(M.eq(H))return this.isOdd()?H:_;if(this.isNegative())return M.isNegative()?this.neg().mul(M.neg()):this.neg().mul(M).neg();if(M.isNegative())return this.mul(M.neg()).neg();if(this.lt(T)&&M.lt(T))return s(this.toNumber()*M.toNumber(),this.unsigned);var te=this.high>>>16,Be=this.high&65535,Ce=this.low>>>16,ke=this.low&65535,Ee=M.high>>>16,me=M.high&65535,_e=M.low>>>16,Ve=M.low&65535,oA=0,tA=0,Pe=0,gA=0;return gA+=ke*Ve,Pe+=gA>>>16,gA&=65535,Pe+=Ce*Ve,tA+=Pe>>>16,Pe&=65535,Pe+=ke*_e,tA+=Pe>>>16,Pe&=65535,tA+=Be*Ve,oA+=tA>>>16,tA&=65535,tA+=Ce*_e,oA+=tA>>>16,tA&=65535,tA+=ke*me,oA+=tA>>>16,tA&=65535,oA+=te*Ve+Be*_e+Ce*me+ke*Ee,oA&=65535,g(Pe<<16|gA,oA<<16|tA,this.unsigned)},v.mul=v.multiply,v.divide=function(M){if(i(M)||(M=E(M)),M.isZero())throw Error("division by zero");if(r){if(!this.unsigned&&this.high===-2147483648&&M.low===-1&&M.high===-1)return this;var G=(this.unsigned?r.div_u:r.div_s)(this.low,this.high,M.low,M.high);return g(G,r.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?P:_;var te,Be,Ce;if(this.unsigned){if(M.unsigned||(M=M.toUnsigned()),M.gt(this))return P;if(M.gt(this.shru(1)))return j;Ce=P}else{if(this.eq(H)){if(M.eq(Y)||M.eq(K))return H;if(M.eq(H))return Y;var ke=this.shr(1);return te=ke.div(M).shl(1),te.eq(_)?M.isNegative()?Y:K:(Be=this.sub(M.mul(te)),Ce=te.add(Be.div(M)),Ce)}else if(M.eq(H))return this.unsigned?P:_;if(this.isNegative())return M.isNegative()?this.neg().div(M.neg()):this.neg().div(M).neg();if(M.isNegative())return this.div(M.neg()).neg();Ce=_}for(Be=this;Be.gte(M);){te=Math.max(1,Math.floor(Be.toNumber()/M.toNumber()));for(var Ee=Math.ceil(Math.log(te)/Math.LN2),me=Ee<=48?1:c(2,Ee-48),_e=s(te),Ve=_e.mul(M);Ve.isNegative()||Ve.gt(Be);)te-=me,_e=s(te,this.unsigned),Ve=_e.mul(M);_e.isZero()&&(_e=Y),Ce=Ce.add(_e),Be=Be.sub(Ve)}return Ce},v.div=v.divide,v.modulo=function(M){if(i(M)||(M=E(M)),r){var G=(this.unsigned?r.rem_u:r.rem_s)(this.low,this.high,M.low,M.high);return g(G,r.get_high(),this.unsigned)}return this.sub(this.div(M).mul(M))},v.mod=v.modulo,v.rem=v.modulo,v.not=function(){return g(~this.low,~this.high,this.unsigned)},v.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},v.clz=v.countLeadingZeros,v.countTrailingZeros=function(){return this.low?e(this.low):e(this.high)+32},v.ctz=v.countTrailingZeros,v.and=function(M){return i(M)||(M=E(M)),g(this.low&M.low,this.high&M.high,this.unsigned)},v.or=function(M){return i(M)||(M=E(M)),g(this.low|M.low,this.high|M.high,this.unsigned)},v.xor=function(M){return i(M)||(M=E(M)),g(this.low^M.low,this.high^M.high,this.unsigned)},v.shiftLeft=function(M){return i(M)&&(M=M.toInt()),(M&=63)===0?this:M<32?g(this.low<>>32-M,this.unsigned):g(0,this.low<>>M|this.high<<32-M,this.high>>M,this.unsigned):g(this.high>>M-32,this.high>=0?0:-1,this.unsigned)},v.shr=v.shiftRight,v.shiftRightUnsigned=function(M){return i(M)&&(M=M.toInt()),(M&=63)===0?this:M<32?g(this.low>>>M|this.high<<32-M,this.high>>>M,this.unsigned):M===32?g(this.high,0,this.unsigned):g(this.high>>>M-32,0,this.unsigned)},v.shru=v.shiftRightUnsigned,v.shr_u=v.shiftRightUnsigned,v.rotateLeft=function(M){var G;return i(M)&&(M=M.toInt()),(M&=63)===0?this:M===32?g(this.high,this.low,this.unsigned):M<32?(G=32-M,g(this.low<>>G,this.high<>>G,this.unsigned)):(M-=32,G=32-M,g(this.high<>>G,this.low<>>G,this.unsigned))},v.rotl=v.rotateLeft,v.rotateRight=function(M){var G;return i(M)&&(M=M.toInt()),(M&=63)===0?this:M===32?g(this.high,this.low,this.unsigned):M<32?(G=32-M,g(this.high<>>M,this.low<>>M,this.unsigned)):(M-=32,G=32-M,g(this.low<>>M,this.high<>>M,this.unsigned))},v.rotr=v.rotateRight,v.toSigned=function(){return this.unsigned?g(this.low,this.high,!1):this},v.toUnsigned=function(){return this.unsigned?this:g(this.low,this.high,!0)},v.toBytes=function(M){return M?this.toBytesLE():this.toBytesBE()},v.toBytesLE=function(){var M=this.high,G=this.low;return[G&255,G>>>8&255,G>>>16&255,G>>>24,M&255,M>>>8&255,M>>>16&255,M>>>24]},v.toBytesBE=function(){var M=this.high,G=this.low;return[M>>>24,M>>>16&255,M>>>8&255,M&255,G>>>24,G>>>16&255,G>>>8&255,G&255]},o.fromBytes=function(M,G,te){return te?o.fromBytesLE(M,G):o.fromBytesBE(M,G)},o.fromBytesLE=function(M,G){return new o(M[0]|M[1]<<8|M[2]<<16|M[3]<<24,M[4]|M[5]<<8|M[6]<<16|M[7]<<24,G)},o.fromBytesBE=function(M,G){return new o(M[4]<<24|M[5]<<16|M[6]<<8|M[7],M[0]<<24|M[1]<<16|M[2]<<8|M[3],G)},typeof BigInt=="function"&&(o.fromBigInt=function(M,G){var te=Number(BigInt.asIntN(32,M)),Be=Number(BigInt.asIntN(32,M>>BigInt(32)));return g(te,Be,G)},o.fromValue=function(M,G){return typeof M=="bigint"?o.fromBigInt(M,G):E(M,G)},v.toBigInt=function(){var M=BigInt(this.low>>>0),G=BigInt(this.unsigned?this.high>>>0:this.high);return G<{"use strict";var dA=Z_;dA.asPromise=yj();dA.base64=wj();dA.EventEmitter=bj();dA.float=vj();dA.utf8=Gj();dA.pool=Lj();dA.LongBits=Hj();function Yj(n){return n==="__proto__"||n==="prototype"||n==="constructor"}dA.isUnsafeProperty=Yj;dA.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);dA.global=dA.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||Z_;dA.emptyArray=Object.freeze?Object.freeze([]):[];dA.emptyObject=Object.freeze?Object.freeze({}):{};dA.isInteger=Number.isInteger||function(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r};dA.isString=function(r){return typeof r=="string"||r instanceof String};dA.isObject=function(r){return r&&typeof r=="object"};dA.isset=dA.isSet=function(r,o){var i=r[o];return i!=null&&Object.hasOwnProperty.call(r,o)?typeof i!="object"||(Array.isArray(i)?i.length:Object.keys(i).length)>0:!1};dA.Buffer=(function(){try{var n=dA.global.Buffer;return n.prototype.utf8Write?n:null}catch{return null}})();dA._Buffer_from=null;dA._Buffer_allocUnsafe=null;dA.newBuffer=function(r){return typeof r=="number"?dA.Buffer?dA._Buffer_allocUnsafe(r):new dA.Array(r):dA.Buffer?dA._Buffer_from(r):typeof Uint8Array>"u"?r:new Uint8Array(r)};dA.Array=typeof Uint8Array<"u"?Uint8Array:Array;dA.Long=dA.global.dcodeIO&&dA.global.dcodeIO.Long||dA.global.Long||(function(){try{var n=Kj();return n&&n.isLong?n:null}catch{return null}})();dA.key2Re=/^true|false|0|1$/;dA.key32Re=/^-?(?:0|[1-9][0-9]*)$/;dA.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;dA.longToHash=function(r){return r?dA.LongBits.from(r).toHash():dA.LongBits.zeroHash};dA.longFromHash=function(r,o){var i=dA.LongBits.fromHash(r);return dA.Long?dA.Long.fromBits(i.lo,i.hi,o):i.toNumber(!!o)};function xj(n){var r=typeof arguments[arguments.length-1]=="boolean",o=r?arguments.length-1:arguments.length;r=r&&arguments[arguments.length-1];for(var i=1;i-1;--a)if(o[e[a]]===1&&this[e[a]]!==void 0&&this[e[a]]!==null)return e[a]}};dA.oneOfSetter=function(r){return function(o){for(var i=0;i{"use strict";zj.exports=lt;var Wi=ng(),X_,zf=Wi.LongBits,Jj=Wi.base64,qj=Wi.utf8;function nh(n,r,o){this.fn=n,this.len=r,this.next=void 0,this.val=o}function eN(){}function qQe(n){this.head=n.head,this.tail=n.tail,this.len=n.len,this.next=n.states}function lt(){this.len=0,this.head=new nh(eN,0,0),this.tail=this.head,this.states=null}var Vj=function(){return Wi.Buffer?function(){return(lt.create=function(){return new X_})()}:function(){return new lt}};lt.create=Vj();lt.alloc=function(r){return new Wi.Array(r)};Wi.Array!==Array&&(lt.alloc=Wi.pool(lt.alloc,Wi.Array.prototype.subarray));lt.prototype._push=function(r,o,i){return this.tail=this.tail.next=new nh(r,o,i),this.len+=o,this};function AN(n,r,o){r[o]=n&255}function VQe(n,r,o){for(;n>127;)r[o++]=n&127|128,n>>>=7;r[o]=n}function tN(n,r){this.len=n,this.next=void 0,this.val=r}tN.prototype=Object.create(nh.prototype);tN.prototype.fn=VQe;lt.prototype.uint32=function(r){return this.len+=(this.tail=this.tail.next=new tN((r=r>>>0)<128?1:r<16384?2:r<2097152?3:r<268435456?4:5,r)).len,this};lt.prototype.int32=function(r){return(r|=0)<0?this._push(rN,10,zf.fromNumber(r)):this.uint32(r)};lt.prototype.sint32=function(r){return this.uint32((r<<1^r>>31)>>>0)};function rN(n,r,o){for(var i=n.lo,e=n.hi;e;)r[o++]=i&127|128,i=(i>>>7|e<<25)>>>0,e>>>=7;for(;i>127;)r[o++]=i&127|128,i=i>>>7;r[o++]=i}lt.prototype.uint64=function(r){var o=zf.from(r);return this._push(rN,o.length(),o)};lt.prototype.int64=lt.prototype.uint64;lt.prototype.sint64=function(r){var o=zf.from(r).zzEncode();return this._push(rN,o.length(),o)};lt.prototype.bool=function(r){return this._push(AN,1,r?1:0)};function $_(n,r,o){r[o]=n&255,r[o+1]=n>>>8&255,r[o+2]=n>>>16&255,r[o+3]=n>>>24}lt.prototype.fixed32=function(r){return this._push($_,4,r>>>0)};lt.prototype.sfixed32=lt.prototype.fixed32;lt.prototype.fixed64=function(r){var o=zf.from(r);return this._push($_,4,o.lo)._push($_,4,o.hi)};lt.prototype.sfixed64=lt.prototype.fixed64;lt.prototype.float=function(r){return this._push(Wi.float.writeFloatLE,4,r)};lt.prototype.double=function(r){return this._push(Wi.float.writeDoubleLE,8,r)};var zQe=Wi.Array.prototype.set?function(r,o,i){o.set(r,i)}:function(r,o,i){for(var e=0;e>>0;if(!o)return this._push(AN,1,0);if(Wi.isString(r)){var i=lt.alloc(o=Jj.length(r));Jj.decode(r,i,0),r=i}return this.uint32(o)._push(zQe,o,r)};lt.prototype.string=function(r){var o=qj.length(r);return o?this.uint32(o)._push(qj.write,o,r):this._push(AN,1,0)};lt.prototype.fork=function(){return this.states=new qQe(this),this.head=this.tail=new nh(eN,0,0),this.len=0,this};lt.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new nh(eN,0,0),this.len=0),this};lt.prototype.ldelim=function(){var r=this.head,o=this.tail,i=this.len;return this.reset().uint32(i),i&&(this.tail.next=r.next,this.tail=o,this.len+=i),this};lt.prototype.finish=function(){for(var r=this.head.next,o=this.constructor.alloc(this.len),i=0;r;)r.fn(r.val,o,i),i+=r.len,r=r.next;return o};lt._configure=function(n){X_=n,lt.create=Vj(),X_._configure()}});var Xj=W((L5e,Zj)=>{"use strict";Zj.exports=pn;var Wj=aN();(pn.prototype=Object.create(Wj.prototype)).constructor=pn;var sg=ng();function pn(){Wj.call(this)}pn._configure=function(){pn.alloc=sg._Buffer_allocUnsafe,pn.writeBytesBuffer=sg.Buffer&&sg.Buffer.prototype instanceof Uint8Array&&sg.Buffer.prototype.set.name==="set"?function(r,o,i){o.set(r,i)}:function(r,o,i){if(r.copy)r.copy(o,i,0,r.length);else for(var e=0;e>>0;return this.uint32(o),o&&this._push(pn.writeBytesBuffer,o,r),this};function WQe(n,r,o){n.length<40?sg.utf8.write(n,r,o):r.utf8Write?r.utf8Write(n,o):r.write(n,o)}pn.prototype.string=function(r){var o=sg.Buffer.byteLength(r);return this.uint32(o),o&&this._push(WQe,o,r),this};pn._configure()});var nN=W((U5e,rJ)=>{"use strict";rJ.exports=Zt;var Zi=ng(),oN,AJ=Zi.LongBits,ZQe=Zi.utf8;function vo(n,r){return RangeError("index out of range: "+n.pos+" + "+(r||1)+" > "+n.len)}function Zt(n){this.buf=n,this.pos=0,this.len=n.length}var $j=typeof Uint8Array<"u"?function(r){if(r instanceof Uint8Array||Array.isArray(r))return new Zt(r);throw Error("illegal buffer")}:function(r){if(Array.isArray(r))return new Zt(r);throw Error("illegal buffer")},tJ=function(){return Zi.Buffer?function(o){return(Zt.create=function(e){return Zi.Buffer.isBuffer(e)?new oN(e):$j(e)})(o)}:$j};Zt.create=tJ();Zt.prototype._slice=Zi.Array.prototype.subarray||Zi.Array.prototype.slice;Zt.prototype.uint32=(function(){var r=4294967295;return function(){if(r=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(r=(r|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(r=(r|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(r=(r|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(r=(r|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return r;if((this.pos+=5)>this.len)throw this.pos=this.len,vo(this,10);return r}})();Zt.prototype.int32=function(){return this.uint32()|0};Zt.prototype.sint32=function(){var r=this.uint32();return r>>>1^-(r&1)|0};function iN(){var n=new AJ(0,0),r=0;if(this.len-this.pos>4){for(;r<4;++r)if(n.lo=(n.lo|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return n;if(n.lo=(n.lo|(this.buf[this.pos]&127)<<28)>>>0,n.hi=(n.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return n;r=0}else{for(;r<3;++r){if(this.pos>=this.len)throw vo(this);if(n.lo=(n.lo|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return n}return n.lo=(n.lo|(this.buf[this.pos++]&127)<>>0,n}if(this.len-this.pos>4){for(;r<5;++r)if(n.hi=(n.hi|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return n}else for(;r<5;++r){if(this.pos>=this.len)throw vo(this);if(n.hi=(n.hi|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return n}throw Error("invalid varint encoding")}Zt.prototype.bool=function(){return this.uint32()!==0};function Wf(n,r){return(n[r-4]|n[r-3]<<8|n[r-2]<<16|n[r-1]<<24)>>>0}Zt.prototype.fixed32=function(){if(this.pos+4>this.len)throw vo(this,4);return Wf(this.buf,this.pos+=4)};Zt.prototype.sfixed32=function(){if(this.pos+4>this.len)throw vo(this,4);return Wf(this.buf,this.pos+=4)|0};function eJ(){if(this.pos+8>this.len)throw vo(this,8);return new AJ(Wf(this.buf,this.pos+=4),Wf(this.buf,this.pos+=4))}Zt.prototype.float=function(){if(this.pos+4>this.len)throw vo(this,4);var r=Zi.float.readFloatLE(this.buf,this.pos);return this.pos+=4,r};Zt.prototype.double=function(){if(this.pos+8>this.len)throw vo(this,4);var r=Zi.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,r};Zt.prototype.bytes=function(){var r=this.uint32(),o=this.pos,i=this.pos+r;if(i>this.len)throw vo(this,r);if(this.pos+=r,Array.isArray(this.buf))return this.buf.slice(o,i);if(o===i){var e=Zi.Buffer;return e?e.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,o,i)};Zt.prototype.string=function(){var r=this.bytes();return ZQe.read(r,0,r.length)};Zt.prototype.skip=function(r){if(typeof r=="number"){if(this.pos+r>this.len)throw vo(this,r);this.pos+=r}else do if(this.pos>=this.len)throw vo(this);while(this.buf[this.pos++]&128);return this};Zt.recursionLimit=Zi.recursionLimit;Zt.prototype.skipType=function(n,r){if(r===void 0&&(r=0),r>Zt.recursionLimit)throw Error("maximum nesting depth exceeded");switch(n){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(n=this.uint32()&7)!==4;)this.skipType(n,r+1);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+n+" at offset "+this.pos)}return this};Zt._configure=function(n){oN=n,Zt.create=tJ(),oN._configure();var r=Zi.Long?"toLong":"toNumber";Zi.merge(Zt.prototype,{int64:function(){return iN.call(this)[r](!1)},uint64:function(){return iN.call(this)[r](!0)},sint64:function(){return iN.call(this).zzDecode()[r](!1)},fixed64:function(){return eJ.call(this)[r](!0)},sfixed64:function(){return eJ.call(this)[r](!1)}})}});var nJ=W((H5e,oJ)=>{"use strict";oJ.exports=Fc;var iJ=nN();(Fc.prototype=Object.create(iJ.prototype)).constructor=Fc;var aJ=ng();function Fc(n){iJ.call(this,n)}Fc._configure=function(){aJ.Buffer&&(Fc.prototype._slice=aJ.Buffer.prototype.slice)};Fc.prototype.string=function(){var r=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+r,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+r,this.len))};Fc._configure()});var gJ=W((K5e,sJ)=>{"use strict";sJ.exports=sh;var sN=ng();(sh.prototype=Object.create(sN.EventEmitter.prototype)).constructor=sh;function sh(n,r,o){if(typeof n!="function")throw TypeError("rpcImpl must be a function");sN.EventEmitter.call(this),this.rpcImpl=n,this.requestDelimited=!!r,this.responseDelimited=!!o}sh.prototype.rpcCall=function n(r,o,i,e,a){if(!e)throw TypeError("request must be specified");var A=this;if(!a)return sN.asPromise(n,A,r,o,i,e);if(!A.rpcImpl){setTimeout(function(){a(Error("already ended"))},0);return}try{return A.rpcImpl(r,o[A.requestDelimited?"encodeDelimited":"encode"](e).finish(),function(s,g){if(s)return A.emit("error",s,r),a(s);if(g===null){A.end(!0);return}if(!(g instanceof i))try{g=i[A.responseDelimited?"decodeDelimited":"decode"](g)}catch(c){return A.emit("error",c,r),a(c)}return A.emit("data",g,r),a(null,g)})}catch(t){A.emit("error",t,r),setTimeout(function(){a(t)},0);return}};sh.prototype.end=function(r){return this.rpcImpl&&(r||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var IJ=W(cJ=>{"use strict";var XQe=cJ;XQe.Service=gJ()});var pJ=W((x5e,lJ)=>{"use strict";lJ.exports=Object.create(null)});var hJ=W(CJ=>{"use strict";var Ai=CJ;Ai.build="minimal";Ai.Writer=aN();Ai.BufferWriter=Xj();Ai.Reader=nN();Ai.BufferReader=nJ();Ai.util=ng();Ai.rpc=IJ();Ai.roots=pJ();Ai.configure=EJ;function EJ(){Ai.util._configure(),Ai.Writer._configure(Ai.BufferWriter),Ai.Reader._configure(Ai.BufferReader)}EJ()});var Zf=W((J5e,dJ)=>{"use strict";dJ.exports=hJ()});var Zq=W(At=>{"use strict";var Oh=Symbol.for("react.element"),PDe=Symbol.for("react.portal"),GDe=Symbol.for("react.fragment"),FDe=Symbol.for("react.strict_mode"),LDe=Symbol.for("react.profiler"),UDe=Symbol.for("react.provider"),HDe=Symbol.for("react.context"),KDe=Symbol.for("react.forward_ref"),YDe=Symbol.for("react.suspense"),xDe=Symbol.for("react.memo"),jDe=Symbol.for("react.lazy"),Uq=Symbol.iterator;function JDe(n){return n===null||typeof n!="object"?null:(n=Uq&&n[Uq]||n["@@iterator"],typeof n=="function"?n:null)}var Yq={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},xq=Object.assign,jq={};function Xl(n,r,o){this.props=n,this.context=r,this.refs=jq,this.updater=o||Yq}Xl.prototype.isReactComponent={};Xl.prototype.setState=function(n,r){if(typeof n!="object"&&typeof n!="function"&&n!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,n,r,"setState")};Xl.prototype.forceUpdate=function(n){this.updater.enqueueForceUpdate(this,n,"forceUpdate")};function Jq(){}Jq.prototype=Xl.prototype;function lR(n,r,o){this.props=n,this.context=r,this.refs=jq,this.updater=o||Yq}var pR=lR.prototype=new Jq;pR.constructor=lR;xq(pR,Xl.prototype);pR.isPureReactComponent=!0;var Hq=Array.isArray,qq=Object.prototype.hasOwnProperty,ER={current:null},Vq={key:!0,ref:!0,__self:!0,__source:!0};function zq(n,r,o){var i,e={},a=null,A=null;if(r!=null)for(i in r.ref!==void 0&&(A=r.ref),r.key!==void 0&&(a=""+r.key),r)qq.call(r,i)&&!Vq.hasOwnProperty(i)&&(e[i]=r[i]);var t=arguments.length-2;if(t===1)e.children=o;else if(1{"use strict";process.env.NODE_ENV!=="production"&&(function(){"use strict";typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var n="18.3.1",r=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),e=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),A=Symbol.for("react.provider"),t=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),B=Symbol.for("react.offscreen"),f=Symbol.iterator,Q="@@iterator";function y(k){if(k===null||typeof k!="object")return null;var $=f&&k[f]||k[Q];return typeof $=="function"?$:null}var m={current:null},T={transition:null},_={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},P={current:null},Y={},j=null;function K(k){j=k}Y.setExtraStackFrame=function(k){j=k},Y.getCurrentStack=null,Y.getStackAddendum=function(){var k="";j&&(k+=j);var $=Y.getCurrentStack;return $&&(k+=$()||""),k};var q=!1,V=!1,H=!1,v=!1,Z=!1,U={ReactCurrentDispatcher:m,ReactCurrentBatchConfig:T,ReactCurrentOwner:P};U.ReactDebugCurrentFrame=Y,U.ReactCurrentActQueue=_;function M(k){{for(var $=arguments.length,ge=new Array($>1?$-1:0),fe=1;fe<$;fe++)ge[fe-1]=arguments[fe];te("warn",k,ge)}}function G(k){{for(var $=arguments.length,ge=new Array($>1?$-1:0),fe=1;fe<$;fe++)ge[fe-1]=arguments[fe];te("error",k,ge)}}function te(k,$,ge){{var fe=U.ReactDebugCurrentFrame,xe=fe.getStackAddendum();xe!==""&&($+="%s",ge=ge.concat([xe]));var MA=ge.map(function(CA){return String(CA)});MA.unshift("Warning: "+$),Function.prototype.apply.call(console[k],console,MA)}}var Be={};function Ce(k,$){{var ge=k.constructor,fe=ge&&(ge.displayName||ge.name)||"ReactClass",xe=fe+"."+$;if(Be[xe])return;G("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",$,fe),Be[xe]=!0}}var ke={isMounted:function(k){return!1},enqueueForceUpdate:function(k,$,ge){Ce(k,"forceUpdate")},enqueueReplaceState:function(k,$,ge,fe){Ce(k,"replaceState")},enqueueSetState:function(k,$,ge,fe){Ce(k,"setState")}},Ee=Object.assign,me={};Object.freeze(me);function _e(k,$,ge){this.props=k,this.context=$,this.refs=me,this.updater=ge||ke}_e.prototype.isReactComponent={},_e.prototype.setState=function(k,$){if(typeof k!="object"&&typeof k!="function"&&k!=null)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,k,$,"setState")},_e.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};{var Ve={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},oA=function(k,$){Object.defineProperty(_e.prototype,k,{get:function(){M("%s(...) is deprecated in plain JavaScript React classes. %s",$[0],$[1])}})};for(var tA in Ve)Ve.hasOwnProperty(tA)&&oA(tA,Ve[tA])}function Pe(){}Pe.prototype=_e.prototype;function gA(k,$,ge){this.props=k,this.context=$,this.refs=me,this.updater=ge||ke}var Qe=gA.prototype=new Pe;Qe.constructor=gA,Ee(Qe,_e.prototype),Qe.isPureReactComponent=!0;function he(){var k={current:null};return Object.seal(k),k}var ze=Array.isArray;function Ke(k){return ze(k)}function De(k){{var $=typeof Symbol=="function"&&Symbol.toStringTag,ge=$&&k[Symbol.toStringTag]||k.constructor.name||"Object";return ge}}function EA(k){try{return pA(k),!1}catch{return!0}}function pA(k){return""+k}function AA(k){if(EA(k))return G("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",De(k)),pA(k)}function qe(k,$,ge){var fe=k.displayName;if(fe)return fe;var xe=$.displayName||$.name||"";return xe!==""?ge+"("+xe+")":ge}function wA(k){return k.displayName||"Context"}function pe(k){if(k==null)return null;if(typeof k.tag=="number"&&G("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof k=="function")return k.displayName||k.name||null;if(typeof k=="string")return k;switch(k){case i:return"Fragment";case o:return"Portal";case a:return"Profiler";case e:return"StrictMode";case g:return"Suspense";case c:return"SuspenseList"}if(typeof k=="object")switch(k.$$typeof){case t:var $=k;return wA($)+".Consumer";case A:var ge=k;return wA(ge._context)+".Provider";case s:return qe(k,k.render,"ForwardRef");case I:var fe=k.displayName||null;return fe!==null?fe:pe(k.type)||"Memo";case E:{var xe=k,MA=xe._payload,CA=xe._init;try{return pe(CA(MA))}catch{return null}}}return null}var Me=Object.prototype.hasOwnProperty,Ge={key:!0,ref:!0,__self:!0,__source:!0},OA,Le,bA;bA={};function $A(k){if(Me.call(k,"ref")){var $=Object.getOwnPropertyDescriptor(k,"ref").get;if($&&$.isReactWarning)return!1}return k.ref!==void 0}function mA(k){if(Me.call(k,"key")){var $=Object.getOwnPropertyDescriptor(k,"key").get;if($&&$.isReactWarning)return!1}return k.key!==void 0}function nt(k,$){var ge=function(){OA||(OA=!0,G("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",$))};ge.isReactWarning=!0,Object.defineProperty(k,"key",{get:ge,configurable:!0})}function Ar(k,$){var ge=function(){Le||(Le=!0,G("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",$))};ge.isReactWarning=!0,Object.defineProperty(k,"ref",{get:ge,configurable:!0})}function GA(k){if(typeof k.ref=="string"&&P.current&&k.__self&&P.current.stateNode!==k.__self){var $=pe(P.current.type);bA[$]||(G('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',$,k.ref),bA[$]=!0)}}var se=function(k,$,ge,fe,xe,MA,CA){var UA={$$typeof:r,type:k,key:$,ref:ge,props:CA,_owner:MA};return UA._store={},Object.defineProperty(UA._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(UA,"_self",{configurable:!1,enumerable:!1,writable:!1,value:fe}),Object.defineProperty(UA,"_source",{configurable:!1,enumerable:!1,writable:!1,value:xe}),Object.freeze&&(Object.freeze(UA.props),Object.freeze(UA)),UA};function de(k,$,ge){var fe,xe={},MA=null,CA=null,UA=null,st=null;if($!=null){$A($)&&(CA=$.ref,GA($)),mA($)&&(AA($.key),MA=""+$.key),UA=$.__self===void 0?null:$.__self,st=$.__source===void 0?null:$.__source;for(fe in $)Me.call($,fe)&&!Ge.hasOwnProperty(fe)&&(xe[fe]=$[fe])}var mt=arguments.length-2;if(mt===1)xe.children=ge;else if(mt>1){for(var Pt=Array(mt),Gt=0;Gt1){for(var Jt=Array(Gt),pr=0;pr is not supported and will be removed in a future major release. Did you mean to render instead?")),$.Provider},set:function(CA){$.Provider=CA}},_currentValue:{get:function(){return $._currentValue},set:function(CA){$._currentValue=CA}},_currentValue2:{get:function(){return $._currentValue2},set:function(CA){$._currentValue2=CA}},_threadCount:{get:function(){return $._threadCount},set:function(CA){$._threadCount=CA}},Consumer:{get:function(){return ge||(ge=!0,G("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?")),$.Consumer}},displayName:{get:function(){return $.displayName},set:function(CA){xe||(M("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",CA),xe=!0)}}}),$.Consumer=MA}return $._currentRenderer=null,$._currentRenderer2=null,$}var ce=-1,ue=0,Ye=1,cA=2;function BA(k){if(k._status===ce){var $=k._result,ge=$();if(ge.then(function(MA){if(k._status===ue||k._status===ce){var CA=k;CA._status=Ye,CA._result=MA}},function(MA){if(k._status===ue||k._status===ce){var CA=k;CA._status=cA,CA._result=MA}}),k._status===ce){var fe=k;fe._status=ue,fe._result=ge}}if(k._status===Ye){var xe=k._result;return xe===void 0&&G(`lazy: Expected the result of a dynamic import() call. Instead received: %s Your code should look like: const MyComponent = lazy(() => import('./MyComponent')) @@ -47,15 +47,15 @@ Check the render method of \``+k+"`."}return""}function Oae(k){if(k!==void 0){va Check your code at `+$+":"+ge+"."}return""}function bae(k){return k!=null?Oae(k.__source):""}var DL={};function Mae(k){var $=SL();if(!$){var ge=typeof k=="string"?k:k.displayName||k.name;ge&&($=` -Check the top-level render call using <`+ge+">.")}return $}function wL(k,$){if(!(!k._store||k._store.validated||k.key!=null)){k._store.validated=!0;var ge=Mae($);if(!DL[ge]){DL[ge]=!0;var fe="";k&&k._owner&&k._owner!==P.current&&(fe=" It was passed a child from "+pe(k._owner.type)+"."),UI(k),G('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ge,fe),UI(null)}}}function OL(k,$){if(typeof k=="object"){if(Ke(k))for(var ge=0;ge",xe=" Did you accidentally export a JSX literal instead of a component?"):CA=typeof k,G("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",CA,xe)}var UA=de.apply(this,arguments);if(UA==null)return UA;if(fe)for(var st=2;st10&&M("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),fe._updatedFibers.clear()}}}var NL=!1,Hu=null;function kae(k){if(Hu===null)try{var $=("require"+Math.random()).slice(0,7),ge=VQ&&VQ[$];Hu=ge.call(VQ,"timers").setImmediate}catch{Hu=function(xe){NL===!1&&(NL=!0,typeof MessageChannel>"u"&&G("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var MA=new MessageChannel;MA.port1.onmessage=xe,MA.port2.postMessage(void 0)}}return Hu(k)}var HI=0,TL=!1;function RL(k){{var $=HI;HI++,_.current===null&&(_.current=[]);var ge=_.isBatchingLegacy,fe;try{if(_.isBatchingLegacy=!0,fe=k(),!ge&&_.didScheduleLegacyUpdate){var xe=_.current;xe!==null&&(_.didScheduleLegacyUpdate=!1,Zw(xe))}}catch(Jt){throw Ku($),Jt}finally{_.isBatchingLegacy=ge}if(fe!==null&&typeof fe=="object"&&typeof fe.then=="function"){var MA=fe,CA=!1,UA={then:function(Jt,pr){CA=!0,MA.then(function(Zr){Ku($),HI===0?zw(Zr,Jt,pr):Jt(Zr)},function(Zr){Ku($),pr(Zr)})}};return!TL&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){CA||(TL=!0,G("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),UA}else{var st=fe;if(Ku($),HI===0){var mt=_.current;mt!==null&&(Zw(mt),_.current=null);var Pt={then:function(Jt,pr){_.current===null?(_.current=[],zw(st,Jt,pr)):Jt(st)}};return Pt}else{var Gt={then:function(Jt,pr){Jt(st)}};return Gt}}}}function Ku(k){k!==HI-1&&G("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),HI=k}function zw(k,$,ge){{var fe=_.current;if(fe!==null)try{Zw(fe),kae(function(){fe.length===0?(_.current=null,$(k)):zw(k,$,ge)})}catch(xe){ge(xe)}else $(k)}}var Ww=!1;function Zw(k){if(!Ww){Ww=!0;var $=0;try{for(;${"use strict";process.env.NODE_ENV==="production"?hR.exports=Zq():hR.exports=Xq()});var Xc=W((htA,M8)=>{"use strict";var im=We("crypto"),r_e=We("assert");function ao(n){if(!(n instanceof Buffer))throw TypeError(`Expected Buffer instead of: ${n.constructor.name}`);return n}function a_e(n,r,o){ao(n),ao(r),ao(o);let i=im.createCipheriv("aes-256-cbc",n,o);return Buffer.concat([i.update(r),i.final()])}function i_e(n,r,o){ao(n),ao(r),ao(o);let i=im.createDecipheriv("aes-256-cbc",n,o);return Buffer.concat([i.update(r),i.final()])}function pp(n,r){ao(n),ao(r);let o=im.createHmac("sha256",n);return o.update(r),Buffer.from(o.digest())}function o_e(n){ao(n);let r=im.createHash("sha512");return r.update(n),r.digest()}function n_e(n,r,o,i){if(ao(n),ao(r),ao(o),r.byteLength!=32)throw new Error("Got salt of incorrect length");i=i||3,r_e(i>=1&&i<=3);let e=pp(r,n),a=new Uint8Array(o.byteLength+1+32);a.set(o,32),a[a.length-1]=1;let A=[pp(e,Buffer.from(a.slice(32)))];return i>1&&(a.set(A[A.length-1]),a[a.length-1]=2,A.push(pp(e,Buffer.from(a)))),i>2&&(a.set(A[A.length-1]),a[a.length-1]=3,A.push(pp(e,Buffer.from(a)))),A}function s_e(n,r,o,i){let e=pp(r,n).slice(0,i);if(o.length!==i||e.length!==i)throw new Error("Bad MAC length");if(!o.equals(e))throw new Error("Bad MAC")}M8.exports={deriveSecrets:n_e,decrypt:i_e,encrypt:a_e,hash:o_e,calculateMAC:pp,verifyMAC:s_e}});var Y8=W(ds=>{"use strict";Object.defineProperty(ds,"__esModule",{value:!0});var dtA=new Uint8Array(16),G8=new Uint8Array(32);G8[0]=9;function lA(n){var r,o=new Float64Array(16);if(n)for(r=0;r>24&255,n[r+1]=o>>16&255,n[r+2]=o>>8&255,n[r+3]=o&255,n[r+4]=i>>24&255,n[r+5]=i>>16&255,n[r+6]=i>>8&255,n[r+7]=i&255}function p_e(n,r,o,i,e){var a,A=0;for(a=0;a>>8)-1}function F8(n,r,o,i){return p_e(n,r,o,i,32)}function dg(n,r){var o;for(o=0;o<16;o++)n[o]=r[o]|0}function Ck(n){var r,o,i=1;for(r=0;r<16;r++)o=n[r]+i+65535,i=Math.floor(o/65536),n[r]=o-i*65536;n[0]+=i-1+37*(i-1)}function Ep(n,r,o){for(var i,e=~(o-1),a=0;a<16;a++)i=e&(n[a]^r[a]),n[a]^=i,r[a]^=i}function hp(n,r){var o,i,e,a=lA(),A=lA();for(o=0;o<16;o++)A[o]=r[o];for(Ck(A),Ck(A),Ck(A),i=0;i<2;i++){for(a[0]=A[0]-65517,o=1;o<15;o++)a[o]=A[o]-65535-(a[o-1]>>16&1),a[o-1]&=65535;a[15]=A[15]-32767-(a[14]>>16&1),e=a[15]>>16&1,a[14]&=65535,Ep(A,a,1-e)}for(o=0;o<16;o++)n[2*o]=A[o]&255,n[2*o+1]=A[o]>>8}function R8(n,r){var o=new Uint8Array(32),i=new Uint8Array(32);return hp(o,n),hp(i,r),F8(o,0,i,0)}function L8(n){var r=new Uint8Array(32);return hp(r,n),r[0]&1}function fk(n,r){var o;for(o=0;o<16;o++)n[o]=r[2*o]+(r[2*o+1]<<8);n[15]&=32767}function Fo(n,r,o){for(var i=0;i<16;i++)n[i]=r[i]+o[i]}function Uo(n,r,o){for(var i=0;i<16;i++)n[i]=r[i]-o[i]}function ot(n,r,o){var i,e,a=0,A=0,t=0,s=0,g=0,c=0,I=0,E=0,B=0,f=0,Q=0,y=0,m=0,T=0,_=0,P=0,Y=0,j=0,K=0,q=0,V=0,H=0,v=0,Z=0,U=0,M=0,G=0,te=0,Be=0,Ce=0,ke=0,Ee=o[0],me=o[1],_e=o[2],Ve=o[3],oA=o[4],tA=o[5],Pe=o[6],gA=o[7],Qe=o[8],he=o[9],ze=o[10],Ke=o[11],De=o[12],EA=o[13],pA=o[14],AA=o[15];i=r[0],a+=i*Ee,A+=i*me,t+=i*_e,s+=i*Ve,g+=i*oA,c+=i*tA,I+=i*Pe,E+=i*gA,B+=i*Qe,f+=i*he,Q+=i*ze,y+=i*Ke,m+=i*De,T+=i*EA,_+=i*pA,P+=i*AA,i=r[1],A+=i*Ee,t+=i*me,s+=i*_e,g+=i*Ve,c+=i*oA,I+=i*tA,E+=i*Pe,B+=i*gA,f+=i*Qe,Q+=i*he,y+=i*ze,m+=i*Ke,T+=i*De,_+=i*EA,P+=i*pA,Y+=i*AA,i=r[2],t+=i*Ee,s+=i*me,g+=i*_e,c+=i*Ve,I+=i*oA,E+=i*tA,B+=i*Pe,f+=i*gA,Q+=i*Qe,y+=i*he,m+=i*ze,T+=i*Ke,_+=i*De,P+=i*EA,Y+=i*pA,j+=i*AA,i=r[3],s+=i*Ee,g+=i*me,c+=i*_e,I+=i*Ve,E+=i*oA,B+=i*tA,f+=i*Pe,Q+=i*gA,y+=i*Qe,m+=i*he,T+=i*ze,_+=i*Ke,P+=i*De,Y+=i*EA,j+=i*pA,K+=i*AA,i=r[4],g+=i*Ee,c+=i*me,I+=i*_e,E+=i*Ve,B+=i*oA,f+=i*tA,Q+=i*Pe,y+=i*gA,m+=i*Qe,T+=i*he,_+=i*ze,P+=i*Ke,Y+=i*De,j+=i*EA,K+=i*pA,q+=i*AA,i=r[5],c+=i*Ee,I+=i*me,E+=i*_e,B+=i*Ve,f+=i*oA,Q+=i*tA,y+=i*Pe,m+=i*gA,T+=i*Qe,_+=i*he,P+=i*ze,Y+=i*Ke,j+=i*De,K+=i*EA,q+=i*pA,V+=i*AA,i=r[6],I+=i*Ee,E+=i*me,B+=i*_e,f+=i*Ve,Q+=i*oA,y+=i*tA,m+=i*Pe,T+=i*gA,_+=i*Qe,P+=i*he,Y+=i*ze,j+=i*Ke,K+=i*De,q+=i*EA,V+=i*pA,H+=i*AA,i=r[7],E+=i*Ee,B+=i*me,f+=i*_e,Q+=i*Ve,y+=i*oA,m+=i*tA,T+=i*Pe,_+=i*gA,P+=i*Qe,Y+=i*he,j+=i*ze,K+=i*Ke,q+=i*De,V+=i*EA,H+=i*pA,v+=i*AA,i=r[8],B+=i*Ee,f+=i*me,Q+=i*_e,y+=i*Ve,m+=i*oA,T+=i*tA,_+=i*Pe,P+=i*gA,Y+=i*Qe,j+=i*he,K+=i*ze,q+=i*Ke,V+=i*De,H+=i*EA,v+=i*pA,Z+=i*AA,i=r[9],f+=i*Ee,Q+=i*me,y+=i*_e,m+=i*Ve,T+=i*oA,_+=i*tA,P+=i*Pe,Y+=i*gA,j+=i*Qe,K+=i*he,q+=i*ze,V+=i*Ke,H+=i*De,v+=i*EA,Z+=i*pA,U+=i*AA,i=r[10],Q+=i*Ee,y+=i*me,m+=i*_e,T+=i*Ve,_+=i*oA,P+=i*tA,Y+=i*Pe,j+=i*gA,K+=i*Qe,q+=i*he,V+=i*ze,H+=i*Ke,v+=i*De,Z+=i*EA,U+=i*pA,M+=i*AA,i=r[11],y+=i*Ee,m+=i*me,T+=i*_e,_+=i*Ve,P+=i*oA,Y+=i*tA,j+=i*Pe,K+=i*gA,q+=i*Qe,V+=i*he,H+=i*ze,v+=i*Ke,Z+=i*De,U+=i*EA,M+=i*pA,G+=i*AA,i=r[12],m+=i*Ee,T+=i*me,_+=i*_e,P+=i*Ve,Y+=i*oA,j+=i*tA,K+=i*Pe,q+=i*gA,V+=i*Qe,H+=i*he,v+=i*ze,Z+=i*Ke,U+=i*De,M+=i*EA,G+=i*pA,te+=i*AA,i=r[13],T+=i*Ee,_+=i*me,P+=i*_e,Y+=i*Ve,j+=i*oA,K+=i*tA,q+=i*Pe,V+=i*gA,H+=i*Qe,v+=i*he,Z+=i*ze,U+=i*Ke,M+=i*De,G+=i*EA,te+=i*pA,Be+=i*AA,i=r[14],_+=i*Ee,P+=i*me,Y+=i*_e,j+=i*Ve,K+=i*oA,q+=i*tA,V+=i*Pe,H+=i*gA,v+=i*Qe,Z+=i*he,U+=i*ze,M+=i*Ke,G+=i*De,te+=i*EA,Be+=i*pA,Ce+=i*AA,i=r[15],P+=i*Ee,Y+=i*me,j+=i*_e,K+=i*Ve,q+=i*oA,V+=i*tA,H+=i*Pe,v+=i*gA,Z+=i*Qe,U+=i*he,M+=i*ze,G+=i*Ke,te+=i*De,Be+=i*EA,Ce+=i*pA,ke+=i*AA,a+=38*Y,A+=38*j,t+=38*K,s+=38*q,g+=38*V,c+=38*H,I+=38*v,E+=38*Z,B+=38*U,f+=38*M,Q+=38*G,y+=38*te,m+=38*Be,T+=38*Ce,_+=38*ke,e=1,i=a+e+65535,e=Math.floor(i/65536),a=i-e*65536,i=A+e+65535,e=Math.floor(i/65536),A=i-e*65536,i=t+e+65535,e=Math.floor(i/65536),t=i-e*65536,i=s+e+65535,e=Math.floor(i/65536),s=i-e*65536,i=g+e+65535,e=Math.floor(i/65536),g=i-e*65536,i=c+e+65535,e=Math.floor(i/65536),c=i-e*65536,i=I+e+65535,e=Math.floor(i/65536),I=i-e*65536,i=E+e+65535,e=Math.floor(i/65536),E=i-e*65536,i=B+e+65535,e=Math.floor(i/65536),B=i-e*65536,i=f+e+65535,e=Math.floor(i/65536),f=i-e*65536,i=Q+e+65535,e=Math.floor(i/65536),Q=i-e*65536,i=y+e+65535,e=Math.floor(i/65536),y=i-e*65536,i=m+e+65535,e=Math.floor(i/65536),m=i-e*65536,i=T+e+65535,e=Math.floor(i/65536),T=i-e*65536,i=_+e+65535,e=Math.floor(i/65536),_=i-e*65536,i=P+e+65535,e=Math.floor(i/65536),P=i-e*65536,a+=e-1+37*(e-1),e=1,i=a+e+65535,e=Math.floor(i/65536),a=i-e*65536,i=A+e+65535,e=Math.floor(i/65536),A=i-e*65536,i=t+e+65535,e=Math.floor(i/65536),t=i-e*65536,i=s+e+65535,e=Math.floor(i/65536),s=i-e*65536,i=g+e+65535,e=Math.floor(i/65536),g=i-e*65536,i=c+e+65535,e=Math.floor(i/65536),c=i-e*65536,i=I+e+65535,e=Math.floor(i/65536),I=i-e*65536,i=E+e+65535,e=Math.floor(i/65536),E=i-e*65536,i=B+e+65535,e=Math.floor(i/65536),B=i-e*65536,i=f+e+65535,e=Math.floor(i/65536),f=i-e*65536,i=Q+e+65535,e=Math.floor(i/65536),Q=i-e*65536,i=y+e+65535,e=Math.floor(i/65536),y=i-e*65536,i=m+e+65535,e=Math.floor(i/65536),m=i-e*65536,i=T+e+65535,e=Math.floor(i/65536),T=i-e*65536,i=_+e+65535,e=Math.floor(i/65536),_=i-e*65536,i=P+e+65535,e=Math.floor(i/65536),P=i-e*65536,a+=e-1+37*(e-1),n[0]=a,n[1]=A,n[2]=t,n[3]=s,n[4]=g,n[5]=c,n[6]=I,n[7]=E,n[8]=B,n[9]=f,n[10]=Q,n[11]=y,n[12]=m,n[13]=T,n[14]=_,n[15]=P}function Lo(n,r){ot(n,r,r)}function Qk(n,r){var o=lA(),i;for(i=0;i<16;i++)o[i]=r[i];for(i=253;i>=0;i--)Lo(o,o),i!==2&&i!==4&&ot(o,o,r);for(i=0;i<16;i++)n[i]=o[i]}function E_e(n,r){var o=lA(),i;for(i=0;i<16;i++)o[i]=r[i];for(i=250;i>=0;i--)Lo(o,o),i!==1&&ot(o,o,r);for(i=0;i<16;i++)n[i]=o[i]}function U8(n,r,o){var i=new Uint8Array(32),e=new Float64Array(80),a,A,t=lA(),s=lA(),g=lA(),c=lA(),I=lA(),E=lA();for(A=0;A<31;A++)i[A]=r[A];for(i[31]=r[31]&127|64,i[0]&=248,fk(e,o),A=0;A<16;A++)s[A]=e[A],c[A]=t[A]=g[A]=0;for(t[0]=c[0]=1,A=254;A>=0;--A)a=i[A>>>3]>>>(A&7)&1,Ep(t,s,a),Ep(g,c,a),Fo(I,t,g),Uo(t,t,g),Fo(g,s,c),Uo(s,s,c),Lo(c,I),Lo(E,t),ot(t,g,t),ot(g,s,I),Fo(I,t,g),Uo(t,t,g),Lo(s,t),Uo(g,c,E),ot(t,g,g_e),Fo(t,t,c),ot(g,g,t),ot(t,c,E),ot(c,s,e),Lo(s,I),Ep(t,s,a),Ep(g,c,a);for(A=0;A<16;A++)e[A+16]=t[A],e[A+32]=g[A],e[A+48]=s[A],e[A+64]=c[A];var B=e.subarray(32),f=e.subarray(16);return Qk(B,B),ot(f,f,B),hp(n,f),0}function C_e(n,r){return U8(n,r,G8)}var k8=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function v8(n,r,o,i){for(var e=new Int32Array(16),a=new Int32Array(16),A,t,s,g,c,I,E,B,f,Q,y,m,T,_,P,Y,j,K,q,V,H,v,Z,U,M,G,te=n[0],Be=n[1],Ce=n[2],ke=n[3],Ee=n[4],me=n[5],_e=n[6],Ve=n[7],oA=r[0],tA=r[1],Pe=r[2],gA=r[3],Qe=r[4],he=r[5],ze=r[6],Ke=r[7],De=0;i>=128;){for(q=0;q<16;q++)V=8*q+De,e[q]=o[V+0]<<24|o[V+1]<<16|o[V+2]<<8|o[V+3],a[q]=o[V+4]<<24|o[V+5]<<16|o[V+6]<<8|o[V+7];for(q=0;q<80;q++)if(A=te,t=Be,s=Ce,g=ke,c=Ee,I=me,E=_e,B=Ve,f=oA,Q=tA,y=Pe,m=gA,T=Qe,_=he,P=ze,Y=Ke,H=Ve,v=Ke,Z=v&65535,U=v>>>16,M=H&65535,G=H>>>16,H=(Ee>>>14|Qe<<18)^(Ee>>>18|Qe<<14)^(Qe>>>9|Ee<<23),v=(Qe>>>14|Ee<<18)^(Qe>>>18|Ee<<14)^(Ee>>>9|Qe<<23),Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,H=Ee&me^~Ee&_e,v=Qe&he^~Qe&ze,Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,H=k8[q*2],v=k8[q*2+1],Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,H=e[q%16],v=a[q%16],Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,U+=Z>>>16,M+=U>>>16,G+=M>>>16,j=M&65535|G<<16,K=Z&65535|U<<16,H=j,v=K,Z=v&65535,U=v>>>16,M=H&65535,G=H>>>16,H=(te>>>28|oA<<4)^(oA>>>2|te<<30)^(oA>>>7|te<<25),v=(oA>>>28|te<<4)^(te>>>2|oA<<30)^(te>>>7|oA<<25),Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,H=te&Be^te&Ce^Be&Ce,v=oA&tA^oA&Pe^tA&Pe,Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,U+=Z>>>16,M+=U>>>16,G+=M>>>16,B=M&65535|G<<16,Y=Z&65535|U<<16,H=g,v=m,Z=v&65535,U=v>>>16,M=H&65535,G=H>>>16,H=j,v=K,Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,U+=Z>>>16,M+=U>>>16,G+=M>>>16,g=M&65535|G<<16,m=Z&65535|U<<16,Be=A,Ce=t,ke=s,Ee=g,me=c,_e=I,Ve=E,te=B,tA=f,Pe=Q,gA=y,Qe=m,he=T,ze=_,Ke=P,oA=Y,q%16===15)for(V=0;V<16;V++)H=e[V],v=a[V],Z=v&65535,U=v>>>16,M=H&65535,G=H>>>16,H=e[(V+9)%16],v=a[(V+9)%16],Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,j=e[(V+1)%16],K=a[(V+1)%16],H=(j>>>1|K<<31)^(j>>>8|K<<24)^j>>>7,v=(K>>>1|j<<31)^(K>>>8|j<<24)^(K>>>7|j<<25),Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,j=e[(V+14)%16],K=a[(V+14)%16],H=(j>>>19|K<<13)^(K>>>29|j<<3)^j>>>6,v=(K>>>19|j<<13)^(j>>>29|K<<3)^(K>>>6|j<<26),Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,U+=Z>>>16,M+=U>>>16,G+=M>>>16,e[V]=M&65535|G<<16,a[V]=Z&65535|U<<16;H=te,v=oA,Z=v&65535,U=v>>>16,M=H&65535,G=H>>>16,H=n[0],v=r[0],Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,U+=Z>>>16,M+=U>>>16,G+=M>>>16,n[0]=te=M&65535|G<<16,r[0]=oA=Z&65535|U<<16,H=Be,v=tA,Z=v&65535,U=v>>>16,M=H&65535,G=H>>>16,H=n[1],v=r[1],Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,U+=Z>>>16,M+=U>>>16,G+=M>>>16,n[1]=Be=M&65535|G<<16,r[1]=tA=Z&65535|U<<16,H=Ce,v=Pe,Z=v&65535,U=v>>>16,M=H&65535,G=H>>>16,H=n[2],v=r[2],Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,U+=Z>>>16,M+=U>>>16,G+=M>>>16,n[2]=Ce=M&65535|G<<16,r[2]=Pe=Z&65535|U<<16,H=ke,v=gA,Z=v&65535,U=v>>>16,M=H&65535,G=H>>>16,H=n[3],v=r[3],Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,U+=Z>>>16,M+=U>>>16,G+=M>>>16,n[3]=ke=M&65535|G<<16,r[3]=gA=Z&65535|U<<16,H=Ee,v=Qe,Z=v&65535,U=v>>>16,M=H&65535,G=H>>>16,H=n[4],v=r[4],Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,U+=Z>>>16,M+=U>>>16,G+=M>>>16,n[4]=Ee=M&65535|G<<16,r[4]=Qe=Z&65535|U<<16,H=me,v=he,Z=v&65535,U=v>>>16,M=H&65535,G=H>>>16,H=n[5],v=r[5],Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,U+=Z>>>16,M+=U>>>16,G+=M>>>16,n[5]=me=M&65535|G<<16,r[5]=he=Z&65535|U<<16,H=_e,v=ze,Z=v&65535,U=v>>>16,M=H&65535,G=H>>>16,H=n[6],v=r[6],Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,U+=Z>>>16,M+=U>>>16,G+=M>>>16,n[6]=_e=M&65535|G<<16,r[6]=ze=Z&65535|U<<16,H=Ve,v=Ke,Z=v&65535,U=v>>>16,M=H&65535,G=H>>>16,H=n[7],v=r[7],Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,U+=Z>>>16,M+=U>>>16,G+=M>>>16,n[7]=Ve=M&65535|G<<16,r[7]=Ke=Z&65535|U<<16,De+=128,i-=128}return i}function $h(n,r,o){var i=new Int32Array(8),e=new Int32Array(8),a=new Uint8Array(256),A,t=o;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,e[0]=4089235720,e[1]=2227873595,e[2]=4271175723,e[3]=1595750129,e[4]=2917565137,e[5]=725511199,e[6]=4215389547,e[7]=327033209,v8(i,e,r,o),o%=128,A=0;A=0;--e)i=o[e/8|0]>>(e&7)&1,P8(n,r,i),uk(r,n),uk(n,n),P8(n,r,i)}function nm(n,r){var o=[lA(),lA(),lA(),lA()];dg(o[0],_8),dg(o[1],N8),dg(o[2],Cp),ot(o[3],_8,N8),H8(n,o,r)}var hk=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function yk(n,r){var o,i,e,a;for(i=63;i>=32;--i){for(o=0,e=i-32,a=i-12;e>8,r[e]-=o*256;r[e]+=o,r[i]=0}for(o=0,e=0;e<32;e++)r[e]+=o-(r[31]>>4)*hk[e],o=r[e]>>8,r[e]&=255;for(e=0;e<32;e++)r[e]-=o*hk[e];for(i=0;i<32;i++)r[i+1]+=r[i]>>8,n[i]=r[i]&255}function ed(n){var r=new Float64Array(64),o;for(o=0;o<64;o++)r[o]=n[o];for(o=0;o<64;o++)n[o]=0;yk(n,r)}function h_e(n,r,o,i){var e=new Uint8Array(64),a=new Uint8Array(64),A,t,s=new Float64Array(64),g=[lA(),lA(),lA(),lA()];for(A=0;A>7&&Uo(n[0],dk,n[0]),ot(n[3],n[0],n[1]),0)}function B_e(n,r,o,i){var e,a,A=new Uint8Array(32),t=new Uint8Array(64),s=[lA(),lA(),lA(),lA()],g=[lA(),lA(),lA(),lA()];if(a=-1,o<64||u_e(g,i))return-1;for(e=0;e=0}ds.verify=D_e;function w_e(n){if(ug(n),n.length!==32)throw new Error("wrong seed length");for(var r=new Uint8Array(32),o=new Uint8Array(32),i=0;i<32;i++)r[i]=n[i];return C_e(o,r),r[0]&=248,r[31]&=127,r[31]|=64,o[31]&=127,{public:o,private:r}}ds.generateKeyPair=w_e;ds.default={}});var Bg=W(up=>{"use strict";var Ad=Y8(),dp=We("crypto"),mk=Buffer.from([48,42,48,5,6,3,43,101,110,3,33,0]),Sk=Buffer.from([48,46,2,1,0,48,5,6,3,43,101,110,4,34,4,32]),O_e=Buffer.from([5]),Dk=function(n){return Buffer.concat([O_e,n])};function x8(n){if(n===void 0)throw new Error("Undefined private key");if(!(n instanceof Buffer))throw new Error(`Invalid private key type: ${n.constructor.name}`);if(n.byteLength!=32)throw new Error(`Incorrect private key length: ${n.byteLength}`)}function j8(n){if(!(n instanceof Buffer))throw new Error(`Invalid public key type: ${n.constructor.name}`);if(n===void 0||(n.byteLength!=33||n[0]!=5)&&n.byteLength!=32)throw new Error("Invalid public key");return n.byteLength==33?n.slice(1):(console.error("WARNING: Expected pubkey of length 33, please report the ST and client that generated the pubkey"),n)}function b_e(n){let r=new Uint8Array(n);return r[0]|=6,r[31]|=128,r[31]&=-65,r}up.getPublicFromPrivateKey=function(n){let r=b_e(n),o=Ad.generateKeyPair(r);return Dk(Buffer.from(o.public))};up.generateKeyPair=function(){try{let{publicKey:n,privateKey:r}=dp.generateKeyPairSync("x25519",{publicKeyEncoding:{format:"der",type:"spki"},privateKeyEncoding:{format:"der",type:"pkcs8"}}),o=n.slice(mk.length,mk.length+32),i=r.slice(Sk.length,Sk.length+32);return{pubKey:Dk(o),privKey:i}}catch{let r=Ad.generateKeyPair(dp.randomBytes(32));return{privKey:Buffer.from(r.private),pubKey:Dk(Buffer.from(r.public))}}};up.calculateAgreement=function(n,r){if(n=j8(n),x8(r),!n||n.byteLength!=32)throw new Error("Invalid public key");if(typeof dp.diffieHellman=="function"){let o=dp.createPrivateKey({key:Buffer.concat([Sk,r]),format:"der",type:"pkcs8"}),i=dp.createPublicKey({key:Buffer.concat([mk,n]),format:"der",type:"spki"});return dp.diffieHellman({privateKey:o,publicKey:i})}else{let o=Ad.sharedKey(r,n);return Buffer.from(o)}};up.calculateSignature=function(n,r){if(x8(n),!r)throw new Error("Invalid message");return Buffer.from(Ad.sign(n,r))};up.verifySignature=function(n,r,o,i){if(n=j8(n),!n||n.byteLength!=32)throw new Error("Invalid public key");if(!r)throw new Error("Invalid message");if(!o||o.byteLength!=64)throw new Error("Invalid signature");return i?!0:Ad.verify(n,r,o)}});var q8=W(td=>{var sm=Bg(),M_e=We("crypto");function J8(n){return typeof n=="number"&&n%1===0&&n>=0}td.generateIdentityKeyPair=sm.generateKeyPair;td.generateRegistrationId=function(){var n=Uint16Array.from(M_e.randomBytes(2))[0];return n&16383};td.generateSignedPreKey=function(n,r){if(!(n.privKey instanceof Buffer)||n.privKey.byteLength!=32||!(n.pubKey instanceof Buffer)||n.pubKey.byteLength!=33)throw new TypeError("Invalid argument for identityKeyPair");if(!J8(r))throw new TypeError("Invalid argument for signedKeyId: "+r);let o=sm.generateKeyPair(),i=sm.calculateSignature(n.privKey,o.pubKey);return{keyId:r,keyPair:o,signature:i}};td.generatePreKey=function(n){if(!J8(n))throw new TypeError("Invalid argument for keyId: "+n);let r=sm.generateKeyPair();return{keyId:n,keyPair:r}}});var Ok=W((QtA,V8)=>{var wk=class n{static from(r){if(typeof r!="string"||!r.match(/.*\.\d+/))throw new Error("Invalid address encoding");let o=r.split(".");return new this(o[0],parseInt(o[1]))}constructor(r,o){if(typeof r!="string")throw new TypeError("id required for addr");if(r.indexOf(".")!==-1)throw new TypeError("encoded addr detected");if(this.id=r,typeof o!="number")throw new TypeError("number required for deviceId");this.deviceId=o}toString(){return`${this.id}.${this.deviceId}`}is(r){return r instanceof n?r.id===this.id&&r.deviceId===this.deviceId:!1}};V8.exports=wk});var bk=W((ytA,z8)=>{var __e={OURS:1,THEIRS:2};z8.exports=__e});var Mk=W((mtA,W8)=>{var N_e={SENDING:1,RECEIVING:2};W8.exports=N_e});var lm=W((StA,X8)=>{var T_e=bk(),R_e=40,Z8="v1";function cm(n){if(!Buffer.isBuffer(n))throw new TypeError("Buffer required")}var Im=class{constructor(){this._chains={}}toString(){return``}inspect(){return this.toString()}addChain(r,o){cm(r);let i=r.toString("base64");if(this._chains.hasOwnProperty(i))throw new Error("Overwrite attempt");this._chains[i]=o}getChain(r){return cm(r),this._chains[r.toString("base64")]}deleteChain(r){cm(r);let o=r.toString("base64");if(!this._chains.hasOwnProperty(o))throw new ReferenceError("Not Found");delete this._chains[o]}*chains(){for(let[r,o]of Object.entries(this._chains))yield[Buffer.from(r,"base64"),o]}serialize(){let r={registrationId:this.registrationId,currentRatchet:{ephemeralKeyPair:{pubKey:this.currentRatchet.ephemeralKeyPair.pubKey.toString("base64"),privKey:this.currentRatchet.ephemeralKeyPair.privKey.toString("base64")},lastRemoteEphemeralKey:this.currentRatchet.lastRemoteEphemeralKey.toString("base64"),previousCounter:this.currentRatchet.previousCounter,rootKey:this.currentRatchet.rootKey.toString("base64")},indexInfo:{baseKey:this.indexInfo.baseKey.toString("base64"),baseKeyType:this.indexInfo.baseKeyType,closed:this.indexInfo.closed,used:this.indexInfo.used,created:this.indexInfo.created,remoteIdentityKey:this.indexInfo.remoteIdentityKey.toString("base64")},_chains:this._serialize_chains(this._chains)};return this.pendingPreKey&&(r.pendingPreKey=Object.assign({},this.pendingPreKey),r.pendingPreKey.baseKey=this.pendingPreKey.baseKey.toString("base64")),r}static deserialize(r){let o=new this;return o.registrationId=r.registrationId,o.currentRatchet={ephemeralKeyPair:{pubKey:Buffer.from(r.currentRatchet.ephemeralKeyPair.pubKey,"base64"),privKey:Buffer.from(r.currentRatchet.ephemeralKeyPair.privKey,"base64")},lastRemoteEphemeralKey:Buffer.from(r.currentRatchet.lastRemoteEphemeralKey,"base64"),previousCounter:r.currentRatchet.previousCounter,rootKey:Buffer.from(r.currentRatchet.rootKey,"base64")},o.indexInfo={baseKey:Buffer.from(r.indexInfo.baseKey,"base64"),baseKeyType:r.indexInfo.baseKeyType,closed:r.indexInfo.closed,used:r.indexInfo.used,created:r.indexInfo.created,remoteIdentityKey:Buffer.from(r.indexInfo.remoteIdentityKey,"base64")},o._chains=this._deserialize_chains(r._chains),r.pendingPreKey&&(o.pendingPreKey=Object.assign({},r.pendingPreKey),o.pendingPreKey.baseKey=Buffer.from(r.pendingPreKey.baseKey,"base64")),o}_serialize_chains(r){let o={};for(let i of Object.keys(r)){let e=r[i],a={};for(let[A,t]of Object.entries(e.messageKeys))a[A]=t.toString("base64");o[i]={chainKey:{counter:e.chainKey.counter,key:e.chainKey.key&&e.chainKey.key.toString("base64")},chainType:e.chainType,messageKeys:a}}return o}static _deserialize_chains(r){let o={};for(let i of Object.keys(r)){let e=r[i],a={};for(let[A,t]of Object.entries(e.messageKeys))a[A]=Buffer.from(t,"base64");o[i]={chainKey:{counter:e.chainKey.counter,key:e.chainKey.key&&Buffer.from(e.chainKey.key,"base64")},chainType:e.chainType,messageKeys:a}}return o}},gm=[{version:"v1",migrate:function(r){let o=r._sessions;if(r.registrationId)for(let i in o)o[i].registrationId||(o[i].registrationId=r.registrationId);else for(let i in o)o[i].indexInfo.closed===-1&&console.error("V1 session storage migration error: registrationId",r.registrationId,"for open session version",r.version)}}],_k=class{static createEntry(){return new Im}static migrate(r){let o=r.version===void 0;for(let i=0;i{let i=r.indexInfo.used||0,e=o.indexInfo.used||0;return i===e?0:iR_e;){let r,o;for(let[i,e]of Object.entries(this.sessions))e.indexInfo.closed!==-1&&(!o||e.indexInfo.closed{un.SignalError=class extends Error{};un.UntrustedIdentityKeyError=class extends un.SignalError{constructor(r,o){super(),this.name="UntrustedIdentityKeyError",this.addr=r,this.identityKey=o}};un.SessionError=class extends un.SignalError{constructor(r){super(r),this.name="SessionError"}};un.MessageCounterError=class extends un.SessionError{constructor(r){super(r),this.name="MessageCounterError"}};un.PreKeyError=class extends un.SessionError{constructor(r){super(r),this.name="PreKeyError"}}});var Nk=W((NtA,eV)=>{"use strict";var Em=new Map,$8=1e4;async function k_e(n,r){let o=0;for(;;){let i=Math.min(n.length,$8);for(let e=o;e=$8?(n.splice(0,i),o=0):o=i;else break}r()}eV.exports=function(n,r){r.name||(Object.defineProperty(r,"name",{writable:!0}),typeof n=="string"?r.name=n:console.warn("Unhandled bucket type (for naming):",typeof n,n));let o;Em.has(n)||(Em.set(n,[]),o=!0);let i=Em.get(n),e=new Promise((a,A)=>i.push({awaitable:r,resolve:a,reject:A}));return o&&k_e(i,()=>Em.delete(n)),e}});var Rk=W((TtA,aV)=>{"use strict";var AV=bk(),v_e=Mk(),tV=lm(),rV=Xc(),fg=Bg(),Cm=pm(),P_e=Nk(),Tk=class{constructor(r,o){this.addr=o,this.storage=r}async initOutgoing(r){let o=this.addr.toString();return await P_e(o,async()=>{if(!await this.storage.isTrustedIdentity(this.addr.id,r.identityKey))throw new Cm.UntrustedIdentityKeyError(this.addr.id,r.identityKey);fg.verifySignature(r.identityKey,r.signedPreKey.publicKey,r.signedPreKey.signature,!0);let i=fg.generateKeyPair(),e=r.preKey&&r.preKey.publicKey,a=await this.initSession(!0,i,void 0,r.identityKey,e,r.signedPreKey.publicKey,r.registrationId);a.pendingPreKey={signedKeyId:r.signedPreKey.keyId,baseKey:i.pubKey},r.preKey&&(a.pendingPreKey.preKeyId=r.preKey.keyId);let A=await this.storage.loadSession(o);if(!A)A=new tV;else{let t=A.getOpenSession();t&&A.closeSession(t)}A.setSession(a),await this.storage.storeSession(o,A)})}async initIncoming(r,o){let i=this.addr.toString();if(!await this.storage.isTrustedIdentity(i,o.identityKey))throw new Cm.UntrustedIdentityKeyError(this.addr.id,o.identityKey);if(r.getSession(o.baseKey))return;let e=await this.storage.loadPreKey(o.preKeyId);if(o.preKeyId&&!e)throw new Cm.PreKeyError("Invalid PreKey ID");let a=await this.storage.loadSignedPreKey(o.signedPreKeyId);if(!a)throw new Cm.PreKeyError("Missing SignedPreKey");let A=r.getOpenSession();return A&&(console.warn("Closing open session in favor of incoming prekey bundle"),r.closeSession(A)),r.setSession(await this.initSession(!1,e,a,o.identityKey,o.baseKey,void 0,o.registrationId)),o.preKeyId}async initSession(r,o,i,e,a,A,t){if(r){if(i)throw new Error("Invalid call to initSession");i=o}else{if(A)throw new Error("Invalid call to initSession");A=a}let s;!o||!a?s=new Uint8Array(128):s=new Uint8Array(160);for(var g=0;g<32;g++)s[g]=255;let c=await this.storage.getOurIdentity(),I=fg.calculateAgreement(A,c.privKey),E=fg.calculateAgreement(e,i.privKey),B=fg.calculateAgreement(A,i.privKey);if(r?(s.set(new Uint8Array(I),32),s.set(new Uint8Array(E),64)):(s.set(new Uint8Array(I),64),s.set(new Uint8Array(E),32)),s.set(new Uint8Array(B),96),o&&a){let y=fg.calculateAgreement(a,o.privKey);s.set(new Uint8Array(y),128)}let f=rV.deriveSecrets(Buffer.from(s),Buffer.alloc(32),Buffer.from("WhisperText")),Q=tV.createEntry();return Q.registrationId=t,Q.currentRatchet={rootKey:f[0],ephemeralKeyPair:r?fg.generateKeyPair():i,lastRemoteEphemeralKey:A,previousCounter:0},Q.indexInfo={created:Date.now(),used:Date.now(),remoteIdentityKey:e,baseKey:r?o.pubKey:a,baseKeyType:r?AV.OURS:AV.THEIRS,closed:-1},r&&this.calculateSendingRatchet(Q,A),Q}calculateSendingRatchet(r,o){let i=r.currentRatchet,e=fg.calculateAgreement(o,i.ephemeralKeyPair.privKey),a=rV.deriveSecrets(e,i.rootKey,Buffer.from("WhisperRatchet"));r.addChain(i.ephemeralKeyPair.pubKey,{messageKeys:{},chainKey:{counter:-1,key:a[1]},chainType:v_e.SENDING}),i.rootKey=a[0]}};aV.exports=Tk});var oV=W((RtA,iV)=>{"use strict";var Qg=Zf(),io=Qg.Reader,kk=Qg.Writer,aA=Qg.util,Ho=Qg.roots.default||(Qg.roots.default={});Ho.textsecure=(function(){var n={};return n.WhisperMessage=(function(){function r(o){if(o)for(var i=Object.keys(o),e=0;e>>3){case 1:A.ephemeralKey=i.bytes();break;case 2:A.counter=i.uint32();break;case 3:A.previousCounter=i.uint32();break;case 4:A.ciphertext=i.bytes();break;default:i.skipType(t&7);break}}return A},r.decodeDelimited=function(i){return i instanceof io||(i=new io(i)),this.decode(i,i.uint32())},r.verify=function(i){return typeof i!="object"||i===null?"object expected":i.ephemeralKey!=null&&i.hasOwnProperty("ephemeralKey")&&!(i.ephemeralKey&&typeof i.ephemeralKey.length=="number"||aA.isString(i.ephemeralKey))?"ephemeralKey: buffer expected":i.counter!=null&&i.hasOwnProperty("counter")&&!aA.isInteger(i.counter)?"counter: integer expected":i.previousCounter!=null&&i.hasOwnProperty("previousCounter")&&!aA.isInteger(i.previousCounter)?"previousCounter: integer expected":i.ciphertext!=null&&i.hasOwnProperty("ciphertext")&&!(i.ciphertext&&typeof i.ciphertext.length=="number"||aA.isString(i.ciphertext))?"ciphertext: buffer expected":null},r.fromObject=function(i){if(i instanceof Ho.textsecure.WhisperMessage)return i;var e=new Ho.textsecure.WhisperMessage;return i.ephemeralKey!=null&&(typeof i.ephemeralKey=="string"?aA.base64.decode(i.ephemeralKey,e.ephemeralKey=aA.newBuffer(aA.base64.length(i.ephemeralKey)),0):i.ephemeralKey.length&&(e.ephemeralKey=i.ephemeralKey)),i.counter!=null&&(e.counter=i.counter>>>0),i.previousCounter!=null&&(e.previousCounter=i.previousCounter>>>0),i.ciphertext!=null&&(typeof i.ciphertext=="string"?aA.base64.decode(i.ciphertext,e.ciphertext=aA.newBuffer(aA.base64.length(i.ciphertext)),0):i.ciphertext.length&&(e.ciphertext=i.ciphertext)),e},r.toObject=function(i,e){e||(e={});var a={};return e.defaults&&(e.bytes===String?a.ephemeralKey="":(a.ephemeralKey=[],e.bytes!==Array&&(a.ephemeralKey=aA.newBuffer(a.ephemeralKey))),a.counter=0,a.previousCounter=0,e.bytes===String?a.ciphertext="":(a.ciphertext=[],e.bytes!==Array&&(a.ciphertext=aA.newBuffer(a.ciphertext)))),i.ephemeralKey!=null&&i.hasOwnProperty("ephemeralKey")&&(a.ephemeralKey=e.bytes===String?aA.base64.encode(i.ephemeralKey,0,i.ephemeralKey.length):e.bytes===Array?Array.prototype.slice.call(i.ephemeralKey):i.ephemeralKey),i.counter!=null&&i.hasOwnProperty("counter")&&(a.counter=i.counter),i.previousCounter!=null&&i.hasOwnProperty("previousCounter")&&(a.previousCounter=i.previousCounter),i.ciphertext!=null&&i.hasOwnProperty("ciphertext")&&(a.ciphertext=e.bytes===String?aA.base64.encode(i.ciphertext,0,i.ciphertext.length):e.bytes===Array?Array.prototype.slice.call(i.ciphertext):i.ciphertext),a},r.prototype.toJSON=function(){return this.constructor.toObject(this,Qg.util.toJSONOptions)},r})(),n.PreKeyWhisperMessage=(function(){function r(o){if(o)for(var i=Object.keys(o),e=0;e>>3){case 5:A.registrationId=i.uint32();break;case 1:A.preKeyId=i.uint32();break;case 6:A.signedPreKeyId=i.uint32();break;case 2:A.baseKey=i.bytes();break;case 3:A.identityKey=i.bytes();break;case 4:A.message=i.bytes();break;default:i.skipType(t&7);break}}return A},r.decodeDelimited=function(i){return i instanceof io||(i=new io(i)),this.decode(i,i.uint32())},r.verify=function(i){return typeof i!="object"||i===null?"object expected":i.registrationId!=null&&i.hasOwnProperty("registrationId")&&!aA.isInteger(i.registrationId)?"registrationId: integer expected":i.preKeyId!=null&&i.hasOwnProperty("preKeyId")&&!aA.isInteger(i.preKeyId)?"preKeyId: integer expected":i.signedPreKeyId!=null&&i.hasOwnProperty("signedPreKeyId")&&!aA.isInteger(i.signedPreKeyId)?"signedPreKeyId: integer expected":i.baseKey!=null&&i.hasOwnProperty("baseKey")&&!(i.baseKey&&typeof i.baseKey.length=="number"||aA.isString(i.baseKey))?"baseKey: buffer expected":i.identityKey!=null&&i.hasOwnProperty("identityKey")&&!(i.identityKey&&typeof i.identityKey.length=="number"||aA.isString(i.identityKey))?"identityKey: buffer expected":i.message!=null&&i.hasOwnProperty("message")&&!(i.message&&typeof i.message.length=="number"||aA.isString(i.message))?"message: buffer expected":null},r.fromObject=function(i){if(i instanceof Ho.textsecure.PreKeyWhisperMessage)return i;var e=new Ho.textsecure.PreKeyWhisperMessage;return i.registrationId!=null&&(e.registrationId=i.registrationId>>>0),i.preKeyId!=null&&(e.preKeyId=i.preKeyId>>>0),i.signedPreKeyId!=null&&(e.signedPreKeyId=i.signedPreKeyId>>>0),i.baseKey!=null&&(typeof i.baseKey=="string"?aA.base64.decode(i.baseKey,e.baseKey=aA.newBuffer(aA.base64.length(i.baseKey)),0):i.baseKey.length&&(e.baseKey=i.baseKey)),i.identityKey!=null&&(typeof i.identityKey=="string"?aA.base64.decode(i.identityKey,e.identityKey=aA.newBuffer(aA.base64.length(i.identityKey)),0):i.identityKey.length&&(e.identityKey=i.identityKey)),i.message!=null&&(typeof i.message=="string"?aA.base64.decode(i.message,e.message=aA.newBuffer(aA.base64.length(i.message)),0):i.message.length&&(e.message=i.message)),e},r.toObject=function(i,e){e||(e={});var a={};return e.defaults&&(a.preKeyId=0,e.bytes===String?a.baseKey="":(a.baseKey=[],e.bytes!==Array&&(a.baseKey=aA.newBuffer(a.baseKey))),e.bytes===String?a.identityKey="":(a.identityKey=[],e.bytes!==Array&&(a.identityKey=aA.newBuffer(a.identityKey))),e.bytes===String?a.message="":(a.message=[],e.bytes!==Array&&(a.message=aA.newBuffer(a.message))),a.registrationId=0,a.signedPreKeyId=0),i.preKeyId!=null&&i.hasOwnProperty("preKeyId")&&(a.preKeyId=i.preKeyId),i.baseKey!=null&&i.hasOwnProperty("baseKey")&&(a.baseKey=e.bytes===String?aA.base64.encode(i.baseKey,0,i.baseKey.length):e.bytes===Array?Array.prototype.slice.call(i.baseKey):i.baseKey),i.identityKey!=null&&i.hasOwnProperty("identityKey")&&(a.identityKey=e.bytes===String?aA.base64.encode(i.identityKey,0,i.identityKey.length):e.bytes===Array?Array.prototype.slice.call(i.identityKey):i.identityKey),i.message!=null&&i.hasOwnProperty("message")&&(a.message=e.bytes===String?aA.base64.encode(i.message,0,i.message.length):e.bytes===Array?Array.prototype.slice.call(i.message):i.message),i.registrationId!=null&&i.hasOwnProperty("registrationId")&&(a.registrationId=i.registrationId),i.signedPreKeyId!=null&&i.hasOwnProperty("signedPreKeyId")&&(a.signedPreKeyId=i.signedPreKeyId),a},r.prototype.toJSON=function(){return this.constructor.toObject(this,Qg.util.toJSONOptions)},r})(),n.KeyExchangeMessage=(function(){function r(o){if(o)for(var i=Object.keys(o),e=0;e>>3){case 1:A.id=i.uint32();break;case 2:A.baseKey=i.bytes();break;case 3:A.ephemeralKey=i.bytes();break;case 4:A.identityKey=i.bytes();break;case 5:A.baseKeySignature=i.bytes();break;default:i.skipType(t&7);break}}return A},r.decodeDelimited=function(i){return i instanceof io||(i=new io(i)),this.decode(i,i.uint32())},r.verify=function(i){return typeof i!="object"||i===null?"object expected":i.id!=null&&i.hasOwnProperty("id")&&!aA.isInteger(i.id)?"id: integer expected":i.baseKey!=null&&i.hasOwnProperty("baseKey")&&!(i.baseKey&&typeof i.baseKey.length=="number"||aA.isString(i.baseKey))?"baseKey: buffer expected":i.ephemeralKey!=null&&i.hasOwnProperty("ephemeralKey")&&!(i.ephemeralKey&&typeof i.ephemeralKey.length=="number"||aA.isString(i.ephemeralKey))?"ephemeralKey: buffer expected":i.identityKey!=null&&i.hasOwnProperty("identityKey")&&!(i.identityKey&&typeof i.identityKey.length=="number"||aA.isString(i.identityKey))?"identityKey: buffer expected":i.baseKeySignature!=null&&i.hasOwnProperty("baseKeySignature")&&!(i.baseKeySignature&&typeof i.baseKeySignature.length=="number"||aA.isString(i.baseKeySignature))?"baseKeySignature: buffer expected":null},r.fromObject=function(i){if(i instanceof Ho.textsecure.KeyExchangeMessage)return i;var e=new Ho.textsecure.KeyExchangeMessage;return i.id!=null&&(e.id=i.id>>>0),i.baseKey!=null&&(typeof i.baseKey=="string"?aA.base64.decode(i.baseKey,e.baseKey=aA.newBuffer(aA.base64.length(i.baseKey)),0):i.baseKey.length&&(e.baseKey=i.baseKey)),i.ephemeralKey!=null&&(typeof i.ephemeralKey=="string"?aA.base64.decode(i.ephemeralKey,e.ephemeralKey=aA.newBuffer(aA.base64.length(i.ephemeralKey)),0):i.ephemeralKey.length&&(e.ephemeralKey=i.ephemeralKey)),i.identityKey!=null&&(typeof i.identityKey=="string"?aA.base64.decode(i.identityKey,e.identityKey=aA.newBuffer(aA.base64.length(i.identityKey)),0):i.identityKey.length&&(e.identityKey=i.identityKey)),i.baseKeySignature!=null&&(typeof i.baseKeySignature=="string"?aA.base64.decode(i.baseKeySignature,e.baseKeySignature=aA.newBuffer(aA.base64.length(i.baseKeySignature)),0):i.baseKeySignature.length&&(e.baseKeySignature=i.baseKeySignature)),e},r.toObject=function(i,e){e||(e={});var a={};return e.defaults&&(a.id=0,e.bytes===String?a.baseKey="":(a.baseKey=[],e.bytes!==Array&&(a.baseKey=aA.newBuffer(a.baseKey))),e.bytes===String?a.ephemeralKey="":(a.ephemeralKey=[],e.bytes!==Array&&(a.ephemeralKey=aA.newBuffer(a.ephemeralKey))),e.bytes===String?a.identityKey="":(a.identityKey=[],e.bytes!==Array&&(a.identityKey=aA.newBuffer(a.identityKey))),e.bytes===String?a.baseKeySignature="":(a.baseKeySignature=[],e.bytes!==Array&&(a.baseKeySignature=aA.newBuffer(a.baseKeySignature)))),i.id!=null&&i.hasOwnProperty("id")&&(a.id=i.id),i.baseKey!=null&&i.hasOwnProperty("baseKey")&&(a.baseKey=e.bytes===String?aA.base64.encode(i.baseKey,0,i.baseKey.length):e.bytes===Array?Array.prototype.slice.call(i.baseKey):i.baseKey),i.ephemeralKey!=null&&i.hasOwnProperty("ephemeralKey")&&(a.ephemeralKey=e.bytes===String?aA.base64.encode(i.ephemeralKey,0,i.ephemeralKey.length):e.bytes===Array?Array.prototype.slice.call(i.ephemeralKey):i.ephemeralKey),i.identityKey!=null&&i.hasOwnProperty("identityKey")&&(a.identityKey=e.bytes===String?aA.base64.encode(i.identityKey,0,i.identityKey.length):e.bytes===Array?Array.prototype.slice.call(i.identityKey):i.identityKey),i.baseKeySignature!=null&&i.hasOwnProperty("baseKeySignature")&&(a.baseKeySignature=e.bytes===String?aA.base64.encode(i.baseKeySignature,0,i.baseKeySignature.length):e.bytes===Array?Array.prototype.slice.call(i.baseKeySignature):i.baseKeySignature),a},r.prototype.toJSON=function(){return this.constructor.toObject(this,Qg.util.toJSONOptions)},r})(),n})();iV.exports=Ho});var vk=W((ktA,nV)=>{"use strict";var{textsecure:{WhisperMessage:G_e,PreKeyWhisperMessage:F_e}}=oV();nV.exports={WhisperMessage:G_e,PreKeyWhisperMessage:F_e}});var IV=W((vtA,cV)=>{var hm=Mk(),L_e=Ok(),U_e=Rk(),sV=lm(),us=Xc(),gV=Bg(),Bn=pm(),Bp=vk(),H_e=Nk(),yg=3;function dm(n){if(!(n instanceof Buffer))throw TypeError(`Expected Buffer instead of: ${n.constructor.name}`);return n}var Pk=class{constructor(r,o){if(!(o instanceof L_e))throw new TypeError("protocolAddress must be a ProtocolAddress");this.addr=o,this.storage=r}_encodeTupleByte(r,o){if(r>15||o>15)throw TypeError("Numbers must be 4 bits or less");return r<<4|o}_decodeTupleByte(r){return[r>>4,r&15]}toString(){return``}async getRecord(){let r=await this.storage.loadSession(this.addr.toString());if(r&&!(r instanceof sV))throw new TypeError("SessionRecord type expected from loadSession");return r}async storeRecord(r){r.removeOldSessions(),await this.storage.storeSession(this.addr.toString(),r)}async queueJob(r){return await H_e(this.addr.toString(),r)}async encrypt(r){dm(r);let o=await this.storage.getOurIdentity();return await this.queueJob(async()=>{let i=await this.getRecord();if(!i)throw new Bn.SessionError("No sessions");let e=i.getOpenSession();if(!e)throw new Bn.SessionError("No open session");let a=e.indexInfo.remoteIdentityKey;if(!await this.storage.isTrustedIdentity(this.addr.id,a))throw new Bn.UntrustedIdentityKeyError(this.addr.id,a);let A=e.getChain(e.currentRatchet.ephemeralKeyPair.pubKey);if(A.chainType===hm.RECEIVING)throw new Error("Tried to encrypt on a receiving chain");this.fillMessageKeys(A,A.chainKey.counter+1);let t=us.deriveSecrets(A.messageKeys[A.chainKey.counter],Buffer.alloc(32),Buffer.from("WhisperMessageKeys"));delete A.messageKeys[A.chainKey.counter];let s=Bp.WhisperMessage.create();s.ephemeralKey=e.currentRatchet.ephemeralKeyPair.pubKey,s.counter=A.chainKey.counter,s.previousCounter=e.currentRatchet.previousCounter,s.ciphertext=us.encrypt(t[0],r,t[2].slice(0,16));let g=Bp.WhisperMessage.encode(s).finish(),c=Buffer.alloc(g.byteLength+66+1);c.set(o.pubKey),c.set(e.indexInfo.remoteIdentityKey,33),c[66]=this._encodeTupleByte(yg,yg),c.set(g,67);let I=us.calculateMAC(t[1],c),E=Buffer.alloc(g.byteLength+9);E[0]=this._encodeTupleByte(yg,yg),E.set(g,1),E.set(I.slice(0,8),g.byteLength+1),await this.storeRecord(i);let B,f;if(e.pendingPreKey){B=3;let Q=Bp.PreKeyWhisperMessage.create({identityKey:o.pubKey,registrationId:await this.storage.getOurRegistrationId(),baseKey:e.pendingPreKey.baseKey,signedPreKeyId:e.pendingPreKey.signedKeyId,message:E});e.pendingPreKey.preKeyId&&(Q.preKeyId=e.pendingPreKey.preKeyId),f=Buffer.concat([Buffer.from([this._encodeTupleByte(yg,yg)]),Buffer.from(Bp.PreKeyWhisperMessage.encode(Q).finish())])}else B=1,f=E;return{type:B,body:f,registrationId:e.registrationId}})}async decryptWithSessions(r,o){if(!o.length)throw new Bn.SessionError("No sessions available");let i=[];for(let e of o){let a;try{return a=await this.doDecryptWhisperMessage(r,e),e.indexInfo.used=Date.now(),{session:e,plaintext:a}}catch(A){i.push(A)}}console.error("Failed to decrypt message with any known session...");for(let e of i)console.error("Session error:"+e,e.stack);throw new Bn.SessionError("No matching sessions found for message")}async decryptWhisperMessage(r){return dm(r),await this.queueJob(async()=>{let o=await this.getRecord();if(!o)throw new Bn.SessionError("No session record");let i=await this.decryptWithSessions(r,o.getSessions()),e=i.session.indexInfo.remoteIdentityKey;if(!await this.storage.isTrustedIdentity(this.addr.id,e))throw new Bn.UntrustedIdentityKeyError(this.addr.id,e);return o.isClosed(i.session)&&console.warn("Decrypted message with closed session."),await this.storeRecord(o),i.plaintext})}async decryptPreKeyWhisperMessage(r){dm(r);let o=this._decodeTupleByte(r[0]);if(o[1]>3||o[0]<3)throw new Error("Incompatible version number on PreKeyWhisperMessage");return await this.queueJob(async()=>{let i=await this.getRecord(),e=Bp.PreKeyWhisperMessage.decode(r.slice(1));if(!i){if(e.registrationId==null)throw new Error("No registrationId");i=new sV}let A=await new U_e(this.storage,this.addr).initIncoming(i,e),t=i.getSession(e.baseKey),s=await this.doDecryptWhisperMessage(e.message,t);return await this.storeRecord(i),A&&await this.storage.removePreKey(A),s})}async doDecryptWhisperMessage(r,o){if(dm(r),!o)throw new TypeError("session required");let i=this._decodeTupleByte(r[0]);if(i[1]>3||i[0]<3)throw new Error("Incompatible version number on WhisperMessage");let e=r.slice(1,-8),a=Bp.WhisperMessage.decode(e);this.maybeStepRatchet(o,a.ephemeralKey,a.previousCounter);let A=o.getChain(a.ephemeralKey);if(A.chainType===hm.SENDING)throw new Error("Tried to decrypt on a sending chain");if(this.fillMessageKeys(A,a.counter),!A.messageKeys.hasOwnProperty(a.counter))throw new Bn.MessageCounterError("Key used already or never filled");let t=A.messageKeys[a.counter];delete A.messageKeys[a.counter];let s=us.deriveSecrets(t,Buffer.alloc(32),Buffer.from("WhisperMessageKeys")),g=await this.storage.getOurIdentity(),c=Buffer.alloc(e.byteLength+66+1);c.set(o.indexInfo.remoteIdentityKey),c.set(g.pubKey,33),c[66]=this._encodeTupleByte(yg,yg),c.set(e,67),us.verifyMAC(c,s[1],r.slice(-8),8);let I=us.decrypt(s[0],a.ciphertext,s[2].slice(0,16));return delete o.pendingPreKey,I}fillMessageKeys(r,o){if(r.chainKey.counter>=o)return;if(o-r.chainKey.counter>2e3)throw new Bn.SessionError("Over 2000 messages into the future!");if(r.chainKey.key===void 0)throw new Bn.SessionError("Chain closed");let i=r.chainKey.key;return r.messageKeys[r.chainKey.counter+1]=us.calculateMAC(i,Buffer.from([1])),r.chainKey.key=us.calculateMAC(i,Buffer.from([2])),r.chainKey.counter+=1,this.fillMessageKeys(r,o)}maybeStepRatchet(r,o,i){if(r.getChain(o))return;let e=r.currentRatchet,a=r.getChain(e.lastRemoteEphemeralKey);a&&(this.fillMessageKeys(a,i),delete a.chainKey.key),this.calculateRatchet(r,o,!1);let A=r.getChain(e.ephemeralKeyPair.pubKey);A&&(e.previousCounter=A.chainKey.counter,r.deleteChain(e.ephemeralKeyPair.pubKey)),e.ephemeralKeyPair=gV.generateKeyPair(),this.calculateRatchet(r,o,!0),e.lastRemoteEphemeralKey=o}calculateRatchet(r,o,i){let e=r.currentRatchet,a=gV.calculateAgreement(o,e.ephemeralKeyPair.privKey),A=us.deriveSecrets(a,e.rootKey,Buffer.from("WhisperRatchet"),2),t=i?e.ephemeralKeyPair.pubKey:o;r.addChain(t,{messageKeys:{},chainKey:{counter:-1,key:A[1]},chainType:i?hm.SENDING:hm.RECEIVING}),e.rootKey=A[0]}async hasOpenSession(){return await this.queueJob(async()=>{let r=await this.getRecord();return r?r.haveOpenSession():!1})}async closeOpenSession(){return await this.queueJob(async()=>{let r=await this.getRecord();if(r){let o=r.getOpenSession();o&&(r.closeSession(o),await this.storeRecord(r))}})}};cV.exports=Pk});var lV=W(Bs=>{"use strict";Bs.crypto=Xc();Bs.curve=Bg();Bs.keyhelper=q8();Bs.ProtocolAddress=Ok();Bs.SessionBuilder=Rk();Bs.SessionCipher=IV();Bs.SessionRecord=lm();Object.assign(Bs,pm())});var Fk=W((UtA,dV)=>{"use strict";dV.exports=function(...n){try{return JSON.stringify(...n)}catch(r){return"[Cannot display object: "+r.message+"]"}}});var Lk=W((uV,BV)=>{"use strict";var V_e=Fk();BV.exports=class extends Error{constructor(n){let r=n.filter(o=>o!=="").map(o=>typeof o=="string"?o:o instanceof Error?o.message:V_e(o));super(r.join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,uV.assert)}}});var $c=W((KtA,fV)=>{"use strict";var z_e=Lk();fV.exports=function(n,...r){if(!n)throw r.length===1&&r[0]instanceof Error?r[0]:new z_e(r)}});var id=W((YtA,yV)=>{"use strict";var Uk=$c(),QV={};yV.exports=function(n,r,o){if(r===!1||r===null||r===void 0)return n;o=o||{},typeof o=="string"&&(o={separator:o});let i=Array.isArray(r);Uk(!i||!o.separator,"Separator option is not valid for array-based chain");let e=i?r:r.split(o.separator||"."),a=n;for(let A=0;A{"use strict";var mV={};ka=SV.exports={array:Array.prototype,buffer:Buffer&&Buffer.prototype,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype};mV.typeMap=new Map([["[object Error]",ka.error],["[object Map]",ka.map],["[object Promise]",ka.promise],["[object Set]",ka.set],["[object WeakMap]",ka.weakMap],["[object WeakSet]",ka.weakSet]]);ka.getInternalProto=function(n){if(Array.isArray(n))return ka.array;if(Buffer&&n instanceof Buffer)return ka.buffer;if(n instanceof Date)return ka.date;if(n instanceof RegExp)return ka.regex;if(n instanceof Error)return ka.error;let r=Object.prototype.toString.call(n);return mV.typeMap.get(r)||ka.generic}});var Bm=W(DV=>{"use strict";DV.keys=function(n,r={}){return r.symbols!==!1?Reflect.ownKeys(n):Object.getOwnPropertyNames(n)}});var fm=W((jtA,wV)=>{"use strict";var W_e=id(),wi=Hk(),Z_e=Bm(),Qs={needsProtoHack:new Set([wi.set,wi.map,wi.weakSet,wi.weakMap])};wV.exports=Qs.clone=function(n,r={},o=null){if(typeof n!="object"||n===null)return n;let i=Qs.clone,e=o;if(r.shallow){if(r.shallow!==!0)return Qs.cloneWithShallow(n,r);i=s=>s}else if(e){let s=e.get(n);if(s)return s}else e=new Map;let a=wi.getInternalProto(n);if(a===wi.buffer)return Buffer&&Buffer.from(n);if(a===wi.date)return new Date(n.getTime());if(a===wi.regex)return new RegExp(n);let A=Qs.base(n,a,r);if(A===n)return n;if(e&&e.set(n,A),a===wi.set)for(let s of n)A.add(i(s,r,e));else if(a===wi.map)for(let[s,g]of n)A.set(s,i(g,r,e));let t=Z_e.keys(n,r);for(let s of t){if(s==="__proto__")continue;if(a===wi.array&&s==="length"){A.length=n.length;continue}let g=Object.getOwnPropertyDescriptor(n,s);g?g.get||g.set?Object.defineProperty(A,s,g):g.enumerable?A[s]=i(n[s],r,e):Object.defineProperty(A,s,{enumerable:!1,writable:!0,configurable:!0,value:i(n[s],r,e)}):Object.defineProperty(A,s,{enumerable:!0,writable:!0,configurable:!0,value:i(n[s],r,e)})}return A};Qs.cloneWithShallow=function(n,r){let o=r.shallow;r=Object.assign({},r),r.shallow=!1;let i=new Map;for(let e of o){let a=W_e(n,e);(typeof a=="object"||typeof a=="function")&&i.set(a,a)}return Qs.clone(n,r,i)};Qs.base=function(n,r,o){if(o.prototype===!1)return Qs.needsProtoHack.has(r)?new r.constructor:r===wi.array?[]:{};let i=Object.getPrototypeOf(n);if(i&&i.isImmutable)return n;if(r===wi.array){let e=[];return i!==r&&Object.setPrototypeOf(e,i),e}if(Qs.needsProtoHack.has(r)){let e=new i.constructor;return i!==r&&Object.setPrototypeOf(e,i),e}return Object.create(i)}});var Yk=W((JtA,MV)=>{"use strict";var Kk=$c(),OV=fm(),X_e=Bm(),bV={};MV.exports=bV.merge=function(n,r,o){if(Kk(n&&typeof n=="object","Invalid target value: must be an object"),Kk(r==null||typeof r=="object","Invalid source value: must be null, undefined, or an object"),!r)return n;if(o=Object.assign({nullOverride:!0,mergeArrays:!0},o),Array.isArray(r)){Kk(Array.isArray(n),"Cannot merge array onto an object"),o.mergeArrays||(n.length=0);for(let e=0;e{"use strict";var Qm=$c(),NV=fm(),TV=Yk(),_V=id(),ym={};RV.exports=function(n,r,o={}){if(Qm(n&&typeof n=="object","Invalid defaults value: must be an object"),Qm(!r||r===!0||typeof r=="object","Invalid source value: must be true, falsy or an object"),Qm(typeof o=="object","Invalid options: must be an object"),!r)return null;if(o.shallow)return ym.applyToDefaultsWithShallow(n,r,o);let i=NV(n);if(r===!0)return i;let e=o.nullOverride!==void 0?o.nullOverride:!1;return TV(i,r,{nullOverride:e,mergeArrays:!1})};ym.applyToDefaultsWithShallow=function(n,r,o){let i=o.shallow;Qm(Array.isArray(i),"Invalid keys");let e=new Map,a=r===!0?null:new Set;for(let s of i){s=Array.isArray(s)?s:s.split(".");let g=_V(n,s);g&&typeof g=="object"?e.set(g,a&&_V(r,s)||g):a&&a.add(s)}let A=NV(n,{},e);if(!a)return A;for(let s of a)ym.reachCopy(A,r,s);let t=o.nullOverride!==void 0?o.nullOverride:!1;return TV(A,r,{nullOverride:t,mergeArrays:!1})};ym.reachCopy=function(n,r,o){for(let a of o){if(!(a in r))return;let A=r[a];if(typeof A!="object"||A===null)return;r=A}let i=r,e=n;for(let a=0;a{"use strict";var xk={};vV.exports=xk.Bench=class{constructor(){this.ts=0,this.reset()}reset(){this.ts=xk.Bench.now()}elapsed(){return xk.Bench.now()-this.ts}static now(){let n=process.hrtime();return n[0]*1e3+n[1]/1e6}}});var jk=W((WtA,GV)=>{"use strict";GV.exports=function(){}});var LV=W((ZtA,FV)=>{"use strict";var $_e=jk();FV.exports=function(){return new Promise($_e)}});var Jk=W((XtA,UV)=>{"use strict";var fn=Hk(),Oa={mismatched:null};UV.exports=function(n,r,o){return o=Object.assign({prototype:!0},o),!!Oa.isDeepEqual(n,r,o,[])};Oa.isDeepEqual=function(n,r,o,i){if(n===r)return n!==0||1/n===1/r;let e=typeof n;if(e!==typeof r||n===null||r===null)return!1;if(e==="function"){if(!o.deepFunction||n.toString()!==r.toString())return!1}else if(e!=="object")return n!==n&&r!==r;let a=Oa.getSharedType(n,r,!!o.prototype);switch(a){case fn.buffer:return Buffer&&Buffer.prototype.equals.call(n,r);case fn.promise:return n===r;case fn.regex:return n.toString()===r.toString();case Oa.mismatched:return!1}for(let A=i.length-1;A>=0;--A)if(i[A].isSame(n,r))return!0;i.push(new Oa.SeenEntry(n,r));try{return!!Oa.isDeepEqualObj(a,n,r,o,i)}finally{i.pop()}};Oa.getSharedType=function(n,r,o){if(o)return Object.getPrototypeOf(n)!==Object.getPrototypeOf(r)?Oa.mismatched:fn.getInternalProto(n);let i=fn.getInternalProto(n);return i!==fn.getInternalProto(r)?Oa.mismatched:i};Oa.valueOf=function(n){let r=n.valueOf;if(r===void 0)return n;try{return r.call(n)}catch(o){return o}};Oa.hasOwnEnumerableProperty=function(n,r){return Object.prototype.propertyIsEnumerable.call(n,r)};Oa.isSetSimpleEqual=function(n,r){for(let o of Set.prototype.values.call(n))if(!Set.prototype.has.call(r,o))return!1;return!0};Oa.isDeepEqualObj=function(n,r,o,i,e){let{isDeepEqual:a,valueOf:A,hasOwnEnumerableProperty:t}=Oa,{keys:s,getOwnPropertySymbols:g}=Object;if(n===fn.array)if(i.part){for(let f of r)for(let Q of o)if(a(f,Q,i,e))return!0}else{if(r.length!==o.length)return!1;for(let f=0;f{"use strict";HV.exports=function(n){return n.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}});var YV=W((ArA,KV)=>{"use strict";var mm=$c(),eNe=Jk(),ANe=qk(),tNe=Bm(),Oi={};KV.exports=function(n,r,o={}){return typeof r!="object"&&(r=[r]),mm(!Array.isArray(r)||r.length,"Values array cannot be empty"),typeof n=="string"?Oi.string(n,r,o):Array.isArray(n)?Oi.array(n,r,o):(mm(typeof n=="object","Reference must be string or an object"),Oi.object(n,r,o))};Oi.array=function(n,r,o){if(Array.isArray(r)||(r=[r]),!n.length||o.only&&o.once&&n.length!==r.length)return!1;let i,e=new Map;for(let A of r)if(!o.deep||!A||typeof A!="object"){let t=e.get(A);t?++t.allowed:e.set(A,{allowed:1,hits:0})}else{i=i||Oi.compare(o);let t=!1;for(let[s,g]of e.entries())if(i(s,A)){++g.allowed,t=!0;break}t||e.set(A,{allowed:1,hits:0})}let a=0;for(let A of n){let t;if(!o.deep||!A||typeof A!="object")t=e.get(A);else{i=i||Oi.compare(o);for(let[s,g]of e.entries())if(i(s,A)){t=g;break}}if(t&&(++t.hits,++a,o.once&&t.hits>t.allowed))return!1}if(o.only&&a!==n.length)return!1;for(let A of e.values())if(A.hits!==A.allowed&&A.hitsr.propertyIsEnumerable(s)),a=[...Object.keys(r),...e],A=Oi.compare(o),t=new Set(a);for(let s of i){if(!t.has(s)){if(o.only)return!1;continue}if(!A(r[s],n[s]))return!1;t.delete(s)}return t.size?o.part?t.sizes!=="");let i=new Map,e=[];for(let s of r)if(mm(typeof s=="string","Cannot compare string reference to non-string value"),s){let g=i.get(s);g?++g.allowed:(i.set(s,{allowed:1,hits:0}),e.push(ANe(s)))}else if(o.once||o.only)return!1;if(!e.length)return!0;let a=new RegExp(`(${e.join("|")})`,"g"),A=n.replace(a,(s,g)=>(++i.get(g).hits,""));if(o.only&&A)return!1;let t=!1;for(let s of i.values())if(s.hits&&(t=!0),s.hits!==s.allowed&&(s.hitseNe(e,a,i)};Oi.shallow=function(n,r){return n===r}});var jV=W((trA,xV)=>{"use strict";var rNe=$c();xV.exports=function(n){return rNe(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~\"\\]*$/.test(n),"Bad attribute value ("+n+")"),n.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')}});var qV=W((rrA,JV)=>{"use strict";var Sg={};JV.exports=function(n){if(!n)return"";let r="";for(let o=0;o=256?"&#"+n+";":`&#x${n.toString(16).padStart(2,"0")};`)};Sg.isSafe=function(n){return Sg.safeCharCodes.has(n)};Sg.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]);Sg.safeCharCodes=(function(){let n=new Set;for(let r=32;r<123;++r)(r>=97||r>=65&&r<=90||r>=48&&r<=57||r===32||r===46||r===44||r===45||r===58||r===95)&&n.add(r);return n})()});var zV=W((arA,VV)=>{"use strict";var Sm={};VV.exports=function(n){return n?n.replace(/[<>&\u2028\u2029]/g,Sm.escape):""};Sm.escape=function(n){return Sm.replacements.get(n)};Sm.replacements=new Map([["<","\\u003c"],[">","\\u003e"],["&","\\u0026"],["\u2028","\\u2028"],["\u2029","\\u2029"]])});var XV=W((irA,ZV)=>{"use strict";var WV={};ZV.exports=WV.flatten=function(n,r){let o=r||[];for(let i of n)Array.isArray(i)?WV.flatten(i,o):o.push(i);return o}});var Az=W((orA,ez)=>{"use strict";var $V={};ez.exports=function(n,r,o={}){if(!n||!r)return o.first?null:[];let i=[],e=Array.isArray(n)?new Set(n):n,a=new Set;for(let A of r)if($V.has(e,A)&&!a.has(A)){if(o.first)return A;i.push(A),a.add(A)}return o.first?null:i};$V.has=function(n,r){return typeof n.has=="function"?n.has(r):n[r]!==void 0}});var rz=W((nrA,tz)=>{"use strict";tz.exports=function(n){return!!n&&typeof n.then=="function"}});var oz=W((srA,iz)=>{"use strict";var az={wrapped:Symbol("wrapped")};iz.exports=function(n){if(n[az.wrapped])return n;let r=!1,o=function(...i){r||(r=!0,n(...i))};return o[az.wrapped]=!0,o}});var sz=W((grA,nz)=>{"use strict";var aNe=id();nz.exports=function(n,r,o){return r.replace(/{([^{}]+)}/g,(i,e)=>{let a=aNe(n,e,o);return a??""})}});var cz=W((crA,gz)=>{"use strict";var iNe={maxTimer:2147483647};gz.exports=function(n,r,o){if(typeof n=="bigint"&&(n=Number(n)),n>=Number.MAX_SAFE_INTEGER&&(n=1/0),typeof n!="number"&&n!==void 0)throw new TypeError("Timeout must be a number or bigint");return new Promise(i=>{let e=o?o.setTimeout:setTimeout,a=()=>{let A=Math.min(n,iNe.maxTimer);n-=A,e(()=>n>0?a():i(r),A)};n!==1/0&&a()})}});var Iz=W(Xt=>{"use strict";Xt.applyToDefaults=kV();Xt.assert=$c();Xt.Bench=PV();Xt.block=LV();Xt.clone=fm();Xt.contain=YV();Xt.deepEqual=Jk();Xt.Error=Lk();Xt.escapeHeaderAttribute=jV();Xt.escapeHtml=qV();Xt.escapeJson=zV();Xt.escapeRegex=qk();Xt.flatten=XV();Xt.ignore=jk();Xt.intersect=Az();Xt.isPromise=rz();Xt.merge=Yk();Xt.once=oz();Xt.reach=id();Xt.reachTemplate=sz();Xt.stringify=Fk();Xt.wait=cz()});var Or=W(Ne=>{"use strict";var eI=Iz(),ai={codes:new Map([[100,"Continue"],[101,"Switching Protocols"],[102,"Processing"],[200,"OK"],[201,"Created"],[202,"Accepted"],[203,"Non-Authoritative Information"],[204,"No Content"],[205,"Reset Content"],[206,"Partial Content"],[207,"Multi-Status"],[300,"Multiple Choices"],[301,"Moved Permanently"],[302,"Moved Temporarily"],[303,"See Other"],[304,"Not Modified"],[305,"Use Proxy"],[307,"Temporary 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 Time-out"],[409,"Conflict"],[410,"Gone"],[411,"Length Required"],[412,"Precondition Failed"],[413,"Request Entity Too Large"],[414,"Request-URI Too Large"],[415,"Unsupported Media Type"],[416,"Requested Range Not Satisfiable"],[417,"Expectation Failed"],[418,"I'm a teapot"],[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 Time-out"],[505,"HTTP Version Not Supported"],[506,"Variant Also Negotiates"],[507,"Insufficient Storage"],[509,"Bandwidth Limit Exceeded"],[510,"Not Extended"],[511,"Network Authentication Required"]])};Ne.Boom=class extends Error{constructor(n,r={}){if(n instanceof Error)return Ne.boomify(eI.clone(n),r);let{statusCode:o=500,data:i=null,ctor:e=Ne.Boom}=r,a=new Error(n||void 0);Error.captureStackTrace(a,e),a.data=i;let A=ai.initialize(a,o);return Object.defineProperty(A,"typeof",{value:e}),r.decorate&&Object.assign(A,r.decorate),A}static[Symbol.hasInstance](n){return this===Ne.Boom?Ne.isBoom(n):this.prototype.isPrototypeOf(n)}};Ne.isBoom=function(n,r){return n instanceof Error&&!!n.isBoom&&(!r||n.output.statusCode===r)};Ne.boomify=function(n,r){return eI.assert(n instanceof Error,"Cannot wrap non-Error object"),r=r||{},r.data!==void 0&&(n.data=r.data),r.decorate&&Object.assign(n,r.decorate),n.isBoom?r.override===!1||!r.statusCode&&!r.message?n:ai.initialize(n,r.statusCode||n.output.statusCode,r.message):ai.initialize(n,r.statusCode||500,r.message)};Ne.badRequest=function(n,r){return new Ne.Boom(n,{statusCode:400,data:r,ctor:Ne.badRequest})};Ne.unauthorized=function(n,r,o){let i=new Ne.Boom(n,{statusCode:401,ctor:Ne.unauthorized});if(!r)return i;if(typeof r!="string")return i.output.headers["WWW-Authenticate"]=r.join(", "),i;let e=`${r}`;return(o||n)&&(i.output.payload.attributes={}),o&&(typeof o=="string"?(e+=" "+eI.escapeHeaderAttribute(o),i.output.payload.attributes=o):e+=" "+Object.keys(o).map(a=>{let A=o[a];return A==null&&(A=""),i.output.payload.attributes[a]=A,`${a}="${eI.escapeHeaderAttribute(A.toString())}"`}).join(", ")),n?(o&&(e+=","),e+=` error="${eI.escapeHeaderAttribute(n)}"`,i.output.payload.attributes.error=n):i.isMissing=!0,i.output.headers["WWW-Authenticate"]=e,i};Ne.paymentRequired=function(n,r){return new Ne.Boom(n,{statusCode:402,data:r,ctor:Ne.paymentRequired})};Ne.forbidden=function(n,r){return new Ne.Boom(n,{statusCode:403,data:r,ctor:Ne.forbidden})};Ne.notFound=function(n,r){return new Ne.Boom(n,{statusCode:404,data:r,ctor:Ne.notFound})};Ne.methodNotAllowed=function(n,r,o){let i=new Ne.Boom(n,{statusCode:405,data:r,ctor:Ne.methodNotAllowed});return typeof o=="string"&&(o=[o]),Array.isArray(o)&&(i.output.headers.Allow=o.join(", ")),i};Ne.notAcceptable=function(n,r){return new Ne.Boom(n,{statusCode:406,data:r,ctor:Ne.notAcceptable})};Ne.proxyAuthRequired=function(n,r){return new Ne.Boom(n,{statusCode:407,data:r,ctor:Ne.proxyAuthRequired})};Ne.clientTimeout=function(n,r){return new Ne.Boom(n,{statusCode:408,data:r,ctor:Ne.clientTimeout})};Ne.conflict=function(n,r){return new Ne.Boom(n,{statusCode:409,data:r,ctor:Ne.conflict})};Ne.resourceGone=function(n,r){return new Ne.Boom(n,{statusCode:410,data:r,ctor:Ne.resourceGone})};Ne.lengthRequired=function(n,r){return new Ne.Boom(n,{statusCode:411,data:r,ctor:Ne.lengthRequired})};Ne.preconditionFailed=function(n,r){return new Ne.Boom(n,{statusCode:412,data:r,ctor:Ne.preconditionFailed})};Ne.entityTooLarge=function(n,r){return new Ne.Boom(n,{statusCode:413,data:r,ctor:Ne.entityTooLarge})};Ne.uriTooLong=function(n,r){return new Ne.Boom(n,{statusCode:414,data:r,ctor:Ne.uriTooLong})};Ne.unsupportedMediaType=function(n,r){return new Ne.Boom(n,{statusCode:415,data:r,ctor:Ne.unsupportedMediaType})};Ne.rangeNotSatisfiable=function(n,r){return new Ne.Boom(n,{statusCode:416,data:r,ctor:Ne.rangeNotSatisfiable})};Ne.expectationFailed=function(n,r){return new Ne.Boom(n,{statusCode:417,data:r,ctor:Ne.expectationFailed})};Ne.teapot=function(n,r){return new Ne.Boom(n,{statusCode:418,data:r,ctor:Ne.teapot})};Ne.badData=function(n,r){return new Ne.Boom(n,{statusCode:422,data:r,ctor:Ne.badData})};Ne.locked=function(n,r){return new Ne.Boom(n,{statusCode:423,data:r,ctor:Ne.locked})};Ne.failedDependency=function(n,r){return new Ne.Boom(n,{statusCode:424,data:r,ctor:Ne.failedDependency})};Ne.tooEarly=function(n,r){return new Ne.Boom(n,{statusCode:425,data:r,ctor:Ne.tooEarly})};Ne.preconditionRequired=function(n,r){return new Ne.Boom(n,{statusCode:428,data:r,ctor:Ne.preconditionRequired})};Ne.tooManyRequests=function(n,r){return new Ne.Boom(n,{statusCode:429,data:r,ctor:Ne.tooManyRequests})};Ne.illegal=function(n,r){return new Ne.Boom(n,{statusCode:451,data:r,ctor:Ne.illegal})};Ne.internal=function(n,r,o=500){return ai.serverError(n,r,o,Ne.internal)};Ne.notImplemented=function(n,r){return ai.serverError(n,r,501,Ne.notImplemented)};Ne.badGateway=function(n,r){return ai.serverError(n,r,502,Ne.badGateway)};Ne.serverUnavailable=function(n,r){return ai.serverError(n,r,503,Ne.serverUnavailable)};Ne.gatewayTimeout=function(n,r){return ai.serverError(n,r,504,Ne.gatewayTimeout)};Ne.badImplementation=function(n,r){let o=ai.serverError(n,r,500,Ne.badImplementation);return o.isDeveloperError=!0,o};ai.initialize=function(n,r,o){let i=parseInt(r,10);if(eI.assert(!isNaN(i)&&i>=400,"First argument must be a number (400+):",r),n.isBoom=!0,n.isServer=i>=500,n.hasOwnProperty("data")||(n.data=null),n.output={statusCode:i,payload:{},headers:{}},Object.defineProperty(n,"reformat",{value:ai.reformat,configurable:!0}),!o&&!n.message&&(n.reformat(),o=n.output.payload.error),o){let e=Object.getOwnPropertyDescriptor(n,"message")||Object.getOwnPropertyDescriptor(Object.getPrototypeOf(n),"message");eI.assert(!e||e.configurable&&!e.get,"The error is not compatible with boom"),n.message=o+(n.message?": "+n.message:""),n.output.payload.message=n.message}return n.reformat(),n};ai.reformat=function(n=!1){this.output.payload.statusCode=this.output.statusCode,this.output.payload.error=ai.codes.get(this.output.statusCode)||"Unknown",this.output.statusCode===500&&n!==!0?this.output.payload.message="An internal server error occurred":this.message&&(this.output.payload.message=this.message)};ai.serverError=function(n,r,o,i){return r instanceof Error&&!r.isBoom?Ne.boomify(r,{statusCode:o,message:n}):new Ne.Boom(n,{statusCode:o,data:r,ctor:i})}});var EW,LNe,UNe,HNe,KNe,YNe,xNe,jNe,JNe,qNe,VNe,zNe,WNe,ZNe,XNe,w,yn=le(()=>{EW=n=>typeof n<"u"&&n!==null,LNe=n=>typeof n=="object",UNe=n=>Object.prototype.toString.call(n)==="[object Object]",HNe=n=>typeof n=="function",KNe=n=>typeof n=="boolean",YNe=n=>n instanceof Buffer,xNe=n=>{if(EW(n))switch(n.constructor){case Uint8Array:case Uint8ClampedArray:case Int8Array:case Uint16Array:case Int16Array:case Uint32Array:case Int32Array:case Float32Array:case Float64Array:return!0}return!1},jNe=n=>n instanceof ArrayBuffer,JNe=n=>typeof n=="string"&&n.length>0,qNe=n=>typeof n=="number"&&Number.isFinite(n),VNe=n=>Number.isInteger(n),zNe=(n,r,o)=>n>=r&&n<=o,WNe=(n,r)=>r.includes(n),ZNe=(n,r,o)=>new Error(`Expected ${r} for ${n} but received ${o} of type ${typeof o}`),XNe=(n,r)=>(r.message=n.message,r),w={defined:EW,object:LNe,plainObject:UNe,fn:HNe,bool:KNe,buffer:YNe,typedArray:xNe,arrayBuffer:jNe,string:JNe,number:qNe,integer:VNe,inRange:zNe,inArray:WNe,invalidParameterError:ZNe,nativeError:XNe}});var dW=W((QaA,hW)=>{"use strict";var CW=()=>process.platform==="linux",Um=null,$Ne=()=>{if(!Um)if(CW()&&process.report){let n=process.report.excludeNetwork;process.report.excludeNetwork=!0,Um=process.report.getReport(),process.report.excludeNetwork=n}else Um={};return Um};hW.exports={isLinux:CW,getReport:$Ne}});var BW=W((yaA,uW)=>{"use strict";var _p=We("fs"),e0e="/usr/bin/ldd",A0e="/proc/self/exe",Hm=2048,t0e=n=>{let r=_p.openSync(n,"r"),o=Buffer.alloc(Hm),i=_p.readSync(r,o,0,Hm,0);return _p.close(r,()=>{}),o.subarray(0,i)},r0e=n=>new Promise((r,o)=>{_p.open(n,"r",(i,e)=>{if(i)o(i);else{let a=Buffer.alloc(Hm);_p.read(e,a,0,Hm,0,(A,t)=>{r(a.subarray(0,t)),_p.close(e,()=>{})})}})});uW.exports={LDD_PATH:e0e,SELF_PATH:A0e,readFileSync:t0e,readFile:r0e}});var QW=W((maA,fW)=>{"use strict";var a0e=n=>{if(n.length<64||n.readUInt32BE(0)!==2135247942||n.readUInt8(4)!==2||n.readUInt8(5)!==1)return null;let r=n.readUInt32LE(32),o=n.readUInt16LE(54),i=n.readUInt16LE(56);for(let e=0;e{"use strict";var mW=We("child_process"),{isLinux:Np,getReport:SW}=dW(),{LDD_PATH:Km,SELF_PATH:DW,readFile:nv,readFileSync:sv}=BW(),{interpreterPath:wW}=QW(),mn,Sn,Dn,OW="getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true",Ng="",bW=()=>Ng||new Promise(n=>{mW.exec(OW,(r,o)=>{Ng=r?" ":o,n(Ng)})}),MW=()=>{if(!Ng)try{Ng=mW.execSync(OW,{encoding:"utf8"})}catch{Ng=" "}return Ng},ws="glibc",_W=/LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i,oI="musl",i0e=n=>n.includes("libc.musl-")||n.includes("ld-musl-"),NW=()=>{let n=SW();return n.header&&n.header.glibcVersionRuntime?ws:Array.isArray(n.sharedObjects)&&n.sharedObjects.some(i0e)?oI:null},TW=n=>{let[r,o]=n.split(/[\r\n]+/);return r&&r.includes(ws)?ws:o&&o.includes(oI)?oI:null},RW=n=>{if(n){if(n.includes("/ld-musl-"))return oI;if(n.includes("/ld-linux-"))return ws}return null},kW=n=>(n=n.toString(),n.includes("musl")?oI:n.includes("GNU C Library")?ws:null),o0e=async()=>{if(Sn!==void 0)return Sn;Sn=null;try{let n=await nv(Km);Sn=kW(n)}catch{}return Sn},n0e=()=>{if(Sn!==void 0)return Sn;Sn=null;try{let n=sv(Km);Sn=kW(n)}catch{}return Sn},s0e=async()=>{if(mn!==void 0)return mn;mn=null;try{let n=await nv(DW),r=wW(n);mn=RW(r)}catch{}return mn},g0e=()=>{if(mn!==void 0)return mn;mn=null;try{let n=sv(DW),r=wW(n);mn=RW(r)}catch{}return mn},vW=async()=>{let n=null;if(Np()&&(n=await s0e(),!n&&(n=await o0e(),n||(n=NW()),!n))){let r=await bW();n=TW(r)}return n},PW=()=>{let n=null;if(Np()&&(n=g0e(),!n&&(n=n0e(),n||(n=NW()),!n))){let r=MW();n=TW(r)}return n},c0e=async()=>Np()&&await vW()!==ws,I0e=()=>Np()&&PW()!==ws,l0e=async()=>{if(Dn!==void 0)return Dn;Dn=null;try{let r=(await nv(Km)).match(_W);r&&(Dn=r[1])}catch{}return Dn},p0e=()=>{if(Dn!==void 0)return Dn;Dn=null;try{let r=sv(Km).match(_W);r&&(Dn=r[1])}catch{}return Dn},GW=()=>{let n=SW();return n.header&&n.header.glibcVersionRuntime?n.header.glibcVersionRuntime:null},yW=n=>n.trim().split(/\s+/)[1],FW=n=>{let[r,o,i]=n.split(/[\r\n]+/);return r&&r.includes(ws)?yW(r):o&&i&&o.includes(oI)?yW(i):null},E0e=async()=>{let n=null;if(Np()&&(n=await l0e(),n||(n=GW()),!n)){let r=await bW();n=FW(r)}return n},C0e=()=>{let n=null;if(Np()&&(n=p0e(),n||(n=GW()),!n)){let r=MW();n=FW(r)}return n};LW.exports={GLIBC:ws,MUSL:oI,family:vW,familySync:PW,isNonGlibcLinux:c0e,isNonGlibcLinuxSync:I0e,version:E0e,versionSync:C0e}});var Tp=W((DaA,UW)=>{"use strict";var h0e="2.0.0",d0e=Number.MAX_SAFE_INTEGER||9007199254740991,u0e=16,B0e=250,f0e=["major","premajor","minor","preminor","patch","prepatch","prerelease"];UW.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:u0e,MAX_SAFE_BUILD_LENGTH:B0e,MAX_SAFE_INTEGER:d0e,RELEASE_TYPES:f0e,SEMVER_SPEC_VERSION:h0e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Bd=W((waA,HW)=>{"use strict";var Q0e=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{};HW.exports=Q0e});var Rp=W((wn,KW)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:gv,MAX_SAFE_BUILD_LENGTH:y0e,MAX_LENGTH:m0e}=Tp(),S0e=Bd();wn=KW.exports={};var D0e=wn.re=[],w0e=wn.safeRe=[],nA=wn.src=[],O0e=wn.safeSrc=[],sA=wn.t={},b0e=0,cv="[a-zA-Z0-9-]",M0e=[["\\s",1],["\\d",m0e],[cv,y0e]],_0e=n=>{for(let[r,o]of M0e)n=n.split(`${r}*`).join(`${r}{0,${o}}`).split(`${r}+`).join(`${r}{1,${o}}`);return n},YA=(n,r,o)=>{let i=_0e(r),e=b0e++;S0e(n,e,r),sA[n]=e,nA[e]=r,O0e[e]=i,D0e[e]=new RegExp(r,o?"g":void 0),w0e[e]=new RegExp(i,o?"g":void 0)};YA("NUMERICIDENTIFIER","0|[1-9]\\d*");YA("NUMERICIDENTIFIERLOOSE","\\d+");YA("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${cv}*`);YA("MAINVERSION",`(${nA[sA.NUMERICIDENTIFIER]})\\.(${nA[sA.NUMERICIDENTIFIER]})\\.(${nA[sA.NUMERICIDENTIFIER]})`);YA("MAINVERSIONLOOSE",`(${nA[sA.NUMERICIDENTIFIERLOOSE]})\\.(${nA[sA.NUMERICIDENTIFIERLOOSE]})\\.(${nA[sA.NUMERICIDENTIFIERLOOSE]})`);YA("PRERELEASEIDENTIFIER",`(?:${nA[sA.NONNUMERICIDENTIFIER]}|${nA[sA.NUMERICIDENTIFIER]})`);YA("PRERELEASEIDENTIFIERLOOSE",`(?:${nA[sA.NONNUMERICIDENTIFIER]}|${nA[sA.NUMERICIDENTIFIERLOOSE]})`);YA("PRERELEASE",`(?:-(${nA[sA.PRERELEASEIDENTIFIER]}(?:\\.${nA[sA.PRERELEASEIDENTIFIER]})*))`);YA("PRERELEASELOOSE",`(?:-?(${nA[sA.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${nA[sA.PRERELEASEIDENTIFIERLOOSE]})*))`);YA("BUILDIDENTIFIER",`${cv}+`);YA("BUILD",`(?:\\+(${nA[sA.BUILDIDENTIFIER]}(?:\\.${nA[sA.BUILDIDENTIFIER]})*))`);YA("FULLPLAIN",`v?${nA[sA.MAINVERSION]}${nA[sA.PRERELEASE]}?${nA[sA.BUILD]}?`);YA("FULL",`^${nA[sA.FULLPLAIN]}$`);YA("LOOSEPLAIN",`[v=\\s]*${nA[sA.MAINVERSIONLOOSE]}${nA[sA.PRERELEASELOOSE]}?${nA[sA.BUILD]}?`);YA("LOOSE",`^${nA[sA.LOOSEPLAIN]}$`);YA("GTLT","((?:<|>)?=?)");YA("XRANGEIDENTIFIERLOOSE",`${nA[sA.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);YA("XRANGEIDENTIFIER",`${nA[sA.NUMERICIDENTIFIER]}|x|X|\\*`);YA("XRANGEPLAIN",`[v=\\s]*(${nA[sA.XRANGEIDENTIFIER]})(?:\\.(${nA[sA.XRANGEIDENTIFIER]})(?:\\.(${nA[sA.XRANGEIDENTIFIER]})(?:${nA[sA.PRERELEASE]})?${nA[sA.BUILD]}?)?)?`);YA("XRANGEPLAINLOOSE",`[v=\\s]*(${nA[sA.XRANGEIDENTIFIERLOOSE]})(?:\\.(${nA[sA.XRANGEIDENTIFIERLOOSE]})(?:\\.(${nA[sA.XRANGEIDENTIFIERLOOSE]})(?:${nA[sA.PRERELEASELOOSE]})?${nA[sA.BUILD]}?)?)?`);YA("XRANGE",`^${nA[sA.GTLT]}\\s*${nA[sA.XRANGEPLAIN]}$`);YA("XRANGELOOSE",`^${nA[sA.GTLT]}\\s*${nA[sA.XRANGEPLAINLOOSE]}$`);YA("COERCEPLAIN",`(^|[^\\d])(\\d{1,${gv}})(?:\\.(\\d{1,${gv}}))?(?:\\.(\\d{1,${gv}}))?`);YA("COERCE",`${nA[sA.COERCEPLAIN]}(?:$|[^\\d])`);YA("COERCEFULL",nA[sA.COERCEPLAIN]+`(?:${nA[sA.PRERELEASE]})?(?:${nA[sA.BUILD]})?(?:$|[^\\d])`);YA("COERCERTL",nA[sA.COERCE],!0);YA("COERCERTLFULL",nA[sA.COERCEFULL],!0);YA("LONETILDE","(?:~>?)");YA("TILDETRIM",`(\\s*)${nA[sA.LONETILDE]}\\s+`,!0);wn.tildeTrimReplace="$1~";YA("TILDE",`^${nA[sA.LONETILDE]}${nA[sA.XRANGEPLAIN]}$`);YA("TILDELOOSE",`^${nA[sA.LONETILDE]}${nA[sA.XRANGEPLAINLOOSE]}$`);YA("LONECARET","(?:\\^)");YA("CARETTRIM",`(\\s*)${nA[sA.LONECARET]}\\s+`,!0);wn.caretTrimReplace="$1^";YA("CARET",`^${nA[sA.LONECARET]}${nA[sA.XRANGEPLAIN]}$`);YA("CARETLOOSE",`^${nA[sA.LONECARET]}${nA[sA.XRANGEPLAINLOOSE]}$`);YA("COMPARATORLOOSE",`^${nA[sA.GTLT]}\\s*(${nA[sA.LOOSEPLAIN]})$|^$`);YA("COMPARATOR",`^${nA[sA.GTLT]}\\s*(${nA[sA.FULLPLAIN]})$|^$`);YA("COMPARATORTRIM",`(\\s*)${nA[sA.GTLT]}\\s*(${nA[sA.LOOSEPLAIN]}|${nA[sA.XRANGEPLAIN]})`,!0);wn.comparatorTrimReplace="$1$2$3";YA("HYPHENRANGE",`^\\s*(${nA[sA.XRANGEPLAIN]})\\s+-\\s+(${nA[sA.XRANGEPLAIN]})\\s*$`);YA("HYPHENRANGELOOSE",`^\\s*(${nA[sA.XRANGEPLAINLOOSE]})\\s+-\\s+(${nA[sA.XRANGEPLAINLOOSE]})\\s*$`);YA("STAR","(<|>)?=?\\s*\\*");YA("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");YA("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var xm=W((OaA,YW)=>{"use strict";var N0e=Object.freeze({loose:!0}),T0e=Object.freeze({}),R0e=n=>n?typeof n!="object"?N0e:n:T0e;YW.exports=R0e});var Iv=W((baA,JW)=>{"use strict";var xW=/^[0-9]+$/,jW=(n,r)=>{if(typeof n=="number"&&typeof r=="number")return n===r?0:njW(r,n);JW.exports={compareIdentifiers:jW,rcompareIdentifiers:k0e}});var ra=W((MaA,VW)=>{"use strict";var jm=Bd(),{MAX_LENGTH:qW,MAX_SAFE_INTEGER:Jm}=Tp(),{safeRe:qm,t:Vm}=Rp(),v0e=xm(),{compareIdentifiers:lv}=Iv(),P0e=(n,r)=>{let o=r.split(".");if(o.length>n.length)return!1;for(let i=0;iqW)throw new TypeError(`version is longer than ${qW} characters`);jm("SemVer",r,o),this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease;let i=r.trim().match(o.loose?qm[Vm.LOOSE]:qm[Vm.FULL]);if(!i)throw new TypeError(`Invalid Version: ${r}`);if(this.raw=r,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>Jm||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Jm||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Jm||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){let a=+e;if(a>=0&&ar.major?1:this.minorr.minor?1:this.patchr.patch?1:0}comparePre(r){if(r instanceof n||(r=new n(r,this.options)),this.prerelease.length&&!r.prerelease.length)return-1;if(!this.prerelease.length&&r.prerelease.length)return 1;if(!this.prerelease.length&&!r.prerelease.length)return 0;let o=0;do{let i=this.prerelease[o],e=r.prerelease[o];if(jm("prerelease compare",o,i,e),i===void 0&&e===void 0)return 0;if(e===void 0)return 1;if(i===void 0)return-1;if(i===e)continue;return lv(i,e)}while(++o)}compareBuild(r){r instanceof n||(r=new n(r,this.options));let o=0;do{let i=this.build[o],e=r.build[o];if(jm("build compare",o,i,e),i===void 0&&e===void 0)return 0;if(e===void 0)return 1;if(i===void 0)return-1;if(i===e)continue;return lv(i,e)}while(++o)}inc(r,o,i){if(r.startsWith("pre")){if(!o&&i===!1)throw new Error("invalid increment argument: identifier is empty");if(o){let e=`-${o}`.match(this.options.loose?qm[Vm.PRERELEASELOOSE]:qm[Vm.PRERELEASE]);if(!e||e[1]!==o)throw new Error(`invalid identifier: ${o}`)}}switch(r){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",o,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",o,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",o,i),this.inc("pre",o,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",o,i),this.inc("pre",o,i);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let e=Number(i)?1:0;if(this.prerelease.length===0)this.prerelease=[e];else{let a=this.prerelease.length;for(;--a>=0;)typeof this.prerelease[a]=="number"&&(this.prerelease[a]++,a=-2);if(a===-1){if(o===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(o){let a=[o,e];if(i===!1&&(a=[o]),P0e(this.prerelease,o)){let A=this.prerelease[o.split(".").length];isNaN(A)&&(this.prerelease=a)}else this.prerelease=a}break}default:throw new Error(`invalid increment argument: ${r}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};VW.exports=pv});var Tg=W((_aA,WW)=>{"use strict";var zW=ra(),G0e=(n,r,o=!1)=>{if(n instanceof zW)return n;try{return new zW(n,r)}catch(i){if(!o)return null;throw i}};WW.exports=G0e});var XW=W((NaA,ZW)=>{"use strict";var F0e=Tg(),L0e=(n,r)=>{let o=F0e(n,r);return o?o.version:null};ZW.exports=L0e});var e6=W((TaA,$W)=>{"use strict";var U0e=Tg(),H0e=(n,r)=>{let o=U0e(n.trim().replace(/^[=v]+/,""),r);return o?o.version:null};$W.exports=H0e});var r6=W((RaA,t6)=>{"use strict";var A6=ra(),K0e=(n,r,o,i,e)=>{typeof o=="string"&&(e=i,i=o,o=void 0);try{return new A6(n instanceof A6?n.version:n,o).inc(r,i,e).version}catch{return null}};t6.exports=K0e});var o6=W((kaA,i6)=>{"use strict";var a6=Tg(),Y0e=(n,r)=>{let o=a6(n,null,!0),i=a6(r,null,!0),e=o.compare(i);if(e===0)return null;let a=e>0,A=a?o:i,t=a?i:o,s=!!A.prerelease.length;if(!!t.prerelease.length&&!s){if(!t.patch&&!t.minor)return"major";if(t.compareMain(A)===0)return t.minor&&!t.patch?"minor":"patch"}let c=s?"pre":"";return o.major!==i.major?c+"major":o.minor!==i.minor?c+"minor":o.patch!==i.patch?c+"patch":"prerelease"};i6.exports=Y0e});var s6=W((vaA,n6)=>{"use strict";var x0e=ra(),j0e=(n,r)=>new x0e(n,r).major;n6.exports=j0e});var c6=W((PaA,g6)=>{"use strict";var J0e=ra(),q0e=(n,r)=>new J0e(n,r).minor;g6.exports=q0e});var l6=W((GaA,I6)=>{"use strict";var V0e=ra(),z0e=(n,r)=>new V0e(n,r).patch;I6.exports=z0e});var E6=W((FaA,p6)=>{"use strict";var W0e=Tg(),Z0e=(n,r)=>{let o=W0e(n,r);return o&&o.prerelease.length?o.prerelease:null};p6.exports=Z0e});var no=W((LaA,h6)=>{"use strict";var C6=ra(),X0e=(n,r,o)=>new C6(n,o).compare(new C6(r,o));h6.exports=X0e});var u6=W((UaA,d6)=>{"use strict";var $0e=no(),eTe=(n,r,o)=>$0e(r,n,o);d6.exports=eTe});var f6=W((HaA,B6)=>{"use strict";var ATe=no(),tTe=(n,r)=>ATe(n,r,!0);B6.exports=tTe});var zm=W((KaA,y6)=>{"use strict";var Q6=ra(),rTe=(n,r,o)=>{let i=new Q6(n,o),e=new Q6(r,o);return i.compare(e)||i.compareBuild(e)};y6.exports=rTe});var S6=W((YaA,m6)=>{"use strict";var aTe=zm(),iTe=(n,r)=>n.sort((o,i)=>aTe(o,i,r));m6.exports=iTe});var w6=W((xaA,D6)=>{"use strict";var oTe=zm(),nTe=(n,r)=>n.sort((o,i)=>oTe(i,o,r));D6.exports=nTe});var fd=W((jaA,O6)=>{"use strict";var sTe=no(),gTe=(n,r,o)=>sTe(n,r,o)>0;O6.exports=gTe});var Wm=W((JaA,b6)=>{"use strict";var cTe=no(),ITe=(n,r,o)=>cTe(n,r,o)<0;b6.exports=ITe});var Ev=W((qaA,M6)=>{"use strict";var lTe=no(),pTe=(n,r,o)=>lTe(n,r,o)===0;M6.exports=pTe});var Cv=W((VaA,_6)=>{"use strict";var ETe=no(),CTe=(n,r,o)=>ETe(n,r,o)!==0;_6.exports=CTe});var Zm=W((zaA,N6)=>{"use strict";var hTe=no(),dTe=(n,r,o)=>hTe(n,r,o)>=0;N6.exports=dTe});var Xm=W((WaA,T6)=>{"use strict";var uTe=no(),BTe=(n,r,o)=>uTe(n,r,o)<=0;T6.exports=BTe});var hv=W((ZaA,R6)=>{"use strict";var fTe=Ev(),QTe=Cv(),yTe=fd(),mTe=Zm(),STe=Wm(),DTe=Xm(),wTe=(n,r,o,i)=>{switch(r){case"===":return typeof n=="object"&&(n=n.version),typeof o=="object"&&(o=o.version),n===o;case"!==":return typeof n=="object"&&(n=n.version),typeof o=="object"&&(o=o.version),n!==o;case"":case"=":case"==":return fTe(n,o,i);case"!=":return QTe(n,o,i);case">":return yTe(n,o,i);case">=":return mTe(n,o,i);case"<":return STe(n,o,i);case"<=":return DTe(n,o,i);default:throw new TypeError(`Invalid operator: ${r}`)}};R6.exports=wTe});var v6=W((XaA,k6)=>{"use strict";var OTe=ra(),bTe=Tg(),{safeRe:$m,t:eS}=Rp(),MTe=(n,r)=>{if(n instanceof OTe)return n;if(typeof n=="number"&&(n=String(n)),typeof n!="string")return null;r=r||{};let o=null;if(!r.rtl)o=n.match(r.includePrerelease?$m[eS.COERCEFULL]:$m[eS.COERCE]);else{let s=r.includePrerelease?$m[eS.COERCERTLFULL]:$m[eS.COERCERTL],g;for(;(g=s.exec(n))&&(!o||o.index+o[0].length!==n.length);)(!o||g.index+g[0].length!==o.index+o[0].length)&&(o=g),s.lastIndex=g.index+g[1].length+g[2].length;s.lastIndex=-1}if(o===null)return null;let i=o[2],e=o[3]||"0",a=o[4]||"0",A=r.includePrerelease&&o[5]?`-${o[5]}`:"",t=r.includePrerelease&&o[6]?`+${o[6]}`:"";return bTe(`${i}.${e}.${a}${A}${t}`,r)};k6.exports=MTe});var G6=W(($aA,P6)=>{"use strict";var _Te=Tg(),NTe=Tp(),TTe=ra(),RTe=(n,r,o)=>{if(!NTe.RELEASE_TYPES.includes(r))return null;let i=kTe(n,o);return i&&vTe(i,r)},kTe=(n,r)=>{let o=n instanceof TTe?n.version:n;return _Te(o,r)},vTe=(n,r)=>{if(PTe(r))return n.version;switch(n.prerelease=[],r){case"major":n.minor=0,n.patch=0;break;case"minor":n.patch=0;break}return n.format()},PTe=n=>n.startsWith("pre");P6.exports=RTe});var L6=W((eiA,F6)=>{"use strict";var dv=class{constructor(){this.max=1e3,this.map=new Map}get(r){let o=this.map.get(r);if(o!==void 0)return this.map.delete(r),this.map.set(r,o),o}delete(r){return this.map.delete(r)}set(r,o){if(!this.delete(r)&&o!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(r,o)}return this}};F6.exports=dv});var so=W((AiA,Y6)=>{"use strict";var GTe=/\s+/g,uv=class n{constructor(r,o){if(o=LTe(o),r instanceof n)return r.loose===!!o.loose&&r.includePrerelease===!!o.includePrerelease?r:new n(r.raw,o);if(r instanceof Bv)return this.raw=r.value,this.set=[[r]],this.formatted=void 0,this;if(this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease,this.raw=r.trim().replace(GTe," "),this.set=this.raw.split("||").map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(e=>!H6(e[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&VTe(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let r=0;r0&&(this.formatted+="||");let o=this.set[r];for(let i=0;i0&&(this.formatted+=" "),this.formatted+=o[i].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(r){r=r.replace(qTe,"");let i=((this.options.includePrerelease&&jTe)|(this.options.loose&&JTe))+":"+r,e=U6.get(i);if(e)return e;let a=this.options.loose,A=a?va[aa.HYPHENRANGELOOSE]:va[aa.HYPHENRANGE];r=r.replace(A,iRe(this.options.includePrerelease)),kt("hyphen replace",r),r=r.replace(va[aa.COMPARATORTRIM],KTe),kt("comparator trim",r),r=r.replace(va[aa.TILDETRIM],YTe),kt("tilde trim",r),r=r.replace(va[aa.CARETTRIM],xTe),kt("caret trim",r);let t=r.split(" ").map(I=>zTe(I,this.options)).join(" ").split(/\s+/).map(I=>aRe(I,this.options));a&&(t=t.filter(I=>(kt("loose invalid filter",I,this.options),!!I.match(va[aa.COMPARATORLOOSE])))),kt("range list",t);let s=new Map,g=t.map(I=>new Bv(I,this.options));for(let I of g){if(H6(I))return[I];s.set(I.value,I)}s.size>1&&s.has("")&&s.delete("");let c=[...s.values()];return U6.set(i,c),c}intersects(r,o){if(!(r instanceof n))throw new TypeError("a Range is required");return this.set.some(i=>K6(i,o)&&r.set.some(e=>K6(e,o)&&i.every(a=>e.every(A=>a.intersects(A,o)))))}test(r){if(!r)return!1;if(typeof r=="string")try{r=new UTe(r,this.options)}catch{return!1}for(let o=0;on.value==="<0.0.0-0",VTe=n=>n.value==="",K6=(n,r)=>{let o=!0,i=n.slice(),e=i.pop();for(;o&&i.length;)o=i.every(a=>e.intersects(a,r)),e=i.pop();return o},zTe=(n,r)=>(n=n.replace(va[aa.BUILD],""),kt("comp",n,r),n=$Te(n,r),kt("caret",n),n=ZTe(n,r),kt("tildes",n),n=ARe(n,r),kt("xrange",n),n=rRe(n,r),kt("stars",n),n),Nr=n=>!n||n.toLowerCase()==="x"||n==="*",WTe=(n,r,o)=>Nr(n)&&!Nr(r)||Nr(r)&&o&&!Nr(o),ZTe=(n,r)=>n.trim().split(/\s+/).map(o=>XTe(o,r)).join(" "),XTe=(n,r)=>{let o=r.loose?va[aa.TILDELOOSE]:va[aa.TILDE],i=r.includePrerelease?"-0":"";return n.replace(o,(e,a,A,t,s)=>{kt("tilde",n,e,a,A,t,s);let g;return Nr(a)?g="":Nr(A)?g=`>=${a}.0.0${i} <${+a+1}.0.0-0`:Nr(t)?g=`>=${a}.${A}.0${i} <${a}.${+A+1}.0-0`:s?(kt("replaceTilde pr",s),g=`>=${a}.${A}.${t}-${s} <${a}.${+A+1}.0-0`):g=`>=${a}.${A}.${t} <${a}.${+A+1}.0-0`,kt("tilde return",g),g})},$Te=(n,r)=>n.trim().split(/\s+/).map(o=>eRe(o,r)).join(" "),eRe=(n,r)=>{kt("caret",n,r);let o=r.loose?va[aa.CARETLOOSE]:va[aa.CARET],i=r.includePrerelease?"-0":"";return n.replace(o,(e,a,A,t,s)=>{kt("caret",n,e,a,A,t,s);let g;return Nr(a)?g="":Nr(A)?g=`>=${a}.0.0${i} <${+a+1}.0.0-0`:Nr(t)?a==="0"?g=`>=${a}.${A}.0${i} <${a}.${+A+1}.0-0`:g=`>=${a}.${A}.0${i} <${+a+1}.0.0-0`:s?(kt("replaceCaret pr",s),a==="0"?A==="0"?g=`>=${a}.${A}.${t}-${s} <${a}.${A}.${+t+1}-0`:g=`>=${a}.${A}.${t}-${s} <${a}.${+A+1}.0-0`:g=`>=${a}.${A}.${t}-${s} <${+a+1}.0.0-0`):(kt("no pr"),a==="0"?A==="0"?g=`>=${a}.${A}.${t} <${a}.${A}.${+t+1}-0`:g=`>=${a}.${A}.${t} <${a}.${+A+1}.0-0`:g=`>=${a}.${A}.${t} <${+a+1}.0.0-0`),kt("caret return",g),g})},ARe=(n,r)=>(kt("replaceXRanges",n,r),n.split(/\s+/).map(o=>tRe(o,r)).join(" ")),tRe=(n,r)=>{n=n.trim();let o=r.loose?va[aa.XRANGELOOSE]:va[aa.XRANGE];return n.replace(o,(i,e,a,A,t,s)=>{if(kt("xRange",n,i,e,a,A,t,s),WTe(a,A,t))return n;let g=Nr(a),c=g||Nr(A),I=c||Nr(t),E=I;return e==="="&&E&&(e=""),s=r.includePrerelease?"-0":"",g?e===">"||e==="<"?i="<0.0.0-0":i="*":e&&E?(c&&(A=0),t=0,e===">"?(e=">=",c?(a=+a+1,A=0,t=0):(A=+A+1,t=0)):e==="<="&&(e="<",c?a=+a+1:A=+A+1),e==="<"&&(s="-0"),i=`${e+a}.${A}.${t}${s}`):c?i=`>=${a}.0.0${s} <${+a+1}.0.0-0`:I&&(i=`>=${a}.${A}.0${s} <${a}.${+A+1}.0-0`),kt("xRange return",i),i})},rRe=(n,r)=>(kt("replaceStars",n,r),n.trim().replace(va[aa.STAR],"")),aRe=(n,r)=>(kt("replaceGTE0",n,r),n.trim().replace(va[r.includePrerelease?aa.GTE0PRE:aa.GTE0],"")),iRe=n=>(r,o,i,e,a,A,t,s,g,c,I,E)=>(Nr(i)?o="":Nr(e)?o=`>=${i}.0.0${n?"-0":""}`:Nr(a)?o=`>=${i}.${e}.0${n?"-0":""}`:A?o=`>=${o}`:o=`>=${o}${n?"-0":""}`,Nr(g)?s="":Nr(c)?s=`<${+g+1}.0.0-0`:Nr(I)?s=`<${g}.${+c+1}.0-0`:E?s=`<=${g}.${c}.${I}-${E}`:n?s=`<${g}.${c}.${+I+1}-0`:s=`<=${s}`,`${o} ${s}`.trim()),oRe=(n,r,o)=>{for(let i=0;i0){let e=n[i].semver;if(e.major===r.major&&e.minor===r.minor&&e.patch===r.patch)return!0}return!1}return!0}});var Qd=W((tiA,z6)=>{"use strict";var yd=Symbol("SemVer ANY"),yv=class n{static get ANY(){return yd}constructor(r,o){if(o=x6(o),r instanceof n){if(r.loose===!!o.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),Qv("comparator",r,o),this.options=o,this.loose=!!o.loose,this.parse(r),this.semver===yd?this.value="":this.value=this.operator+this.semver.version,Qv("comp",this)}parse(r){let o=this.options.loose?j6[J6.COMPARATORLOOSE]:j6[J6.COMPARATOR],i=r.match(o);if(!i)throw new TypeError(`Invalid comparator: ${r}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new q6(i[2],this.options.loose):this.semver=yd}toString(){return this.value}test(r){if(Qv("Comparator.test",r,this.options.loose),this.semver===yd||r===yd)return!0;if(typeof r=="string")try{r=new q6(r,this.options)}catch{return!1}return fv(r,this.operator,this.semver,this.options)}intersects(r,o){if(!(r instanceof n))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new V6(r.value,o).test(this.value):r.operator===""?r.value===""?!0:new V6(this.value,o).test(r.semver):(o=x6(o),o.includePrerelease&&(this.value==="<0.0.0-0"||r.value==="<0.0.0-0")||!o.includePrerelease&&(this.value.startsWith("<0.0.0")||r.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&r.operator.startsWith(">")||this.operator.startsWith("<")&&r.operator.startsWith("<")||this.semver.version===r.semver.version&&this.operator.includes("=")&&r.operator.includes("=")||fv(this.semver,"<",r.semver,o)&&this.operator.startsWith(">")&&r.operator.startsWith("<")||fv(this.semver,">",r.semver,o)&&this.operator.startsWith("<")&&r.operator.startsWith(">")))}};z6.exports=yv;var x6=xm(),{safeRe:j6,t:J6}=Rp(),fv=hv(),Qv=Bd(),q6=ra(),V6=so()});var md=W((riA,W6)=>{"use strict";var nRe=so(),sRe=(n,r,o)=>{try{r=new nRe(r,o)}catch{return!1}return r.test(n)};W6.exports=sRe});var X6=W((aiA,Z6)=>{"use strict";var gRe=so(),cRe=(n,r)=>new gRe(n,r).set.map(o=>o.map(i=>i.value).join(" ").trim().split(" "));Z6.exports=cRe});var e5=W((iiA,$6)=>{"use strict";var IRe=ra(),lRe=so(),pRe=(n,r,o)=>{let i=null,e=null,a=null;try{a=new lRe(r,o)}catch{return null}return n.forEach(A=>{a.test(A)&&(!i||e.compare(A)===-1)&&(i=A,e=new IRe(i,o))}),i};$6.exports=pRe});var t5=W((oiA,A5)=>{"use strict";var ERe=ra(),CRe=so(),hRe=(n,r,o)=>{let i=null,e=null,a=null;try{a=new CRe(r,o)}catch{return null}return n.forEach(A=>{a.test(A)&&(!i||e.compare(A)===1)&&(i=A,e=new ERe(i,o))}),i};A5.exports=hRe});var i5=W((niA,a5)=>{"use strict";var mv=ra(),dRe=so(),r5=fd(),uRe=(n,r)=>{n=new dRe(n,r);let o=new mv("0.0.0");if(n.test(o)||(o=new mv("0.0.0-0"),n.test(o)))return o;o=null;for(let i=0;i{let t=new mv(A.semver.version);switch(A.operator){case">":t.prerelease.length===0?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!a||r5(t,a))&&(a=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${A.operator}`)}}),a&&(!o||r5(o,a))&&(o=a)}return o&&n.test(o)?o:null};a5.exports=uRe});var n5=W((siA,o5)=>{"use strict";var BRe=so(),fRe=(n,r)=>{try{return new BRe(n,r).range||"*"}catch{return null}};o5.exports=fRe});var AS=W((giA,I5)=>{"use strict";var QRe=ra(),c5=Qd(),{ANY:yRe}=c5,mRe=so(),SRe=md(),s5=fd(),g5=Wm(),DRe=Xm(),wRe=Zm(),ORe=(n,r,o,i)=>{n=new QRe(n,i),r=new mRe(r,i);let e,a,A,t,s;switch(o){case">":e=s5,a=DRe,A=g5,t=">",s=">=";break;case"<":e=g5,a=wRe,A=s5,t="<",s="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(SRe(n,r,i))return!1;for(let g=0;g{B.semver===yRe&&(B=new c5(">=0.0.0")),I=I||B,E=E||B,e(B.semver,I.semver,i)?I=B:A(B.semver,E.semver,i)&&(E=B)}),I.operator===t||I.operator===s||(!E.operator||E.operator===t)&&a(n,E.semver))return!1;if(E.operator===s&&A(n,E.semver))return!1}return!0};I5.exports=ORe});var p5=W((ciA,l5)=>{"use strict";var bRe=AS(),MRe=(n,r,o)=>bRe(n,r,">",o);l5.exports=MRe});var C5=W((IiA,E5)=>{"use strict";var _Re=AS(),NRe=(n,r,o)=>_Re(n,r,"<",o);E5.exports=NRe});var u5=W((liA,d5)=>{"use strict";var h5=so(),TRe=(n,r,o)=>(n=new h5(n,o),r=new h5(r,o),n.intersects(r,o));d5.exports=TRe});var f5=W((piA,B5)=>{"use strict";var RRe=md(),kRe=no();B5.exports=(n,r,o)=>{let i=[],e=null,a=null,A=n.sort((c,I)=>kRe(c,I,o));for(let c of A)RRe(c,r,o)?(a=c,e||(e=c)):(a&&i.push([e,a]),a=null,e=null);e&&i.push([e,null]);let t=[];for(let[c,I]of i)c===I?t.push(c):!I&&c===A[0]?t.push("*"):I?c===A[0]?t.push(`<=${I}`):t.push(`${c} - ${I}`):t.push(`>=${c}`);let s=t.join(" || "),g=typeof r.raw=="string"?r.raw:String(r);return s.length{"use strict";var Q5=so(),wv=Qd(),{ANY:Sv}=wv,Dv=md(),Ov=no(),vRe=(n,r,o={})=>{if(n===r)return!0;n=new Q5(n,o),r=new Q5(r,o);let i=!1;e:for(let e of n.set){for(let a of r.set){let A=GRe(e,a,o);if(i=i||A!==null,A)continue e}if(i)return!1}return!0},PRe=[new wv(">=0.0.0-0")],y5=[new wv(">=0.0.0")],GRe=(n,r,o)=>{if(n===r)return!0;if(n.length===1&&n[0].semver===Sv){if(r.length===1&&r[0].semver===Sv)return!0;o.includePrerelease?n=PRe:n=y5}if(r.length===1&&r[0].semver===Sv){if(o.includePrerelease)return!0;r=y5}let i=new Set,e,a;for(let B of n)B.operator===">"||B.operator===">="?e=m5(e,B,o):B.operator==="<"||B.operator==="<="?a=S5(a,B,o):i.add(B.semver);if(i.size>1)return null;let A;if(e&&a){if(A=Ov(e.semver,a.semver,o),A>0)return null;if(A===0&&(e.operator!==">="||a.operator!=="<="))return null}for(let B of i){if(e&&!Dv(B,String(e),o)||a&&!Dv(B,String(a),o))return null;for(let f of r)if(!Dv(B,String(f),o))return!1;return!0}let t,s,g,c,I=a&&!o.includePrerelease&&a.semver.prerelease.length?a.semver:!1,E=e&&!o.includePrerelease&&e.semver.prerelease.length?e.semver:!1;I&&I.prerelease.length===1&&a.operator==="<"&&I.prerelease[0]===0&&(I=!1);for(let B of r){if(c=c||B.operator===">"||B.operator===">=",g=g||B.operator==="<"||B.operator==="<=",e){if(E&&B.semver.prerelease&&B.semver.prerelease.length&&B.semver.major===E.major&&B.semver.minor===E.minor&&B.semver.patch===E.patch&&(E=!1),B.operator===">"||B.operator===">="){if(t=m5(e,B,o),t===B&&t!==e)return!1}else if(e.operator===">="&&!B.test(e.semver))return!1}if(a){if(I&&B.semver.prerelease&&B.semver.prerelease.length&&B.semver.major===I.major&&B.semver.minor===I.minor&&B.semver.patch===I.patch&&(I=!1),B.operator==="<"||B.operator==="<="){if(s=S5(a,B,o),s===B&&s!==a)return!1}else if(a.operator==="<="&&!B.test(a.semver))return!1}if(!B.operator&&(a||e)&&A!==0)return!1}return!(e&&g&&!a&&A!==0||a&&c&&!e&&A!==0||E||I)},m5=(n,r,o)=>{if(!n)return r;let i=Ov(n.semver,r.semver,o);return i>0?n:i<0||r.operator===">"&&n.operator===">="?r:n},S5=(n,r,o)=>{if(!n)return r;let i=Ov(n.semver,r.semver,o);return i<0?n:i>0||r.operator==="<"&&n.operator==="<="?r:n};D5.exports=vRe});var _5=W((CiA,M5)=>{"use strict";var bv=Rp(),O5=Tp(),FRe=ra(),b5=Iv(),LRe=Tg(),URe=XW(),HRe=e6(),KRe=r6(),YRe=o6(),xRe=s6(),jRe=c6(),JRe=l6(),qRe=E6(),VRe=no(),zRe=u6(),WRe=f6(),ZRe=zm(),XRe=S6(),$Re=w6(),eke=fd(),Ake=Wm(),tke=Ev(),rke=Cv(),ake=Zm(),ike=Xm(),oke=hv(),nke=v6(),ske=G6(),gke=Qd(),cke=so(),Ike=md(),lke=X6(),pke=e5(),Eke=t5(),Cke=i5(),hke=n5(),dke=AS(),uke=p5(),Bke=C5(),fke=u5(),Qke=f5(),yke=w5();M5.exports={parse:LRe,valid:URe,clean:HRe,inc:KRe,diff:YRe,major:xRe,minor:jRe,patch:JRe,prerelease:qRe,compare:VRe,rcompare:zRe,compareLoose:WRe,compareBuild:ZRe,sort:XRe,rsort:$Re,gt:eke,lt:Ake,eq:tke,neq:rke,gte:ake,lte:ike,cmp:oke,coerce:nke,truncate:ske,Comparator:gke,Range:cke,satisfies:Ike,toComparators:lke,maxSatisfying:pke,minSatisfying:Eke,minVersion:Cke,validRange:hke,outside:dke,gtr:uke,ltr:Bke,intersects:fke,simplifyRange:Qke,subset:yke,SemVer:FRe,re:bv.re,src:bv.src,tokens:bv.t,SEMVER_SPEC_VERSION:O5.SEMVER_SPEC_VERSION,RELEASE_TYPES:O5.RELEASE_TYPES,compareIdentifiers:b5.compareIdentifiers,rcompareIdentifiers:b5.rcompareIdentifiers}});var Os,tS=le(()=>{Os={name:"sharp",description:"High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images",version:"0.35.3",author:"Lovell Fuller ",homepage:"https://sharp.pixelplumbing.com",contributors:["Pierre Inglebert ","Jonathan Ong ","Chanon Sajjamanochai ","Juliano Julio ","Daniel Gasienica ","Julian Walker ","Amit Pitaru ","Brandon Aaron ","Andreas Lind ","Maurus Cuelenaere ","Linus Unneb\xE4ck ","Victor Mateevitsi ","Alaric Holloway ","Bernhard K. Weisshuhn ","Chris Riley ","David Carley ","John Tobin ","Kenton Gray ","Felix B\xFCnemann ","Samy Al Zahrani ","Chintan Thakkar ","F. Orlando Galashan ","Kleis Auke Wolthuizen ","Matt Hirsch ","Matthias Thoemmes ","Patrick Paskaris ","J\xE9r\xE9my Lal ","Rahul Nanwani ","Alice Monday ","Kristo Jorgenson ","YvesBos ","Guy Maliar ","Nicolas Coden ","Matt Parrish ","Marcel Bretschneider ","Matthew McEachen ","Jarda Kot\u011B\u0161ovec ","Kenric D'Souza ","Oleh Aleinyk ","Marcel Bretschneider ","Andrea Bianco ","Rik Heywood ","Thomas Parisot ","Nathan Graves ","Tom Lokhorst ","Espen Hovlandsdal ","Sylvain Dumont ","Alun Davies ","Aidan Hoolachan ","Axel Eirola ","Freezy ","Daiz ","Julian Aubourg ","Keith Belovay ","Michael B. Klein ","Jordan Prudhomme ","Ilya Ovdin ","Andargor ","Paul Neave ","Brendan Kennedy ","Brychan Bennett-Odlum ","Edward Silverton ","Roman Malieiev ","Tomas Szabo ","Robert O'Rourke ","Guillermo Alfonso Varela Chouci\xF1o ","Christian Flintrup ","Manan Jadhav ","Leon Radley ","alza54 ","Jacob Smith ","Michael Nutt ","Brad Parham ","Taneli Vatanen ","Joris Dugu\xE9 ","Chris Banks ","Ompal Singh ","Brodan ","Ankur Parihar ","Brahim Ait elhaj ","Mart Jansink ","Lachlan Newman ","Dennis Beatty ","Ingvar Stepanyan ","Don Denton ","Dmytro Tiapukhin ","Florian Lefebvre "],scripts:{build:"node install/build.js","build:dist":"node scripts/build.mjs",clean:"rm -rf src/build/ test/fixtures/output.*",test:"npm run lint && npm run test-unit",lint:"npm run lint-cpp && npm run lint-js && npm run lint-types && npm run lint-publish","lint-cpp":"cpplint --quiet src/*.h src/*.cc","lint-js":"biome lint","lint-publish":"publint --strict","lint-types":"tsd --files ./test/types/sharp.test-d.{cts,mts}","test-leak":"./test/leak/leak.sh","test-unit":"node --experimental-test-coverage test/unit.mjs","package-from-local-build":"node npm/from-local-build.js","package-wasm-wrappers":"node npm/wasm-wrappers.js","package-release-notes":"node npm/release-notes.js","docs-build":"node docs/build.mjs","docs-serve":"cd docs && npm start","docs-publish":"cd docs && npm run build && npx firebase-tools deploy --project pixelplumbing --only hosting:pixelplumbing-sharp"},type:"commonjs",files:["dist","install","lib/index.d.ts","src/*.{cc,h,gyp}"],main:"./dist/index.cjs",module:"./dist/index.mjs",types:"./dist/index.d.mts",exports:{".":{import:{types:"./dist/index.d.mts",default:"./dist/index.mjs"},require:{types:"./dist/index.d.cts",default:"./dist/index.cjs"}}},sideEffects:!0,repository:{type:"git",url:"git+https://github.com/lovell/sharp.git"},keywords:["jpeg","png","webp","avif","tiff","gif","svg","jp2","dzi","image","resize","thumbnail","crop","embed","libvips","vips"],dependencies:{"@img/colour":"^1.1.0","detect-libc":"^2.1.2",semver:"^7.8.5"},optionalDependencies:{"@img/sharp-darwin-arm64":"0.35.3","@img/sharp-darwin-x64":"0.35.3","@img/sharp-freebsd-wasm32":"0.35.3","@img/sharp-libvips-darwin-arm64":"1.3.2","@img/sharp-libvips-darwin-x64":"1.3.2","@img/sharp-libvips-linux-arm":"1.3.2","@img/sharp-libvips-linux-arm64":"1.3.2","@img/sharp-libvips-linux-ppc64":"1.3.2","@img/sharp-libvips-linux-riscv64":"1.3.2","@img/sharp-libvips-linux-s390x":"1.3.2","@img/sharp-libvips-linux-x64":"1.3.2","@img/sharp-libvips-linuxmusl-arm64":"1.3.2","@img/sharp-libvips-linuxmusl-x64":"1.3.2","@img/sharp-linux-arm":"0.35.3","@img/sharp-linux-arm64":"0.35.3","@img/sharp-linux-ppc64":"0.35.3","@img/sharp-linux-riscv64":"0.35.3","@img/sharp-linux-s390x":"0.35.3","@img/sharp-linux-x64":"0.35.3","@img/sharp-linuxmusl-arm64":"0.35.3","@img/sharp-linuxmusl-x64":"0.35.3","@img/sharp-webcontainers-wasm32":"0.35.3","@img/sharp-win32-arm64":"0.35.3","@img/sharp-win32-ia32":"0.35.3","@img/sharp-win32-x64":"0.35.3"},peerDependenciesMeta:{"@types/node":{optional:!0}},devDependencies:{"@biomejs/biome":"^2.5.1","@cpplint/cli":"^0.1.0","@emnapi/runtime":"^1.11.1","@img/sharp-libvips-dev":"1.3.2","@img/sharp-libvips-dev-wasm32":"1.3.2","@img/sharp-libvips-win32-arm64":"1.3.2","@img/sharp-libvips-win32-ia32":"1.3.2","@img/sharp-libvips-win32-x64":"1.3.2","@types/node":"*",emnapi:"^1.11.1","exif-reader":"^2.0.3","extract-zip":"^2.0.1",icc:"^4.0.0","node-addon-api":"^8.9.0","node-gyp":"^12.4.0",publint:"^0.3.21","tar-fs":"^3.1.3",tsd:"^0.33.0"},license:"Apache-2.0",engines:{node:">=20.9.0"},config:{libvips:">=8.18.3"},funding:{url:"https://opencollective.com/libvips"}}});import{spawnSync as Sd}from"node:child_process";import{createHash as Ske}from"node:crypto";var Dd,_v,Dke,T5,wke,Nv,Oke,R5,bke,kp,Mke,_ke,Nke,Tke,k5,Rke,N5,kke,vke,v5,Pke,Gke,P5,Mv,Fke,rS,Tv=le(()=>{Dd=Je(_5(),1),_v=Je(Ym(),1);tS();Dke=process.env.npm_package_config_libvips||Os.config.libvips,T5=Dd.default.coerce(Dke).version,wke=["darwin-arm64","darwin-x64","freebsd-arm64","freebsd-x64","linux-arm","linux-arm64","linux-ppc64","linux-riscv64","linux-s390x","linux-wasm32","linux-x64","linuxmusl-arm64","linuxmusl-x64","win32-arm64","win32-ia32","win32-x64"],Nv={encoding:"utf8",shell:!0},Oke=n=>{n instanceof Error?console.error(`sharp: Installation error: ${n.message}`):console.log(`sharp: ${n}`)},R5=()=>_v.default.isNonGlibcLinuxSync()?_v.default.familySync():"",bke=()=>`${process.platform}${R5()}-${process.arch}`,kp=()=>{if(k5())return"wasm32";let{npm_config_arch:n,npm_config_platform:r,npm_config_libc:o}=process.env,i=typeof o=="string"?o:R5();return`${r||process.platform}${i}-${n||process.arch}`},Mke=()=>{try{return We(`@img/sharp-libvips-dev-${kp()}/include`)}catch{try{return We("@img/sharp-libvips-dev/include")}catch{}}return""},_ke=()=>{try{return We("@img/sharp-libvips-dev/cplusplus")}catch{}return""},Nke=()=>{try{return We(`@img/sharp-libvips-dev-${kp()}/lib`)}catch{try{return We(`@img/sharp-libvips-${kp()}/lib`)}catch{}}return""},Tke=()=>{if(process.release?.name==="node"&&process.versions&&!Dd.default.satisfies(process.versions.node,Os.engines.node))return{found:process.versions.node,expected:Os.engines.node}},k5=()=>{let{CC:n}=process.env;return!!n?.endsWith("/emcc")},Rke=()=>process.platform==="darwin"&&process.arch==="x64"?(Sd("sysctl sysctl.proc_translated",Nv).stdout||"").trim()==="sysctl.proc_translated: 1":!1,N5=n=>Ske("sha512").update(n).digest("hex"),kke=()=>{try{let n=N5(`imgsharp-libvips-${kp()}`),r=Dd.default.coerce(Os.optionalDependencies[`@img/sharp-libvips-${kp()}`],{includePrerelease:!0}).version;return N5(`${n}npm:${r}`).slice(0,10)}catch{}return""},vke=()=>Sd(`node-gyp rebuild --directory=src ${k5()?"--nodedir=emscripten":""}`,{...Nv,stdio:"inherit"}).status,v5=()=>process.platform!=="win32"?(Sd("pkg-config --modversion vips-cpp",{...Nv,env:{...process.env,PKG_CONFIG_PATH:P5()}}).stdout||"").trim():"",Pke=()=>{try{let n=(Sd("brew",["--prefix"],{encoding:"utf8"}).stdout||"").trim();if(n)return`${n}/lib/pkgconfig`}catch{}},Gke=()=>{try{let n=(Sd("pkg-config",["--variable","pc_path","pkg-config"],{encoding:"utf8"}).stdout||"").trim();if(n)return n}catch{}},P5=()=>process.platform!=="win32"?[Pke(),Gke(),process.env.PKG_CONFIG_PATH].filter(Boolean).join(":"):"",Mv=(n,r,o)=>(o&&o(`Detected ${r}, skipping search for globally-installed libvips`),n),Fke=n=>{if(process.env.SHARP_IGNORE_GLOBAL_LIBVIPS)return Mv(!1,"SHARP_IGNORE_GLOBAL_LIBVIPS",n);if(process.env.SHARP_FORCE_GLOBAL_LIBVIPS)return Mv(!0,"SHARP_FORCE_GLOBAL_LIBVIPS",n);if(Rke())return Mv(!1,"Rosetta",n);let r=v5();return!!r&&Dd.default.gte(r,T5)},rS={minimumLibvipsVersion:T5,prebuiltPlatforms:wke,buildPlatformArch:kp,buildSharpLibvipsIncludeDir:Mke,buildSharpLibvipsCPlusPlusDir:_ke,buildSharpLibvipsLibDir:Nke,isUnsupportedNodeRuntime:Tke,runtimePlatformArch:bke,log:Oke,yarnLocator:kke,spawnRebuild:vke,globalLibvipsVersion:v5,pkgConfigPath:P5,useGlobalLibvips:Fke}});import{createRequire as Lke}from"node:module";var aS,Tr,F5,Uke,G5,Hke,Kke,bs,Ot,Rg,dt,wd=le(()=>{aS=Je(Ym(),1);Tv();tS();Tr=Lke(import.meta.url),{version:F5}=Os,{runtimePlatformArch:Uke,isUnsupportedNodeRuntime:G5,prebuiltPlatforms:Hke,minimumLibvipsVersion:Kke}=rS,bs=Uke(),Rg=[];try{Ot=Tr(`../src/build/Release/sharp-${bs}-${F5}.node`)}catch(n){Rg.push(n)}if(!Ot)try{Ot=Tr(`../src/build/Release/sharp-wasm32-${F5}.node`)}catch(n){Rg.push(n)}if(!Ot)try{switch(bs){case"darwin-arm64":Ot=Tr("@img/sharp-darwin-arm64/sharp.node");break;case"darwin-x64":Ot=Tr("@img/sharp-darwin-x64/sharp.node");break;case"linux-arm":Ot=Tr("@img/sharp-linux-arm/sharp.node");break;case"linux-arm64":Ot=Tr("@img/sharp-linux-arm64/sharp.node");break;case"linux-ppc64":Ot=Tr("@img/sharp-linux-ppc64/sharp.node");break;case"linux-riscv64":Ot=Tr("@img/sharp-linux-riscv64/sharp.node");break;case"linux-s390x":Ot=Tr("@img/sharp-linux-s390x/sharp.node");break;case"linux-x64":Ot=Tr("@img/sharp-linux-x64/sharp.node");break;case"linuxmusl-arm64":Ot=Tr("@img/sharp-linuxmusl-arm64/sharp.node");break;case"linuxmusl-x64":Ot=Tr("@img/sharp-linuxmusl-x64/sharp.node");break;case"win32-arm64":Ot=Tr("@img/sharp-win32-arm64/sharp.node");break;case"win32-ia32":Ot=Tr("@img/sharp-win32-ia32/sharp.node");break;case"win32-x64":Ot=Tr("@img/sharp-win32-x64/sharp.node");break;case"freebsd-arm64":case"freebsd-x64":Ot=Tr("@img/sharp-freebsd-wasm32/sharp.node");break;case"linux-wasm32":Ot=Tr("@img/sharp-webcontainers-wasm32/sharp.node");break}if(Ot&&["linux-x64","linuxmusl-x64"].includes(bs)&&!Ot._isUsingX64V2()){let n=new Error("Prebuilt binaries for Linux x64 require v2 microarchitecture");n.code="Unsupported CPU",Rg.push(n),Ot=null}Ot&&process.versions.electron&&bs.startsWith("linux")&&process.emitWarning("Binaries provided by Electron for use on Linux may be incompatible with sharp - see https://sharp.pixelplumbing.com/install#electron-and-linux",{code:"SharpElectronLinux"})}catch(n){Rg.push(n)}if(!Ot)try{Ot=Tr("@img/sharp-wasm32/sharp.node")}catch(n){Rg.push(n)}if(!Ot){let[n,r,o]=["linux","darwin","win32"].map(a=>bs.startsWith(a)),i=[`Could not load the "sharp" module using the ${bs} runtime`];Rg.forEach(a=>{a.code.endsWith("MODULE_NOT_FOUND")||i.push(`${a.code}: ${a.message}`)});let e=Rg.map(a=>a.message).join(" ");if(i.push("Possible solutions:"),G5()){let{found:a,expected:A}=G5();i.push("- Please upgrade Node.js:",` Found ${a}`,` Requires ${A}`)}else if(Hke.includes(bs)){let[a,A]=bs.split("-"),t=a.endsWith("musl")?" --libc=musl":"";i.push("- Ensure optional dependencies can be installed:"," npm install --include=optional sharp","- Ensure your package manager supports multi-platform installation:"," See https://sharp.pixelplumbing.com/install#cross-platform","- Add platform-specific dependencies:",` npm install --os=${a.replace("musl","")}${t} --cpu=${A} sharp`)}else i.push(`- Manually install libvips >= ${Kke}`," See https://sharp.pixelplumbing.com/install#building-from-source","- Add WebAssembly-based dependencies:"," npm install sharp @img/sharp-wasm32");if(n&&/(symbol not found|CXXABI_)/i.test(e))try{let{config:a}=Tr(`@img/sharp-libvips-${bs}/package`),A=`${(0,aS.familySync)()} ${(0,aS.versionSync)()}`,t=`${a.musl?"musl":"glibc"} ${a.musl||a.glibc}`;i.push("- Update your OS:",` Found ${A}`,` Requires ${t}`)}catch{}throw n&&/\/snap\/core[0-9]{2}/.test(e)&&i.push("- Remove the Node.js Snap, which does not support native modules"," snap remove node"),r&&/Incompatible library version/.test(e)&&i.push("- Update Homebrew:"," brew update && brew upgrade vips"),Rg.some(a=>a.code==="ERR_DLOPEN_DISABLED")&&i.push("- Run Node.js without using the --no-addons flag"),o&&/The specified procedure could not be found/.test(e)&&i.push("- Using the canvas package on Windows?"," See https://sharp.pixelplumbing.com/install#canvas-and-windows","- Check for outdated versions of sharp in the dependency tree:"," npm ls sharp"),i.push("- Consult the installation documentation:"," See https://sharp.pixelplumbing.com/install"),new Error(i.join(` -`))}dt=Ot});import Yke from"node:util";import Rv from"node:stream";function Jke(){let n=this.constructor.call(),{debuglog:r,queueListener:o,...i}=this.options;return n.options=structuredClone(i),n.options.debuglog=r,n.options.queueListener=o,this._isStreamInput()&&this.on("finish",()=>{this._flattenBufferIn(),n.options.input.buffer=this.options.input.buffer,n.emit("finish")}),n}var xke,jke,nI,On,L5=le(()=>{yn();wd();xke=Yke.debuglog("sharp"),jke=n=>{nI.queue.emit("change",n)},nI=function(n,r){if(arguments.length===1&&!w.defined(n))throw new Error("Invalid input");return this instanceof nI?(Rv.Duplex.call(this),this.options={topOffsetPre:-1,leftOffsetPre:-1,widthPre:-1,heightPre:-1,topOffsetPost:-1,leftOffsetPost:-1,widthPost:-1,heightPost:-1,width:-1,height:-1,canvas:"crop",position:0,resizeBackground:[0,0,0,255],angle:0,rotationAngle:0,rotationBackground:[0,0,0,255],rotateBefore:!1,orientBefore:!1,flip:!1,flop:!1,extendTop:0,extendBottom:0,extendLeft:0,extendRight:0,extendBackground:[0,0,0,255],extendWith:"background",withoutEnlargement:!1,withoutReduction:!1,affineMatrix:[],affineBackground:[0,0,0,255],affineIdx:0,affineIdy:0,affineOdx:0,affineOdy:0,affineInterpolator:this.constructor.interpolators.bilinear,kernel:"lanczos3",fastShrinkOnLoad:!0,tint:[-1,0,0,0],flatten:!1,flattenBackground:[0,0,0],unflatten:!1,negate:!1,negateAlpha:!0,medianSize:0,blurSigma:0,precision:"integer",minAmpl:.2,sharpenSigma:0,sharpenM1:1,sharpenM2:2,sharpenX1:2,sharpenY2:10,sharpenY3:20,threshold:0,thresholdGrayscale:!0,trimBackground:[],trimThreshold:-1,trimLineArt:!1,trimMargin:0,dilateWidth:0,erodeWidth:0,gamma:0,gammaOut:0,greyscale:!1,normalise:!1,normaliseLower:1,normaliseUpper:99,claheWidth:0,claheHeight:0,claheMaxSlope:3,brightness:1,saturation:1,hue:0,lightness:0,booleanBufferIn:null,booleanFileIn:"",joinChannelIn:[],extractChannel:-1,removeAlpha:!1,ensureAlpha:-1,colourspace:"srgb",colourspacePipeline:"last",composite:[],fileOut:"",formatOut:"input",streamOut:!1,typedArrayOut:!1,keepMetadata:0,withMetadataOrientation:-1,withMetadataDensity:0,withIccProfile:"",withExif:{},withExifMerge:!0,withXmp:"",keepGainMap:!1,withGainMap:!1,resolveWithObject:!1,loop:-1,delay:[],jpegQuality:80,jpegProgressive:!1,jpegChromaSubsampling:"4:2:0",jpegTrellisQuantisation:!1,jpegOvershootDeringing:!1,jpegOptimiseScans:!1,jpegOptimiseCoding:!0,jpegQuantisationTable:0,pngProgressive:!1,pngCompressionLevel:6,pngAdaptiveFiltering:!1,pngPalette:!1,pngQuality:100,pngEffort:7,pngBitdepth:8,pngDither:1,jp2Quality:80,jp2TileHeight:512,jp2TileWidth:512,jp2Lossless:!1,jp2ChromaSubsampling:"4:4:4",webpQuality:80,webpAlphaQuality:100,webpLossless:!1,webpNearLossless:!1,webpSmartSubsample:!1,webpSmartDeblock:!1,webpPreset:"default",webpEffort:4,webpMinSize:!1,webpMixed:!1,webpExact:!1,gifBitdepth:8,gifEffort:7,gifDither:1,gifInterFrameMaxError:0,gifInterPaletteMaxError:3,gifKeepDuplicateFrames:!1,gifReuse:!0,gifProgressive:!1,tiffQuality:80,tiffCompression:"jpeg",tiffBigtiff:!1,tiffPredictor:"horizontal",tiffPyramid:!1,tiffMiniswhite:!1,tiffBitdepth:0,tiffTile:!1,tiffTileHeight:256,tiffTileWidth:256,tiffXres:1,tiffYres:1,tiffResolutionUnit:"inch",heifQuality:50,heifLossless:!1,heifCompression:"av1",heifEffort:4,heifChromaSubsampling:"4:4:4",heifBitdepth:8,heifTune:"auto",jxlDistance:1,jxlDecodingTier:0,jxlEffort:7,jxlLossless:!1,rawDepth:"uchar",tileSize:256,tileOverlap:0,tileContainer:"fs",tileLayout:"dz",tileFormat:"last",tileDepth:"last",tileAngle:0,tileSkipBlanks:-1,tileBackground:[255,255,255,255],tileCentre:!1,tileId:"https://example.com/iiif",tileBasename:"",timeoutSeconds:0,linearA:[],linearB:[],pdfBackground:[255,255,255,255],debuglog:o=>{this.emit("warning",o),xke(o)},queueListener:jke},this.options.input=this._createInputDescriptor(n,r,{allowStream:!0}),this):new nI(n,r)};Object.setPrototypeOf(nI.prototype,Rv.Duplex.prototype);Object.setPrototypeOf(nI,Rv.Duplex);Object.assign(nI.prototype,{clone:Jke});On=nI});function U5(n){let r=Vke.filter(o=>w.defined(n[o])).map(o=>[o,n[o]]);return r.length?Object.fromEntries(r):void 0}function zke(n,r,o){let i={autoOrient:!1,failOn:"warning",limitInputPixels:268402689,limitInputChannels:5,ignoreIcc:!1,unlimited:!1,sequentialRead:!0};if(w.string(n))i.file=n;else if(w.buffer(n)){if(n.length===0)throw Error("Input Buffer is empty");i.buffer=n}else if(w.arrayBuffer(n)){if(n.byteLength===0)throw Error("Input bit Array is empty");i.buffer=Buffer.from(n,0,n.byteLength)}else if(w.typedArray(n)){if(n.length===0)throw Error("Input Bit Array is empty");i.buffer=Buffer.from(n.buffer,n.byteOffset,n.byteLength)}else if(w.plainObject(n)&&!w.defined(r))r=n,U5(r)&&(i.buffer=[]);else if(!w.defined(n)&&!w.defined(r)&&w.object(o)&&o.allowStream)i.buffer=[];else if(Array.isArray(n))if(n.length>1)if(!this.options.joining)this.options.joining=!0,this.options.join=n.map(e=>this._createInputDescriptor(e));else throw new Error("Recursive join is unsupported");else throw new Error("Expected at least two images to join");else throw new Error(`Unsupported input '${n}' of type ${typeof n}${w.defined(r)?` when also providing options of type ${typeof r}`:""}`);if(w.object(r)){if(w.defined(r.failOn))if(w.string(r.failOn)&&w.inArray(r.failOn,["none","truncated","error","warning"]))i.failOn=r.failOn;else throw w.invalidParameterError("failOn","one of: none, truncated, error, warning",r.failOn);if(w.defined(r.autoOrient))if(w.bool(r.autoOrient))i.autoOrient=r.autoOrient;else throw w.invalidParameterError("autoOrient","boolean",r.autoOrient);if(w.defined(r.density))if(w.number(r.density)&&w.inRange(r.density,1,1e5))i.density=r.density;else throw w.invalidParameterError("density","number between 1 and 100000",r.density);if(w.defined(r.ignoreIcc))if(w.bool(r.ignoreIcc))i.ignoreIcc=r.ignoreIcc;else throw w.invalidParameterError("ignoreIcc","boolean",r.ignoreIcc);if(w.defined(r.limitInputPixels))if(w.bool(r.limitInputPixels))i.limitInputPixels=r.limitInputPixels?16383**2:0;else if(w.integer(r.limitInputPixels)&&w.inRange(r.limitInputPixels,0,Number.MAX_SAFE_INTEGER))i.limitInputPixels=r.limitInputPixels;else throw w.invalidParameterError("limitInputPixels","positive integer",r.limitInputPixels);if(w.defined(r.limitInputChannels))if(w.bool(r.limitInputChannels))i.limitInputChannels=r.limitInputChannels?5:0;else if(w.integer(r.limitInputChannels)&&w.inRange(r.limitInputChannels,0,Number.MAX_SAFE_INTEGER))i.limitInputChannels=r.limitInputChannels;else throw w.invalidParameterError("limitInputChannels","positive integer",r.limitInputChannels);if(w.defined(r.unlimited))if(w.bool(r.unlimited))i.unlimited=r.unlimited;else throw w.invalidParameterError("unlimited","boolean",r.unlimited);if(w.defined(r.sequentialRead))if(w.bool(r.sequentialRead))i.sequentialRead=r.sequentialRead;else throw w.invalidParameterError("sequentialRead","boolean",r.sequentialRead);if(w.defined(r.raw)){if(w.object(r.raw)&&w.integer(r.raw.width)&&w.inRange(r.raw.width,1,1e8)&&w.integer(r.raw.height)&&w.inRange(r.raw.height,1,1e8)&&w.integer(r.raw.channels)&&w.inRange(r.raw.channels,1,4))switch(i.rawWidth=r.raw.width,i.rawHeight=r.raw.height,i.rawChannels=r.raw.channels,n.constructor){case Uint8Array:case Uint8ClampedArray:i.rawDepth="uchar";break;case Int8Array:i.rawDepth="char";break;case Uint16Array:i.rawDepth="ushort";break;case Int16Array:i.rawDepth="short";break;case Uint32Array:i.rawDepth="uint";break;case Int32Array:i.rawDepth="int";break;case Float32Array:i.rawDepth="float";break;case Float64Array:i.rawDepth="double";break;default:i.rawDepth="uchar";break}else throw new Error("Expected width, height and channels for raw pixel input");if(i.rawPremultiplied=!1,w.defined(r.raw.premultiplied))if(w.bool(r.raw.premultiplied))i.rawPremultiplied=r.raw.premultiplied;else throw w.invalidParameterError("raw.premultiplied","boolean",r.raw.premultiplied);if(i.rawPageHeight=0,w.defined(r.raw.pageHeight))if(w.integer(r.raw.pageHeight)&&r.raw.pageHeight>0&&r.raw.pageHeight<=r.raw.height){if(r.raw.height%r.raw.pageHeight!==0)throw new Error(`Expected raw.height ${r.raw.height} to be a multiple of raw.pageHeight ${r.raw.pageHeight}`);i.rawPageHeight=r.raw.pageHeight}else throw w.invalidParameterError("raw.pageHeight","positive integer",r.raw.pageHeight)}if(w.defined(r.animated))if(w.bool(r.animated))i.pages=r.animated?-1:1;else throw w.invalidParameterError("animated","boolean",r.animated);if(w.defined(r.pages))if(w.integer(r.pages)&&w.inRange(r.pages,-1,1e5))i.pages=r.pages;else throw w.invalidParameterError("pages","integer between -1 and 100000",r.pages);if(w.defined(r.page))if(w.integer(r.page)&&w.inRange(r.page,0,1e5))i.page=r.page;else throw w.invalidParameterError("page","integer between 0 and 100000",r.page);if(w.object(r.openSlide)&&w.defined(r.openSlide.level))if(w.integer(r.openSlide.level)&&w.inRange(r.openSlide.level,0,256))i.openSlideLevel=r.openSlide.level;else throw w.invalidParameterError("openSlide.level","integer between 0 and 256",r.openSlide.level);else if(w.defined(r.level))if(w.integer(r.level)&&w.inRange(r.level,0,256))i.openSlideLevel=r.level;else throw w.invalidParameterError("level","integer between 0 and 256",r.level);if(w.object(r.tiff)&&w.defined(r.tiff.subifd))if(w.integer(r.tiff.subifd)&&w.inRange(r.tiff.subifd,-1,1e5))i.tiffSubifd=r.tiff.subifd;else throw w.invalidParameterError("tiff.subifd","integer between -1 and 100000",r.tiff.subifd);else if(w.defined(r.subifd))if(w.integer(r.subifd)&&w.inRange(r.subifd,-1,1e5))i.tiffSubifd=r.subifd;else throw w.invalidParameterError("subifd","integer between -1 and 100000",r.subifd);if(w.object(r.svg)){if(w.defined(r.svg.stylesheet))if(w.string(r.svg.stylesheet))i.svgStylesheet=r.svg.stylesheet;else throw w.invalidParameterError("svg.stylesheet","string",r.svg.stylesheet);if(w.defined(r.svg.highBitdepth))if(w.bool(r.svg.highBitdepth))i.svgHighBitdepth=r.svg.highBitdepth;else throw w.invalidParameterError("svg.highBitdepth","boolean",r.svg.highBitdepth)}if(w.object(r.pdf)&&w.defined(r.pdf.background)?i.pdfBackground=this._getBackgroundColourOption(r.pdf.background):w.defined(r.pdfBackground)&&(i.pdfBackground=this._getBackgroundColourOption(r.pdfBackground)),w.object(r.jp2)&&w.defined(r.jp2.oneshot))if(w.bool(r.jp2.oneshot))i.jp2Oneshot=r.jp2.oneshot;else throw w.invalidParameterError("jp2.oneshot","boolean",r.jp2.oneshot);if(w.defined(r.create))if(w.object(r.create)&&w.integer(r.create.width)&&w.inRange(r.create.width,1,1e8)&&w.integer(r.create.height)&&w.inRange(r.create.height,1,1e8)&&w.integer(r.create.channels)){if(i.createWidth=r.create.width,i.createHeight=r.create.height,i.createChannels=r.create.channels,i.createPageHeight=0,w.defined(r.create.pageHeight))if(w.integer(r.create.pageHeight)&&r.create.pageHeight>0&&r.create.pageHeight<=r.create.height){if(r.create.height%r.create.pageHeight!==0)throw new Error(`Expected create.height ${r.create.height} to be a multiple of create.pageHeight ${r.create.pageHeight}`);i.createPageHeight=r.create.pageHeight}else throw w.invalidParameterError("create.pageHeight","positive integer",r.create.pageHeight);if(w.defined(r.create.noise)){if(!w.object(r.create.noise))throw new Error("Expected noise to be an object");if(r.create.noise.type!=="gaussian")throw new Error("Only gaussian noise is supported at the moment");if(i.createNoiseType=r.create.noise.type,!w.inRange(r.create.channels,1,4))throw w.invalidParameterError("create.channels","number between 1 and 4",r.create.channels);if(i.createNoiseMean=128,w.defined(r.create.noise.mean))if(w.number(r.create.noise.mean)&&w.inRange(r.create.noise.mean,0,1e4))i.createNoiseMean=r.create.noise.mean;else throw w.invalidParameterError("create.noise.mean","number between 0 and 10000",r.create.noise.mean);if(i.createNoiseSigma=30,w.defined(r.create.noise.sigma))if(w.number(r.create.noise.sigma)&&w.inRange(r.create.noise.sigma,0,1e4))i.createNoiseSigma=r.create.noise.sigma;else throw w.invalidParameterError("create.noise.sigma","number between 0 and 10000",r.create.noise.sigma)}else if(w.defined(r.create.background)){if(!w.inRange(r.create.channels,3,4))throw w.invalidParameterError("create.channels","number between 3 and 4",r.create.channels);i.createBackground=this._getBackgroundColourOption(r.create.background)}else throw new Error("Expected valid noise or background to create a new input image");delete i.buffer}else throw new Error("Expected valid width, height and channels to create a new input image");if(w.defined(r.text))if(w.object(r.text)&&w.string(r.text.text)){if(i.textValue=r.text.text,w.defined(r.text.height)&&w.defined(r.text.dpi))throw new Error("Expected only one of dpi or height");if(w.defined(r.text.font))if(w.string(r.text.font))i.textFont=r.text.font;else throw w.invalidParameterError("text.font","string",r.text.font);if(w.defined(r.text.fontfile))if(w.string(r.text.fontfile))i.textFontfile=r.text.fontfile;else throw w.invalidParameterError("text.fontfile","string",r.text.fontfile);if(w.defined(r.text.width))if(w.integer(r.text.width)&&w.inRange(r.text.width,1,1e6))i.textWidth=r.text.width;else throw w.invalidParameterError("text.width","integer between 1 and 1000000",r.text.width);if(w.defined(r.text.height))if(w.integer(r.text.height)&&w.inRange(r.text.height,1,1e6))i.textHeight=r.text.height;else throw w.invalidParameterError("text.height","integer between 1 and 1000000",r.text.height);if(w.defined(r.text.align))if(w.string(r.text.align)&&w.string(this.constructor.align[r.text.align]))i.textAlign=this.constructor.align[r.text.align];else throw w.invalidParameterError("text.align","valid alignment",r.text.align);if(w.defined(r.text.justify))if(w.bool(r.text.justify))i.textJustify=r.text.justify;else throw w.invalidParameterError("text.justify","boolean",r.text.justify);if(w.defined(r.text.dpi))if(w.integer(r.text.dpi)&&w.inRange(r.text.dpi,1,1e6))i.textDpi=r.text.dpi;else throw w.invalidParameterError("text.dpi","integer between 1 and 1000000",r.text.dpi);if(w.defined(r.text.rgba))if(w.bool(r.text.rgba))i.textRgba=r.text.rgba;else throw w.invalidParameterError("text.rgba","bool",r.text.rgba);if(w.defined(r.text.spacing))if(w.integer(r.text.spacing)&&w.inRange(r.text.spacing,-1e6,1e6))i.textSpacing=r.text.spacing;else throw w.invalidParameterError("text.spacing","integer between -1000000 and 1000000",r.text.spacing);if(w.defined(r.text.wrap))if(w.string(r.text.wrap)&&w.inArray(r.text.wrap,["word","char","word-char","none"]))i.textWrap=r.text.wrap;else throw w.invalidParameterError("text.wrap","one of: word, char, word-char, none",r.text.wrap);delete i.buffer}else throw new Error("Expected a valid string to create an image with text.");if(w.defined(r.join))if(w.defined(this.options.join)){if(w.defined(r.join.animated))if(w.bool(r.join.animated))i.joinAnimated=r.join.animated;else throw w.invalidParameterError("join.animated","boolean",r.join.animated);if(w.defined(r.join.across))if(w.integer(r.join.across)&&w.inRange(r.join.across,1,1e6))i.joinAcross=r.join.across;else throw w.invalidParameterError("join.across","integer between 1 and 100000",r.join.across);if(w.defined(r.join.shim))if(w.integer(r.join.shim)&&w.inRange(r.join.shim,0,1e6))i.joinShim=r.join.shim;else throw w.invalidParameterError("join.shim","integer between 0 and 100000",r.join.shim);if(w.defined(r.join.background)&&(i.joinBackground=this._getBackgroundColourOption(r.join.background)),w.defined(r.join.halign))if(w.string(r.join.halign)&&w.string(this.constructor.align[r.join.halign]))i.joinHalign=this.constructor.align[r.join.halign];else throw w.invalidParameterError("join.halign","valid alignment",r.join.halign);if(w.defined(r.join.valign))if(w.string(r.join.valign)&&w.string(this.constructor.align[r.join.valign]))i.joinValign=this.constructor.align[r.join.valign];else throw w.invalidParameterError("join.valign","valid alignment",r.join.valign)}else throw new Error("Expected input to be an array of images to join")}else if(w.defined(r))throw new Error(`Invalid input options ${r}`);return i}function Wke(n,r,o){Array.isArray(this.options.input.buffer)?w.buffer(n)?(this.options.input.buffer.length===0&&this.on("finish",()=>{this.streamInFinished=!0}),this.options.input.buffer.push(n),o()):o(new Error("Non-Buffer data on Writable Stream")):o(new Error("Unexpected data on Writable Stream"))}function Zke(){this._isStreamInput()&&(this.options.input.buffer=Buffer.concat(this.options.input.buffer))}function Xke(){return Array.isArray(this.options.input.buffer)}function $ke(n){let r=Error();return w.fn(n)?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),dt.metadata(this.options,(o,i)=>{o?n(w.nativeError(o,r)):n(null,i)})}):dt.metadata(this.options,(o,i)=>{o?n(w.nativeError(o,r)):n(null,i)}),this):this._isStreamInput()?new Promise((o,i)=>{let e=()=>{this._flattenBufferIn(),dt.metadata(this.options,(a,A)=>{a?i(w.nativeError(a,r)):o(A)})};this.writableFinished?e():this.once("finish",e)}):new Promise((o,i)=>{dt.metadata(this.options,(e,a)=>{e?i(w.nativeError(e,r)):o(a)})})}function eve(n){let r=Error();return w.fn(n)?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),dt.stats(this.options,(o,i)=>{o?n(w.nativeError(o,r)):n(null,i)})}):dt.stats(this.options,(o,i)=>{o?n(w.nativeError(o,r)):n(null,i)}),this):this._isStreamInput()?new Promise((o,i)=>{this.on("finish",function(){this._flattenBufferIn(),dt.stats(this.options,(e,a)=>{e?i(w.nativeError(e,r)):o(a)})})}):new Promise((o,i)=>{dt.stats(this.options,(e,a)=>{e?i(w.nativeError(e,r)):o(a)})})}var qke,Vke,H5,K5=le(()=>{yn();wd();qke={left:"low",top:"low",low:"low",center:"centre",centre:"centre",right:"high",bottom:"high",high:"high"},Vke=["failOn","limitInputPixels","limitInputChannels","unlimited","animated","autoOrient","density","ignoreIcc","page","pages","sequentialRead","jp2","openSlide","pdf","raw","svg","tiff","openSlideLevel","pdfBackground","tiffSubifd"];H5=n=>{Object.assign(n.prototype,{_inputOptionsFromObject:U5,_createInputDescriptor:zke,_write:Wke,_flattenBufferIn:Zke,_isStreamInput:Xke,metadata:$ke,stats:eve}),n.align=qke}});function vv(n){return n.angle%360!==0||n.rotationAngle!==0}function iS(n){return n.width!==-1||n.height!==-1}function rve(n,r,o){if(iS(this.options)&&this.options.debuglog("ignoring previous resize options"),this.options.widthPost!==-1&&this.options.debuglog("operation order will be: extract, resize, extract"),w.defined(n))if(w.object(n)&&!w.defined(o))o=n;else if(w.integer(n)&&n>0)this.options.width=n;else throw w.invalidParameterError("width","positive integer",n);else this.options.width=-1;if(w.defined(r))if(w.integer(r)&&r>0)this.options.height=r;else throw w.invalidParameterError("height","positive integer",r);else this.options.height=-1;if(w.object(o)){if(w.defined(o.width))if(w.integer(o.width)&&o.width>0)this.options.width=o.width;else throw w.invalidParameterError("width","positive integer",o.width);if(w.defined(o.height))if(w.integer(o.height)&&o.height>0)this.options.height=o.height;else throw w.invalidParameterError("height","positive integer",o.height);if(w.defined(o.fit)){let i=tve[o.fit];if(w.string(i))this.options.canvas=i;else throw w.invalidParameterError("fit","valid fit",o.fit)}if(w.defined(o.position)){let i=w.integer(o.position)?o.position:J5[o.position]||j5[o.position]||x5[o.position];if(w.integer(i)&&(w.inRange(i,0,8)||w.inRange(i,16,17)))this.options.position=i;else throw w.invalidParameterError("position","valid position/gravity/strategy",o.position)}if(this._setBackgroundColourOption("resizeBackground",o.background),w.defined(o.kernel))if(w.string(kv[o.kernel]))this.options.kernel=kv[o.kernel];else throw w.invalidParameterError("kernel","valid kernel name",o.kernel);w.defined(o.withoutEnlargement)&&this._setBooleanOption("withoutEnlargement",o.withoutEnlargement),w.defined(o.withoutReduction)&&this._setBooleanOption("withoutReduction",o.withoutReduction),w.defined(o.fastShrinkOnLoad)&&this._setBooleanOption("fastShrinkOnLoad",o.fastShrinkOnLoad)}return vv(this.options)&&iS(this.options)&&(this.options.rotateBefore=!0),this}function ave(n){if(w.integer(n))if(w.inRange(n,1,1e4))this.options.extendTop=n,this.options.extendBottom=n,this.options.extendLeft=n,this.options.extendRight=n;else throw w.invalidParameterError("extend","integer between 1 and 10000",n);else if(w.object(n)){if(w.defined(n.top))if(w.integer(n.top)&&w.inRange(n.top,0,1e4))this.options.extendTop=n.top;else throw w.invalidParameterError("top","integer between 0 and 10000",n.top);if(w.defined(n.bottom))if(w.integer(n.bottom)&&w.inRange(n.bottom,0,1e4))this.options.extendBottom=n.bottom;else throw w.invalidParameterError("bottom","integer between 0 and 10000",n.bottom);if(w.defined(n.left))if(w.integer(n.left)&&w.inRange(n.left,0,1e4))this.options.extendLeft=n.left;else throw w.invalidParameterError("left","integer between 0 and 10000",n.left);if(w.defined(n.right))if(w.integer(n.right)&&w.inRange(n.right,0,1e4))this.options.extendRight=n.right;else throw w.invalidParameterError("right","integer between 0 and 10000",n.right);if(this._setBackgroundColourOption("extendBackground",n.background),w.defined(n.extendWith))if(w.string(Y5[n.extendWith]))this.options.extendWith=Y5[n.extendWith];else throw w.invalidParameterError("extendWith","one of: background, copy, repeat, mirror",n.extendWith)}else throw w.invalidParameterError("extend","integer or object",n);return this}function ive(n){let r=iS(this.options)||this.options.widthPre!==-1?"Post":"Pre";return this.options[`width${r}`]!==-1&&this.options.debuglog("ignoring previous extract options"),["left","top","width","height"].forEach(function(o){let i=n[o];if(w.integer(i)&&w.inRange(i,0,1e8))this.options[o+(o==="left"||o==="top"?"Offset":"")+r]=i;else throw w.invalidParameterError(o,"integer between 0 and 100000000",i)},this),vv(this.options)&&!iS(this.options)&&(this.options.widthPre===-1||this.options.widthPost===-1)&&(this.options.rotateBefore=!0),this.options.input.autoOrient&&(this.options.orientBefore=!0),this}function ove(n){if(this.options.trimThreshold=10,w.defined(n))if(w.object(n)){if(w.defined(n.background)&&this._setBackgroundColourOption("trimBackground",n.background),w.defined(n.threshold))if(w.number(n.threshold)&&n.threshold>=0)this.options.trimThreshold=n.threshold;else throw w.invalidParameterError("threshold","positive number",n.threshold);if(w.defined(n.lineArt)&&this._setBooleanOption("trimLineArt",n.lineArt),w.defined(n.margin))if(w.integer(n.margin)&&w.inRange(n.margin,0,1e7))this.options.trimMargin=n.margin;else throw w.invalidParameterError("margin","integer between 0 and 10000000",n.margin)}else throw w.invalidParameterError("trim","object",n);return vv(this.options)&&(this.options.rotateBefore=!0),this}var x5,j5,Y5,J5,kv,Ave,tve,q5,V5=le(()=>{yn();x5={center:0,centre:0,north:1,east:2,south:3,west:4,northeast:5,southeast:6,southwest:7,northwest:8},j5={top:1,right:2,bottom:3,left:4,"right top":5,"right bottom":6,"left bottom":7,"left top":8},Y5={background:"background",copy:"copy",repeat:"repeat",mirror:"mirror"},J5={entropy:16,attention:17},kv={nearest:"nearest",linear:"linear",cubic:"cubic",mitchell:"mitchell",lanczos2:"lanczos2",lanczos3:"lanczos3",mks2013:"mks2013",mks2021:"mks2021"},Ave={contain:"contain",cover:"cover",fill:"fill",inside:"inside",outside:"outside"},tve={contain:"embed",cover:"crop",fill:"ignore_aspect",inside:"max",outside:"min"};q5=n=>{Object.assign(n.prototype,{resize:rve,extend:ave,extract:ive,trim:ove}),n.gravity=x5,n.strategy=J5,n.kernel=kv,n.fit=Ave,n.position=j5}});function nve(n){if(!Array.isArray(n))throw w.invalidParameterError("images to composite","array",n);return this.options.composite=n.map(r=>{if(!w.object(r))throw w.invalidParameterError("image to composite","object",r);let o=this._inputOptionsFromObject(r),i={input:this._createInputDescriptor(r.input,o,{allowStream:!1}),blend:"over",tile:!1,left:0,top:0,hasOffset:!1,gravity:0,premultiplied:!1};if(w.defined(r.blend))if(w.string(Pv[r.blend]))i.blend=Pv[r.blend];else throw w.invalidParameterError("blend","valid blend name",r.blend);if(w.defined(r.tile))if(w.bool(r.tile))i.tile=r.tile;else throw w.invalidParameterError("tile","boolean",r.tile);if(w.defined(r.left))if(w.integer(r.left))i.left=r.left;else throw w.invalidParameterError("left","integer",r.left);if(w.defined(r.top))if(w.integer(r.top))i.top=r.top;else throw w.invalidParameterError("top","integer",r.top);if(w.defined(r.top)!==w.defined(r.left))throw new Error("Expected both left and top to be set");if(i.hasOffset=w.integer(r.top)&&w.integer(r.left),w.defined(r.gravity))if(w.integer(r.gravity)&&w.inRange(r.gravity,0,8))i.gravity=r.gravity;else if(w.string(r.gravity)&&w.integer(this.constructor.gravity[r.gravity]))i.gravity=this.constructor.gravity[r.gravity];else throw w.invalidParameterError("gravity","valid gravity",r.gravity);if(w.defined(r.premultiplied))if(w.bool(r.premultiplied))i.premultiplied=r.premultiplied;else throw w.invalidParameterError("premultiplied","boolean",r.premultiplied);return i}),this}var Pv,z5,W5=le(()=>{yn();Pv={clear:"clear",source:"source",over:"over",in:"in",out:"out",atop:"atop",dest:"dest","dest-over":"dest-over","dest-in":"dest-in","dest-out":"dest-out","dest-atop":"dest-atop",xor:"xor",add:"add",saturate:"saturate",multiply:"multiply",screen:"screen",overlay:"overlay",darken:"darken",lighten:"lighten","colour-dodge":"colour-dodge","color-dodge":"colour-dodge","colour-burn":"colour-burn","color-burn":"colour-burn","hard-light":"hard-light","soft-light":"soft-light",difference:"difference",exclusion:"exclusion"};z5=n=>{n.prototype.composite=nve,n.blend=Pv}});function sve(n,r){if(!w.defined(n))return this.autoOrient();if((this.options.angle||this.options.rotationAngle)&&(this.options.debuglog("ignoring previous rotate options"),this.options.angle=0,this.options.rotationAngle=0),w.integer(n)&&!(n%90))this.options.angle=n;else if(w.number(n))this.options.rotationAngle=n,w.object(r)&&r.background&&this._setBackgroundColourOption("rotationBackground",r.background);else throw w.invalidParameterError("angle","numeric",n);return this}function gve(){return this.options.input.autoOrient=!0,this}function cve(n){return this.options.flip=w.bool(n)?n:!0,this}function Ive(n){return this.options.flop=w.bool(n)?n:!0,this}function lve(n,r){let i=Array.isArray(n)&&(n.length===4&&n.every(w.number)||n.length===2&&n.every(e=>Array.isArray(e)&&e.length===2))?n.flat():[];if(i.length===4&&i.every(w.number))this.options.affineMatrix=i;else throw w.invalidParameterError("matrix","1x4 or 2x2 array",n);if(w.defined(r))if(w.object(r)){if(this._setBackgroundColourOption("affineBackground",r.background),w.defined(r.idx))if(w.number(r.idx))this.options.affineIdx=r.idx;else throw w.invalidParameterError("options.idx","number",r.idx);if(w.defined(r.idy))if(w.number(r.idy))this.options.affineIdy=r.idy;else throw w.invalidParameterError("options.idy","number",r.idy);if(w.defined(r.odx))if(w.number(r.odx))this.options.affineOdx=r.odx;else throw w.invalidParameterError("options.odx","number",r.odx);if(w.defined(r.ody))if(w.number(r.ody))this.options.affineOdy=r.ody;else throw w.invalidParameterError("options.ody","number",r.ody);if(w.defined(r.interpolator))if(w.inArray(r.interpolator,Object.values(this.constructor.interpolators)))this.options.affineInterpolator=r.interpolator;else throw w.invalidParameterError("options.interpolator","valid interpolator name",r.interpolator)}else throw w.invalidParameterError("options","object",r);return this}function pve(n){if(w.plainObject(n)){if(w.number(n.sigma)&&w.inRange(n.sigma,1e-6,10))this.options.sharpenSigma=n.sigma;else throw w.invalidParameterError("options.sigma","number between 0.000001 and 10",n.sigma);if(w.defined(n.m1))if(w.number(n.m1)&&w.inRange(n.m1,0,1e6))this.options.sharpenM1=n.m1;else throw w.invalidParameterError("options.m1","number between 0 and 1000000",n.m1);if(w.defined(n.m2))if(w.number(n.m2)&&w.inRange(n.m2,0,1e6))this.options.sharpenM2=n.m2;else throw w.invalidParameterError("options.m2","number between 0 and 1000000",n.m2);if(w.defined(n.x1))if(w.number(n.x1)&&w.inRange(n.x1,0,1e6))this.options.sharpenX1=n.x1;else throw w.invalidParameterError("options.x1","number between 0 and 1000000",n.x1);if(w.defined(n.y2))if(w.number(n.y2)&&w.inRange(n.y2,0,1e6))this.options.sharpenY2=n.y2;else throw w.invalidParameterError("options.y2","number between 0 and 1000000",n.y2);if(w.defined(n.y3))if(w.number(n.y3)&&w.inRange(n.y3,0,1e6))this.options.sharpenY3=n.y3;else throw w.invalidParameterError("options.y3","number between 0 and 1000000",n.y3)}else this.options.sharpenSigma=-1;return this}function Eve(n){if(!w.defined(n))this.options.medianSize=3;else if(w.integer(n)&&w.inRange(n,1,1e3))this.options.medianSize=n;else throw w.invalidParameterError("size","integer between 1 and 1000",n);return this}function Cve(n){let r;if(w.number(n))r=n;else if(w.plainObject(n)){if(!w.number(n.sigma))throw w.invalidParameterError("options.sigma","number between 0.3 and 1000",r);if(r=n.sigma,"precision"in n)if(w.string(Z5[n.precision]))this.options.precision=Z5[n.precision];else throw w.invalidParameterError("precision","one of: integer, float, approximate",n.precision);if("minAmplitude"in n)if(w.number(n.minAmplitude)&&w.inRange(n.minAmplitude,.001,1))this.options.minAmpl=n.minAmplitude;else throw w.invalidParameterError("minAmplitude","number between 0.001 and 1",n.minAmplitude)}if(!w.defined(n))this.options.blurSigma=-1;else if(w.bool(n))this.options.blurSigma=n?-1:0;else if(w.number(r)&&w.inRange(r,.3,1e3))this.options.blurSigma=r;else throw w.invalidParameterError("sigma","number between 0.3 and 1000",r);return this}function hve(n){if(!w.defined(n))this.options.dilateWidth=1;else if(w.integer(n)&&w.inRange(n,1,65536))this.options.dilateWidth=n;else throw w.invalidParameterError("width","integer between 1 and 65536",n);return this}function dve(n){if(!w.defined(n))this.options.erodeWidth=1;else if(w.integer(n)&&w.inRange(n,1,65536))this.options.erodeWidth=n;else throw w.invalidParameterError("width","integer between 1 and 65536",n);return this}function uve(n){return this.options.flatten=w.bool(n)?n:!0,w.object(n)&&this._setBackgroundColourOption("flattenBackground",n.background),this}function Bve(){return this.options.unflatten=!0,this}function fve(n,r){if(!w.defined(n))this.options.gamma=2.2;else if(w.number(n)&&w.inRange(n,1,3))this.options.gamma=n;else throw w.invalidParameterError("gamma","number between 1.0 and 3.0",n);if(!w.defined(r))this.options.gammaOut=this.options.gamma;else if(w.number(r)&&w.inRange(r,1,3))this.options.gammaOut=r;else throw w.invalidParameterError("gammaOut","number between 1.0 and 3.0",r);return this}function Qve(n){if(this.options.negate=w.bool(n)?n:!0,w.plainObject(n)&&"alpha"in n)if(w.bool(n.alpha))this.options.negateAlpha=n.alpha;else throw w.invalidParameterError("alpha","should be boolean value",n.alpha);return this}function yve(n){if(w.plainObject(n)){if(w.defined(n.lower))if(w.number(n.lower)&&w.inRange(n.lower,0,99))this.options.normaliseLower=n.lower;else throw w.invalidParameterError("lower","number between 0 and 99",n.lower);if(w.defined(n.upper))if(w.number(n.upper)&&w.inRange(n.upper,1,100))this.options.normaliseUpper=n.upper;else throw w.invalidParameterError("upper","number between 1 and 100",n.upper)}if(this.options.normaliseLower>=this.options.normaliseUpper)throw w.invalidParameterError("range","lower to be less than upper",`${this.options.normaliseLower} >= ${this.options.normaliseUpper}`);return this.options.normalise=!0,this}function mve(n){return this.normalise(n)}function Sve(n){if(w.plainObject(n)){if(w.integer(n.width)&&w.inRange(n.width,1,65536))this.options.claheWidth=n.width;else throw w.invalidParameterError("width","integer between 1 and 65536",n.width);if(w.integer(n.height)&&w.inRange(n.height,1,65536))this.options.claheHeight=n.height;else throw w.invalidParameterError("height","integer between 1 and 65536",n.height);if(w.defined(n.maxSlope))if(w.integer(n.maxSlope)&&w.inRange(n.maxSlope,0,100))this.options.claheMaxSlope=n.maxSlope;else throw w.invalidParameterError("maxSlope","integer between 0 and 100",n.maxSlope)}else throw w.invalidParameterError("options","plain object",n);return this}function Dve(n){if(!w.object(n)||!Array.isArray(n.kernel)||!w.integer(n.width)||!w.integer(n.height)||!w.inRange(n.width,3,1001)||!w.inRange(n.height,3,1001)||n.height*n.width!==n.kernel.length||!n.kernel.every(w.number))throw new Error("Invalid convolution kernel");return w.integer(n.scale)||(n.scale=n.kernel.reduce((r,o)=>r+o,0)),n.scale<1&&(n.scale=1),w.integer(n.offset)||(n.offset=0),this.options.convKernel=n,this}function wve(n,r){if(!w.defined(n))this.options.threshold=128;else if(w.bool(n))this.options.threshold=n?128:0;else if(w.integer(n)&&w.inRange(n,0,255))this.options.threshold=n;else throw w.invalidParameterError("threshold","integer between 0 and 255",n);return!w.object(r)||r.greyscale===!0||r.grayscale===!0?this.options.thresholdGrayscale=!0:this.options.thresholdGrayscale=!1,this}function Ove(n,r,o){if(this.options.boolean=this._createInputDescriptor(n,o),w.string(r)&&w.inArray(r,["and","or","eor"]))this.options.booleanOp=r;else throw w.invalidParameterError("operator","one of: and, or, eor",r);return this}function bve(n,r){if(!w.defined(n)&&w.number(r)?n=1:w.number(n)&&!w.defined(r)&&(r=0),!w.defined(n))this.options.linearA=[];else if(w.number(n))this.options.linearA=[n];else if(Array.isArray(n)&&n.length&&n.every(w.number))this.options.linearA=n;else throw w.invalidParameterError("a","number or array of numbers",n);if(!w.defined(r))this.options.linearB=[];else if(w.number(r))this.options.linearB=[r];else if(Array.isArray(r)&&r.length&&r.every(w.number))this.options.linearB=r;else throw w.invalidParameterError("b","number or array of numbers",r);if(this.options.linearA.length!==this.options.linearB.length)throw new Error("Expected a and b to be arrays of the same length");return this}function Mve(n){if(!Array.isArray(n))throw w.invalidParameterError("inputMatrix","array",n);let r=n.length;if(r!==3&&r!==4)throw w.invalidParameterError("inputMatrix","3x3 or 4x4 array",r);if(!n.every(i=>Array.isArray(i)&&i.length===r))throw w.invalidParameterError("inputMatrix",`array of ${r} arrays of length ${r}`,n);let o=n.flat();if(!o.every(w.number))throw w.invalidParameterError("inputMatrix","array of numbers",o);return this.options.recombMatrix=o,this}function _ve(n){if(!w.plainObject(n))throw w.invalidParameterError("options","plain object",n);if("brightness"in n)if(w.number(n.brightness)&&n.brightness>=0)this.options.brightness=n.brightness;else throw w.invalidParameterError("brightness","number above zero",n.brightness);if("saturation"in n)if(w.number(n.saturation)&&n.saturation>=0)this.options.saturation=n.saturation;else throw w.invalidParameterError("saturation","number above zero",n.saturation);if("hue"in n)if(w.integer(n.hue))this.options.hue=n.hue%360;else throw w.invalidParameterError("hue","number",n.hue);if("lightness"in n)if(w.number(n.lightness))this.options.lightness=n.lightness;else throw w.invalidParameterError("lightness","number",n.lightness);return this}var Z5,X5,$5=le(()=>{yn();Z5={integer:"integer",float:"float",approximate:"approximate"};X5=n=>{Object.assign(n.prototype,{autoOrient:gve,rotate:sve,flip:cve,flop:Ive,affine:lve,sharpen:pve,erode:dve,dilate:hve,median:Eve,blur:Cve,flatten:uve,unflatten:Bve,gamma:fve,negate:Qve,normalise:yve,normalize:mve,clahe:Sve,convolve:Dve,threshold:wve,boolean:Ove,linear:bve,recomb:Mve,modulate:_ve})}});var iZ=W((UiA,aZ)=>{var Hv=Object.defineProperty,Nve=Object.getOwnPropertyDescriptor,Tve=Object.getOwnPropertyNames,Rve=Object.prototype.hasOwnProperty,kve=(n,r)=>{for(var o in r)Hv(n,o,{get:r[o],enumerable:!0})},vve=(n,r,o,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let e of Tve(r))!Rve.call(n,e)&&e!==o&&Hv(n,e,{get:()=>r[e],enumerable:!(i=Nve(r,e))||i.enumerable});return n},Pve=n=>vve(Hv({},"__esModule",{value:!0}),n),eZ={};kve(eZ,{default:()=>Wve});aZ.exports=Pve(eZ);var Gv={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};for(let n in Gv)Object.freeze(Gv[n]);var bn=Object.freeze(Gv),AZ=Object.create(null);for(let n in bn)Object.hasOwn(bn,n)&&(AZ[bn[n]]=n);var oi={to:{},get:{}};oi.get=function(n){let r=n.slice(0,3).toLowerCase(),o,i;switch(r){case"hsl":{o=oi.get.hsl(n),i="hsl";break}case"hwb":{o=oi.get.hwb(n),i="hwb";break}default:{o=oi.get.rgb(n),i="rgb";break}}return o?{model:i,value:o}:null};oi.get.rgb=function(n){if(!n)return null;let r=/^#([a-f\d]{3,4})$/i,o=/^#([a-f\d]{6})([a-f\d]{2})?$/i,i=/^rgba?\(\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)\s*(?:[\s,|/]\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(%?)\s*)?\)$/i,e=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/i,a=/^(\w+)$/,A=[0,0,0,1],t,s,g;if(t=n.match(o)){for(g=t[2],t=t[1],s=0;s<3;s++){let c=s*2;A[s]=Number.parseInt(t.slice(c,c+2),16)}g&&(A[3]=Number.parseInt(g,16)/255)}else if(t=n.match(r)){for(t=t[1],g=t[3],s=0;s<3;s++)A[s]=Number.parseInt(t[s]+t[s],16);g&&(A[3]=Number.parseInt(g+g,16)/255)}else if(t=n.match(i)){for(s=0;s<3;s++)A[s]=Number.parseFloat(t[s+1]);t[4]&&(A[3]=t[5]?Number.parseFloat(t[4])*.01:Number.parseFloat(t[4]))}else if(t=n.match(e)){for(s=0;s<3;s++)A[s]=Math.round(Number.parseFloat(t[s+1])*2.55);t[4]&&(A[3]=t[5]?Number.parseFloat(t[4])*.01:Number.parseFloat(t[4]))}else return(t=n.toLowerCase().match(a))?t[1]==="transparent"?[0,0,0,0]:Object.hasOwn(bn,t[1])?(A=bn[t[1]].slice(),A[3]=1,A):null:null;for(s=0;s<3;s++)A[s]=kg(A[s],0,255);return A[3]=kg(A[3],0,1),A};oi.get.hsl=function(n){if(!n)return null;let r=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i,o=n.match(r);if(o){let i=Number.parseFloat(o[4]),e=(Number.parseFloat(o[1])%360+360)%360,a=kg(Number.parseFloat(o[2]),0,100),A=kg(Number.parseFloat(o[3]),0,100),t=kg(Number.isNaN(i)?1:i,0,1);return[e,a,A,t]}return null};oi.get.hwb=function(n){if(!n)return null;let r=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i,o=n.match(r);if(o){let i=Number.parseFloat(o[4]),e=(Number.parseFloat(o[1])%360+360)%360,a=kg(Number.parseFloat(o[2]),0,100),A=kg(Number.parseFloat(o[3]),0,100),t=kg(Number.isNaN(i)?1:i,0,1);return[e,a,A,t]}return null};oi.to.hex=function(...n){return"#"+oS(n[0])+oS(n[1])+oS(n[2])+(n[3]<1?oS(Math.round(n[3]*255)):"")};oi.to.rgb=function(...n){return n.length<4||n[3]===1?"rgb("+Math.round(n[0])+", "+Math.round(n[1])+", "+Math.round(n[2])+")":"rgba("+Math.round(n[0])+", "+Math.round(n[1])+", "+Math.round(n[2])+", "+n[3]+")"};oi.to.rgb.percent=function(...n){let r=Math.round(n[0]/255*100),o=Math.round(n[1]/255*100),i=Math.round(n[2]/255*100);return n.length<4||n[3]===1?"rgb("+r+"%, "+o+"%, "+i+"%)":"rgba("+r+"%, "+o+"%, "+i+"%, "+n[3]+")"};oi.to.hsl=function(...n){return n.length<4||n[3]===1?"hsl("+n[0]+", "+n[1]+"%, "+n[2]+"%)":"hsla("+n[0]+", "+n[1]+"%, "+n[2]+"%, "+n[3]+")"};oi.to.hwb=function(...n){let r="";return n.length>=4&&n[3]!==1&&(r=", "+n[3]),"hwb("+n[0]+", "+n[1]+"%, "+n[2]+"%"+r+")"};oi.to.keyword=function(...n){return AZ[n.slice(0,3)]};function kg(n,r,o){return Math.min(Math.max(r,n),o)}function oS(n){let r=Math.round(n).toString(16).toUpperCase();return r.length<2?"0"+r:r}var vp=oi,tZ={};for(let n of Object.keys(bn))tZ[bn[n]]=n;var iA={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},sI=iA,Ms=(6/29)**3;function Gp(n){let r=n>.0031308?1.055*n**.4166666666666667-.055:n*12.92;return Math.min(Math.max(0,r),1)}function Fp(n){return n>.04045?((n+.055)/1.055)**2.4:n/12.92}for(let n of Object.keys(iA)){if(!("channels"in iA[n]))throw new Error("missing channels property: "+n);if(!("labels"in iA[n]))throw new Error("missing channel labels property: "+n);if(iA[n].labels.length!==iA[n].channels)throw new Error("channel and label counts mismatch: "+n);let{channels:r,labels:o}=iA[n];delete iA[n].channels,delete iA[n].labels,Object.defineProperty(iA[n],"channels",{value:r}),Object.defineProperty(iA[n],"labels",{value:o})}iA.rgb.hsl=function(n){let r=n[0]/255,o=n[1]/255,i=n[2]/255,e=Math.min(r,o,i),a=Math.max(r,o,i),A=a-e,t,s;switch(a){case e:{t=0;break}case r:{t=(o-i)/A;break}case o:{t=2+(i-r)/A;break}case i:{t=4+(r-o)/A;break}}t=Math.min(t*60,360),t<0&&(t+=360);let g=(e+a)/2;return a===e?s=0:g<=.5?s=A/(a+e):s=A/(2-a-e),[t,s*100,g*100]};iA.rgb.hsv=function(n){let r,o,i,e,a,A=n[0]/255,t=n[1]/255,s=n[2]/255,g=Math.max(A,t,s),c=g-Math.min(A,t,s),I=function(E){return(g-E)/6/c+1/2};if(c===0)e=0,a=0;else{switch(a=c/g,r=I(A),o=I(t),i=I(s),g){case A:{e=i-o;break}case t:{e=1/3+r-i;break}case s:{e=2/3+o-r;break}}e<0?e+=1:e>1&&(e-=1)}return[e*360,a*100,g*100]};iA.rgb.hwb=function(n){let r=n[0],o=n[1],i=n[2],e=iA.rgb.hsl(n)[0],a=1/255*Math.min(r,Math.min(o,i));return i=1-1/255*Math.max(r,Math.max(o,i)),[e,a*100,i*100]};iA.rgb.oklab=function(n){let r=Fp(n[0]/255),o=Fp(n[1]/255),i=Fp(n[2]/255),e=Math.cbrt(.4122214708*r+.5363325363*o+.0514459929*i),a=Math.cbrt(.2119034982*r+.6806995451*o+.1073969566*i),A=Math.cbrt(.0883024619*r+.2817188376*o+.6299787005*i),t=.2104542553*e+.793617785*a-.0040720468*A,s=1.9779984951*e-2.428592205*a+.4505937099*A,g=.0259040371*e+.7827717662*a-.808675766*A;return[t*100,s*100,g*100]};iA.rgb.cmyk=function(n){let r=n[0]/255,o=n[1]/255,i=n[2]/255,e=Math.min(1-r,1-o,1-i),a=(1-r-e)/(1-e)||0,A=(1-o-e)/(1-e)||0,t=(1-i-e)/(1-e)||0;return[a*100,A*100,t*100,e*100]};function Gve(n,r){return(n[0]-r[0])**2+(n[1]-r[1])**2+(n[2]-r[2])**2}iA.rgb.keyword=function(n){let r=tZ[n];if(r)return r;let o=Number.POSITIVE_INFINITY,i;for(let e of Object.keys(bn)){let a=bn[e],A=Gve(n,a);AMs?o**(1/3):7.787*o+16/116,i=i>Ms?i**(1/3):7.787*i+16/116,e=e>Ms?e**(1/3):7.787*e+16/116;let a=116*i-16,A=500*(o-i),t=200*(i-e);return[a,A,t]};iA.hsl.rgb=function(n){let r=n[0]/360,o=n[1]/100,i=n[2]/100,e,a;if(o===0)return a=i*255,[a,a,a];let A=i<.5?i*(1+o):i+o-i*o,t=2*i-A,s=[0,0,0];for(let g=0;g<3;g++)e=r+1/3*-(g-1),e<0&&e++,e>1&&e--,6*e<1?a=t+(A-t)*6*e:2*e<1?a=A:3*e<2?a=t+(A-t)*(2/3-e)*6:a=t,s[g]=a*255;return s};iA.hsl.hsv=function(n){let r=n[0],o=n[1]/100,i=n[2]/100,e=o,a=Math.max(i,.01);i*=2,o*=i<=1?i:2-i,e*=a<=1?a:2-a;let A=(i+o)/2,t=i===0?2*e/(a+e):2*o/(i+o);return[r,t*100,A*100]};iA.hsv.rgb=function(n){let r=n[0]/60,o=n[1]/100,i=n[2]/100,e=Math.floor(r)%6,a=r-Math.floor(r),A=255*i*(1-o),t=255*i*(1-o*a),s=255*i*(1-o*(1-a));switch(i*=255,e){case 0:return[i,s,A];case 1:return[t,i,A];case 2:return[A,i,s];case 3:return[A,t,i];case 4:return[s,A,i];case 5:return[i,A,t]}};iA.hsv.hsl=function(n){let r=n[0],o=n[1]/100,i=n[2]/100,e=Math.max(i,.01),a,A;A=(2-o)*i;let t=(2-o)*e;return a=o*e,a/=t<=1?t:2-t,a=a||0,A/=2,[r,a*100,A*100]};iA.hwb.rgb=function(n){let r=n[0]/360,o=n[1]/100,i=n[2]/100,e=o+i,a;e>1&&(o/=e,i/=e);let A=Math.floor(6*r),t=1-i;a=6*r-A,(A&1)!==0&&(a=1-a);let s=o+a*(t-o),g,c,I;switch(A){default:case 6:case 0:{g=t,c=s,I=o;break}case 1:{g=s,c=t,I=o;break}case 2:{g=o,c=t,I=s;break}case 3:{g=o,c=s,I=t;break}case 4:{g=s,c=o,I=t;break}case 5:{g=t,c=o,I=s;break}}return[g*255,c*255,I*255]};iA.cmyk.rgb=function(n){let r=n[0]/100,o=n[1]/100,i=n[2]/100,e=n[3]/100,a=1-Math.min(1,r*(1-e)+e),A=1-Math.min(1,o*(1-e)+e),t=1-Math.min(1,i*(1-e)+e);return[a*255,A*255,t*255]};iA.xyz.rgb=function(n){let r=n[0]/100,o=n[1]/100,i=n[2]/100,e,a,A;return e=r*3.2404542+o*-1.5371385+i*-.4985314,a=r*-.969266+o*1.8760108+i*.041556,A=r*.0556434+o*-.2040259+i*1.0572252,e=Gp(e),a=Gp(a),A=Gp(A),[e*255,a*255,A*255]};iA.xyz.lab=function(n){let r=n[0],o=n[1],i=n[2];r/=95.047,o/=100,i/=108.883,r=r>Ms?r**(1/3):7.787*r+16/116,o=o>Ms?o**(1/3):7.787*o+16/116,i=i>Ms?i**(1/3):7.787*i+16/116;let e=116*o-16,a=500*(r-o),A=200*(o-i);return[e,a,A]};iA.xyz.oklab=function(n){let r=n[0]/100,o=n[1]/100,i=n[2]/100,e=Math.cbrt(.8189330101*r+.3618667424*o-.1288597137*i),a=Math.cbrt(.0329845436*r+.9293118715*o+.0361456387*i),A=Math.cbrt(.0482003018*r+.2643662691*o+.633851707*i),t=.2104542553*e+.793617785*a-.0040720468*A,s=1.9779984951*e-2.428592205*a+.4505937099*A,g=.0259040371*e+.7827717662*a-.808675766*A;return[t*100,s*100,g*100]};iA.oklab.oklch=function(n){return iA.lab.lch(n)};iA.oklab.xyz=function(n){let r=n[0]/100,o=n[1]/100,i=n[2]/100,e=(.999999998*r+.396337792*o+.215803758*i)**3,a=(1.000000008*r-.105561342*o-.063854175*i)**3,A=(1.000000055*r-.089484182*o-1.291485538*i)**3,t=1.227013851*e-.55779998*a+.281256149*A,s=-.040580178*e+1.11225687*a-.071676679*A,g=-.076381285*e-.421481978*a+1.58616322*A;return[t*100,s*100,g*100]};iA.oklab.rgb=function(n){let r=n[0]/100,o=n[1]/100,i=n[2]/100,e=(r+.3963377774*o+.2158037573*i)**3,a=(r-.1055613458*o-.0638541728*i)**3,A=(r-.0894841775*o-1.291485548*i)**3,t=Gp(4.0767416621*e-3.3077115913*a+.2309699292*A),s=Gp(-1.2684380046*e+2.6097574011*a-.3413193965*A),g=Gp(-.0041960863*e-.7034186147*a+1.707614701*A);return[t*255,s*255,g*255]};iA.oklch.oklab=function(n){return iA.lch.lab(n)};iA.lab.xyz=function(n){let r=n[0],o=n[1],i=n[2],e,a,A;a=(r+16)/116,e=o/500+a,A=a-i/200;let t=a**3,s=e**3,g=A**3;return a=t>Ms?t:(a-16/116)/7.787,e=s>Ms?s:(e-16/116)/7.787,A=g>Ms?g:(A-16/116)/7.787,e*=95.047,a*=100,A*=108.883,[e,a,A]};iA.lab.lch=function(n){let r=n[0],o=n[1],i=n[2],e;e=Math.atan2(i,o)*360/2/Math.PI,e<0&&(e+=360);let A=Math.sqrt(o*o+i*i);return[r,A,e]};iA.lch.lab=function(n){let r=n[0],o=n[1],e=n[2]/360*2*Math.PI,a=o*Math.cos(e),A=o*Math.sin(e);return[r,a,A]};iA.rgb.ansi16=function(n,r=null){let[o,i,e]=n,a=r===null?iA.rgb.hsv(n)[2]:r;if(a=Math.round(a/50),a===0)return 30;let A=30+(Math.round(e/255)<<2|Math.round(i/255)<<1|Math.round(o/255));return a===2&&(A+=60),A};iA.hsv.ansi16=function(n){return iA.rgb.ansi16(iA.hsv.rgb(n),n[2])};iA.rgb.ansi256=function(n){let r=n[0],o=n[1],i=n[2];return r>>4===o>>4&&o>>4===i>>4?r<8?16:r>248?231:Math.round((r-8)/247*24)+232:16+36*Math.round(r/255*5)+6*Math.round(o/255*5)+Math.round(i/255*5)};iA.ansi16.rgb=function(n){n=n[0];let r=n%10;if(r===0||r===7)return n>50&&(r+=3.5),r=r/10.5*255,[r,r,r];let o=(Math.trunc(n>50)+1)*.5,i=(r&1)*o*255,e=(r>>1&1)*o*255,a=(r>>2&1)*o*255;return[i,e,a]};iA.ansi256.rgb=function(n){if(n=n[0],n>=232){let a=(n-232)*10+8;return[a,a,a]}n-=16;let r,o=Math.floor(n/36)/5*255,i=Math.floor((r=n%36)/6)/5*255,e=r%6/5*255;return[o,i,e]};iA.rgb.hex=function(n){let o=(((Math.round(n[0])&255)<<16)+((Math.round(n[1])&255)<<8)+(Math.round(n[2])&255)).toString(16).toUpperCase();return"000000".slice(o.length)+o};iA.hex.rgb=function(n){let r=n.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!r)return[0,0,0];let o=r[0];r[0].length===3&&(o=[...o].map(t=>t+t).join(""));let i=Number.parseInt(o,16),e=i>>16&255,a=i>>8&255,A=i&255;return[e,a,A]};iA.rgb.hcg=function(n){let r=n[0]/255,o=n[1]/255,i=n[2]/255,e=Math.max(Math.max(r,o),i),a=Math.min(Math.min(r,o),i),A=e-a,t,s=A<1?a/(1-A):0;return A<=0?t=0:e===r?t=(o-i)/A%6:e===o?t=2+(i-r)/A:t=4+(r-o)/A,t/=6,t%=1,[t*360,A*100,s*100]};iA.hsl.hcg=function(n){let r=n[1]/100,o=n[2]/100,i=o<.5?2*r*o:2*r*(1-o),e=0;return i<1&&(e=(o-.5*i)/(1-i)),[n[0],i*100,e*100]};iA.hsv.hcg=function(n){let r=n[1]/100,o=n[2]/100,i=r*o,e=0;return i<1&&(e=(o-i)/(1-i)),[n[0],i*100,e*100]};iA.hcg.rgb=function(n){let r=n[0]/360,o=n[1]/100,i=n[2]/100;if(o===0)return[i*255,i*255,i*255];let e=[0,0,0],a=r%1*6,A=a%1,t=1-A,s=0;switch(Math.floor(a)){case 0:{e[0]=1,e[1]=A,e[2]=0;break}case 1:{e[0]=t,e[1]=1,e[2]=0;break}case 2:{e[0]=0,e[1]=1,e[2]=A;break}case 3:{e[0]=0,e[1]=t,e[2]=1;break}case 4:{e[0]=A,e[1]=0,e[2]=1;break}default:e[0]=1,e[1]=0,e[2]=t}return s=(1-o)*i,[(o*e[0]+s)*255,(o*e[1]+s)*255,(o*e[2]+s)*255]};iA.hcg.hsv=function(n){let r=n[1]/100,o=n[2]/100,i=r+o*(1-r),e=0;return i>0&&(e=r/i),[n[0],e*100,i*100]};iA.hcg.hsl=function(n){let r=n[1]/100,i=n[2]/100*(1-r)+.5*r,e=0;return i>0&&i<.5?e=r/(2*i):i>=.5&&i<1&&(e=r/(2*(1-i))),[n[0],e*100,i*100]};iA.hcg.hwb=function(n){let r=n[1]/100,o=n[2]/100,i=r+o*(1-r);return[n[0],(i-r)*100,(1-i)*100]};iA.hwb.hcg=function(n){let r=n[1]/100,i=1-n[2]/100,e=i-r,a=0;return e<1&&(a=(i-e)/(1-e)),[n[0],e*100,a*100]};iA.apple.rgb=function(n){return[n[0]/65535*255,n[1]/65535*255,n[2]/65535*255]};iA.rgb.apple=function(n){return[n[0]/255*65535,n[1]/255*65535,n[2]/255*65535]};iA.gray.rgb=function(n){return[n[0]/100*255,n[0]/100*255,n[0]/100*255]};iA.gray.hsl=function(n){return[0,0,n[0]]};iA.gray.hsv=iA.gray.hsl;iA.gray.hwb=function(n){return[0,100,n[0]]};iA.gray.cmyk=function(n){return[0,0,0,n[0]]};iA.gray.lab=function(n){return[n[0],0,0]};iA.gray.hex=function(n){let r=Math.round(n[0]/100*255)&255,i=((r<<16)+(r<<8)+r).toString(16).toUpperCase();return"000000".slice(i.length)+i};iA.rgb.gray=function(n){return[(n[0]+n[1]+n[2])/3/255*100]};function Fve(){let n={},r=Object.keys(sI);for(let{length:o}=r,i=0;i0;){let i=o.pop(),e=Object.keys(sI[i]);for(let{length:a}=e,A=0;A1&&(o=i),n(o))};return"conversion"in n&&(r.conversion=n.conversion),r}function Jve(n){let r=function(...o){let i=o[0];if(i==null)return i;i.length>1&&(o=i);let e=n(o);if(typeof e=="object")for(let{length:a}=e,A=0;A0){this.model=r||"rgb",i=bi[this.model].channels;let e=Array.prototype.slice.call(n,0,i);this.color=Uv(e,i),this.valpha=typeof n[i]=="number"?n[i]:1}else if(typeof n=="number")this.model="rgb",this.color=[n>>16&255,n>>8&255,n&255],this.valpha=1;else{this.valpha=1;let e=Object.keys(n);"alpha"in n&&(e.splice(e.indexOf("alpha"),1),this.valpha=typeof n.alpha=="number"?n.alpha:0);let a=e.sort().join("");if(!(a in Fv))throw new Error("Unable to parse color from object: "+JSON.stringify(n));this.model=Fv[a];let{labels:A}=bi[this.model],t=[];for(o=0;o(n%360+360)%360),saturationl:gr("hsl",1,Rr(100)),lightness:gr("hsl",2,Rr(100)),saturationv:gr("hsv",1,Rr(100)),value:gr("hsv",2,Rr(100)),chroma:gr("hcg",1,Rr(100)),gray:gr("hcg",2,Rr(100)),white:gr("hwb",1,Rr(100)),wblack:gr("hwb",2,Rr(100)),cyan:gr("cmyk",0,Rr(100)),magenta:gr("cmyk",1,Rr(100)),yellow:gr("cmyk",2,Rr(100)),black:gr("cmyk",3,Rr(100)),x:gr("xyz",0,Rr(95.047)),y:gr("xyz",1,Rr(100)),z:gr("xyz",2,Rr(108.833)),l:gr("lab",0,Rr(100)),a:gr("lab",1),b:gr("lab",2),keyword(n){return n!==void 0?new Jr(n):bi[this.model].keyword(this.color)},hex(n){return n!==void 0?new Jr(n):vp.to.hex(...this.rgb().round().color)},hexa(n){if(n!==void 0)return new Jr(n);let r=this.rgb().round().color,o=Math.round(this.valpha*255).toString(16).toUpperCase();return o.length===1&&(o="0"+o),vp.to.hex(...r)+o},rgbNumber(){let n=this.rgb().color;return(n[0]&255)<<16|(n[1]&255)<<8|n[2]&255},luminosity(){let n=this.rgb().color,r=[];for(let[o,i]of n.entries()){let e=i/255;r[o]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return .2126*r[0]+.7152*r[1]+.0722*r[2]},contrast(n){let r=this.luminosity(),o=n.luminosity();return r>o?(r+.05)/(o+.05):(o+.05)/(r+.05)},level(n){let r=this.contrast(n);return r>=7?"AAA":r>=4.5?"AA":""},isDark(){let n=this.rgb().color;return(n[0]*2126+n[1]*7152+n[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let n=this.rgb();for(let r=0;r<3;r++)n.color[r]=255-n.color[r];return n},lighten(n){let r=this.hsl();return r.color[2]+=r.color[2]*n,r},darken(n){let r=this.hsl();return r.color[2]-=r.color[2]*n,r},saturate(n){let r=this.hsl();return r.color[1]+=r.color[1]*n,r},desaturate(n){let r=this.hsl();return r.color[1]-=r.color[1]*n,r},whiten(n){let r=this.hwb();return r.color[1]+=r.color[1]*n,r},blacken(n){let r=this.hwb();return r.color[2]+=r.color[2]*n,r},grayscale(){let n=this.rgb().color,r=n[0]*.3+n[1]*.59+n[2]*.11;return Jr.rgb(r,r,r)},fade(n){return this.alpha(this.valpha-this.valpha*n)},opaquer(n){return this.alpha(this.valpha+this.valpha*n)},rotate(n){let r=this.hsl(),o=r.color[0];return o=(o+n)%360,o=o<0?360+o:o,r.color[0]=o,r},mix(n,r){if(!n||!n.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof n);let o=n.rgb(),i=this.rgb(),e=r===void 0?.5:r,a=2*e-1,A=o.alpha()-i.alpha(),t=((a*A===-1?a:(a+A)/(1+a*A))+1)/2,s=1-t;return Jr.rgb(t*o.red()+s*i.red(),t*o.green()+s*i.green(),t*o.blue()+s*i.blue(),o.alpha()*e+i.alpha()*(1-e))}};for(let n of Object.keys(bi)){if(rZ.includes(n))continue;let{channels:r}=bi[n];Jr.prototype[n]=function(...o){return this.model===n?new Jr(this):o.length>0?new Jr(o,n):new Jr([...zve(bi[this.model][n].raw(this.color)),this.valpha],n)},Jr[n]=function(...o){let i=o[0];return typeof i=="number"&&(i=Uv(o,r)),new Jr(i,n)}}function qve(n,r){return Number(n.toFixed(r))}function Vve(n){return function(r){return qve(r,n)}}function gr(n,r,o){n=Array.isArray(n)?n:[n];for(let i of n)(Lv[i]||=[])[r]=o;return n=n[0],function(i){let e;return i!==void 0?(o&&(i=o(i)),e=this[n](),e.color[r]=i,e):(e=this[n]().color[r],o&&(e=o(e)),e)}}function Rr(n){return function(r){return Math.max(0,Math.min(n,r))}}function zve(n){return Array.isArray(n)?n:[n]}function Uv(n,r){for(let o=0;o{oZ.exports=iZ().default});function Zve(n){return this._setBackgroundColourOption("tint",n),this}function Xve(n){return this.options.greyscale=w.bool(n)?n:!0,this}function $ve(n){return this.greyscale(n)}function ePe(n){if(!w.string(n))throw w.invalidParameterError("colourspace","string",n);return this.options.colourspacePipeline=n,this}function APe(n){return this.pipelineColourspace(n)}function tPe(n){if(!w.string(n))throw w.invalidParameterError("colourspace","string",n);return this.options.colourspace=n,this}function rPe(n){return this.toColourspace(n)}function cZ(n){if(w.object(n)||w.string(n)&&n.length>=3&&n.length<=200){let r=(0,gZ.default)(n),o=r.red(),i=r.green(),e=r.blue(),a=Math.round(r.alpha()*255);for(let[A,t]of[["red",o],["green",i],["blue",e],["alpha",a]])if(!w.number(t))throw w.invalidParameterError(`background.${A}`,"number",t);return[o,i,e,a]}else throw w.invalidParameterError("background","object or string",n)}function aPe(n,r){w.defined(r)&&(this.options[n]=cZ(r))}var gZ,sZ,IZ,lZ=le(()=>{gZ=Je(nZ(),1);yn();sZ={multiband:"multiband","b-w":"b-w",bw:"b-w",cmyk:"cmyk",srgb:"srgb"};IZ=n=>{Object.assign(n.prototype,{tint:Zve,greyscale:Xve,grayscale:$ve,pipelineColourspace:ePe,pipelineColorspace:APe,toColourspace:tPe,toColorspace:rPe,_getBackgroundColourOption:cZ,_setBackgroundColourOption:aPe}),n.colourspace=sZ,n.colorspace=sZ}});function oPe(){return this.options.removeAlpha=!0,this}function nPe(n){if(w.defined(n))if(w.number(n)&&w.inRange(n,0,1))this.options.ensureAlpha=n;else throw w.invalidParameterError("alpha","number between 0 and 1",n);else this.options.ensureAlpha=1;return this}function sPe(n){let r={red:0,green:1,blue:2,alpha:3};if(Object.keys(r).includes(n)&&(n=r[n]),w.integer(n)&&w.inRange(n,0,4))this.options.extractChannel=n;else throw w.invalidParameterError("channel","integer or one of: red, green, blue, alpha",n);return this}function gPe(n,r){return Array.isArray(n)?n.forEach(function(o){this.options.joinChannelIn.push(this._createInputDescriptor(o,r))},this):this.options.joinChannelIn.push(this._createInputDescriptor(n,r)),this}function cPe(n){if(w.string(n)&&w.inArray(n,["and","or","eor"]))this.options.bandBoolOp=n;else throw w.invalidParameterError("boolOp","one of: and, or, eor",n);return this}var iPe,pZ,EZ=le(()=>{yn();iPe={and:"and",or:"or",eor:"eor"};pZ=n=>{Object.assign(n.prototype,{removeAlpha:oPe,ensureAlpha:nPe,extractChannel:sPe,joinChannel:gPe,bandbool:cPe}),n.bool=iPe}});import Kv from"node:path";function lPe(n,r){let o;if(w.string(n)?w.string(this.options.input.file)&&Kv.resolve(this.options.input.file)===Kv.resolve(n)?o=new Error("Cannot use same file for input and output"):IPe.test(Kv.extname(n))&&!this.constructor.format.jp2.output.file&&(o=hZ()):o=new Error("Missing output file path"),o)if(w.fn(r))r(o);else return Promise.reject(o);else{this.options.fileOut=n;let i=Error();return this._pipeline(r,i)}return this}function pPe(n,r){w.object(n)?this._setBooleanOption("resolveWithObject",n.resolveWithObject):this.options.resolveWithObject&&(this.options.resolveWithObject=!1),this.options.fileOut="";let o=Error();return this._pipeline(w.fn(n)?n:r,o)}function EPe(){this.options.resolveWithObject=!0,this.options.typedArrayOut=!0;let n=Error();return this._pipeline(null,n)}function CPe(n){if(w.number(n)&&n>0)this.options.withMetadataDensity=n;else throw w.invalidParameterError("density","positive number",n);return this.keepExif()}function hPe(){return this.options.keepMetadata|=1,this}function dPe(n){if(w.object(n))for(let[r,o]of Object.entries(n))if(w.object(o))for(let[i,e]of Object.entries(o))if(w.string(e))this.options.withExif[`exif-${r.toLowerCase()}-${i}`]=e;else throw w.invalidParameterError(`${r}.${i}`,"string",e);else throw w.invalidParameterError(r,"object",o);else throw w.invalidParameterError("exif","object",n);return this.options.withExifMerge=!1,this.keepExif()}function uPe(n){return this.withExif(n),this.options.withExifMerge=!0,this}function BPe(){return this.options.keepMetadata|=8,this}function fPe(n,r){if(w.string(n))this.options.withIccProfile=n;else throw w.invalidParameterError("icc","string",n);if(this.keepIccProfile(),w.object(r)&&w.defined(r.attach))if(w.bool(r.attach))r.attach||(this.options.keepMetadata&=-9);else throw w.invalidParameterError("attach","boolean",r.attach);return this}function QPe(){return this.options.keepGainMap=!0,this.options.withGainMap=!1,this.options.keepMetadata|=32,this}function yPe(){return this.options.withGainMap=!0,this.options.keepGainMap=!1,this.options.colourspace="scrgb",this}function mPe(){return this.options.keepMetadata|=2,this}function SPe(n){if(w.string(n)&&n.length>0)this.options.withXmp=n,this.options.keepMetadata|=2;else throw w.invalidParameterError("xmp","non-empty string",n);return this}function DPe(){return this.options.keepMetadata|=31,this}function wPe(n){if(this.keepMetadata(),this.withIccProfile("srgb"),w.object(n)){if(w.defined(n.orientation))if(w.integer(n.orientation)&&w.inRange(n.orientation,1,8))this.options.withMetadataOrientation=n.orientation;else throw w.invalidParameterError("orientation","integer between 1 and 8",n.orientation);if(w.defined(n.density))if(w.number(n.density)&&n.density>0)this.options.withMetadataDensity=n.density;else throw w.invalidParameterError("density","positive number",n.density);w.defined(n.icc)&&this.withIccProfile(n.icc),w.defined(n.exif)&&this.withExifMerge(n.exif)}return this}function OPe(n,r){let o=CZ.get((w.object(n)&&w.string(n.id)?n.id:n).toLowerCase());if(!o)throw w.invalidParameterError("format",`one of: ${[...CZ.keys()].join(", ")}`,n);return this[o](r)}function bPe(n){if(w.object(n)){if(w.defined(n.quality))if(w.integer(n.quality)&&w.inRange(n.quality,1,100))this.options.jpegQuality=n.quality;else throw w.invalidParameterError("quality","integer between 1 and 100",n.quality);if(w.defined(n.progressive)&&this._setBooleanOption("jpegProgressive",n.progressive),w.defined(n.chromaSubsampling))if(w.string(n.chromaSubsampling)&&w.inArray(n.chromaSubsampling,["4:2:0","4:4:4"]))this.options.jpegChromaSubsampling=n.chromaSubsampling;else throw w.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",n.chromaSubsampling);let r=w.bool(n.optimizeCoding)?n.optimizeCoding:n.optimiseCoding;if(w.defined(r)&&this._setBooleanOption("jpegOptimiseCoding",r),w.defined(n.mozjpeg))if(w.bool(n.mozjpeg))n.mozjpeg&&(this.options.jpegTrellisQuantisation=!0,this.options.jpegOvershootDeringing=!0,this.options.jpegOptimiseScans=!0,this.options.jpegProgressive=!0,this.options.jpegQuantisationTable=3);else throw w.invalidParameterError("mozjpeg","boolean",n.mozjpeg);let o=w.bool(n.trellisQuantization)?n.trellisQuantization:n.trellisQuantisation;w.defined(o)&&this._setBooleanOption("jpegTrellisQuantisation",o),w.defined(n.overshootDeringing)&&this._setBooleanOption("jpegOvershootDeringing",n.overshootDeringing);let i=w.bool(n.optimizeScans)?n.optimizeScans:n.optimiseScans;w.defined(i)&&(this._setBooleanOption("jpegOptimiseScans",i),i&&(this.options.jpegProgressive=!0));let e=w.number(n.quantizationTable)?n.quantizationTable:n.quantisationTable;if(w.defined(e))if(w.integer(e)&&w.inRange(e,0,8))this.options.jpegQuantisationTable=e;else throw w.invalidParameterError("quantisationTable","integer between 0 and 8",e)}return this._updateFormatOut("jpeg",n)}function MPe(n){if(w.object(n)){if(w.defined(n.progressive)&&this._setBooleanOption("pngProgressive",n.progressive),w.defined(n.compressionLevel))if(w.integer(n.compressionLevel)&&w.inRange(n.compressionLevel,0,9))this.options.pngCompressionLevel=n.compressionLevel;else throw w.invalidParameterError("compressionLevel","integer between 0 and 9",n.compressionLevel);w.defined(n.adaptiveFiltering)&&this._setBooleanOption("pngAdaptiveFiltering",n.adaptiveFiltering);let r=n.colours||n.colors;if(w.defined(r))if(w.integer(r)&&w.inRange(r,2,256))this.options.pngBitdepth=dZ(r);else throw w.invalidParameterError("colours","integer between 2 and 256",r);if(w.defined(n.palette)?this._setBooleanOption("pngPalette",n.palette):[n.quality,n.effort,n.colours,n.colors,n.dither].some(w.defined)&&this._setBooleanOption("pngPalette",!0),this.options.pngPalette){if(w.defined(n.quality))if(w.integer(n.quality)&&w.inRange(n.quality,0,100))this.options.pngQuality=n.quality;else throw w.invalidParameterError("quality","integer between 0 and 100",n.quality);if(w.defined(n.effort))if(w.integer(n.effort)&&w.inRange(n.effort,1,10))this.options.pngEffort=n.effort;else throw w.invalidParameterError("effort","integer between 1 and 10",n.effort);if(w.defined(n.dither))if(w.number(n.dither)&&w.inRange(n.dither,0,1))this.options.pngDither=n.dither;else throw w.invalidParameterError("dither","number between 0.0 and 1.0",n.dither)}}return this._updateFormatOut("png",n)}function _Pe(n){if(w.object(n)){if(w.defined(n.quality))if(w.integer(n.quality)&&w.inRange(n.quality,1,100))this.options.webpQuality=n.quality;else throw w.invalidParameterError("quality","integer between 1 and 100",n.quality);if(w.defined(n.alphaQuality))if(w.integer(n.alphaQuality)&&w.inRange(n.alphaQuality,0,100))this.options.webpAlphaQuality=n.alphaQuality;else throw w.invalidParameterError("alphaQuality","integer between 0 and 100",n.alphaQuality);if(w.defined(n.lossless)&&this._setBooleanOption("webpLossless",n.lossless),w.defined(n.nearLossless)&&this._setBooleanOption("webpNearLossless",n.nearLossless),w.defined(n.smartSubsample)&&this._setBooleanOption("webpSmartSubsample",n.smartSubsample),w.defined(n.smartDeblock)&&this._setBooleanOption("webpSmartDeblock",n.smartDeblock),w.defined(n.preset))if(w.string(n.preset)&&w.inArray(n.preset,["default","photo","picture","drawing","icon","text"]))this.options.webpPreset=n.preset;else throw w.invalidParameterError("preset","one of: default, photo, picture, drawing, icon, text",n.preset);if(w.defined(n.effort))if(w.integer(n.effort)&&w.inRange(n.effort,0,6))this.options.webpEffort=n.effort;else throw w.invalidParameterError("effort","integer between 0 and 6",n.effort);w.defined(n.minSize)&&this._setBooleanOption("webpMinSize",n.minSize),w.defined(n.mixed)&&this._setBooleanOption("webpMixed",n.mixed),w.defined(n.exact)&&this._setBooleanOption("webpExact",n.exact)}return Yv(n,this.options),this._updateFormatOut("webp",n)}function NPe(n){if(w.object(n)){w.defined(n.reuse)&&this._setBooleanOption("gifReuse",n.reuse),w.defined(n.progressive)&&this._setBooleanOption("gifProgressive",n.progressive);let r=n.colours||n.colors;if(w.defined(r))if(w.integer(r)&&w.inRange(r,2,256))this.options.gifBitdepth=dZ(r);else throw w.invalidParameterError("colours","integer between 2 and 256",r);if(w.defined(n.effort))if(w.integer(n.effort)&&w.inRange(n.effort,1,10))this.options.gifEffort=n.effort;else throw w.invalidParameterError("effort","integer between 1 and 10",n.effort);if(w.defined(n.dither))if(w.number(n.dither)&&w.inRange(n.dither,0,1))this.options.gifDither=n.dither;else throw w.invalidParameterError("dither","number between 0.0 and 1.0",n.dither);if(w.defined(n.interFrameMaxError))if(w.number(n.interFrameMaxError)&&w.inRange(n.interFrameMaxError,0,32))this.options.gifInterFrameMaxError=n.interFrameMaxError;else throw w.invalidParameterError("interFrameMaxError","number between 0.0 and 32.0",n.interFrameMaxError);if(w.defined(n.interPaletteMaxError))if(w.number(n.interPaletteMaxError)&&w.inRange(n.interPaletteMaxError,0,256))this.options.gifInterPaletteMaxError=n.interPaletteMaxError;else throw w.invalidParameterError("interPaletteMaxError","number between 0.0 and 256.0",n.interPaletteMaxError);if(w.defined(n.keepDuplicateFrames))if(w.bool(n.keepDuplicateFrames))this._setBooleanOption("gifKeepDuplicateFrames",n.keepDuplicateFrames);else throw w.invalidParameterError("keepDuplicateFrames","boolean",n.keepDuplicateFrames)}return Yv(n,this.options),this._updateFormatOut("gif",n)}function TPe(n){if(!this.constructor.format.jp2.output.buffer)throw hZ();if(w.object(n)){if(w.defined(n.quality))if(w.integer(n.quality)&&w.inRange(n.quality,1,100))this.options.jp2Quality=n.quality;else throw w.invalidParameterError("quality","integer between 1 and 100",n.quality);if(w.defined(n.lossless))if(w.bool(n.lossless))this.options.jp2Lossless=n.lossless;else throw w.invalidParameterError("lossless","boolean",n.lossless);if(w.defined(n.tileWidth))if(w.integer(n.tileWidth)&&w.inRange(n.tileWidth,1,32768))this.options.jp2TileWidth=n.tileWidth;else throw w.invalidParameterError("tileWidth","integer between 1 and 32768",n.tileWidth);if(w.defined(n.tileHeight))if(w.integer(n.tileHeight)&&w.inRange(n.tileHeight,1,32768))this.options.jp2TileHeight=n.tileHeight;else throw w.invalidParameterError("tileHeight","integer between 1 and 32768",n.tileHeight);if(w.defined(n.chromaSubsampling))if(w.string(n.chromaSubsampling)&&w.inArray(n.chromaSubsampling,["4:2:0","4:4:4"]))this.options.jp2ChromaSubsampling=n.chromaSubsampling;else throw w.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",n.chromaSubsampling)}return this._updateFormatOut("jp2",n)}function Yv(n,r){if(w.object(n)&&w.defined(n.loop))if(w.integer(n.loop)&&w.inRange(n.loop,0,65535))r.loop=n.loop;else throw w.invalidParameterError("loop","integer between 0 and 65535",n.loop);if(w.object(n)&&w.defined(n.delay))if(w.integer(n.delay)&&w.inRange(n.delay,0,65535))r.delay=[n.delay];else if(Array.isArray(n.delay)&&n.delay.every(w.integer)&&n.delay.every(o=>w.inRange(o,0,65535)))r.delay=n.delay;else throw w.invalidParameterError("delay","integer or an array of integers between 0 and 65535",n.delay)}function RPe(n){if(w.object(n)){if(w.defined(n.quality))if(w.integer(n.quality)&&w.inRange(n.quality,1,100))this.options.tiffQuality=n.quality;else throw w.invalidParameterError("quality","integer between 1 and 100",n.quality);if(w.defined(n.bitdepth))if(w.integer(n.bitdepth)&&w.inArray(n.bitdepth,[1,2,4]))this.options.tiffBitdepth=n.bitdepth;else throw w.invalidParameterError("bitdepth","1, 2 or 4",n.bitdepth);if(w.defined(n.tile)&&this._setBooleanOption("tiffTile",n.tile),w.defined(n.tileWidth))if(w.integer(n.tileWidth)&&w.inRange(n.tileWidth,1,32768))this.options.tiffTileWidth=n.tileWidth;else throw w.invalidParameterError("tileWidth","integer between 1 and 32768",n.tileWidth);if(w.defined(n.tileHeight))if(w.integer(n.tileHeight)&&w.inRange(n.tileHeight,1,32768))this.options.tiffTileHeight=n.tileHeight;else throw w.invalidParameterError("tileHeight","integer between 1 and 32768",n.tileHeight);if(w.defined(n.miniswhite)&&this._setBooleanOption("tiffMiniswhite",n.miniswhite),w.defined(n.pyramid)&&this._setBooleanOption("tiffPyramid",n.pyramid),w.defined(n.xres))if(w.number(n.xres)&&w.inRange(n.xres,.001,1e6))this.options.tiffXres=n.xres;else throw w.invalidParameterError("xres","number between 0.001 and 1000000",n.xres);if(w.defined(n.yres))if(w.number(n.yres)&&w.inRange(n.yres,.001,1e6))this.options.tiffYres=n.yres;else throw w.invalidParameterError("yres","number between 0.001 and 1000000",n.yres);if(w.defined(n.compression))if(w.string(n.compression)&&w.inArray(n.compression,["none","jpeg","deflate","packbits","ccittfax4","lzw","webp","zstd","jp2k"]))this.options.tiffCompression=n.compression;else throw w.invalidParameterError("compression","one of: none, jpeg, deflate, packbits, ccittfax4, lzw, webp, zstd, jp2k",n.compression);if(w.defined(n.bigtiff)&&this._setBooleanOption("tiffBigtiff",n.bigtiff),w.defined(n.predictor))if(w.string(n.predictor)&&w.inArray(n.predictor,["none","horizontal","float"]))this.options.tiffPredictor=n.predictor;else throw w.invalidParameterError("predictor","one of: none, horizontal, float",n.predictor);if(w.defined(n.resolutionUnit))if(w.string(n.resolutionUnit)&&w.inArray(n.resolutionUnit,["inch","cm"]))this.options.tiffResolutionUnit=n.resolutionUnit;else throw w.invalidParameterError("resolutionUnit","one of: inch, cm",n.resolutionUnit)}return this._updateFormatOut("tiff",n)}function kPe(n){return this.heif({...n,compression:"av1"})}function vPe(n){if(w.object(n)){if(w.string(n.compression)&&w.inArray(n.compression,["av1","hevc"]))this.options.heifCompression=n.compression;else throw w.invalidParameterError("compression","one of: av1, hevc",n.compression);if(w.defined(n.quality))if(w.integer(n.quality)&&w.inRange(n.quality,1,100))this.options.heifQuality=n.quality;else throw w.invalidParameterError("quality","integer between 1 and 100",n.quality);if(w.defined(n.lossless))if(w.bool(n.lossless))this.options.heifLossless=n.lossless;else throw w.invalidParameterError("lossless","boolean",n.lossless);if(w.defined(n.effort))if(w.integer(n.effort)&&w.inRange(n.effort,0,9))this.options.heifEffort=n.effort;else throw w.invalidParameterError("effort","integer between 0 and 9",n.effort);if(w.defined(n.chromaSubsampling))if(w.string(n.chromaSubsampling)&&w.inArray(n.chromaSubsampling,["4:2:0","4:4:4"]))this.options.heifChromaSubsampling=n.chromaSubsampling;else throw w.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",n.chromaSubsampling);if(w.defined(n.bitdepth))if(w.integer(n.bitdepth)&&w.inArray(n.bitdepth,[8,10,12]))this.options.heifBitdepth=n.bitdepth;else throw w.invalidParameterError("bitdepth","8, 10 or 12",n.bitdepth);if(w.defined(n.tune))if(w.string(n.tune)&&w.inArray(n.tune,["auto","iq","psnr","ssim"]))this.options.heifLossless&&n.tune==="iq"?this.options.heifTune="ssim":this.options.heifTune=n.tune;else throw w.invalidParameterError("tune","one of: auto, iq, psnr, ssim",n.tune)}else throw w.invalidParameterError("options","Object",n);return this._updateFormatOut("heif",n)}function PPe(n){if(w.object(n)){if(w.defined(n.quality))if(w.integer(n.quality)&&w.inRange(n.quality,1,100))this.options.jxlDistance=n.quality>=30?.1+(100-n.quality)*.09:53/3e3*n.quality*n.quality-23/20*n.quality+25;else throw w.invalidParameterError("quality","integer between 1 and 100",n.quality);else if(w.defined(n.distance))if(w.number(n.distance)&&w.inRange(n.distance,0,15))this.options.jxlDistance=n.distance;else throw w.invalidParameterError("distance","number between 0.0 and 15.0",n.distance);if(w.defined(n.decodingTier))if(w.integer(n.decodingTier)&&w.inRange(n.decodingTier,0,4))this.options.jxlDecodingTier=n.decodingTier;else throw w.invalidParameterError("decodingTier","integer between 0 and 4",n.decodingTier);if(w.defined(n.lossless))if(w.bool(n.lossless))this.options.jxlLossless=n.lossless;else throw w.invalidParameterError("lossless","boolean",n.lossless);if(w.defined(n.effort))if(w.integer(n.effort)&&w.inRange(n.effort,1,9))this.options.jxlEffort=n.effort;else throw w.invalidParameterError("effort","integer between 1 and 9",n.effort)}return Yv(n,this.options),this._updateFormatOut("jxl",n)}function GPe(n){if(w.object(n)&&w.defined(n.depth))if(w.string(n.depth)&&w.inArray(n.depth,["char","uchar","short","ushort","int","uint","float","complex","double","dpcomplex"]))this.options.rawDepth=n.depth;else throw w.invalidParameterError("depth","one of: char, uchar, short, ushort, int, uint, float, complex, double, dpcomplex",n.depth);return this._updateFormatOut("raw")}function FPe(n){if(w.object(n)){if(w.defined(n.size))if(w.integer(n.size)&&w.inRange(n.size,1,8192))this.options.tileSize=n.size;else throw w.invalidParameterError("size","integer between 1 and 8192",n.size);if(w.defined(n.overlap))if(w.integer(n.overlap)&&w.inRange(n.overlap,0,8192)){if(n.overlap>this.options.tileSize)throw w.invalidParameterError("overlap",`<= size (${this.options.tileSize})`,n.overlap);this.options.tileOverlap=n.overlap}else throw w.invalidParameterError("overlap","integer between 0 and 8192",n.overlap);if(w.defined(n.container))if(w.string(n.container)&&w.inArray(n.container,["fs","zip"]))this.options.tileContainer=n.container;else throw w.invalidParameterError("container","one of: fs, zip",n.container);if(w.defined(n.layout))if(w.string(n.layout)&&w.inArray(n.layout,["dz","google","iiif","iiif3","zoomify"]))this.options.tileLayout=n.layout;else throw w.invalidParameterError("layout","one of: dz, google, iiif, iiif3, zoomify",n.layout);if(w.defined(n.angle))if(w.integer(n.angle)&&!(n.angle%90))this.options.tileAngle=n.angle;else throw w.invalidParameterError("angle","positive/negative multiple of 90",n.angle);if(this._setBackgroundColourOption("tileBackground",n.background),w.defined(n.depth))if(w.string(n.depth)&&w.inArray(n.depth,["onepixel","onetile","one"]))this.options.tileDepth=n.depth;else throw w.invalidParameterError("depth","one of: onepixel, onetile, one",n.depth);if(w.defined(n.skipBlanks))if(w.integer(n.skipBlanks)&&w.inRange(n.skipBlanks,-1,65535))this.options.tileSkipBlanks=n.skipBlanks;else throw w.invalidParameterError("skipBlanks","integer between -1 and 255/65535",n.skipBlanks);else w.defined(n.layout)&&n.layout==="google"&&(this.options.tileSkipBlanks=5);let r=w.bool(n.center)?n.center:n.centre;if(w.defined(r)&&this._setBooleanOption("tileCentre",r),w.defined(n.id))if(w.string(n.id))this.options.tileId=n.id;else throw w.invalidParameterError("id","string",n.id);if(w.defined(n.basename))if(w.string(n.basename))this.options.tileBasename=n.basename;else throw w.invalidParameterError("basename","string",n.basename)}if(w.inArray(this.options.formatOut,["jpeg","png","webp"]))this.options.tileFormat=this.options.formatOut;else if(this.options.formatOut!=="input")throw w.invalidParameterError("format","one of: jpeg, png, webp",this.options.formatOut);return this._updateFormatOut("dz")}function LPe(n){if(!w.plainObject(n))throw w.invalidParameterError("options","object",n);if(w.integer(n.seconds)&&w.inRange(n.seconds,0,3600))this.options.timeoutSeconds=n.seconds;else throw w.invalidParameterError("seconds","integer between 0 and 3600",n.seconds);return this}function UPe(n,r){return w.object(r)&&r.force===!1||(this.options.formatOut=n),this}function HPe(n,r){if(w.bool(r))this.options[n]=r;else throw w.invalidParameterError(n,"boolean",r)}function KPe(){if(!this.options.streamOut){this.options.streamOut=!0;let n=Error();this._pipeline(void 0,n)}}function YPe(n,r){return typeof n=="function"?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),dt.pipeline(this.options,(o,i,e)=>{o?n(w.nativeError(o,r)):n(null,i,e)})}):dt.pipeline(this.options,(o,i,e)=>{o?n(w.nativeError(o,r)):n(null,i,e)}),this):this.options.streamOut?(this._isStreamInput()?(this.once("finish",()=>{this._flattenBufferIn(),dt.pipeline(this.options,(o,i,e)=>{o?this.emit("error",w.nativeError(o,r)):(this.emit("info",e),this.push(i)),this.push(null),this.on("end",()=>this.emit("close"))})}),this.streamInFinished&&this.emit("finish")):dt.pipeline(this.options,(o,i,e)=>{o?this.emit("error",w.nativeError(o,r)):(this.emit("info",e),this.push(i)),this.push(null),this.on("end",()=>this.emit("close"))}),this):this._isStreamInput()?new Promise((o,i)=>{this.once("finish",()=>{this._flattenBufferIn(),dt.pipeline(this.options,(e,a,A)=>{e?i(w.nativeError(e,r)):this.options.resolveWithObject?o({data:a,info:A}):o(a)})})}):new Promise((o,i)=>{dt.pipeline(this.options,(e,a,A)=>{e?i(w.nativeError(e,r)):this.options.resolveWithObject?o({data:a,info:A}):o(a)})})}var CZ,IPe,hZ,dZ,uZ,BZ=le(()=>{yn();wd();CZ=new Map([["heic","heif"],["heif","heif"],["avif","avif"],["jpeg","jpeg"],["jpg","jpeg"],["jpe","jpeg"],["tile","tile"],["dz","tile"],["png","png"],["raw","raw"],["tiff","tiff"],["tif","tiff"],["webp","webp"],["gif","gif"],["jp2","jp2"],["jpx","jp2"],["j2k","jp2"],["j2c","jp2"],["jxl","jxl"]]),IPe=/\.(jp[2x]|j2[kc])$/i,hZ=()=>new Error("JP2 output requires libvips with support for OpenJPEG"),dZ=n=>1<<31-Math.clz32(Math.ceil(Math.log2(n)));uZ=n=>{Object.assign(n.prototype,{toFile:lPe,toBuffer:pPe,toUint8Array:EPe,withDensity:CPe,keepExif:hPe,withExif:dPe,withExifMerge:uPe,keepIccProfile:BPe,withIccProfile:fPe,keepGainMap:QPe,withGainMap:yPe,keepXmp:mPe,withXmp:SPe,keepMetadata:DPe,withMetadata:wPe,toFormat:OPe,jpeg:bPe,jp2:TPe,png:MPe,webp:_Pe,tiff:RPe,avif:kPe,heif:vPe,jxl:PPe,gif:NPe,raw:GPe,tile:FPe,timeout:LPe,_updateFormatOut:UPe,_setBooleanOption:HPe,_read:KPe,_pipeline:YPe})}});import xPe from"node:events";import{createRequire as jPe}from"node:module";import{availableParallelism as JPe}from"node:os";function QZ(n){if(w.bool(n))return n?dt.cache(50,20,100):dt.cache(0,0,0);if(w.object(n)){for(let r of["memory","files","items"]){let o=n[r];if(w.defined(o)&&!(w.integer(o)&&o>=0))throw w.invalidParameterError(r,"a positive integer",o)}return dt.cache(n.memory,n.files,n.items)}else return dt.cache()}function VPe(n){return dt.concurrency(w.integer(n)?n:null)}function WPe(){return dt.counters()}function ZPe(n){return dt.simd(w.bool(n)?n:null)}function XPe(n){if(w.object(n))if(Array.isArray(n.operation)&&n.operation.every(w.string))dt.block(n.operation,!0);else throw w.invalidParameterError("operation","Array",n.operation);else throw w.invalidParameterError("options","object",n)}function $Pe(n){if(w.object(n))if(Array.isArray(n.operation)&&n.operation.every(w.string))dt.block(n.operation,!1);else throw w.invalidParameterError("operation","Array",n.operation);else throw w.invalidParameterError("options","object",n)}var Od,xv,fZ,jv,vg,qPe,Lp,zPe,yZ,mZ=le(()=>{Od=Je(Ym(),1);yn();Tv();wd();tS();xv=jPe(import.meta.url),fZ=rS.runtimePlatformArch(),jv=dt.libvipsVersion(),vg=dt.format();vg.heif.output.alias=["avif","heic"];vg.jpeg.output.alias=["jpe","jpg"];vg.tiff.output.alias=["tif"];vg.jp2.output.alias=["j2c","j2k","jp2","jpx"];qPe={nearest:"nearest",bilinear:"bilinear",bicubic:"bicubic",locallyBoundedBicubic:"lbb",nohalo:"nohalo",vertexSplitQuadraticBasisSpline:"vsqbs"},Lp={vips:jv.semver};if(!jv.isGlobal)if(jv.isWasm)try{Lp=xv("@img/sharp-wasm32/versions")}catch{}else try{Lp=xv(`@img/sharp-${fZ}/versions`)}catch{try{Lp=xv(`@img/sharp-libvips-${fZ}/versions`)}catch{}}Lp.sharp=Os.version;Lp.heif&&vg.heif&&(vg.heif.input.fileSuffix=[".avif"],vg.heif.output.alias=["avif"]);QZ(!0);!process.env.MALLOC_ARENA_MAX&&Od.default.familySync()===Od.default.GLIBC&&!dt._isUsingJemalloc()?dt.concurrency(1):Od.default.familySync()===Od.default.MUSL&&dt.concurrency()===1024&&dt.concurrency(JPe());zPe=new xPe.EventEmitter;yZ=n=>{n.cache=QZ,n.concurrency=VPe,n.counters=WPe,n.simd=ZPe,n.format=vg,n.interpolators=qPe,n.versions=Lp,n.queue=zPe,n.block=XPe,n.unblock=$Pe}});var SZ={};Qr(SZ,{default:()=>eGe});var eGe,DZ=le(()=>{L5();K5();V5();W5();$5();lZ();EZ();BZ();mZ();H5(On);q5(On);z5(On);X5(On);IZ(On);pZ(On);uZ(On);yZ(On);eGe=On});var AGe,NA,Pg,bd=le(()=>{AGe="End-Of-Stream",NA=class extends Error{constructor(){super(AGe),this.name="EndOfStreamError"}},Pg=class extends Error{constructor(r="The operation was aborted"){super(r),this.name="AbortError"}}});var nS,wZ=le(()=>{nS=class{constructor(){this.resolve=()=>null,this.reject=()=>null,this.promise=new Promise((r,o)=>{this.reject=o,this.resolve=r})}}});var Gg,sS=le(()=>{bd();Gg=class{constructor(){this.endOfStream=!1,this.interrupted=!1,this.peekQueue=[]}async peek(r,o=!1){let i=await this.read(r,o);return this.peekQueue.push(r.subarray(0,i)),i}async read(r,o=!1){if(r.length===0)return 0;let i=this.readFromPeekBuffer(r);if(this.endOfStream||(i+=await this.readRemainderFromStream(r.subarray(i),o)),i===0&&!o)throw new NA;return i}readFromPeekBuffer(r){let o=r.length,i=0;for(;this.peekQueue.length>0&&o>0;){let e=this.peekQueue.pop();if(!e)throw new Error("peekData should be defined");let a=Math.min(e.length,o);r.set(e.subarray(0,a),i),i+=a,o-=a,a{bd();wZ();sS();Md=class extends Gg{constructor(r){if(super(),this.s=r,this.deferred=null,!r.read||!r.once)throw new Error("Expected an instance of stream.Readable");this.s.once("end",()=>{this.endOfStream=!0,this.deferred&&this.deferred.resolve(0)}),this.s.once("error",o=>this.reject(o)),this.s.once("close",()=>this.abort())}async readFromStream(r,o){if(r.length===0)return 0;let i=this.s.read(r.length);if(i)return r.set(i),i.length;let e={buffer:r,mayBeLess:o,deferred:new nS};return this.deferred=e.deferred,this.s.once("readable",()=>{this.readDeferred(e)}),e.deferred.promise}readDeferred(r){let o=this.s.read(r.buffer.length);o?(r.buffer.set(o),r.deferred.resolve(o.length),this.deferred=null):this.s.once("readable",()=>{this.readDeferred(r)})}reject(r){this.interrupted=!0,this.deferred&&(this.deferred.reject(r),this.deferred=null)}async abort(){this.reject(new Pg)}async close(){return this.abort()}}});var gS,bZ=le(()=>{sS();gS=class extends Gg{constructor(r){super(),this.reader=r}async abort(){return this.close()}async close(){this.reader.releaseLock()}}});var _d,Jv=le(()=>{bZ();_d=class extends gS{async readFromStream(r,o){if(r.length===0)return 0;let i=await this.reader.read(new Uint8Array(r.length),{min:o?void 0:r.length});return i.done&&(this.endOfStream=i.done),i.value?(r.set(i.value),i.value.length):0}}});var Up,qv=le(()=>{bd();sS();Up=class extends Gg{constructor(r){super(),this.reader=r,this.buffer=null}writeChunk(r,o){let i=Math.min(o.length,r.length);return r.set(o.subarray(0,i)),i{Jv();qv()});var Fg=le(()=>{bd();OZ();Jv();qv();MZ()});var qo,Hp=le(()=>{Fg();qo=class{constructor(r){this.numBuffer=new Uint8Array(8),this.position=0,this.onClose=r?.onClose,r?.abortSignal&&r.abortSignal.addEventListener("abort",()=>{this.abort()})}async readToken(r,o=this.position){let i=new Uint8Array(r.len);if(await this.readBuffer(i,{position:o})o)return this.position+=o,o}return this.position+=r,r}async close(){await this.abort(),await this.onClose?.()}normalizeOptions(r,o){if(!this.supportsRandomAccess()&&o&&o.position!==void 0&&o.position{Hp();Fg();tGe=256e3,Nd=class extends qo{constructor(r,o){super(o),this.streamReader=r,this.fileInfo=o?.fileInfo??{}}async readBuffer(r,o){let i=this.normalizeOptions(r,o),e=i.position-this.position;if(e>0)return await this.ignore(e),this.readBuffer(r,o);if(e<0)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");if(i.length===0)return 0;let a=await this.streamReader.read(r.subarray(0,i.length),i.mayBeLess);if(this.position+=a,(!o||!o.mayBeLess)&&a0){let A=new Uint8Array(i.length+a);return e=await this.peekBuffer(A,{mayBeLess:i.mayBeLess}),r.set(A.subarray(a)),e-a}if(a<0)throw new Error("Cannot peek from a negative offset in a stream")}if(i.length>0){try{e=await this.streamReader.peek(r.subarray(0,i.length),i.mayBeLess)}catch(a){if(o?.mayBeLess&&a instanceof NA)return 0;throw a}if(!i.mayBeLess&&e{Fg();Hp();cS=class extends qo{constructor(r,o){super(o),this.uint8Array=r,this.fileInfo={...o?.fileInfo??{},size:r.length}}async readBuffer(r,o){o?.position&&(this.position=o.position);let i=await this.peekBuffer(r,o);return this.position+=i,i}async peekBuffer(r,o){let i=this.normalizeOptions(r,o),e=Math.min(this.uint8Array.length-i.position,i.length);if(!i.mayBeLess&&e{Fg();Hp();IS=class extends qo{constructor(r,o){super(o),this.blob=r,this.fileInfo={...o?.fileInfo??{},size:r.size,mimeType:r.type}}async readBuffer(r,o){o?.position&&(this.position=o.position);let i=await this.peekBuffer(r,o);return this.position+=i,i}async peekBuffer(r,o){let i=this.normalizeOptions(r,o),e=Math.min(this.blob.size-i.position,i.length);if(!i.mayBeLess&&e{if(await o.close(),e)return e()},new Nd(o,i)}function lS(n,r){let o=Vv(n),i=r??{},e=i.onClose;return i.onClose=async()=>{if(await o.close(),e)return e()},new Nd(o,i)}function Mi(n,r){return new cS(n,r)}function pS(n,r){return new IS(n,r)}var ES=le(()=>{Fg();_Z();NZ();TZ();Fg();Hp()});import{open as aGe}from"node:fs/promises";var Kp,zv=le(()=>{Hp();Fg();Kp=class n extends qo{static async fromFile(r){let o=await aGe(r,"r"),i=await o.stat();return new n(o,{fileInfo:{path:r,size:i.size}})}constructor(r,o){super(o),this.fileHandle=r,this.fileInfo=o.fileInfo}async readBuffer(r,o){let i=this.normalizeOptions(r,o);if(this.position=i.position,i.length===0)return 0;let e=await this.fileHandle.read(r,0,i.length,i.position);if(this.position+=e.bytesRead,e.bytesRead{ES();zv();zv();ES();kZ=Kp.fromFile});var vZ=W(Zv=>{Zv.read=function(n,r,o,i,e){var a,A,t=e*8-i-1,s=(1<>1,c=-7,I=o?e-1:0,E=o?-1:1,B=n[r+I];for(I+=E,a=B&(1<<-c)-1,B>>=-c,c+=t;c>0;a=a*256+n[r+I],I+=E,c-=8);for(A=a&(1<<-c)-1,a>>=-c,c+=i;c>0;A=A*256+n[r+I],I+=E,c-=8);if(a===0)a=1-g;else{if(a===s)return A?NaN:(B?-1:1)*(1/0);A=A+Math.pow(2,i),a=a-g}return(B?-1:1)*A*Math.pow(2,a-i)};Zv.write=function(n,r,o,i,e,a){var A,t,s,g=a*8-e-1,c=(1<>1,E=e===23?Math.pow(2,-24)-Math.pow(2,-77):0,B=i?0:a-1,f=i?1:-1,Q=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(t=isNaN(r)?1:0,A=c):(A=Math.floor(Math.log(r)/Math.LN2),r*(s=Math.pow(2,-A))<1&&(A--,s*=2),A+I>=1?r+=E/s:r+=E*Math.pow(2,1-I),r*s>=2&&(A++,s/=2),A+I>=c?(t=0,A=c):A+I>=1?(t=(r*s-1)*Math.pow(2,e),A=A+I):(t=r*Math.pow(2,I-1)*Math.pow(2,e),A=0));e>=8;n[o+B]=t&255,B+=f,t/=256,e-=8);for(A=A<0;n[o+B]=A&255,B+=f,A/=256,g-=8);n[o+B-f]|=Q*128}});function oGe(){if(!(typeof globalThis.TextDecoder>"u"))return CS??(CS=new globalThis.TextDecoder("utf-8"))}function nGe(){if(!(typeof globalThis.TextEncoder>"u"))return hS??(hS=new globalThis.TextEncoder)}function lr(n,r="utf-8"){switch(r.toLowerCase()){case"utf-8":case"utf8":{let o=oGe();return o?o.decode(n):gGe(n)}case"utf-16le":return cGe(n);case"us-ascii":case"ascii":return IGe(n);case"latin1":case"iso-8859-1":return lGe(n);case"windows-1252":return pGe(n);default:throw new RangeError(`Encoding '${r}' not supported`)}}function GZ(n="",r="utf-8"){switch(r.toLowerCase()){case"utf-8":case"utf8":{let o=nGe();return o?o.encode(n):EGe(n)}case"utf-16le":return CGe(n);case"us-ascii":case"ascii":return hGe(n);case"latin1":case"iso-8859-1":return dGe(n);case"windows-1252":return uGe(n);default:throw new RangeError(`Encoding '${r}' not supported`)}}function $v(n,r){r.length!==0&&(n.push(String.fromCharCode.apply(null,r)),r.length=0)}function ur(n,r,o){r.push(o),r.length>=Yp&&$v(n,r)}function sGe(n,r,o){if(o<=65535){ur(n,r,o);return}o-=65536,ur(n,r,55296+(o>>10)),ur(n,r,56320+(o&1023))}function gGe(n){let r=[],o=[],i=0;for(n.length>=3&&n[0]===239&&n[1]===187&&n[2]===191&&(i=3);i244){ur(r,o,ia),i++;continue}if(e<=223){if(i+1>=n.length){ur(r,o,ia),i++;continue}let c=n[i+1];if((c&192)!==128){ur(r,o,ia),i++;continue}let I=(e&31)<<6|c&63;ur(r,o,I),i+=2;continue}if(e<=239){if(i+2>=n.length){ur(r,o,ia),i++;continue}let c=n[i+1],I=n[i+2];if(!((c&192)===128&&(I&192)===128&&!(e===224&&c<160)&&!(e===237&&c>=160))){ur(r,o,ia),i++;continue}let B=(e&15)<<12|(c&63)<<6|I&63;ur(r,o,B),i+=3;continue}if(i+3>=n.length){ur(r,o,ia),i++;continue}let a=n[i+1],A=n[i+2],t=n[i+3];if(!((a&192)===128&&(A&192)===128&&(t&192)===128&&!(e===240&&a<144)&&!(e===244&&a>143))){ur(r,o,ia),i++;continue}let g=(e&7)<<18|(a&63)<<12|(A&63)<<6|t&63;sGe(r,o,g),i+=4}return $v(r,o),r.join("")}function cGe(n){let r=[],o=[],i=n.length,e=0;for(;e+1=55296&&a<=56319){if(e+1=56320&&A<=57343?(ur(r,o,a),ur(r,o,A),e+=2):ur(r,o,ia)}else ur(r,o,ia);continue}if(a>=56320&&a<=57343){ur(r,o,ia);continue}ur(r,o,a)}return e=128&&e<=159?PZ[e]:void 0;o+=a??String.fromCharCode(e),o.length>=Yp&&(r.push(o),o="")}return o&&r.push(o),r.join("")}function EGe(n){let r=[];for(let o=0;o=55296&&i<=56319)if(o+1=56320&&e<=57343?(i=65536+(i-55296<<10)+(e-56320),o++):i=ia}else i=ia;else i>=56320&&i<=57343&&(i=ia);i<128?r.push(i):i<2048?r.push(192|i>>6,128|i&63):i<65536?r.push(224|i>>12,128|i>>6&63,128|i&63):r.push(240|i>>18,128|i>>12&63,128|i>>6&63,128|i&63)}return new Uint8Array(r)}function CGe(n){let r=[];for(let i=0;i=55296&&e<=56319){if(i+1=56320&&a<=57343?(r.push(e,a),i++):r.push(ia)}else r.push(ia);continue}if(e>=56320&&e<=57343){r.push(ia);continue}r.push(e)}let o=new Uint8Array(r.length*2);for(let i=0;i>>8}return o}function hGe(n){let r=new Uint8Array(n.length);for(let o=0;o=0&&e<=127||e>=160&&e<=255){r[o]=e;continue}r[o]=63}return r}var PZ,Xv,CS,hS,Yp,ia,Mn=le(()=>{PZ={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"},Xv={};for(let[n,r]of Object.entries(PZ))Xv[r]=Number.parseInt(n,10);Yp=32*1024,ia=65533});var JA={};Qr(JA,{AnsiStringType:()=>AP,Float16_BE:()=>QGe,Float16_LE:()=>yGe,Float32_BE:()=>rP,Float32_LE:()=>mGe,Float64_BE:()=>uS,Float64_LE:()=>SGe,Float80_BE:()=>DGe,Float80_LE:()=>wGe,INT16_BE:()=>co,INT16_LE:()=>BGe,INT24_BE:()=>dS,INT24_LE:()=>fGe,INT32_BE:()=>Pa,INT32_LE:()=>$t,INT64_BE:()=>tP,INT64_LE:()=>kd,INT8:()=>Nn,IgnoreType:()=>eP,StringType:()=>je,UINT16_BE:()=>PA,UINT16_LE:()=>yA,UINT24_BE:()=>Br,UINT24_LE:()=>Rd,UINT32_BE:()=>Ue,UINT32_LE:()=>ve,UINT64_BE:()=>Tn,UINT64_LE:()=>fr,UINT8:()=>uA,Uint8ArrayType:()=>ut});function jA(n){return new DataView(n.buffer,n.byteOffset)}var _n,uA,yA,PA,Rd,Br,ve,Ue,Nn,co,BGe,fGe,dS,Pa,$t,fr,kd,Tn,tP,QGe,yGe,rP,mGe,uS,SGe,DGe,wGe,eP,ut,je,AP,SA=le(()=>{_n=Je(vZ(),1);Mn();uA={len:1,get(n,r){return jA(n).getUint8(r)},put(n,r,o){return jA(n).setUint8(r,o),r+1}},yA={len:2,get(n,r){return jA(n).getUint16(r,!0)},put(n,r,o){return jA(n).setUint16(r,o,!0),r+2}},PA={len:2,get(n,r){return jA(n).getUint16(r)},put(n,r,o){return jA(n).setUint16(r,o),r+2}},Rd={len:3,get(n,r){let o=jA(n);return o.getUint8(r)+(o.getUint16(r+1,!0)<<8)},put(n,r,o){let i=jA(n);return i.setUint8(r,o&255),i.setUint16(r+1,o>>8,!0),r+3}},Br={len:3,get(n,r){let o=jA(n);return(o.getUint16(r)<<8)+o.getUint8(r+2)},put(n,r,o){let i=jA(n);return i.setUint16(r,o>>8),i.setUint8(r+2,o&255),r+3}},ve={len:4,get(n,r){return jA(n).getUint32(r,!0)},put(n,r,o){return jA(n).setUint32(r,o,!0),r+4}},Ue={len:4,get(n,r){return jA(n).getUint32(r)},put(n,r,o){return jA(n).setUint32(r,o),r+4}},Nn={len:1,get(n,r){return jA(n).getInt8(r)},put(n,r,o){return jA(n).setInt8(r,o),r+1}},co={len:2,get(n,r){return jA(n).getInt16(r)},put(n,r,o){return jA(n).setInt16(r,o),r+2}},BGe={len:2,get(n,r){return jA(n).getInt16(r,!0)},put(n,r,o){return jA(n).setInt16(r,o,!0),r+2}},fGe={len:3,get(n,r){let o=Rd.get(n,r);return o>8388607?o-16777216:o},put(n,r,o){let i=jA(n);return i.setUint8(r,o&255),i.setUint16(r+1,o>>8,!0),r+3}},dS={len:3,get(n,r){let o=Br.get(n,r);return o>8388607?o-16777216:o},put(n,r,o){let i=jA(n);return i.setUint16(r,o>>8),i.setUint8(r+2,o&255),r+3}},Pa={len:4,get(n,r){return jA(n).getInt32(r)},put(n,r,o){return jA(n).setInt32(r,o),r+4}},$t={len:4,get(n,r){return jA(n).getInt32(r,!0)},put(n,r,o){return jA(n).setInt32(r,o,!0),r+4}},fr={len:8,get(n,r){return jA(n).getBigUint64(r,!0)},put(n,r,o){return jA(n).setBigUint64(r,o,!0),r+8}},kd={len:8,get(n,r){return jA(n).getBigInt64(r,!0)},put(n,r,o){return jA(n).setBigInt64(r,o,!0),r+8}},Tn={len:8,get(n,r){return jA(n).getBigUint64(r)},put(n,r,o){return jA(n).setBigUint64(r,o),r+8}},tP={len:8,get(n,r){return jA(n).getBigInt64(r)},put(n,r,o){return jA(n).setBigInt64(r,o),r+8}},QGe={len:2,get(n,r){return _n.read(n,r,!1,10,this.len)},put(n,r,o){return _n.write(n,o,r,!1,10,this.len),r+this.len}},yGe={len:2,get(n,r){return _n.read(n,r,!0,10,this.len)},put(n,r,o){return _n.write(n,o,r,!0,10,this.len),r+this.len}},rP={len:4,get(n,r){return jA(n).getFloat32(r)},put(n,r,o){return jA(n).setFloat32(r,o),r+4}},mGe={len:4,get(n,r){return jA(n).getFloat32(r,!0)},put(n,r,o){return jA(n).setFloat32(r,o,!0),r+4}},uS={len:8,get(n,r){return jA(n).getFloat64(r)},put(n,r,o){return jA(n).setFloat64(r,o),r+8}},SGe={len:8,get(n,r){return jA(n).getFloat64(r,!0)},put(n,r,o){return jA(n).setFloat64(r,o,!0),r+8}},DGe={len:10,get(n,r){return _n.read(n,r,!1,63,this.len)},put(n,r,o){return _n.write(n,o,r,!1,63,this.len),r+this.len}},wGe={len:10,get(n,r){return _n.read(n,r,!0,63,this.len)},put(n,r,o){return _n.write(n,o,r,!0,63,this.len),r+this.len}},eP=class{constructor(r){this.len=r}get(r,o){}},ut=class{constructor(r){this.len=r}get(r,o){return r.subarray(o,o+this.len)}},je=class{constructor(r,o){this.len=r,this.encoding=o}get(r,o=0){let i=r.subarray(o,o+this.len);return lr(i,this.encoding)}},AP=class extends je{constructor(r){super(r,"windows-1252")}}});var gI,aP,FZ,LZ,UZ,HZ=le(()=>{SA();gI={LocalFileHeader:67324752,DataDescriptor:134695760,CentralFileHeader:33639248,EndOfCentralDirectory:101010256},aP={get(n){return{signature:ve.get(n,0),compressedSize:ve.get(n,8),uncompressedSize:ve.get(n,12)}},len:16},FZ={get(n){let r=yA.get(n,6);return{signature:ve.get(n,0),minVersion:yA.get(n,4),dataDescriptor:!!(r&8),compressedMethod:yA.get(n,8),compressedSize:ve.get(n,18),uncompressedSize:ve.get(n,22),filenameLength:yA.get(n,26),extraFieldLength:yA.get(n,28),filename:null}},len:30},LZ={get(n){return{signature:ve.get(n,0),nrOfThisDisk:yA.get(n,4),nrOfThisDiskWithTheStart:yA.get(n,6),nrOfEntriesOnThisDisk:yA.get(n,8),nrOfEntriesOfSize:yA.get(n,10),sizeOfCd:ve.get(n,12),offsetOfStartOfCd:ve.get(n,16),zipFileCommentLength:yA.get(n,20)}},len:22},UZ={get(n){let r=yA.get(n,8);return{signature:ve.get(n,0),minVersion:yA.get(n,6),dataDescriptor:!!(r&8),compressedMethod:yA.get(n,10),compressedSize:ve.get(n,20),uncompressedSize:ve.get(n,24),filenameLength:yA.get(n,28),extraFieldLength:yA.get(n,30),fileCommentLength:yA.get(n,32),relativeOffsetOfLocalHeader:ve.get(n,42),filename:null}},len:46}});function YZ(n){let r=new Uint8Array(ve.len);return ve.put(r,0,n),r}function bGe(n,r){let o=n.length,i=r.length;if(i>o)return-1;for(let e=0;e<=o-i;e++){let a=!0;for(let A=0;Ae+a.length,0),o=new Uint8Array(r),i=0;for(let e of n)o.set(e,i),i+=e.length;return o}var KZ,Rn,iP,OGe,BS,cI,xZ=le(()=>{SA();KZ=Je(at(),1);HZ();Rn=(0,KZ.default)("tokenizer:inflate"),iP=256*1024,OGe=YZ(gI.DataDescriptor),BS=YZ(gI.EndOfCentralDirectory),cI=class n{constructor(r){this.tokenizer=r,this.syncBuffer=new Uint8Array(iP)}async isZip(){return await this.peekSignature()===gI.LocalFileHeader}peekSignature(){return this.tokenizer.peekToken(ve)}async findEndOfCentralDirectoryLocator(){let r=this.tokenizer,o=Math.min(16*1024,r.fileInfo.size),i=this.syncBuffer.subarray(0,o);await this.tokenizer.readBuffer(i,{position:r.fileInfo.size-o});for(let e=i.length-4;e>=0;e--)if(i[e]===BS[0]&&i[e+1]===BS[1]&&i[e+2]===BS[2]&&i[e+3]===BS[3])return r.fileInfo.size-o+e;return-1}async readCentralDirectory(){if(!this.tokenizer.supportsRandomAccess()){Rn("Cannot reading central-directory without random-read support");return}Rn("Reading central-directory...");let r=this.tokenizer.position,o=await this.findEndOfCentralDirectoryLocator();if(o>0){Rn("Central-directory 32-bit signature found");let i=await this.tokenizer.readToken(LZ,o),e=[];this.tokenizer.setPosition(i.offsetOfStartOfCd);for(let a=0;a=0?g:s;if(a.handler){let I=new Uint8Array(c);await this.tokenizer.readBuffer(I),t.push(I)}else await this.tokenizer.ignore(c)}Rn(`Found data-descriptor-signature at pos=${this.tokenizer.position}`),a.handler&&await this.inflate(e,MGe(t),a.handler)}else a.handler?(Rn(`Reading compressed-file-data: ${e.compressedSize} bytes`),A=new Uint8Array(e.compressedSize),await this.tokenizer.readBuffer(A),await this.inflate(e,A,a.handler)):(Rn(`Ignoring compressed-file-data: ${e.compressedSize} bytes`),await this.tokenizer.ignore(e.compressedSize));if(Rn(`Reading data-descriptor at pos=${this.tokenizer.position}`),e.dataDescriptor&&(await this.tokenizer.readToken(aP)).signature!==134695760)throw new Error(`Expected data-descriptor-signature at position ${this.tokenizer.position-aP.len}`)}while(!i)}async iterateOverCentralDirectory(r,o){for(let i of r){let e=o(i);if(e.handler){this.tokenizer.setPosition(i.relativeOffsetOfLocalHeader);let a=await this.readLocalFileHeader();if(a){await this.tokenizer.ignore(a.extraFieldLength);let A=new Uint8Array(i.compressedSize);await this.tokenizer.readBuffer(A),await this.inflate(a,A,e.handler)}}if(e.stop)break}}async inflate(r,o,i){if(r.compressedMethod===0)return i(o);if(r.compressedMethod!==8)throw new Error(`Unsupported ZIP compression method: ${r.compressedMethod}`);Rn(`Decompress filename=${r.filename}, compressed-size=${o.length}`);let e=await n.decompressDeflateRaw(o);return i(e)}static async decompressDeflateRaw(r){let o=new ReadableStream({start(a){a.enqueue(r),a.close()}}),i=new DecompressionStream("deflate-raw"),e=o.pipeThrough(i);try{let A=await new Response(e).arrayBuffer();return new Uint8Array(A)}catch(a){let A=a instanceof Error?`Failed to deflate ZIP entry: ${a.message}`:"Unknown decompression error in ZIP entry";throw new TypeError(A)}}async readLocalFileHeader(){let r=await this.tokenizer.peekToken(ve);if(r===gI.LocalFileHeader){let o=await this.tokenizer.readToken(FZ);return o.filename=await this.tokenizer.readToken(new je(o.filenameLength,"utf-8")),o}if(r===gI.CentralFileHeader)return!1;throw r===3759263696?new Error("Encrypted ZIP"):new Error("Unexpected signature")}}});var vd,jZ=le(()=>{vd=class{constructor(r){this.tokenizer=r}inflate(){let r=this.tokenizer;return new ReadableStream({async pull(o){let i=new Uint8Array(1024),e=await r.readBuffer(i,{mayBeLess:!0});if(e===0){o.close();return}o.enqueue(i.subarray(0,e))}}).pipeThrough(new DecompressionStream("gzip"))}}});var JZ=le(()=>{xZ();jZ()});function TGe(n,r,o){return n?n.constructor===r?!0:_Ge.call(n)===o:!1}function RGe(n){return TGe(n,Uint8Array,NGe)}function kGe(n){if(!RGe(n))throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof n}\``)}function fS(n){kGe(n);let r="";for(let o=0;o{_Ge=Object.prototype.toString,NGe="[object Uint8Array]";QnA={utf8:new globalThis.TextDecoder("utf8")},ynA=new globalThis.TextEncoder,vGe=Array.from({length:256},(n,r)=>r.toString(16).padStart(2,"0"))});function qZ(n,r){if(r==="utf-16le"){let o=[];for(let i=0;i>8&255)}return o}if(r==="utf-16be"){let o=[];for(let i=0;i>8&255,e&255)}return o}return[...n].map(o=>o.charCodeAt(0))}function VZ(n,r=0){let o=Number.parseInt(new je(6).get(n,148).replace(/\0.*$/,"").trim(),8);if(Number.isNaN(o))return!1;let i=256;for(let e=r;e{SA();zZ={get:(n,r)=>n[r+3]&127|n[r+2]<<7|n[r+1]<<14|n[r]<<21,len:4}});var ZZ,XZ,$Z=le(()=>{ZZ=["jpg","png","apng","gif","webp","flif","xcf","cr2","cr3","orf","arw","dng","nef","rw2","raf","tif","bmp","icns","jxr","psd","indd","zip","tar","rar","gz","bz2","7z","dmg","mp4","mid","mkv","webm","mov","avi","mpg","mp2","mp3","m4a","oga","ogg","ogv","opus","flac","wav","spx","amr","pdf","epub","elf","macho","exe","swf","rtf","wasm","woff","woff2","eot","ttf","otf","ttc","ico","flv","ps","xz","sqlite","nes","crx","xpi","cab","deb","ar","rpm","Z","lz","cfb","mxf","mts","blend","bpg","docx","pptx","xlsx","3gp","3g2","j2c","jp2","jpm","jpx","mj2","aif","qcp","odt","ods","odp","xml","mobi","heic","cur","ktx","ape","wv","dcm","ics","glb","pcap","dsf","lnk","alias","voc","ac3","m4v","m4p","m4b","f4v","f4p","f4b","f4a","mie","asf","ogm","ogx","mpc","arrow","shp","aac","mp1","it","s3m","xm","skp","avif","eps","lzh","pgp","asar","stl","chm","3mf","zst","jxl","vcf","jls","pst","dwg","parquet","class","arj","cpio","ace","avro","icc","fbx","vsdx","vtt","apk","drc","lz4","potx","xltx","dotx","xltm","ott","ots","otp","odg","otg","xlsm","docm","dotm","potm","pptm","jar","jmp","rm","sav","ppsm","ppsx","tar.gz","reg","dat"],XZ=["image/jpeg","image/png","image/gif","image/webp","image/flif","image/x-xcf","image/x-canon-cr2","image/x-canon-cr3","image/tiff","image/bmp","image/vnd.ms-photo","image/vnd.adobe.photoshop","application/x-indesign","application/epub+zip","application/x-xpinstall","application/vnd.ms-powerpoint.slideshow.macroenabled.12","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/zip","application/x-tar","application/x-rar-compressed","application/gzip","application/x-bzip2","application/x-7z-compressed","application/x-apple-diskimage","application/vnd.apache.arrow.file","video/mp4","audio/midi","video/matroska","video/webm","video/quicktime","video/vnd.avi","audio/wav","audio/qcelp","audio/x-ms-asf","video/x-ms-asf","application/vnd.ms-asf","video/mpeg","video/3gpp","audio/mpeg","audio/mp4","video/ogg","audio/ogg","audio/ogg; codecs=opus","application/ogg","audio/flac","audio/ape","audio/wavpack","audio/amr","application/pdf","application/x-elf","application/x-mach-binary","application/x-msdownload","application/x-shockwave-flash","application/rtf","application/wasm","font/woff","font/woff2","application/vnd.ms-fontobject","font/ttf","font/otf","font/collection","image/x-icon","video/x-flv","application/postscript","application/eps","application/x-xz","application/x-sqlite3","application/x-nintendo-nes-rom","application/x-google-chrome-extension","application/vnd.ms-cab-compressed","application/x-deb","application/x-unix-archive","application/x-rpm","application/x-compress","application/x-lzip","application/x-cfb","application/x-mie","application/mxf","video/mp2t","application/x-blender","image/bpg","image/j2c","image/jp2","image/jpx","image/jpm","image/mj2","audio/aiff","application/xml","application/x-mobipocket-ebook","image/heif","image/heif-sequence","image/heic","image/heic-sequence","image/icns","image/ktx","application/dicom","audio/x-musepack","text/calendar","text/vcard","text/vtt","model/gltf-binary","application/vnd.tcpdump.pcap","audio/x-dsf","application/x.ms.shortcut","application/x.apple.alias","audio/x-voc","audio/vnd.dolby.dd-raw","audio/x-m4a","image/apng","image/x-olympus-orf","image/x-sony-arw","image/x-adobe-dng","image/x-nikon-nef","image/x-panasonic-rw2","image/x-fujifilm-raf","video/x-m4v","video/3gpp2","application/x-esri-shape","audio/aac","audio/x-it","audio/x-s3m","audio/x-xm","video/MP1S","video/MP2P","application/vnd.sketchup.skp","image/avif","application/x-lzh-compressed","application/pgp-encrypted","application/x-asar","model/stl","application/vnd.ms-htmlhelp","model/3mf","image/jxl","application/zstd","image/jls","application/vnd.ms-outlook","image/vnd.dwg","application/vnd.apache.parquet","application/java-vm","application/x-arj","application/x-cpio","application/x-ace-compressed","application/avro","application/vnd.iccprofile","application/x.autodesk.fbx","application/vnd.visio","application/vnd.android.package-archive","application/vnd.google.draco","application/x-lz4","application/vnd.openxmlformats-officedocument.presentationml.template","application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/vnd.ms-excel.template.macroenabled.12","application/vnd.oasis.opendocument.text-template","application/vnd.oasis.opendocument.spreadsheet-template","application/vnd.oasis.opendocument.presentation-template","application/vnd.oasis.opendocument.graphics","application/vnd.oasis.opendocument.graphics-template","application/vnd.ms-excel.sheet.macroenabled.12","application/vnd.ms-word.document.macroenabled.12","application/vnd.ms-word.template.macroenabled.12","application/vnd.ms-powerpoint.template.macroenabled.12","application/vnd.ms-powerpoint.presentation.macroenabled.12","application/java-archive","application/vnd.rn-realmedia","application/x-spss-sav","application/x-ms-regedit","application/x-ft-windows-registry-hive","application/x-jmp-data"]});function zGe(n){let r=n?.streamReader;if(r?.constructor?.name!=="WebStreamByobReader")return n;let{reader:o}=r,i=async()=>{await o.cancel(),o.releaseLock()};return r.close=i,r.abort=async()=>{r.interrupted=!0,await i()},n}function gP(n,r,o){if(!Number.isFinite(n)||n<0||n>r)throw new _s(`${o} has invalid size ${n} (maximum ${r} bytes)`);return n}async function Lg(n,r,{maximumLength:o=Io,reason:i="skip"}={}){let e=gP(r,o,i);await n.ignore(e)}async function nP(n,r,o,{maximumLength:i=r.length,reason:e="read"}={}){let a=o?.length??r.length,A=gP(a,i,e);return n.readBuffer(r,{...o,length:A})}async function WGe(n,{maximumLength:r=vn}={}){let e=new ReadableStream({start(g){g.enqueue(n),g.close()}}).pipeThrough(new DecompressionStream("deflate-raw")).getReader(),a=[],A=0;try{for(;;){let{done:g,value:c}=await e.read();if(g)break;if(A+=c.length,A>r)throw await e.cancel(),new Error(`ZIP entry decompressed data exceeds ${r} bytes`);a.push(c)}}finally{e.releaseLock()}let t=new Uint8Array(A),s=0;for(let g of a)t.set(g,s),s+=g.length;return t}function XGe(n,r){if(n.length=0?0:t===e?Math.min(ZGe,t-1):0,c=s>=0?s:t-g;if(c===0)break;if(A+=c,A>o)throw new Error(`ZIP entry compressed data exceeds ${o} bytes`);if(r){let I=new Uint8Array(c);await n.tokenizer.readBuffer(I),a.push(I)}else await n.tokenizer.ignore(c);if(s>=0)break}if(Ga(n.tokenizer)||(n.knownSizeDescriptorScannedBytes+=A),!!r)return eFe(a,A)}function tFe(n,r){return Ga(n.tokenizer)?Math.max(0,Io-(n.tokenizer.position-r)):Math.max(0,vn-n.knownSizeDescriptorScannedBytes)}async function rFe(n,r,{shouldBuffer:o,maximumDescriptorLength:i=vn}={}){if(r.dataDescriptor&&r.compressedSize===0)return AFe(n,{shouldBuffer:o,maximumLength:i});if(!o){await Lg(n.tokenizer,r.compressedSize,{maximumLength:Ga(n.tokenizer)?vn:n.tokenizer.fileInfo.size,reason:"ZIP entry compressed data"});return}let e=gFe(n.tokenizer);if(!Number.isFinite(r.compressedSize)||r.compressedSize<0||r.compressedSize>e)throw new Error(`ZIP entry compressed data exceeds ${e} bytes`);let a=new Uint8Array(r.compressedSize);return await n.tokenizer.readBuffer(a),a}function aFe(n,r){let o=n.getReader(),i=0,e=!1,a=!1,A=async t=>{e||a||(a=!0,await o.cancel(t))};return new ReadableStream({async pull(t){if(i>=r){t.close(),await A();return}let{done:s,value:g}=await o.read();if(s||!g){e=!0,t.close();return}let c=r-i;if(g.length>c){t.enqueue(g.subarray(0,c)),i+=c,t.close(),await A();return}t.enqueue(g),i+=g.length},async cancel(t){await A(t)}})}async function Ud(n,r){return new sP(r).fromBuffer(n)}function g9(n){switch(n=n.toLowerCase(),n){case"application/epub+zip":return{ext:"epub",mime:n};case"application/vnd.oasis.opendocument.text":return{ext:"odt",mime:n};case"application/vnd.oasis.opendocument.text-template":return{ext:"ott",mime:n};case"application/vnd.oasis.opendocument.spreadsheet":return{ext:"ods",mime:n};case"application/vnd.oasis.opendocument.spreadsheet-template":return{ext:"ots",mime:n};case"application/vnd.oasis.opendocument.presentation":return{ext:"odp",mime:n};case"application/vnd.oasis.opendocument.presentation-template":return{ext:"otp",mime:n};case"application/vnd.oasis.opendocument.graphics":return{ext:"odg",mime:n};case"application/vnd.oasis.opendocument.graphics-template":return{ext:"otg",mime:n};case"application/vnd.openxmlformats-officedocument.presentationml.slideshow":return{ext:"ppsx",mime:n};case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":return{ext:"xlsx",mime:n};case"application/vnd.ms-excel.sheet.macroenabled":return{ext:"xlsm",mime:"application/vnd.ms-excel.sheet.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.spreadsheetml.template":return{ext:"xltx",mime:n};case"application/vnd.ms-excel.template.macroenabled":return{ext:"xltm",mime:"application/vnd.ms-excel.template.macroenabled.12"};case"application/vnd.ms-powerpoint.slideshow.macroenabled":return{ext:"ppsm",mime:"application/vnd.ms-powerpoint.slideshow.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return{ext:"docx",mime:n};case"application/vnd.ms-word.document.macroenabled":return{ext:"docm",mime:"application/vnd.ms-word.document.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.template":return{ext:"dotx",mime:n};case"application/vnd.ms-word.template.macroenabledtemplate":return{ext:"dotm",mime:"application/vnd.ms-word.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.template":return{ext:"potx",mime:n};case"application/vnd.ms-powerpoint.template.macroenabled":return{ext:"potm",mime:"application/vnd.ms-powerpoint.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.presentation":return{ext:"pptx",mime:n};case"application/vnd.ms-powerpoint.presentation.macroenabled":return{ext:"pptm",mime:"application/vnd.ms-powerpoint.presentation.macroenabled.12"};case"application/vnd.ms-visio.drawing":return{ext:"vsdx",mime:"application/vnd.visio"};case"application/vnd.ms-package.3dmanufacturing-3dmodel+xml":return{ext:"3mf",mime:"model/3mf"};default:}}function kn(n,r,o){o={offset:0,...o};for(let[i,e]of r.entries())if(o.mask){if(e!==(o.mask[i]&n[i+o.offset]))return!1}else if(e!==n[i+o.offset])return!1;return!0}function iFe(n){return Number.isFinite(n)?Math.max(1,Math.trunc(n)):Fd}function oFe(n,r,o){return o===void 0?n.read(r):(o.throwIfAborted(),new Promise((i,e)=>{let a=()=>{o.removeEventListener("abort",A)},A=()=>{let t=o.reason;a(),(async()=>{try{await n.cancel(t)}catch{}})(),e(t)};o.addEventListener("abort",A,{once:!0}),(async()=>{try{let t=await n.read(r);a(),i(t)}catch(t){a(),e(t)}})()}))}function nFe(n){return Number.isFinite(n)?Math.max(0,Math.min(PGe,Math.trunc(n))):0}function sFe(n){return Number.isFinite(n)?Math.max(0,n):Number.MAX_SAFE_INTEGER}function Ga(n){let r=n.fileInfo.size;return!Number.isFinite(r)||r===Number.MAX_SAFE_INTEGER}function Ld(n,r,o){return Ga(n)&&n.position-r>o}function gFe(n){let r=n.fileInfo.size,o=Number.isFinite(r)?Math.max(0,r-n.position):Number.MAX_SAFE_INTEGER;return Math.min(o,GGe)}function cFe(n){if(n instanceof NA||n instanceof _s)return!0;if(!(n instanceof Error))return!1;if(JGe.has(n.message)||VGe.has(n.code))return!0;for(let r of qGe)if(n.message.startsWith(r))return!0;return!1}function c9(n,r=vn){let o=[n.compressedSize,n.uncompressedSize];for(let i of o)if(!Number.isFinite(i)||i<0||i>r)return!1;return!0}function IFe(){return{hasContentTypesEntry:!1,hasParsedContentTypesEntry:!1,isParsingContentTypes:!1,hasUnparseableContentTypes:!1,hasWordDirectory:!1,hasPresentationDirectory:!1,hasSpreadsheetDirectory:!1,hasThreeDimensionalModelEntry:!1}}function lFe(n,r){r.startsWith("word/")&&(n.hasWordDirectory=!0),r.startsWith("ppt/")&&(n.hasPresentationDirectory=!0),r.startsWith("xl/")&&(n.hasSpreadsheetDirectory=!0),r.startsWith("3D/")&&r.endsWith(".model")&&(n.hasThreeDimensionalModelEntry=!0)}function I9(n){if(!(!n.hasContentTypesEntry||n.hasUnparseableContentTypes||n.isParsingContentTypes||n.hasParsedContentTypesEntry)){if(n.hasWordDirectory)return{ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};if(n.hasPresentationDirectory)return{ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};if(n.hasSpreadsheetDirectory)return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};if(n.hasThreeDimensionalModelEntry)return{ext:"3mf",mime:"model/3mf"}}}function pFe(n){let r=n.indexOf('.main+xml"');if(r===-1){let e="application/vnd.ms-package.3dmanufacturing-3dmodel+xml";return n.includes(`ContentType="${e}"`)?e:void 0}let o=n.slice(0,r),i=o.lastIndexOf('"');return o.slice(i+1)}var Fd,PGe,vn,e9,GGe,Io,yS,A9,FGe,LGe,t9,oP,r9,a9,UGe,HGe,KGe,YGe,xGe,i9,o9,n9,jGe,s9,JGe,qGe,VGe,_s,l9,QS,ZGe,sP,EFe,CFe,p9=le(()=>{SA();ES();JZ();Gd();WZ();$Z();Fd=4100,PGe=Fd-2,vn=1024*1024,e9=1024,GGe=2**31-1,Io=16*1024*1024,yS=vn,A9=vn,FGe=Io,LGe=1,t9=100,oP=Io,r9=64,a9=yS,UGe=256,HGe=512,KGe=Io,YGe=512,xGe=512,i9=256,o9=yS,n9=yS,jGe=yS,s9=Io,JGe=new Set(["Unexpected signature","Encrypted ZIP","Expected Central-File-Header signature"]),qGe=["ZIP entry count exceeds ","Unsupported ZIP compression method:","ZIP entry compressed data exceeds ","ZIP entry decompressed data exceeds ","Expected data-descriptor-signature at position "],VGe=new Set(["Z_BUF_ERROR","Z_DATA_ERROR","ERR_INVALID_STATE"]),_s=class extends Error{};l9=134695760,QS=16,ZGe=QS-1;cI.prototype.inflate=async function(n,r,o){if(n.compressedMethod===0)return o(r);if(n.compressedMethod!==8)throw new Error(`Unsupported ZIP compression method: ${n.compressedMethod}`);let i=await WGe(r,{maximumLength:vn});return o(i)};cI.prototype.unzip=async function(n){let r=!1,o=0,i=this.tokenizer.position;this.knownSizeDescriptorScannedBytes=0;do{if(Ld(this.tokenizer,i,Io))throw new _s(`ZIP stream probing exceeds ${Io} bytes`);let e=await this.readLocalFileHeader();if(!e)break;if(o++,o>e9)throw new Error(`ZIP entry count exceeds ${e9}`);let a=n(e);r=!!a.stop,await this.tokenizer.ignore(e.extraFieldLength);let A=await rFe(this,e,{shouldBuffer:!!a.handler,maximumDescriptorLength:Math.min(vn,tFe(this,i))});if(a.handler&&await this.inflate(e,A,a.handler),e.dataDescriptor){let t=new Uint8Array(QS);if(await this.tokenizer.readBuffer(t),ve.get(t,0)!==l9)throw new Error(`Expected data-descriptor-signature at position ${this.tokenizer.position-t.length}`)}if(Ld(this.tokenizer,i,Io))throw new _s(`ZIP stream probing exceeds ${Io} bytes`)}while(!r)};sP=class n{constructor(r){let o=nFe(r?.mpegOffsetTolerance);this.options={...r,mpegOffsetTolerance:o},this.detectors=[...this.options.customDetectors??[],{id:"core",detect:this.detectConfident},{id:"core.imprecise",detect:this.detectImprecise}],this.tokenizerOptions={abortSignal:this.options.signal},this.gzipProbeDepth=0}getTokenizerOptions(){return{...this.tokenizerOptions}}createTokenizerFromWebStream(r){return zGe(lS(r,this.getTokenizerOptions()))}async parseTokenizer(r,o=0){this.detectionReentryCount=o;let i=r.position;for(let e of this.detectors){let a;try{a=await e.detect(r)}catch(A){if(A instanceof NA||A instanceof _s)return;throw A}if(a)return a;if(i!==r.position)return}}async fromTokenizer(r){try{return await this.parseTokenizer(r)}finally{await r.close()}}async fromBuffer(r){if(!(r instanceof Uint8Array||r instanceof ArrayBuffer))throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof r}\``);let o=r instanceof Uint8Array?r:new Uint8Array(r);if(o?.length>1)return this.fromTokenizer(Mi(o,this.getTokenizerOptions()))}async fromBlob(r){this.options.signal?.throwIfAborted();let o=pS(r,this.getTokenizerOptions());return this.fromTokenizer(o)}async fromStream(r){this.options.signal?.throwIfAborted();let o=this.createTokenizerFromWebStream(r);return this.fromTokenizer(o)}async toDetectionStream(r,o){let i=iFe(o?.sampleSize??Fd),e,a,A=r.getReader({mode:"byob"});try{let{value:g,done:c}=await oFe(A,new Uint8Array(i),this.options.signal);if(a=g,!c&&g)try{e=await this.fromBuffer(g.subarray(0,i))}catch(I){if(!(I instanceof NA))throw I;e=void 0}a=g}finally{A.releaseLock()}let t=new TransformStream({async start(g){g.enqueue(a)},transform(g,c){c.enqueue(g)}}),s=r.pipeThrough(t);return s.fileType=e,s}async detectGzip(r){if(this.gzipProbeDepth>=LGe)return{ext:"gz",mime:"application/gzip"};let o=new vd(r),i=aFe(o.inflate(),FGe),e=Ga(r),a,A,t,s;if(e){let g=new AbortController;a=setTimeout(()=>{g.abort(new DOMException(`Operation timed out after ${t9} ms`,"TimeoutError"))},t9),A=this.options.signal===void 0?g.signal:AbortSignal.any([this.options.signal,g.signal]),t=new n({...this.options,signal:A}),t.gzipProbeDepth=this.gzipProbeDepth+1}else this.gzipProbeDepth++;try{s=await(t??this).fromStream(i)}catch(g){if(g?.name==="AbortError"&&A?.reason?.name!=="TimeoutError")throw g}finally{clearTimeout(a),e||this.gzipProbeDepth--}return s?.ext==="tar"?{ext:"tar.gz",mime:"application/gzip"}:{ext:"gz",mime:"application/gzip"}}check(r,o){return kn(this.buffer,r,o)}checkString(r,o){return this.check(qZ(r,o?.encoding),o)}detectConfident=async r=>{if(this.buffer=new Uint8Array(Fd),r.fileInfo.size===void 0&&(r.fileInfo.size=Number.MAX_SAFE_INTEGER),this.tokenizer=r,Ga(r)&&(await r.peekBuffer(this.buffer,{length:3,mayBeLess:!0}),this.check([31,139,8])))return this.detectGzip(r);if(await r.peekBuffer(this.buffer,{length:32,mayBeLess:!0}),this.check([66,77]))return{ext:"bmp",mime:"image/bmp"};if(this.check([11,119]))return{ext:"ac3",mime:"audio/vnd.dolby.dd-raw"};if(this.check([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(this.check([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if(this.check([37,33]))return await r.peekBuffer(this.buffer,{length:24,mayBeLess:!0}),this.checkString("PS-Adobe-",{offset:2})&&this.checkString(" EPSF-",{offset:14})?{ext:"eps",mime:"application/eps"}:{ext:"ps",mime:"application/postscript"};if(this.check([31,160])||this.check([31,157]))return{ext:"Z",mime:"application/x-compress"};if(this.check([199,113]))return{ext:"cpio",mime:"application/x-cpio"};if(this.check([96,234]))return{ext:"arj",mime:"application/x-arj"};if(this.check([239,187,191]))return this.detectionReentryCount>=i9?void 0:(this.detectionReentryCount++,await this.tokenizer.ignore(3),this.detectConfident(r));if(this.check([71,73,70]))return{ext:"gif",mime:"image/gif"};if(this.check([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(this.check([31,139,8]))return this.detectGzip(r);if(this.check([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(this.checkString("ID3")){await Lg(r,6,{maximumLength:6,reason:"ID3 header prefix"});let o=await r.readToken(zZ),i=Ga(r);if(!Number.isFinite(o)||o<0||i&&(o>oP||r.position+o>oP))return;if(r.position+o>r.fileInfo.size)return i?void 0:{ext:"mp3",mime:"audio/mpeg"};try{await Lg(r,o,{maximumLength:i?oP:r.fileInfo.size,reason:"ID3 payload"})}catch(e){if(e instanceof NA)return;throw e}return this.detectionReentryCount>=i9?void 0:(this.detectionReentryCount++,this.parseTokenizer(r,this.detectionReentryCount))}if(this.checkString("MP+"))return{ext:"mpc",mime:"audio/x-musepack"};if((this.buffer[0]===67||this.buffer[0]===70)&&this.check([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(this.check([255,216,255]))return this.check([247],{offset:3})?{ext:"jls",mime:"image/jls"}:{ext:"jpg",mime:"image/jpeg"};if(this.check([79,98,106,1]))return{ext:"avro",mime:"application/avro"};if(this.checkString("FLIF"))return{ext:"flif",mime:"image/flif"};if(this.checkString("8BPS"))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(this.checkString("MPCK"))return{ext:"mpc",mime:"audio/x-musepack"};if(this.checkString("FORM"))return{ext:"aif",mime:"audio/aiff"};if(this.checkString("icns",{offset:0}))return{ext:"icns",mime:"image/icns"};if(this.check([80,75,3,4])){let o,i=IFe();try{await new cI(r).unzip(e=>{lFe(i,e.filename);let a=e.filename==="[Content_Types].xml",A=I9(i);if(!a&&A)return o=A,{stop:!0};switch(e.filename){case"META-INF/mozilla.rsa":return o={ext:"xpi",mime:"application/x-xpinstall"},{stop:!0};case"META-INF/MANIFEST.MF":return o={ext:"jar",mime:"application/java-archive"},{stop:!0};case"mimetype":return c9(e,A9)?{async handler(t){let s=new TextDecoder("utf-8").decode(t).trim();o=g9(s)},stop:!0}:{};case"[Content_Types].xml":return i.hasContentTypesEntry=!0,c9(e,A9)?(i.isParsingContentTypes=!0,{async handler(t){let s=new TextDecoder("utf-8").decode(t),g=pFe(s);g&&(o=g9(g)),i.hasParsedContentTypesEntry=!0,i.isParsingContentTypes=!1},stop:!0}):(i.hasUnparseableContentTypes=!0,{});default:return/classes\d*\.dex/.test(e.filename)?(o={ext:"apk",mime:"application/vnd.android.package-archive"},{stop:!0}):{}}})}catch(e){if(!cFe(e))throw e;i.isParsingContentTypes&&(i.isParsingContentTypes=!1,i.hasUnparseableContentTypes=!0)}return o??I9(i)??{ext:"zip",mime:"application/zip"}}if(this.checkString("OggS")){await r.ignore(28);let o=new Uint8Array(8);return await r.readBuffer(o),kn(o,[79,112,117,115,72,101,97,100])?{ext:"opus",mime:"audio/ogg; codecs=opus"}:kn(o,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:kn(o,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:kn(o,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:kn(o,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:kn(o,[1,118,111,114,98,105,115])?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"}}if(this.check([80,75])&&(this.buffer[2]===3||this.buffer[2]===5||this.buffer[2]===7)&&(this.buffer[3]===4||this.buffer[3]===6||this.buffer[3]===8))return{ext:"zip",mime:"application/zip"};if(this.checkString("MThd"))return{ext:"mid",mime:"audio/midi"};if(this.checkString("wOFF")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff",mime:"font/woff"};if(this.checkString("wOF2")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(this.check([212,195,178,161])||this.check([161,178,195,212]))return{ext:"pcap",mime:"application/vnd.tcpdump.pcap"};if(this.checkString("DSD "))return{ext:"dsf",mime:"audio/x-dsf"};if(this.checkString("LZIP"))return{ext:"lz",mime:"application/x-lzip"};if(this.checkString("fLaC"))return{ext:"flac",mime:"audio/flac"};if(this.check([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(this.checkString("wvpk"))return{ext:"wv",mime:"audio/wavpack"};if(this.checkString("%PDF"))return{ext:"pdf",mime:"application/pdf"};if(this.check([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(this.check([73,73])){let o=await this.readTiffHeader(!1);if(o)return o}if(this.check([77,77])){let o=await this.readTiffHeader(!0);if(o)return o}if(this.checkString("MAC "))return{ext:"ape",mime:"audio/ape"};if(this.check([26,69,223,163])){async function o(){let s=await r.peekNumber(uA),g=128,c=0;for(;(s&g)===0&&g!==0;)++c,g>>=1;let I=new Uint8Array(c+1);return await nP(r,I,void 0,{maximumLength:I.length,reason:"EBML field"}),I}async function i(){let s=await o(),g=await o();g[0]^=128>>g.length-1;let c=Math.min(6,g.length),I=new DataView(s.buffer),E=new DataView(g.buffer,g.length-c,c);return{id:Pd(I),len:Pd(E)}}async function e(s){let g=0;for(;s>0;){if(g++,g>UGe||Ld(r,A,Io))return;let c=r.position,I=await i();if(I.id===17026){if(I.len>r9)return;let E=gP(I.len,r9,"EBML DocType");return(await r.readToken(new je(E))).replaceAll(/\00.*$/g,"")}if(Ga(r)&&(!Number.isFinite(I.len)||I.len<0||I.len>a9)||(await Lg(r,I.len,{maximumLength:Ga(r)?a9:r.fileInfo.size,reason:"EBML payload"}),--s,r.position<=c))return}}let a=await i(),A=r.position;switch(await e(a.len)){case"webm":return{ext:"webm",mime:"video/webm"};case"matroska":return{ext:"mkv",mime:"video/matroska"};default:return}}if(this.checkString("SQLi"))return{ext:"sqlite",mime:"application/x-sqlite3"};if(this.check([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(this.checkString("Cr24"))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(this.checkString("MSCF")||this.checkString("ISc("))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(this.check([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(this.check([197,208,211,198]))return{ext:"eps",mime:"application/eps"};if(this.check([40,181,47,253]))return{ext:"zst",mime:"application/zstd"};if(this.check([127,69,76,70]))return{ext:"elf",mime:"application/x-elf"};if(this.check([33,66,68,78]))return{ext:"pst",mime:"application/vnd.ms-outlook"};if(this.checkString("PAR1")||this.checkString("PARE"))return{ext:"parquet",mime:"application/vnd.apache.parquet"};if(this.checkString("ttcf"))return{ext:"ttc",mime:"font/collection"};if(this.check([254,237,250,206])||this.check([254,237,250,207])||this.check([206,250,237,254])||this.check([207,250,237,254]))return{ext:"macho",mime:"application/x-mach-binary"};if(this.check([4,34,77,24]))return{ext:"lz4",mime:"application/x-lz4"};if(this.checkString("regf"))return{ext:"dat",mime:"application/x-ft-windows-registry-hive"};if(this.checkString("$FL2")||this.checkString("$FL3"))return{ext:"sav",mime:"application/x-spss-sav"};if(this.check([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(this.checkString("#!AMR"))return{ext:"amr",mime:"audio/amr"};if(this.checkString("{\\rtf"))return{ext:"rtf",mime:"application/rtf"};if(this.check([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(this.checkString("IMPM"))return{ext:"it",mime:"audio/x-it"};if(this.checkString("-lh0-",{offset:2})||this.checkString("-lh1-",{offset:2})||this.checkString("-lh2-",{offset:2})||this.checkString("-lh3-",{offset:2})||this.checkString("-lh4-",{offset:2})||this.checkString("-lh5-",{offset:2})||this.checkString("-lh6-",{offset:2})||this.checkString("-lh7-",{offset:2})||this.checkString("-lzs-",{offset:2})||this.checkString("-lz4-",{offset:2})||this.checkString("-lz5-",{offset:2})||this.checkString("-lhd-",{offset:2}))return{ext:"lzh",mime:"application/x-lzh-compressed"};if(this.check([0,0,1,186])){if(this.check([33],{offset:4,mask:[241]}))return{ext:"mpg",mime:"video/MP1S"};if(this.check([68],{offset:4,mask:[196]}))return{ext:"mpg",mime:"video/MP2P"}}if(this.checkString("ITSF"))return{ext:"chm",mime:"application/vnd.ms-htmlhelp"};if(this.check([202,254,186,190])){let o=Ue.get(this.buffer,4),i=PA.get(this.buffer,6);if(o>0&&o<=30)return{ext:"macho",mime:"application/x-mach-binary"};if(i>30)return{ext:"class",mime:"application/java-vm"}}if(this.checkString(".RMF"))return{ext:"rm",mime:"application/vnd.rn-realmedia"};if(this.checkString("DRACO"))return{ext:"drc",mime:"application/vnd.google.draco"};if(this.check([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(this.checkString("=1e3&&o<=1050)return{ext:"dwg",mime:"image/vnd.dwg"}}if(this.checkString("070707"))return{ext:"cpio",mime:"application/x-cpio"};if(this.checkString("BLENDER"))return{ext:"blend",mime:"application/x-blender"};if(this.checkString("!"))return await r.ignore(8),await r.readToken(new je(13,"ascii"))==="debian-binary"?{ext:"deb",mime:"application/x-deb"}:{ext:"ar",mime:"application/x-unix-archive"};if(this.checkString("WEBVTT")&&[` -`,"\r"," "," ","\0"].some(o=>this.checkString(o,{offset:6})))return{ext:"vtt",mime:"text/vtt"};if(this.check([137,80,78,71,13,10,26,10])){let o={ext:"png",mime:"image/png"},i={ext:"apng",mime:"image/apng"};await r.ignore(8);async function e(){return{length:await r.readToken(Pa),type:await r.readToken(new je(4,"latin1"))}}let a=Ga(r),A=r.position,t=0,s=!1;do{if(t++,t>HGe||Ld(r,A,KGe))break;let g=r.position,c=await e();if(c.length<0)return;if(c.type==="IHDR"){if(c.length!==13)return;s=!0}switch(c.type){case"IDAT":return o;case"acTL":return i;default:if(!s&&c.type!=="CgBI")return;if(a&&c.length>o9)return s&&$Ge(c.type)?o:void 0;try{await Lg(r,c.length+4,{maximumLength:a?o9+4:r.fileInfo.size,reason:"PNG chunk payload"})}catch(I){if(!a&&(I instanceof _s||I instanceof NA))return o;throw I}}if(r.position<=g)break}while(r.position+8YGe||Ld(r,a,Io)));){let t=r.position,s=await i(),g=s.size-24;if(!Number.isFinite(g)||g<0){o=!0;break}if(kn(s.id,[145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101])){let c=new Uint8Array(16);if(g-=await nP(r,c,void 0,{maximumLength:c.length,reason:"ASF stream type GUID"}),kn(c,[64,158,105,248,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"audio/x-ms-asf"};if(kn(c,[192,239,25,188,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"video/x-ms-asf"};break}if(e&&g>n9){o=!0;break}if(await Lg(r,g,{maximumLength:e?n9:r.fileInfo.size,reason:"ASF header payload"}),r.position<=t){o=!0;break}}}catch(i){if(i instanceof NA||i instanceof _s)Ga(r)&&(o=!0);else throw i}return o?void 0:{ext:"asf",mime:"application/vnd.ms-asf"}}if(this.check([171,75,84,88,32,49,49,187,13,10,26,10]))return{ext:"ktx",mime:"image/ktx"};if((this.check([126,16,4])||this.check([126,24,4]))&&this.check([48,77,73,69],{offset:4}))return{ext:"mie",mime:"application/x-mie"};if(this.check([39,10,0,0,0,0,0,0,0,0,0,0],{offset:2}))return{ext:"shp",mime:"application/x-esri-shape"};if(this.check([255,79,255,81]))return{ext:"j2c",mime:"image/j2c"};if(this.check([0,0,0,12,106,80,32,32,13,10,135,10]))switch(await r.ignore(20),await r.readToken(new je(4,"ascii"))){case"jp2 ":return{ext:"jp2",mime:"image/jp2"};case"jpx ":return{ext:"jpx",mime:"image/jpx"};case"jpm ":return{ext:"jpm",mime:"image/jpm"};case"mjp2":return{ext:"mj2",mime:"image/mj2"};default:return}if(this.check([255,10])||this.check([0,0,0,12,74,88,76,32,13,10,135,10]))return{ext:"jxl",mime:"image/jxl"};if(this.check([254,255]))return this.checkString("=16){let o=new DataView(this.buffer.buffer).getUint32(12,!0);if(o>12&&this.buffer.length>=o+16)try{let i=new TextDecoder().decode(this.buffer.subarray(16,o+16));if(JSON.parse(i).files)return{ext:"asar",mime:"application/x-asar"}}catch{}}if(this.check([6,14,43,52,2,5,1,1,13,1,2,1,1,2]))return{ext:"mxf",mime:"application/mxf"};if(this.checkString("SCRM",{offset:44}))return{ext:"s3m",mime:"audio/x-s3m"};if(this.check([71])&&this.check([71],{offset:188}))return{ext:"mts",mime:"video/mp2t"};if(this.check([71],{offset:4})&&this.check([71],{offset:196}))return{ext:"mts",mime:"video/mp2t"};if(this.check([66,79,79,75,77,79,66,73],{offset:60}))return{ext:"mobi",mime:"application/x-mobipocket-ebook"};if(this.check([68,73,67,77],{offset:128}))return{ext:"dcm",mime:"application/dicom"};if(this.check([76,0,0,0,1,20,2,0,0,0,0,0,192,0,0,0,0,0,0,70]))return{ext:"lnk",mime:"application/x.ms.shortcut"};if(this.check([98,111,111,107,0,0,0,0,109,97,114,107,0,0,0,0]))return{ext:"alias",mime:"application/x.apple.alias"};if(this.checkString("Kaydara FBX Binary \0"))return{ext:"fbx",mime:"application/x.autodesk.fbx"};if(this.check([76,80],{offset:34})&&(this.check([0,0,1],{offset:8})||this.check([1,0,2],{offset:8})||this.check([2,0,2],{offset:8})))return{ext:"eot",mime:"application/vnd.ms-fontobject"};if(this.check([6,6,237,245,216,29,70,229,189,49,239,231,254,116,183,29]))return{ext:"indd",mime:"application/x-indesign"};if(this.check([255,255,0,0,7,0,0,0,4,0,0,0,1,0,1,0])||this.check([0,0,255,255,0,0,0,7,0,0,0,4,0,1,0,1]))return{ext:"jmp",mime:"application/x-jmp-data"};if(await r.peekBuffer(this.buffer,{length:Math.min(512,r.fileInfo.size),mayBeLess:!0}),this.checkString("ustar",{offset:257})&&(this.checkString("\0",{offset:262})||this.checkString(" ",{offset:262}))||this.check([0,0,0,0,0,0],{offset:257})&&VZ(this.buffer))return{ext:"tar",mime:"application/x-tar"};if(this.check([255,254])){let o="utf-16le";return this.checkString("{this.buffer=new Uint8Array(Fd);let o=sFe(r.fileInfo.size);if(await r.peekBuffer(this.buffer,{length:Math.min(8,o),mayBeLess:!0}),this.check([0,0,1,186])||this.check([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(this.check([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(this.check([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(this.check([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(await r.peekBuffer(this.buffer,{length:Math.min(2+this.options.mpegOffsetTolerance,o),mayBeLess:!0}),this.buffer.length>=2+this.options.mpegOffsetTolerance)for(let i=0;i<=this.options.mpegOffsetTolerance;++i){let e=this.scanMpeg(i);if(e)return e}};async readTiffTag(r){let o=await this.tokenizer.readToken(r?PA:yA);switch(await this.tokenizer.ignore(10),o){case 50341:return{ext:"arw",mime:"image/x-sony-arw"};case 50706:return{ext:"dng",mime:"image/x-adobe-dng"};default:}}async readTiffIFD(r){let o=await this.tokenizer.readToken(r?PA:yA);if(!(o>xGe)&&!(Ga(this.tokenizer)&&2+o*12>s9))for(let i=0;i=6){if(this.checkString("CR",{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(e>=8){let t=(r?PA:yA).get(this.buffer,8),s=(r?PA:yA).get(this.buffer,10);if(t===28&&s===254||t===31&&s===11)return{ext:"nef",mime:"image/x-nikon-nef"}}}if(Ga(this.tokenizer)&&e>jGe)return o;let a=Ga(this.tokenizer)?s9:this.tokenizer.fileInfo.size;try{await Lg(this.tokenizer,e,{maximumLength:a,reason:"TIFF IFD offset"})}catch(t){if(t instanceof NA)return;throw t}let A;try{A=await this.readTiffIFD(r)}catch(t){if(t instanceof NA)return;throw t}return A??o}if(i===43)return o}scanMpeg(r){if(this.check([255,224],{offset:r,mask:[255,224]})){if(this.check([16],{offset:r+1,mask:[22]}))return this.check([8],{offset:r+1,mask:[8]})?{ext:"aac",mime:"audio/aac"}:{ext:"aac",mime:"audio/aac"};if(this.check([2],{offset:r+1,mask:[6]}))return{ext:"mp3",mime:"audio/mpeg"};if(this.check([4],{offset:r+1,mask:[6]}))return{ext:"mp2",mime:"audio/mpeg"};if(this.check([6],{offset:r+1,mask:[6]}))return{ext:"mp1",mime:"audio/mpeg"}}}},EFe=new Set(ZZ),CFe=new Set(XZ)});var cP=le(()=>{go();p9()});var f9=W(mS=>{"use strict";Object.defineProperty(mS,"__esModule",{value:!0});mS.format=BFe;mS.parse=fFe;var hFe=/^[\u0009\u0020-\u007e\u0080-\u00ff]*$/,C9=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,dFe=/[\\"]/g,uFe=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,h9=(()=>{let n=function(){};return n.prototype=Object.create(null),n})();function BFe(n){let{type:r,parameters:o}=n;if(!r||!uFe.test(r))throw new TypeError(`Invalid type: ${r}`);let i=r;if(o)for(let e of Object.keys(o)){if(!C9.test(e))throw new TypeError(`Invalid parameter name: ${e}`);i+=`; ${e}=${DFe(o[e])}`}return i}function fFe(n,r){let o=r?.comma===!0?mFe:65536,i=n.length,e=lP(n,r?.start??0,i),a=e;e=IP(n,e,i,o);let A=pP(n,a,e),t=n.slice(a,A).toLowerCase();return r?.parameters===!1?{type:t,index:e,parameters:new h9}:SFe(n,t,e,i,o)}var d9=32,u9=9,B9=59,QFe=61,E9=34,yFe=92,mFe=44;function SFe(n,r,o,i,e){let a=new h9;e:for(;or;){let i=n.charCodeAt(o-1);if(i!==d9&&i!==u9)break;o--}return o}function DFe(n){if(C9.test(n))return n;if(hFe.test(n))return`"${n.replace(dFe,"\\$&")}"`;throw new TypeError(`Invalid parameter value: ${n}`)}});function Q9(n){if(!wFe.test(n))throw new TypeError(`Invalid media type: ${n}`);let r=n.indexOf("/"),o=n.slice(0,r).toLowerCase(),i=n.slice(r+1).toLowerCase(),e,a=i.lastIndexOf("+");return a!==-1&&(e=i.slice(a+1),i=i.slice(0,a)),{type:o,subtype:i,suffix:e}}var wFe,y9=le(()=>{wFe=/^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}\/[A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}$/});var m9,qr,EP,CP=le(()=>{m9={10:"shot",20:"scene",30:"track",40:"part",50:"album",60:"edition",70:"collection"},qr={video:1,audio:2,complex:3,logo:4,subtitle:17,button:18,control:32},EP={[qr.video]:"video",[qr.audio]:"audio",[qr.complex]:"complex",[qr.logo]:"logo",[qr.subtitle]:"subtitle",[qr.button]:"button",[qr.control]:"control"}});var xp,Ug,Hg,hP,lo,II,pt,Ht=le(()=>{xp=n=>class extends Error{constructor(o){super(o),this.name=n}},Ug=class extends xp("CouldNotDetermineFileTypeError"){},Hg=class extends xp("UnsupportedFileTypeError"){},hP=class extends xp("UnexpectedFileContentError"){constructor(r,o){super(o),this.fileType=r}toString(){return`${this.name} (FileType: ${this.fileType}): ${this.message}`}},lo=class extends xp("FieldDecodingError"){},II=class extends xp("InternalParserError"){},pt=n=>class extends hP{constructor(r){super(n,r)}}});function kA(n,r,o){return(n[r]&1<>a;let t=8-a,s=i-t;return s<0?A>>=8-a-i:s>0&&(A<<=s,A|=qA(n,r,o+t,s)),A}function oa(n,r,o){return qA(n,r,o,1)===1}function D9(n){let r=[];for(let o=0,i=n.length;oo.trim().toLowerCase());if(r.length>=1){let o=Number.parseFloat(r[0]);return r.length===2&&r[1]==="db"?{dB:o,ratio:bFe(o)}:{dB:OFe(o),ratio:o}}}function dP(n){if(n.length===0)throw new Error("decodeUintBE: empty Uint8Array");let r=new DataView(n.buffer,n.byteOffset,n.byteLength);return Pd(r)}var Kt=le(()=>{SA();Ht();Gd()});var jp,Jp,qp,uP,Hd,BP,Vp,DS,fP,Kg=le(()=>{SA();Kt();jp={0:"Other",1:"32x32 pixels 'file icon' (PNG only)",2:"Other file icon",3:"Cover (front)",4:"Cover (back)",5:"Leaflet page",6:"Media (e.g. label side of CD)",7:"Lead artist/lead performer/soloist",8:"Artist/performer",9:"Conductor",10:"Band/Orchestra",11:"Composer",12:"Lyricist/text writer",13:"Recording Location",14:"During recording",15:"During performance",16:"Movie/video screen capture",17:"A bright coloured fish",18:"Illustration",19:"Band/artist logotype",20:"Publisher/Studio logotype"},Jp={other:0,lyrics:1,text:2,movement_part:3,events:4,chord:5,trivia_pop:6},qp={notSynchronized:0,mpegFrameNumber:1,milliseconds:2},uP={get:(n,r)=>n[r+3]&127|n[r+2]<<7|n[r+1]<<14|n[r]<<21,len:4},Hd={len:10,get:(n,r)=>({fileIdentifier:new je(3,"ascii").get(n,r),version:{major:Nn.get(n,r+3),revision:Nn.get(n,r+4)},flags:{unsynchronisation:kA(n,r+5,7),isExtendedHeader:kA(n,r+5,6),expIndicator:kA(n,r+5,5),footer:kA(n,r+5,4)},size:uP.get(n,r+6)})},BP={len:10,get:(n,r)=>({size:Ue.get(n,r),extendedFlags:PA.get(n,r+4),sizeOfPadding:Ue.get(n,r+6),crcDataPresent:kA(n,r+4,31)})},Vp={len:1,get:(n,r)=>{switch(n[r]){case 0:return{encoding:"latin1"};case 1:return{encoding:"utf-16le",bom:!0};case 2:return{encoding:"utf-16be",bom:!1};case 3:return{encoding:"utf8",bom:!1};default:return{encoding:"utf8",bom:!1}}}},DS={len:4,get:(n,r)=>({encoding:Vp.get(n,r),language:new je(3,"latin1").get(n,r+1)})},fP={len:6,get:(n,r)=>{let o=DS.get(n,r);return{encoding:o.encoding,language:o.language,timeStampFormat:uA.get(n,r+4),contentType:uA.get(n,r+5)}}}});var lI=le(()=>{CP();Kg()});function O9(n){return wS[n]&&!wS[n].multiple}function b9(n){return!wS[n].multiple||wS[n].unique||!1}var Xe,wS,M9=le(()=>{Xe={multiple:!1},wS={year:Xe,track:Xe,disk:Xe,title:Xe,artist:Xe,artists:{multiple:!0,unique:!0},albumartist:Xe,albumartists:{multiple:!0,unique:!0},album:Xe,date:Xe,originaldate:Xe,originalyear:Xe,releasedate:Xe,comment:{multiple:!0,unique:!1},genre:{multiple:!0,unique:!0},picture:{multiple:!0,unique:!0},composer:{multiple:!0,unique:!0},lyrics:{multiple:!0,unique:!1},albumsort:{multiple:!1,unique:!0},titlesort:{multiple:!1,unique:!0},work:{multiple:!1,unique:!0},artistsort:{multiple:!1,unique:!0},albumartistsort:{multiple:!1,unique:!0},composersort:{multiple:!1,unique:!0},lyricist:{multiple:!0,unique:!0},writer:{multiple:!0,unique:!0},conductor:{multiple:!0,unique:!0},remixer:{multiple:!0,unique:!0},arranger:{multiple:!0,unique:!0},engineer:{multiple:!0,unique:!0},producer:{multiple:!0,unique:!0},technician:{multiple:!0,unique:!0},djmixer:{multiple:!0,unique:!0},mixer:{multiple:!0,unique:!0},label:{multiple:!0,unique:!0},grouping:Xe,subtitle:{multiple:!0},discsubtitle:Xe,totaltracks:Xe,totaldiscs:Xe,compilation:Xe,rating:{multiple:!0},bpm:Xe,mood:Xe,media:Xe,catalognumber:{multiple:!0,unique:!0},tvShow:Xe,tvShowSort:Xe,tvSeason:Xe,tvEpisode:Xe,tvEpisodeId:Xe,tvNetwork:Xe,podcast:Xe,podcasturl:Xe,releasestatus:Xe,releasetype:{multiple:!0},releasecountry:Xe,script:Xe,language:Xe,copyright:Xe,license:Xe,encodedby:Xe,encodersettings:Xe,gapless:Xe,barcode:Xe,isrc:{multiple:!0},asin:Xe,musicbrainz_recordingid:Xe,musicbrainz_trackid:Xe,musicbrainz_albumid:Xe,musicbrainz_artistid:{multiple:!0},musicbrainz_albumartistid:{multiple:!0},musicbrainz_releasegroupid:Xe,musicbrainz_workid:Xe,musicbrainz_trmid:Xe,musicbrainz_discid:Xe,acoustid_id:Xe,acoustid_fingerprint:Xe,musicip_puid:Xe,musicip_fingerprint:Xe,website:Xe,"performer:instrument":{multiple:!0,unique:!0},averageLevel:Xe,peakLevel:Xe,notes:{multiple:!0,unique:!1},key:Xe,originalalbum:Xe,originalartist:Xe,discogs_artist_id:{multiple:!0,unique:!0},discogs_release_id:Xe,discogs_label_id:Xe,discogs_master_release_id:Xe,discogs_votes:Xe,discogs_rating:Xe,replaygain_track_peak:Xe,replaygain_track_gain:Xe,replaygain_album_peak:Xe,replaygain_album_gain:Xe,replaygain_track_minmax:Xe,replaygain_album_minmax:Xe,replaygain_undo:Xe,description:{multiple:!0},longDescription:Xe,category:{multiple:!0},hdVideo:Xe,keywords:{multiple:!0},movement:Xe,movementIndex:Xe,movementTotal:Xe,podcastId:Xe,showMovement:Xe,stik:Xe,playCounter:Xe}});var er,Ns=le(()=>{er=class{static toIntOrNull(r){let o=Number.parseInt(r,10);return Number.isNaN(o)?null:o}static normalizeTrack(r){let o=r.toString().split("/");return{no:Number.parseInt(o[0],10)||null,of:Number.parseInt(o[1],10)||null}}constructor(r,o){this.tagTypes=r,this.tagMap=o}mapGenericTag(r,o){r={id:r.id,value:r.value},this.postMap(r,o);let i=this.getCommonName(r.id);return i?{id:i,value:r.value}:null}getCommonName(r){return this.tagMap[r]}postMap(r,o){}};er.maxRatingScore=1});var MFe,OS,_9=le(()=>{Ns();MFe={title:"title",artist:"artist",album:"album",year:"year",comment:"comment",track:"track",genre:"genre"},OS=class extends er{constructor(){super(["ID3v1"],MFe)}}});var Eo,zp=le(()=>{Ns();Eo=class extends er{constructor(r,o){let i={};for(let e of Object.keys(o))i[e.toUpperCase()]=o[e];super(r,i)}getCommonName(r){return this.tagMap[r.toUpperCase()]}}});var _Fe,bS,N9=le(()=>{SA();Ns();zp();Kt();_Fe={TIT2:"title",TPE1:"artist","TXXX:Artists":"artists",TPE2:"albumartist",TALB:"album",TDRV:"date",TORY:"originalyear",TPOS:"disk",TCON:"genre",APIC:"picture",TCOM:"composer",USLT:"lyrics",TSOA:"albumsort",TSOT:"titlesort",TOAL:"originalalbum",TSOP:"artistsort",TSO2:"albumartistsort",TSOC:"composersort",TEXT:"lyricist","TXXX:Writer":"writer",TPE3:"conductor",TPE4:"remixer","IPLS:arranger":"arranger","IPLS:engineer":"engineer","IPLS:producer":"producer","IPLS:DJ-mix":"djmixer","IPLS:mix":"mixer",TPUB:"label",TIT1:"grouping",TIT3:"subtitle",TRCK:"track",TCMP:"compilation",POPM:"rating",TBPM:"bpm",TMED:"media","TXXX:CATALOGNUMBER":"catalognumber","TXXX:MusicBrainz Album Status":"releasestatus","TXXX:MusicBrainz Album Type":"releasetype","TXXX:MusicBrainz Album Release Country":"releasecountry","TXXX:RELEASECOUNTRY":"releasecountry","TXXX:SCRIPT":"script",TLAN:"language",TCOP:"copyright",WCOP:"license",TENC:"encodedby",TSSE:"encodersettings","TXXX:BARCODE":"barcode","TXXX:ISRC":"isrc",TSRC:"isrc","TXXX:ASIN":"asin","TXXX:originalyear":"originalyear","UFID:http://musicbrainz.org":"musicbrainz_recordingid","TXXX:MusicBrainz Release Track Id":"musicbrainz_trackid","TXXX:MusicBrainz Album Id":"musicbrainz_albumid","TXXX:MusicBrainz Artist Id":"musicbrainz_artistid","TXXX:MusicBrainz Album Artist Id":"musicbrainz_albumartistid","TXXX:MusicBrainz Release Group Id":"musicbrainz_releasegroupid","TXXX:MusicBrainz Work Id":"musicbrainz_workid","TXXX:MusicBrainz TRM Id":"musicbrainz_trmid","TXXX:MusicBrainz Disc Id":"musicbrainz_discid","TXXX:ACOUSTID_ID":"acoustid_id","TXXX:Acoustid Id":"acoustid_id","TXXX:Acoustid Fingerprint":"acoustid_fingerprint","TXXX:MusicIP PUID":"musicip_puid","TXXX:MusicMagic Fingerprint":"musicip_fingerprint",WOAR:"website",TDRC:"date",TYER:"year",TDOR:"originaldate","TIPL:arranger":"arranger","TIPL:engineer":"engineer","TIPL:producer":"producer","TIPL:DJ-mix":"djmixer","TIPL:mix":"mixer",TMOO:"mood",SYLT:"lyrics",TSST:"discsubtitle",TKEY:"key",COMM:"comment",TOPE:"originalartist","PRIV:AverageLevel":"averageLevel","PRIV:PeakLevel":"peakLevel","TXXX:DISCOGS_ARTIST_ID":"discogs_artist_id","TXXX:DISCOGS_ARTISTS":"artists","TXXX:DISCOGS_ARTIST_NAME":"artists","TXXX:DISCOGS_ALBUM_ARTISTS":"albumartist","TXXX:DISCOGS_CATALOG":"catalognumber","TXXX:DISCOGS_COUNTRY":"releasecountry","TXXX:DISCOGS_DATE":"originaldate","TXXX:DISCOGS_LABEL":"label","TXXX:DISCOGS_LABEL_ID":"discogs_label_id","TXXX:DISCOGS_MASTER_RELEASE_ID":"discogs_master_release_id","TXXX:DISCOGS_RATING":"discogs_rating","TXXX:DISCOGS_RELEASED":"date","TXXX:DISCOGS_RELEASE_ID":"discogs_release_id","TXXX:DISCOGS_VOTES":"discogs_votes","TXXX:CATALOGID":"catalognumber","TXXX:STYLE":"genre","TXXX:REPLAYGAIN_TRACK_PEAK":"replaygain_track_peak","TXXX:REPLAYGAIN_TRACK_GAIN":"replaygain_track_gain","TXXX:REPLAYGAIN_ALBUM_PEAK":"replaygain_album_peak","TXXX:REPLAYGAIN_ALBUM_GAIN":"replaygain_album_gain","TXXX:MP3GAIN_MINMAX":"replaygain_track_minmax","TXXX:MP3GAIN_ALBUM_MINMAX":"replaygain_album_minmax","TXXX:MP3GAIN_UNDO":"replaygain_undo",MVNM:"movement",MVIN:"movementIndex",PCST:"podcast",TCAT:"category",TDES:"description",TDRL:"releasedate",TGID:"podcastId",TKWD:"keywords",WFED:"podcasturl",GRP1:"grouping",PCNT:"playCounter"},bS=class n extends Eo{static toRating(r){return{source:r.email,rating:r.rating>0?(r.rating-1)/254*er.maxRatingScore:void 0}}constructor(){super(["ID3v2.3","ID3v2.4"],_Fe)}postMap(r,o){switch(r.id){case"UFID":{let i=r.value;i.owner_identifier==="http://musicbrainz.org"&&(r.id+=`:${i.owner_identifier}`,r.value=Vr(i.identifier,"latin1"))}break;case"PRIV":{let i=r.value;switch(i.owner_identifier){case"AverageLevel":case"PeakValue":r.id+=`:${i.owner_identifier}`,r.value=i.data.length===4?ve.get(i.data,0):null,r.value===null&&o.addWarning("Failed to parse PRIV:PeakValue");break;default:o.addWarning(`Unknown PRIV owner-identifier: ${i.data}`)}}break;case"POPM":r.value=n.toRating(r.value);break;default:break}}}});var NFe,MS,T9=le(()=>{Ns();NFe={Title:"title",Author:"artist","WM/AlbumArtist":"albumartist","WM/AlbumTitle":"album","WM/Year":"date","WM/OriginalReleaseTime":"originaldate","WM/OriginalReleaseYear":"originalyear",Description:"comment","WM/TrackNumber":"track","WM/PartOfSet":"disk","WM/Genre":"genre","WM/Composer":"composer","WM/Lyrics":"lyrics","WM/AlbumSortOrder":"albumsort","WM/TitleSortOrder":"titlesort","WM/ArtistSortOrder":"artistsort","WM/AlbumArtistSortOrder":"albumartistsort","WM/ComposerSortOrder":"composersort","WM/Writer":"lyricist","WM/Conductor":"conductor","WM/ModifiedBy":"remixer","WM/Engineer":"engineer","WM/Producer":"producer","WM/DJMixer":"djmixer","WM/Mixer":"mixer","WM/Publisher":"label","WM/ContentGroupDescription":"grouping","WM/SubTitle":"subtitle","WM/SetSubTitle":"discsubtitle","WM/IsCompilation":"compilation","WM/SharedUserRating":"rating","WM/BeatsPerMinute":"bpm","WM/Mood":"mood","WM/Media":"media","WM/CatalogNo":"catalognumber","MusicBrainz/Album Status":"releasestatus","MusicBrainz/Album Type":"releasetype","MusicBrainz/Album Release Country":"releasecountry","WM/Script":"script","WM/Language":"language",Copyright:"copyright",LICENSE:"license","WM/EncodedBy":"encodedby","WM/EncodingSettings":"encodersettings","WM/Barcode":"barcode","WM/ISRC":"isrc","MusicBrainz/Track Id":"musicbrainz_recordingid","MusicBrainz/Release Track Id":"musicbrainz_trackid","MusicBrainz/Album Id":"musicbrainz_albumid","MusicBrainz/Artist Id":"musicbrainz_artistid","MusicBrainz/Album Artist Id":"musicbrainz_albumartistid","MusicBrainz/Release Group Id":"musicbrainz_releasegroupid","MusicBrainz/Work Id":"musicbrainz_workid","MusicBrainz/TRM Id":"musicbrainz_trmid","MusicBrainz/Disc Id":"musicbrainz_discid","Acoustid/Id":"acoustid_id","Acoustid/Fingerprint":"acoustid_fingerprint","MusicIP/PUID":"musicip_puid","WM/ARTISTS":"artists","WM/InitialKey":"key",ASIN:"asin","WM/Work":"work","WM/AuthorURL":"website","WM/Picture":"picture"},MS=class n extends er{static toRating(r){return{rating:Number.parseFloat(r+1)/5}}constructor(){super(["asf"],NFe)}postMap(r){switch(r.id){case"WM/SharedUserRating":{let o=r.id.split(":");r.value=n.toRating(r.value),r.id=o[0];break}}}}});var TFe,_S,R9=le(()=>{zp();TFe={TT2:"title",TP1:"artist",TP2:"albumartist",TAL:"album",TYE:"year",COM:"comment",TRK:"track",TPA:"disk",TCO:"genre",PIC:"picture",TCM:"composer",TOR:"originaldate",TOT:"originalalbum",TXT:"lyricist",TP3:"conductor",TPB:"label",TT1:"grouping",TT3:"subtitle",TLA:"language",TCR:"copyright",WCP:"license",TEN:"encodedby",TSS:"encodersettings",WAR:"website",PCS:"podcast",TCP:"compilation",TDR:"date",TS2:"albumartistsort",TSA:"albumsort",TSC:"composersort",TSP:"artistsort",TST:"titlesort",WFD:"podcasturl",TBP:"bpm",GP1:"grouping"},_S=class extends Eo{constructor(){super(["ID3v2.2"],TFe)}}});var RFe,NS,k9=le(()=>{zp();RFe={Title:"title",Artist:"artist",Artists:"artists","Album Artist":"albumartist",Album:"album",Year:"date",Originalyear:"originalyear",Originaldate:"originaldate",Releasedate:"releasedate",Comment:"comment",Track:"track",Disc:"disk",DISCNUMBER:"disk",Genre:"genre","Cover Art (Front)":"picture","Cover Art (Back)":"picture",Composer:"composer",Lyrics:"lyrics",ALBUMSORT:"albumsort",TITLESORT:"titlesort",WORK:"work",ARTISTSORT:"artistsort",ALBUMARTISTSORT:"albumartistsort",COMPOSERSORT:"composersort",Lyricist:"lyricist",Writer:"writer",Conductor:"conductor",MixArtist:"remixer",Arranger:"arranger",Engineer:"engineer",Producer:"producer",DJMixer:"djmixer",Mixer:"mixer",Label:"label",Grouping:"grouping",Subtitle:"subtitle",DiscSubtitle:"discsubtitle",Compilation:"compilation",BPM:"bpm",Mood:"mood",Media:"media",CatalogNumber:"catalognumber",MUSICBRAINZ_ALBUMSTATUS:"releasestatus",MUSICBRAINZ_ALBUMTYPE:"releasetype",RELEASECOUNTRY:"releasecountry",Script:"script",Language:"language",Copyright:"copyright",LICENSE:"license",EncodedBy:"encodedby",EncoderSettings:"encodersettings",Barcode:"barcode",ISRC:"isrc",ASIN:"asin",musicbrainz_trackid:"musicbrainz_recordingid",musicbrainz_releasetrackid:"musicbrainz_trackid",MUSICBRAINZ_ALBUMID:"musicbrainz_albumid",MUSICBRAINZ_ARTISTID:"musicbrainz_artistid",MUSICBRAINZ_ALBUMARTISTID:"musicbrainz_albumartistid",MUSICBRAINZ_RELEASEGROUPID:"musicbrainz_releasegroupid",MUSICBRAINZ_WORKID:"musicbrainz_workid",MUSICBRAINZ_TRMID:"musicbrainz_trmid",MUSICBRAINZ_DISCID:"musicbrainz_discid",Acoustid_Id:"acoustid_id",ACOUSTID_FINGERPRINT:"acoustid_fingerprint",MUSICIP_PUID:"musicip_puid",Weblink:"website",REPLAYGAIN_TRACK_GAIN:"replaygain_track_gain",REPLAYGAIN_TRACK_PEAK:"replaygain_track_peak",MP3GAIN_MINMAX:"replaygain_track_minmax",MP3GAIN_UNDO:"replaygain_undo"},NS=class extends Eo{constructor(){super(["APEv2"],RFe)}}});var kFe,vFe,Kd,v9=le(()=>{zp();kFe={"\xA9nam":"title","\xA9ART":"artist",aART:"albumartist","----:com.apple.iTunes:Band":"albumartist","\xA9alb":"album","\xA9day":"date","\xA9cmt":"comment","\xA9com":"comment",trkn:"track",disk:"disk","\xA9gen":"genre",covr:"picture","\xA9wrt":"composer","\xA9lyr":"lyrics",soal:"albumsort",sonm:"titlesort",soar:"artistsort",soaa:"albumartistsort",soco:"composersort","----:com.apple.iTunes:LYRICIST":"lyricist","----:com.apple.iTunes:CONDUCTOR":"conductor","----:com.apple.iTunes:REMIXER":"remixer","----:com.apple.iTunes:ENGINEER":"engineer","----:com.apple.iTunes:PRODUCER":"producer","----:com.apple.iTunes:DJMIXER":"djmixer","----:com.apple.iTunes:MIXER":"mixer","----:com.apple.iTunes:LABEL":"label","\xA9grp":"grouping","----:com.apple.iTunes:SUBTITLE":"subtitle","----:com.apple.iTunes:DISCSUBTITLE":"discsubtitle",cpil:"compilation",tmpo:"bpm","----:com.apple.iTunes:MOOD":"mood","----:com.apple.iTunes:MEDIA":"media","----:com.apple.iTunes:CATALOGNUMBER":"catalognumber",tvsh:"tvShow",tvsn:"tvSeason",tves:"tvEpisode",sosn:"tvShowSort",tven:"tvEpisodeId",tvnn:"tvNetwork",pcst:"podcast",purl:"podcasturl","----:com.apple.iTunes:MusicBrainz Album Status":"releasestatus","----:com.apple.iTunes:MusicBrainz Album Type":"releasetype","----:com.apple.iTunes:MusicBrainz Album Release Country":"releasecountry","----:com.apple.iTunes:SCRIPT":"script","----:com.apple.iTunes:LANGUAGE":"language",cprt:"copyright","\xA9cpy":"copyright","----:com.apple.iTunes:LICENSE":"license","\xA9too":"encodedby",pgap:"gapless","----:com.apple.iTunes:BARCODE":"barcode","----:com.apple.iTunes:ISRC":"isrc","----:com.apple.iTunes:ASIN":"asin","----:com.apple.iTunes:NOTES":"comment","----:com.apple.iTunes:MusicBrainz Track Id":"musicbrainz_recordingid","----:com.apple.iTunes:MusicBrainz Release Track Id":"musicbrainz_trackid","----:com.apple.iTunes:MusicBrainz Album Id":"musicbrainz_albumid","----:com.apple.iTunes:MusicBrainz Artist Id":"musicbrainz_artistid","----:com.apple.iTunes:MusicBrainz Album Artist Id":"musicbrainz_albumartistid","----:com.apple.iTunes:MusicBrainz Release Group Id":"musicbrainz_releasegroupid","----:com.apple.iTunes:MusicBrainz Work Id":"musicbrainz_workid","----:com.apple.iTunes:MusicBrainz TRM Id":"musicbrainz_trmid","----:com.apple.iTunes:MusicBrainz Disc Id":"musicbrainz_discid","----:com.apple.iTunes:Acoustid Id":"acoustid_id","----:com.apple.iTunes:Acoustid Fingerprint":"acoustid_fingerprint","----:com.apple.iTunes:MusicIP PUID":"musicip_puid","----:com.apple.iTunes:fingerprint":"musicip_fingerprint","----:com.apple.iTunes:replaygain_track_gain":"replaygain_track_gain","----:com.apple.iTunes:replaygain_track_peak":"replaygain_track_peak","----:com.apple.iTunes:replaygain_album_gain":"replaygain_album_gain","----:com.apple.iTunes:replaygain_album_peak":"replaygain_album_peak","----:com.apple.iTunes:replaygain_track_minmax":"replaygain_track_minmax","----:com.apple.iTunes:replaygain_album_minmax":"replaygain_album_minmax","----:com.apple.iTunes:replaygain_undo":"replaygain_undo",gnre:"genre","----:com.apple.iTunes:ALBUMARTISTSORT":"albumartistsort","----:com.apple.iTunes:ARTISTS":"artists","----:com.apple.iTunes:ORIGINALDATE":"originaldate","----:com.apple.iTunes:ORIGINALYEAR":"originalyear","----:com.apple.iTunes:RELEASEDATE":"releasedate",desc:"description",ldes:"longDescription","\xA9mvn":"movement","\xA9mvi":"movementIndex","\xA9mvc":"movementTotal","\xA9wrk":"work",catg:"category",egid:"podcastId",hdvd:"hdVideo",keyw:"keywords",shwm:"showMovement",stik:"stik",rate:"rating"},vFe="iTunes",Kd=class extends Eo{constructor(){super([vFe],kFe)}postMap(r,o){switch(r.id){case"rate":r.value={source:void 0,rating:Number.parseFloat(r.value)/100};break}}}});var PFe,TS,P9=le(()=>{Ns();PFe={TITLE:"title",ARTIST:"artist",ARTISTS:"artists",ALBUMARTIST:"albumartist","ALBUM ARTIST":"albumartist",ALBUM:"album",DATE:"date",ORIGINALDATE:"originaldate",ORIGINALYEAR:"originalyear",RELEASEDATE:"releasedate",COMMENT:"comment",TRACKNUMBER:"track",DISCNUMBER:"disk",GENRE:"genre",METADATA_BLOCK_PICTURE:"picture",COMPOSER:"composer",LYRICS:"lyrics",ALBUMSORT:"albumsort",TITLESORT:"titlesort",WORK:"work",ARTISTSORT:"artistsort",ALBUMARTISTSORT:"albumartistsort",COMPOSERSORT:"composersort",LYRICIST:"lyricist",WRITER:"writer",CONDUCTOR:"conductor",REMIXER:"remixer",ARRANGER:"arranger",ENGINEER:"engineer",PRODUCER:"producer",DJMIXER:"djmixer",MIXER:"mixer",LABEL:"label",GROUPING:"grouping",SUBTITLE:"subtitle",DISCSUBTITLE:"discsubtitle",TRACKTOTAL:"totaltracks",DISCTOTAL:"totaldiscs",COMPILATION:"compilation",RATING:"rating",BPM:"bpm",KEY:"key",MOOD:"mood",MEDIA:"media",CATALOGNUMBER:"catalognumber",RELEASESTATUS:"releasestatus",RELEASETYPE:"releasetype",RELEASECOUNTRY:"releasecountry",SCRIPT:"script",LANGUAGE:"language",COPYRIGHT:"copyright",LICENSE:"license",ENCODEDBY:"encodedby",ENCODERSETTINGS:"encodersettings",BARCODE:"barcode",ISRC:"isrc",ASIN:"asin",MUSICBRAINZ_TRACKID:"musicbrainz_recordingid",MUSICBRAINZ_RELEASETRACKID:"musicbrainz_trackid",MUSICBRAINZ_ALBUMID:"musicbrainz_albumid",MUSICBRAINZ_ARTISTID:"musicbrainz_artistid",MUSICBRAINZ_ALBUMARTISTID:"musicbrainz_albumartistid",MUSICBRAINZ_RELEASEGROUPID:"musicbrainz_releasegroupid",MUSICBRAINZ_WORKID:"musicbrainz_workid",MUSICBRAINZ_TRMID:"musicbrainz_trmid",MUSICBRAINZ_DISCID:"musicbrainz_discid",ACOUSTID_ID:"acoustid_id",ACOUSTID_ID_FINGERPRINT:"acoustid_fingerprint",MUSICIP_PUID:"musicip_puid",WEBSITE:"website",NOTES:"notes",TOTALTRACKS:"totaltracks",TOTALDISCS:"totaldiscs",DISCOGS_ARTIST_ID:"discogs_artist_id",DISCOGS_ARTISTS:"artists",DISCOGS_ARTIST_NAME:"artists",DISCOGS_ALBUM_ARTISTS:"albumartist",DISCOGS_CATALOG:"catalognumber",DISCOGS_COUNTRY:"releasecountry",DISCOGS_DATE:"originaldate",DISCOGS_LABEL:"label",DISCOGS_LABEL_ID:"discogs_label_id",DISCOGS_MASTER_RELEASE_ID:"discogs_master_release_id",DISCOGS_RATING:"discogs_rating",DISCOGS_RELEASED:"date",DISCOGS_RELEASE_ID:"discogs_release_id",DISCOGS_VOTES:"discogs_votes",CATALOGID:"catalognumber",STYLE:"genre",REPLAYGAIN_TRACK_GAIN:"replaygain_track_gain",REPLAYGAIN_TRACK_PEAK:"replaygain_track_peak",REPLAYGAIN_ALBUM_GAIN:"replaygain_album_gain",REPLAYGAIN_ALBUM_PEAK:"replaygain_album_peak",REPLAYGAIN_MINMAX:"replaygain_track_minmax",REPLAYGAIN_ALBUM_MINMAX:"replaygain_album_minmax",REPLAYGAIN_UNDO:"replaygain_undo"},TS=class n extends er{static toRating(r,o,i){return{source:r?r.toLowerCase():void 0,rating:Number.parseFloat(o)/i*er.maxRatingScore}}constructor(){super(["vorbis"],PFe)}postMap(r){if(r.id==="RATING")r.value=n.toRating(void 0,r.value,100);else if(r.id.indexOf("RATING:")===0){let o=r.id.split(":");r.value=n.toRating(o[1],r.value,1),r.id=o[0]}}}});var GFe,RS,G9=le(()=>{Ns();GFe={IART:"artist",ICRD:"date",INAM:"title",TITL:"title",IPRD:"album",ITRK:"track",IPRT:"track",COMM:"comment",ICMT:"comment",ICNT:"releasecountry",GNRE:"genre",IWRI:"writer",RATE:"rating",YEAR:"year",ISFT:"encodedby",CODE:"encodedby",TURL:"website",IGNR:"genre",IENG:"engineer",ITCH:"technician",IMED:"media",IRPD:"album"},RS=class extends er{constructor(){super(["exif"],GFe)}}});var FFe,kS,F9=le(()=>{zp();FFe={"segment:title":"title","album:ARTIST":"albumartist","album:ARTISTSORT":"albumartistsort","album:TITLE":"album","album:DATE_RECORDED":"originaldate","album:DATE_RELEASED":"releasedate","album:PART_NUMBER":"disk","album:TOTAL_PARTS":"totaltracks","track:ARTIST":"artist","track:ARTISTSORT":"artistsort","track:TITLE":"title","track:PART_NUMBER":"track","track:MUSICBRAINZ_TRACKID":"musicbrainz_recordingid","track:MUSICBRAINZ_ALBUMID":"musicbrainz_albumid","track:MUSICBRAINZ_ARTISTID":"musicbrainz_artistid","track:PUBLISHER":"label","track:GENRE":"genre","track:ENCODER":"encodedby","track:ENCODER_OPTIONS":"encodersettings","edition:TOTAL_PARTS":"totaldiscs",picture:"picture"},kS=class extends Eo{constructor(){super(["matroska"],FFe)}}});var LFe,vS,L9=le(()=>{Ns();LFe={NAME:"title",AUTH:"artist","(c) ":"copyright",ANNO:"comment"},vS=class extends er{constructor(){super(["AIFF"],LFe)}}});var PS,U9=le(()=>{_9();N9();T9();R9();k9();v9();P9();G9();F9();L9();Ht();PS=class{constructor(){this.tagMappers={},[new OS,new _S,new bS,new Kd,new Kd,new TS,new NS,new MS,new RS,new kS,new vS].forEach(r=>{this.registerTagMapper(r)})}mapTag(r,o,i){if(this.tagMappers[r])return this.tagMappers[r].mapGenericTag(o,i);throw new II(`No generic tag mapper defined for tag-format: ${r}`)}registerTagMapper(r){for(let o of r.tagTypes)this.tagMappers[o]=r}}});function H9(n){return QP.test(n)?HFe(n):UFe(n)}function UFe(n){return{contentType:Jp.lyrics,timeStampFormat:qp.notSynchronized,text:n.trim(),syncText:[]}}function HFe(n){let r=n.split(` +Check the top-level render call using <`+ge+">.")}return $}function wL(k,$){if(!(!k._store||k._store.validated||k.key!=null)){k._store.validated=!0;var ge=Mae($);if(!DL[ge]){DL[ge]=!0;var fe="";k&&k._owner&&k._owner!==P.current&&(fe=" It was passed a child from "+pe(k._owner.type)+"."),UI(k),G('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ge,fe),UI(null)}}}function OL(k,$){if(typeof k=="object"){if(Ke(k))for(var ge=0;ge",xe=" Did you accidentally export a JSX literal instead of a component?"):CA=typeof k,G("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",CA,xe)}var UA=de.apply(this,arguments);if(UA==null)return UA;if(fe)for(var st=2;st10&&M("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),fe._updatedFibers.clear()}}}var NL=!1,Hu=null;function kae(k){if(Hu===null)try{var $=("require"+Math.random()).slice(0,7),ge=VQ&&VQ[$];Hu=ge.call(VQ,"timers").setImmediate}catch{Hu=function(xe){NL===!1&&(NL=!0,typeof MessageChannel>"u"&&G("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var MA=new MessageChannel;MA.port1.onmessage=xe,MA.port2.postMessage(void 0)}}return Hu(k)}var HI=0,TL=!1;function RL(k){{var $=HI;HI++,_.current===null&&(_.current=[]);var ge=_.isBatchingLegacy,fe;try{if(_.isBatchingLegacy=!0,fe=k(),!ge&&_.didScheduleLegacyUpdate){var xe=_.current;xe!==null&&(_.didScheduleLegacyUpdate=!1,Zw(xe))}}catch(Jt){throw Ku($),Jt}finally{_.isBatchingLegacy=ge}if(fe!==null&&typeof fe=="object"&&typeof fe.then=="function"){var MA=fe,CA=!1,UA={then:function(Jt,pr){CA=!0,MA.then(function(Zr){Ku($),HI===0?zw(Zr,Jt,pr):Jt(Zr)},function(Zr){Ku($),pr(Zr)})}};return!TL&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){CA||(TL=!0,G("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),UA}else{var st=fe;if(Ku($),HI===0){var mt=_.current;mt!==null&&(Zw(mt),_.current=null);var Pt={then:function(Jt,pr){_.current===null?(_.current=[],zw(st,Jt,pr)):Jt(st)}};return Pt}else{var Gt={then:function(Jt,pr){Jt(st)}};return Gt}}}}function Ku(k){k!==HI-1&&G("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),HI=k}function zw(k,$,ge){{var fe=_.current;if(fe!==null)try{Zw(fe),kae(function(){fe.length===0?(_.current=null,$(k)):zw(k,$,ge)})}catch(xe){ge(xe)}else $(k)}}var Ww=!1;function Zw(k){if(!Ww){Ww=!0;var $=0;try{for(;${"use strict";process.env.NODE_ENV==="production"?hR.exports=Zq():hR.exports=Xq()});var Xc=W((BtA,M8)=>{"use strict";var im=We("crypto"),o_e=We("assert");function ao(n){if(!(n instanceof Buffer))throw TypeError(`Expected Buffer instead of: ${n.constructor.name}`);return n}function n_e(n,r,o){ao(n),ao(r),ao(o);let i=im.createCipheriv("aes-256-cbc",n,o);return Buffer.concat([i.update(r),i.final()])}function s_e(n,r,o){ao(n),ao(r),ao(o);let i=im.createDecipheriv("aes-256-cbc",n,o);return Buffer.concat([i.update(r),i.final()])}function pp(n,r){ao(n),ao(r);let o=im.createHmac("sha256",n);return o.update(r),Buffer.from(o.digest())}function g_e(n){ao(n);let r=im.createHash("sha512");return r.update(n),r.digest()}function c_e(n,r,o,i){if(ao(n),ao(r),ao(o),r.byteLength!=32)throw new Error("Got salt of incorrect length");i=i||3,o_e(i>=1&&i<=3);let e=pp(r,n),a=new Uint8Array(o.byteLength+1+32);a.set(o,32),a[a.length-1]=1;let A=[pp(e,Buffer.from(a.slice(32)))];return i>1&&(a.set(A[A.length-1]),a[a.length-1]=2,A.push(pp(e,Buffer.from(a)))),i>2&&(a.set(A[A.length-1]),a[a.length-1]=3,A.push(pp(e,Buffer.from(a)))),A}function I_e(n,r,o,i){let e=pp(r,n).slice(0,i);if(o.length!==i||e.length!==i)throw new Error("Bad MAC length");if(!o.equals(e))throw new Error("Bad MAC")}M8.exports={deriveSecrets:c_e,decrypt:s_e,encrypt:n_e,hash:g_e,calculateMAC:pp,verifyMAC:I_e}});var Y8=W(ds=>{"use strict";Object.defineProperty(ds,"__esModule",{value:!0});var ftA=new Uint8Array(16),G8=new Uint8Array(32);G8[0]=9;function lA(n){var r,o=new Float64Array(16);if(n)for(r=0;r>24&255,n[r+1]=o>>16&255,n[r+2]=o>>8&255,n[r+3]=o&255,n[r+4]=i>>24&255,n[r+5]=i>>16&255,n[r+6]=i>>8&255,n[r+7]=i&255}function h_e(n,r,o,i,e){var a,A=0;for(a=0;a>>8)-1}function F8(n,r,o,i){return h_e(n,r,o,i,32)}function dg(n,r){var o;for(o=0;o<16;o++)n[o]=r[o]|0}function Ck(n){var r,o,i=1;for(r=0;r<16;r++)o=n[r]+i+65535,i=Math.floor(o/65536),n[r]=o-i*65536;n[0]+=i-1+37*(i-1)}function Ep(n,r,o){for(var i,e=~(o-1),a=0;a<16;a++)i=e&(n[a]^r[a]),n[a]^=i,r[a]^=i}function hp(n,r){var o,i,e,a=lA(),A=lA();for(o=0;o<16;o++)A[o]=r[o];for(Ck(A),Ck(A),Ck(A),i=0;i<2;i++){for(a[0]=A[0]-65517,o=1;o<15;o++)a[o]=A[o]-65535-(a[o-1]>>16&1),a[o-1]&=65535;a[15]=A[15]-32767-(a[14]>>16&1),e=a[15]>>16&1,a[14]&=65535,Ep(A,a,1-e)}for(o=0;o<16;o++)n[2*o]=A[o]&255,n[2*o+1]=A[o]>>8}function R8(n,r){var o=new Uint8Array(32),i=new Uint8Array(32);return hp(o,n),hp(i,r),F8(o,0,i,0)}function L8(n){var r=new Uint8Array(32);return hp(r,n),r[0]&1}function fk(n,r){var o;for(o=0;o<16;o++)n[o]=r[2*o]+(r[2*o+1]<<8);n[15]&=32767}function Fo(n,r,o){for(var i=0;i<16;i++)n[i]=r[i]+o[i]}function Uo(n,r,o){for(var i=0;i<16;i++)n[i]=r[i]-o[i]}function ot(n,r,o){var i,e,a=0,A=0,t=0,s=0,g=0,c=0,I=0,E=0,B=0,f=0,Q=0,y=0,m=0,T=0,_=0,P=0,Y=0,j=0,K=0,q=0,V=0,H=0,v=0,Z=0,U=0,M=0,G=0,te=0,Be=0,Ce=0,ke=0,Ee=o[0],me=o[1],_e=o[2],Ve=o[3],oA=o[4],tA=o[5],Pe=o[6],gA=o[7],Qe=o[8],he=o[9],ze=o[10],Ke=o[11],De=o[12],EA=o[13],pA=o[14],AA=o[15];i=r[0],a+=i*Ee,A+=i*me,t+=i*_e,s+=i*Ve,g+=i*oA,c+=i*tA,I+=i*Pe,E+=i*gA,B+=i*Qe,f+=i*he,Q+=i*ze,y+=i*Ke,m+=i*De,T+=i*EA,_+=i*pA,P+=i*AA,i=r[1],A+=i*Ee,t+=i*me,s+=i*_e,g+=i*Ve,c+=i*oA,I+=i*tA,E+=i*Pe,B+=i*gA,f+=i*Qe,Q+=i*he,y+=i*ze,m+=i*Ke,T+=i*De,_+=i*EA,P+=i*pA,Y+=i*AA,i=r[2],t+=i*Ee,s+=i*me,g+=i*_e,c+=i*Ve,I+=i*oA,E+=i*tA,B+=i*Pe,f+=i*gA,Q+=i*Qe,y+=i*he,m+=i*ze,T+=i*Ke,_+=i*De,P+=i*EA,Y+=i*pA,j+=i*AA,i=r[3],s+=i*Ee,g+=i*me,c+=i*_e,I+=i*Ve,E+=i*oA,B+=i*tA,f+=i*Pe,Q+=i*gA,y+=i*Qe,m+=i*he,T+=i*ze,_+=i*Ke,P+=i*De,Y+=i*EA,j+=i*pA,K+=i*AA,i=r[4],g+=i*Ee,c+=i*me,I+=i*_e,E+=i*Ve,B+=i*oA,f+=i*tA,Q+=i*Pe,y+=i*gA,m+=i*Qe,T+=i*he,_+=i*ze,P+=i*Ke,Y+=i*De,j+=i*EA,K+=i*pA,q+=i*AA,i=r[5],c+=i*Ee,I+=i*me,E+=i*_e,B+=i*Ve,f+=i*oA,Q+=i*tA,y+=i*Pe,m+=i*gA,T+=i*Qe,_+=i*he,P+=i*ze,Y+=i*Ke,j+=i*De,K+=i*EA,q+=i*pA,V+=i*AA,i=r[6],I+=i*Ee,E+=i*me,B+=i*_e,f+=i*Ve,Q+=i*oA,y+=i*tA,m+=i*Pe,T+=i*gA,_+=i*Qe,P+=i*he,Y+=i*ze,j+=i*Ke,K+=i*De,q+=i*EA,V+=i*pA,H+=i*AA,i=r[7],E+=i*Ee,B+=i*me,f+=i*_e,Q+=i*Ve,y+=i*oA,m+=i*tA,T+=i*Pe,_+=i*gA,P+=i*Qe,Y+=i*he,j+=i*ze,K+=i*Ke,q+=i*De,V+=i*EA,H+=i*pA,v+=i*AA,i=r[8],B+=i*Ee,f+=i*me,Q+=i*_e,y+=i*Ve,m+=i*oA,T+=i*tA,_+=i*Pe,P+=i*gA,Y+=i*Qe,j+=i*he,K+=i*ze,q+=i*Ke,V+=i*De,H+=i*EA,v+=i*pA,Z+=i*AA,i=r[9],f+=i*Ee,Q+=i*me,y+=i*_e,m+=i*Ve,T+=i*oA,_+=i*tA,P+=i*Pe,Y+=i*gA,j+=i*Qe,K+=i*he,q+=i*ze,V+=i*Ke,H+=i*De,v+=i*EA,Z+=i*pA,U+=i*AA,i=r[10],Q+=i*Ee,y+=i*me,m+=i*_e,T+=i*Ve,_+=i*oA,P+=i*tA,Y+=i*Pe,j+=i*gA,K+=i*Qe,q+=i*he,V+=i*ze,H+=i*Ke,v+=i*De,Z+=i*EA,U+=i*pA,M+=i*AA,i=r[11],y+=i*Ee,m+=i*me,T+=i*_e,_+=i*Ve,P+=i*oA,Y+=i*tA,j+=i*Pe,K+=i*gA,q+=i*Qe,V+=i*he,H+=i*ze,v+=i*Ke,Z+=i*De,U+=i*EA,M+=i*pA,G+=i*AA,i=r[12],m+=i*Ee,T+=i*me,_+=i*_e,P+=i*Ve,Y+=i*oA,j+=i*tA,K+=i*Pe,q+=i*gA,V+=i*Qe,H+=i*he,v+=i*ze,Z+=i*Ke,U+=i*De,M+=i*EA,G+=i*pA,te+=i*AA,i=r[13],T+=i*Ee,_+=i*me,P+=i*_e,Y+=i*Ve,j+=i*oA,K+=i*tA,q+=i*Pe,V+=i*gA,H+=i*Qe,v+=i*he,Z+=i*ze,U+=i*Ke,M+=i*De,G+=i*EA,te+=i*pA,Be+=i*AA,i=r[14],_+=i*Ee,P+=i*me,Y+=i*_e,j+=i*Ve,K+=i*oA,q+=i*tA,V+=i*Pe,H+=i*gA,v+=i*Qe,Z+=i*he,U+=i*ze,M+=i*Ke,G+=i*De,te+=i*EA,Be+=i*pA,Ce+=i*AA,i=r[15],P+=i*Ee,Y+=i*me,j+=i*_e,K+=i*Ve,q+=i*oA,V+=i*tA,H+=i*Pe,v+=i*gA,Z+=i*Qe,U+=i*he,M+=i*ze,G+=i*Ke,te+=i*De,Be+=i*EA,Ce+=i*pA,ke+=i*AA,a+=38*Y,A+=38*j,t+=38*K,s+=38*q,g+=38*V,c+=38*H,I+=38*v,E+=38*Z,B+=38*U,f+=38*M,Q+=38*G,y+=38*te,m+=38*Be,T+=38*Ce,_+=38*ke,e=1,i=a+e+65535,e=Math.floor(i/65536),a=i-e*65536,i=A+e+65535,e=Math.floor(i/65536),A=i-e*65536,i=t+e+65535,e=Math.floor(i/65536),t=i-e*65536,i=s+e+65535,e=Math.floor(i/65536),s=i-e*65536,i=g+e+65535,e=Math.floor(i/65536),g=i-e*65536,i=c+e+65535,e=Math.floor(i/65536),c=i-e*65536,i=I+e+65535,e=Math.floor(i/65536),I=i-e*65536,i=E+e+65535,e=Math.floor(i/65536),E=i-e*65536,i=B+e+65535,e=Math.floor(i/65536),B=i-e*65536,i=f+e+65535,e=Math.floor(i/65536),f=i-e*65536,i=Q+e+65535,e=Math.floor(i/65536),Q=i-e*65536,i=y+e+65535,e=Math.floor(i/65536),y=i-e*65536,i=m+e+65535,e=Math.floor(i/65536),m=i-e*65536,i=T+e+65535,e=Math.floor(i/65536),T=i-e*65536,i=_+e+65535,e=Math.floor(i/65536),_=i-e*65536,i=P+e+65535,e=Math.floor(i/65536),P=i-e*65536,a+=e-1+37*(e-1),e=1,i=a+e+65535,e=Math.floor(i/65536),a=i-e*65536,i=A+e+65535,e=Math.floor(i/65536),A=i-e*65536,i=t+e+65535,e=Math.floor(i/65536),t=i-e*65536,i=s+e+65535,e=Math.floor(i/65536),s=i-e*65536,i=g+e+65535,e=Math.floor(i/65536),g=i-e*65536,i=c+e+65535,e=Math.floor(i/65536),c=i-e*65536,i=I+e+65535,e=Math.floor(i/65536),I=i-e*65536,i=E+e+65535,e=Math.floor(i/65536),E=i-e*65536,i=B+e+65535,e=Math.floor(i/65536),B=i-e*65536,i=f+e+65535,e=Math.floor(i/65536),f=i-e*65536,i=Q+e+65535,e=Math.floor(i/65536),Q=i-e*65536,i=y+e+65535,e=Math.floor(i/65536),y=i-e*65536,i=m+e+65535,e=Math.floor(i/65536),m=i-e*65536,i=T+e+65535,e=Math.floor(i/65536),T=i-e*65536,i=_+e+65535,e=Math.floor(i/65536),_=i-e*65536,i=P+e+65535,e=Math.floor(i/65536),P=i-e*65536,a+=e-1+37*(e-1),n[0]=a,n[1]=A,n[2]=t,n[3]=s,n[4]=g,n[5]=c,n[6]=I,n[7]=E,n[8]=B,n[9]=f,n[10]=Q,n[11]=y,n[12]=m,n[13]=T,n[14]=_,n[15]=P}function Lo(n,r){ot(n,r,r)}function Qk(n,r){var o=lA(),i;for(i=0;i<16;i++)o[i]=r[i];for(i=253;i>=0;i--)Lo(o,o),i!==2&&i!==4&&ot(o,o,r);for(i=0;i<16;i++)n[i]=o[i]}function d_e(n,r){var o=lA(),i;for(i=0;i<16;i++)o[i]=r[i];for(i=250;i>=0;i--)Lo(o,o),i!==1&&ot(o,o,r);for(i=0;i<16;i++)n[i]=o[i]}function U8(n,r,o){var i=new Uint8Array(32),e=new Float64Array(80),a,A,t=lA(),s=lA(),g=lA(),c=lA(),I=lA(),E=lA();for(A=0;A<31;A++)i[A]=r[A];for(i[31]=r[31]&127|64,i[0]&=248,fk(e,o),A=0;A<16;A++)s[A]=e[A],c[A]=t[A]=g[A]=0;for(t[0]=c[0]=1,A=254;A>=0;--A)a=i[A>>>3]>>>(A&7)&1,Ep(t,s,a),Ep(g,c,a),Fo(I,t,g),Uo(t,t,g),Fo(g,s,c),Uo(s,s,c),Lo(c,I),Lo(E,t),ot(t,g,t),ot(g,s,I),Fo(I,t,g),Uo(t,t,g),Lo(s,t),Uo(g,c,E),ot(t,g,l_e),Fo(t,t,c),ot(g,g,t),ot(t,c,E),ot(c,s,e),Lo(s,I),Ep(t,s,a),Ep(g,c,a);for(A=0;A<16;A++)e[A+16]=t[A],e[A+32]=g[A],e[A+48]=s[A],e[A+64]=c[A];var B=e.subarray(32),f=e.subarray(16);return Qk(B,B),ot(f,f,B),hp(n,f),0}function u_e(n,r){return U8(n,r,G8)}var k8=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function v8(n,r,o,i){for(var e=new Int32Array(16),a=new Int32Array(16),A,t,s,g,c,I,E,B,f,Q,y,m,T,_,P,Y,j,K,q,V,H,v,Z,U,M,G,te=n[0],Be=n[1],Ce=n[2],ke=n[3],Ee=n[4],me=n[5],_e=n[6],Ve=n[7],oA=r[0],tA=r[1],Pe=r[2],gA=r[3],Qe=r[4],he=r[5],ze=r[6],Ke=r[7],De=0;i>=128;){for(q=0;q<16;q++)V=8*q+De,e[q]=o[V+0]<<24|o[V+1]<<16|o[V+2]<<8|o[V+3],a[q]=o[V+4]<<24|o[V+5]<<16|o[V+6]<<8|o[V+7];for(q=0;q<80;q++)if(A=te,t=Be,s=Ce,g=ke,c=Ee,I=me,E=_e,B=Ve,f=oA,Q=tA,y=Pe,m=gA,T=Qe,_=he,P=ze,Y=Ke,H=Ve,v=Ke,Z=v&65535,U=v>>>16,M=H&65535,G=H>>>16,H=(Ee>>>14|Qe<<18)^(Ee>>>18|Qe<<14)^(Qe>>>9|Ee<<23),v=(Qe>>>14|Ee<<18)^(Qe>>>18|Ee<<14)^(Ee>>>9|Qe<<23),Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,H=Ee&me^~Ee&_e,v=Qe&he^~Qe&ze,Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,H=k8[q*2],v=k8[q*2+1],Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,H=e[q%16],v=a[q%16],Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,U+=Z>>>16,M+=U>>>16,G+=M>>>16,j=M&65535|G<<16,K=Z&65535|U<<16,H=j,v=K,Z=v&65535,U=v>>>16,M=H&65535,G=H>>>16,H=(te>>>28|oA<<4)^(oA>>>2|te<<30)^(oA>>>7|te<<25),v=(oA>>>28|te<<4)^(te>>>2|oA<<30)^(te>>>7|oA<<25),Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,H=te&Be^te&Ce^Be&Ce,v=oA&tA^oA&Pe^tA&Pe,Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,U+=Z>>>16,M+=U>>>16,G+=M>>>16,B=M&65535|G<<16,Y=Z&65535|U<<16,H=g,v=m,Z=v&65535,U=v>>>16,M=H&65535,G=H>>>16,H=j,v=K,Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,U+=Z>>>16,M+=U>>>16,G+=M>>>16,g=M&65535|G<<16,m=Z&65535|U<<16,Be=A,Ce=t,ke=s,Ee=g,me=c,_e=I,Ve=E,te=B,tA=f,Pe=Q,gA=y,Qe=m,he=T,ze=_,Ke=P,oA=Y,q%16===15)for(V=0;V<16;V++)H=e[V],v=a[V],Z=v&65535,U=v>>>16,M=H&65535,G=H>>>16,H=e[(V+9)%16],v=a[(V+9)%16],Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,j=e[(V+1)%16],K=a[(V+1)%16],H=(j>>>1|K<<31)^(j>>>8|K<<24)^j>>>7,v=(K>>>1|j<<31)^(K>>>8|j<<24)^(K>>>7|j<<25),Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,j=e[(V+14)%16],K=a[(V+14)%16],H=(j>>>19|K<<13)^(K>>>29|j<<3)^j>>>6,v=(K>>>19|j<<13)^(j>>>29|K<<3)^(K>>>6|j<<26),Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,U+=Z>>>16,M+=U>>>16,G+=M>>>16,e[V]=M&65535|G<<16,a[V]=Z&65535|U<<16;H=te,v=oA,Z=v&65535,U=v>>>16,M=H&65535,G=H>>>16,H=n[0],v=r[0],Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,U+=Z>>>16,M+=U>>>16,G+=M>>>16,n[0]=te=M&65535|G<<16,r[0]=oA=Z&65535|U<<16,H=Be,v=tA,Z=v&65535,U=v>>>16,M=H&65535,G=H>>>16,H=n[1],v=r[1],Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,U+=Z>>>16,M+=U>>>16,G+=M>>>16,n[1]=Be=M&65535|G<<16,r[1]=tA=Z&65535|U<<16,H=Ce,v=Pe,Z=v&65535,U=v>>>16,M=H&65535,G=H>>>16,H=n[2],v=r[2],Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,U+=Z>>>16,M+=U>>>16,G+=M>>>16,n[2]=Ce=M&65535|G<<16,r[2]=Pe=Z&65535|U<<16,H=ke,v=gA,Z=v&65535,U=v>>>16,M=H&65535,G=H>>>16,H=n[3],v=r[3],Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,U+=Z>>>16,M+=U>>>16,G+=M>>>16,n[3]=ke=M&65535|G<<16,r[3]=gA=Z&65535|U<<16,H=Ee,v=Qe,Z=v&65535,U=v>>>16,M=H&65535,G=H>>>16,H=n[4],v=r[4],Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,U+=Z>>>16,M+=U>>>16,G+=M>>>16,n[4]=Ee=M&65535|G<<16,r[4]=Qe=Z&65535|U<<16,H=me,v=he,Z=v&65535,U=v>>>16,M=H&65535,G=H>>>16,H=n[5],v=r[5],Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,U+=Z>>>16,M+=U>>>16,G+=M>>>16,n[5]=me=M&65535|G<<16,r[5]=he=Z&65535|U<<16,H=_e,v=ze,Z=v&65535,U=v>>>16,M=H&65535,G=H>>>16,H=n[6],v=r[6],Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,U+=Z>>>16,M+=U>>>16,G+=M>>>16,n[6]=_e=M&65535|G<<16,r[6]=ze=Z&65535|U<<16,H=Ve,v=Ke,Z=v&65535,U=v>>>16,M=H&65535,G=H>>>16,H=n[7],v=r[7],Z+=v&65535,U+=v>>>16,M+=H&65535,G+=H>>>16,U+=Z>>>16,M+=U>>>16,G+=M>>>16,n[7]=Ve=M&65535|G<<16,r[7]=Ke=Z&65535|U<<16,De+=128,i-=128}return i}function $h(n,r,o){var i=new Int32Array(8),e=new Int32Array(8),a=new Uint8Array(256),A,t=o;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,e[0]=4089235720,e[1]=2227873595,e[2]=4271175723,e[3]=1595750129,e[4]=2917565137,e[5]=725511199,e[6]=4215389547,e[7]=327033209,v8(i,e,r,o),o%=128,A=0;A=0;--e)i=o[e/8|0]>>(e&7)&1,P8(n,r,i),uk(r,n),uk(n,n),P8(n,r,i)}function nm(n,r){var o=[lA(),lA(),lA(),lA()];dg(o[0],_8),dg(o[1],N8),dg(o[2],Cp),ot(o[3],_8,N8),H8(n,o,r)}var hk=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function yk(n,r){var o,i,e,a;for(i=63;i>=32;--i){for(o=0,e=i-32,a=i-12;e>8,r[e]-=o*256;r[e]+=o,r[i]=0}for(o=0,e=0;e<32;e++)r[e]+=o-(r[31]>>4)*hk[e],o=r[e]>>8,r[e]&=255;for(e=0;e<32;e++)r[e]-=o*hk[e];for(i=0;i<32;i++)r[i+1]+=r[i]>>8,n[i]=r[i]&255}function ed(n){var r=new Float64Array(64),o;for(o=0;o<64;o++)r[o]=n[o];for(o=0;o<64;o++)n[o]=0;yk(n,r)}function B_e(n,r,o,i){var e=new Uint8Array(64),a=new Uint8Array(64),A,t,s=new Float64Array(64),g=[lA(),lA(),lA(),lA()];for(A=0;A>7&&Uo(n[0],dk,n[0]),ot(n[3],n[0],n[1]),0)}function y_e(n,r,o,i){var e,a,A=new Uint8Array(32),t=new Uint8Array(64),s=[lA(),lA(),lA(),lA()],g=[lA(),lA(),lA(),lA()];if(a=-1,o<64||Q_e(g,i))return-1;for(e=0;e=0}ds.verify=b_e;function M_e(n){if(ug(n),n.length!==32)throw new Error("wrong seed length");for(var r=new Uint8Array(32),o=new Uint8Array(32),i=0;i<32;i++)r[i]=n[i];return u_e(o,r),r[0]&=248,r[31]&=127,r[31]|=64,o[31]&=127,{public:o,private:r}}ds.generateKeyPair=M_e;ds.default={}});var Bg=W(up=>{"use strict";var Ad=Y8(),dp=We("crypto"),mk=Buffer.from([48,42,48,5,6,3,43,101,110,3,33,0]),Sk=Buffer.from([48,46,2,1,0,48,5,6,3,43,101,110,4,34,4,32]),__e=Buffer.from([5]),Dk=function(n){return Buffer.concat([__e,n])};function x8(n){if(n===void 0)throw new Error("Undefined private key");if(!(n instanceof Buffer))throw new Error(`Invalid private key type: ${n.constructor.name}`);if(n.byteLength!=32)throw new Error(`Incorrect private key length: ${n.byteLength}`)}function j8(n){if(!(n instanceof Buffer))throw new Error(`Invalid public key type: ${n.constructor.name}`);if(n===void 0||(n.byteLength!=33||n[0]!=5)&&n.byteLength!=32)throw new Error("Invalid public key");return n.byteLength==33?n.slice(1):(console.error("WARNING: Expected pubkey of length 33, please report the ST and client that generated the pubkey"),n)}function N_e(n){let r=new Uint8Array(n);return r[0]|=6,r[31]|=128,r[31]&=-65,r}up.getPublicFromPrivateKey=function(n){let r=N_e(n),o=Ad.generateKeyPair(r);return Dk(Buffer.from(o.public))};up.generateKeyPair=function(){try{let{publicKey:n,privateKey:r}=dp.generateKeyPairSync("x25519",{publicKeyEncoding:{format:"der",type:"spki"},privateKeyEncoding:{format:"der",type:"pkcs8"}}),o=n.slice(mk.length,mk.length+32),i=r.slice(Sk.length,Sk.length+32);return{pubKey:Dk(o),privKey:i}}catch{let r=Ad.generateKeyPair(dp.randomBytes(32));return{privKey:Buffer.from(r.private),pubKey:Dk(Buffer.from(r.public))}}};up.calculateAgreement=function(n,r){if(n=j8(n),x8(r),!n||n.byteLength!=32)throw new Error("Invalid public key");if(typeof dp.diffieHellman=="function"){let o=dp.createPrivateKey({key:Buffer.concat([Sk,r]),format:"der",type:"pkcs8"}),i=dp.createPublicKey({key:Buffer.concat([mk,n]),format:"der",type:"spki"});return dp.diffieHellman({privateKey:o,publicKey:i})}else{let o=Ad.sharedKey(r,n);return Buffer.from(o)}};up.calculateSignature=function(n,r){if(x8(n),!r)throw new Error("Invalid message");return Buffer.from(Ad.sign(n,r))};up.verifySignature=function(n,r,o,i){if(n=j8(n),!n||n.byteLength!=32)throw new Error("Invalid public key");if(!r)throw new Error("Invalid message");if(!o||o.byteLength!=64)throw new Error("Invalid signature");return i?!0:Ad.verify(n,r,o)}});var q8=W(td=>{var sm=Bg(),T_e=We("crypto");function J8(n){return typeof n=="number"&&n%1===0&&n>=0}td.generateIdentityKeyPair=sm.generateKeyPair;td.generateRegistrationId=function(){var n=Uint16Array.from(T_e.randomBytes(2))[0];return n&16383};td.generateSignedPreKey=function(n,r){if(!(n.privKey instanceof Buffer)||n.privKey.byteLength!=32||!(n.pubKey instanceof Buffer)||n.pubKey.byteLength!=33)throw new TypeError("Invalid argument for identityKeyPair");if(!J8(r))throw new TypeError("Invalid argument for signedKeyId: "+r);let o=sm.generateKeyPair(),i=sm.calculateSignature(n.privKey,o.pubKey);return{keyId:r,keyPair:o,signature:i}};td.generatePreKey=function(n){if(!J8(n))throw new TypeError("Invalid argument for keyId: "+n);let r=sm.generateKeyPair();return{keyId:n,keyPair:r}}});var Ok=W((StA,V8)=>{var wk=class n{static from(r){if(typeof r!="string"||!r.match(/.*\.\d+/))throw new Error("Invalid address encoding");let o=r.split(".");return new this(o[0],parseInt(o[1]))}constructor(r,o){if(typeof r!="string")throw new TypeError("id required for addr");if(r.indexOf(".")!==-1)throw new TypeError("encoded addr detected");if(this.id=r,typeof o!="number")throw new TypeError("number required for deviceId");this.deviceId=o}toString(){return`${this.id}.${this.deviceId}`}is(r){return r instanceof n?r.id===this.id&&r.deviceId===this.deviceId:!1}};V8.exports=wk});var bk=W((DtA,z8)=>{var R_e={OURS:1,THEIRS:2};z8.exports=R_e});var Mk=W((wtA,W8)=>{var k_e={SENDING:1,RECEIVING:2};W8.exports=k_e});var lm=W((OtA,X8)=>{var v_e=bk(),P_e=40,Z8="v1";function cm(n){if(!Buffer.isBuffer(n))throw new TypeError("Buffer required")}var Im=class{constructor(){this._chains={}}toString(){return``}inspect(){return this.toString()}addChain(r,o){cm(r);let i=r.toString("base64");if(this._chains.hasOwnProperty(i))throw new Error("Overwrite attempt");this._chains[i]=o}getChain(r){return cm(r),this._chains[r.toString("base64")]}deleteChain(r){cm(r);let o=r.toString("base64");if(!this._chains.hasOwnProperty(o))throw new ReferenceError("Not Found");delete this._chains[o]}*chains(){for(let[r,o]of Object.entries(this._chains))yield[Buffer.from(r,"base64"),o]}serialize(){let r={registrationId:this.registrationId,currentRatchet:{ephemeralKeyPair:{pubKey:this.currentRatchet.ephemeralKeyPair.pubKey.toString("base64"),privKey:this.currentRatchet.ephemeralKeyPair.privKey.toString("base64")},lastRemoteEphemeralKey:this.currentRatchet.lastRemoteEphemeralKey.toString("base64"),previousCounter:this.currentRatchet.previousCounter,rootKey:this.currentRatchet.rootKey.toString("base64")},indexInfo:{baseKey:this.indexInfo.baseKey.toString("base64"),baseKeyType:this.indexInfo.baseKeyType,closed:this.indexInfo.closed,used:this.indexInfo.used,created:this.indexInfo.created,remoteIdentityKey:this.indexInfo.remoteIdentityKey.toString("base64")},_chains:this._serialize_chains(this._chains)};return this.pendingPreKey&&(r.pendingPreKey=Object.assign({},this.pendingPreKey),r.pendingPreKey.baseKey=this.pendingPreKey.baseKey.toString("base64")),r}static deserialize(r){let o=new this;return o.registrationId=r.registrationId,o.currentRatchet={ephemeralKeyPair:{pubKey:Buffer.from(r.currentRatchet.ephemeralKeyPair.pubKey,"base64"),privKey:Buffer.from(r.currentRatchet.ephemeralKeyPair.privKey,"base64")},lastRemoteEphemeralKey:Buffer.from(r.currentRatchet.lastRemoteEphemeralKey,"base64"),previousCounter:r.currentRatchet.previousCounter,rootKey:Buffer.from(r.currentRatchet.rootKey,"base64")},o.indexInfo={baseKey:Buffer.from(r.indexInfo.baseKey,"base64"),baseKeyType:r.indexInfo.baseKeyType,closed:r.indexInfo.closed,used:r.indexInfo.used,created:r.indexInfo.created,remoteIdentityKey:Buffer.from(r.indexInfo.remoteIdentityKey,"base64")},o._chains=this._deserialize_chains(r._chains),r.pendingPreKey&&(o.pendingPreKey=Object.assign({},r.pendingPreKey),o.pendingPreKey.baseKey=Buffer.from(r.pendingPreKey.baseKey,"base64")),o}_serialize_chains(r){let o={};for(let i of Object.keys(r)){let e=r[i],a={};for(let[A,t]of Object.entries(e.messageKeys))a[A]=t.toString("base64");o[i]={chainKey:{counter:e.chainKey.counter,key:e.chainKey.key&&e.chainKey.key.toString("base64")},chainType:e.chainType,messageKeys:a}}return o}static _deserialize_chains(r){let o={};for(let i of Object.keys(r)){let e=r[i],a={};for(let[A,t]of Object.entries(e.messageKeys))a[A]=Buffer.from(t,"base64");o[i]={chainKey:{counter:e.chainKey.counter,key:e.chainKey.key&&Buffer.from(e.chainKey.key,"base64")},chainType:e.chainType,messageKeys:a}}return o}},gm=[{version:"v1",migrate:function(r){let o=r._sessions;if(r.registrationId)for(let i in o)o[i].registrationId||(o[i].registrationId=r.registrationId);else for(let i in o)o[i].indexInfo.closed===-1&&console.error("V1 session storage migration error: registrationId",r.registrationId,"for open session version",r.version)}}],_k=class{static createEntry(){return new Im}static migrate(r){let o=r.version===void 0;for(let i=0;i{let i=r.indexInfo.used||0,e=o.indexInfo.used||0;return i===e?0:iP_e;){let r,o;for(let[i,e]of Object.entries(this.sessions))e.indexInfo.closed!==-1&&(!o||e.indexInfo.closed{un.SignalError=class extends Error{};un.UntrustedIdentityKeyError=class extends un.SignalError{constructor(r,o){super(),this.name="UntrustedIdentityKeyError",this.addr=r,this.identityKey=o}};un.SessionError=class extends un.SignalError{constructor(r){super(r),this.name="SessionError"}};un.MessageCounterError=class extends un.SessionError{constructor(r){super(r),this.name="MessageCounterError"}};un.PreKeyError=class extends un.SessionError{constructor(r){super(r),this.name="PreKeyError"}}});var Nk=W((ktA,eV)=>{"use strict";var Em=new Map,$8=1e4;async function G_e(n,r){let o=0;for(;;){let i=Math.min(n.length,$8);for(let e=o;e=$8?(n.splice(0,i),o=0):o=i;else break}r()}eV.exports=function(n,r){r.name||(Object.defineProperty(r,"name",{writable:!0}),typeof n=="string"?r.name=n:console.warn("Unhandled bucket type (for naming):",typeof n,n));let o;Em.has(n)||(Em.set(n,[]),o=!0);let i=Em.get(n),e=new Promise((a,A)=>i.push({awaitable:r,resolve:a,reject:A}));return o&&G_e(i,()=>Em.delete(n)),e}});var Rk=W((vtA,aV)=>{"use strict";var AV=bk(),F_e=Mk(),tV=lm(),rV=Xc(),fg=Bg(),Cm=pm(),L_e=Nk(),Tk=class{constructor(r,o){this.addr=o,this.storage=r}async initOutgoing(r){let o=this.addr.toString();return await L_e(o,async()=>{if(!await this.storage.isTrustedIdentity(this.addr.id,r.identityKey))throw new Cm.UntrustedIdentityKeyError(this.addr.id,r.identityKey);fg.verifySignature(r.identityKey,r.signedPreKey.publicKey,r.signedPreKey.signature,!0);let i=fg.generateKeyPair(),e=r.preKey&&r.preKey.publicKey,a=await this.initSession(!0,i,void 0,r.identityKey,e,r.signedPreKey.publicKey,r.registrationId);a.pendingPreKey={signedKeyId:r.signedPreKey.keyId,baseKey:i.pubKey},r.preKey&&(a.pendingPreKey.preKeyId=r.preKey.keyId);let A=await this.storage.loadSession(o);if(!A)A=new tV;else{let t=A.getOpenSession();t&&A.closeSession(t)}A.setSession(a),await this.storage.storeSession(o,A)})}async initIncoming(r,o){let i=this.addr.toString();if(!await this.storage.isTrustedIdentity(i,o.identityKey))throw new Cm.UntrustedIdentityKeyError(this.addr.id,o.identityKey);if(r.getSession(o.baseKey))return;let e=await this.storage.loadPreKey(o.preKeyId);if(o.preKeyId&&!e)throw new Cm.PreKeyError("Invalid PreKey ID");let a=await this.storage.loadSignedPreKey(o.signedPreKeyId);if(!a)throw new Cm.PreKeyError("Missing SignedPreKey");let A=r.getOpenSession();return A&&(console.warn("Closing open session in favor of incoming prekey bundle"),r.closeSession(A)),r.setSession(await this.initSession(!1,e,a,o.identityKey,o.baseKey,void 0,o.registrationId)),o.preKeyId}async initSession(r,o,i,e,a,A,t){if(r){if(i)throw new Error("Invalid call to initSession");i=o}else{if(A)throw new Error("Invalid call to initSession");A=a}let s;!o||!a?s=new Uint8Array(128):s=new Uint8Array(160);for(var g=0;g<32;g++)s[g]=255;let c=await this.storage.getOurIdentity(),I=fg.calculateAgreement(A,c.privKey),E=fg.calculateAgreement(e,i.privKey),B=fg.calculateAgreement(A,i.privKey);if(r?(s.set(new Uint8Array(I),32),s.set(new Uint8Array(E),64)):(s.set(new Uint8Array(I),64),s.set(new Uint8Array(E),32)),s.set(new Uint8Array(B),96),o&&a){let y=fg.calculateAgreement(a,o.privKey);s.set(new Uint8Array(y),128)}let f=rV.deriveSecrets(Buffer.from(s),Buffer.alloc(32),Buffer.from("WhisperText")),Q=tV.createEntry();return Q.registrationId=t,Q.currentRatchet={rootKey:f[0],ephemeralKeyPair:r?fg.generateKeyPair():i,lastRemoteEphemeralKey:A,previousCounter:0},Q.indexInfo={created:Date.now(),used:Date.now(),remoteIdentityKey:e,baseKey:r?o.pubKey:a,baseKeyType:r?AV.OURS:AV.THEIRS,closed:-1},r&&this.calculateSendingRatchet(Q,A),Q}calculateSendingRatchet(r,o){let i=r.currentRatchet,e=fg.calculateAgreement(o,i.ephemeralKeyPair.privKey),a=rV.deriveSecrets(e,i.rootKey,Buffer.from("WhisperRatchet"));r.addChain(i.ephemeralKeyPair.pubKey,{messageKeys:{},chainKey:{counter:-1,key:a[1]},chainType:F_e.SENDING}),i.rootKey=a[0]}};aV.exports=Tk});var oV=W((PtA,iV)=>{"use strict";var Qg=Zf(),io=Qg.Reader,kk=Qg.Writer,aA=Qg.util,Ho=Qg.roots.default||(Qg.roots.default={});Ho.textsecure=(function(){var n={};return n.WhisperMessage=(function(){function r(o){if(o)for(var i=Object.keys(o),e=0;e>>3){case 1:A.ephemeralKey=i.bytes();break;case 2:A.counter=i.uint32();break;case 3:A.previousCounter=i.uint32();break;case 4:A.ciphertext=i.bytes();break;default:i.skipType(t&7);break}}return A},r.decodeDelimited=function(i){return i instanceof io||(i=new io(i)),this.decode(i,i.uint32())},r.verify=function(i){return typeof i!="object"||i===null?"object expected":i.ephemeralKey!=null&&i.hasOwnProperty("ephemeralKey")&&!(i.ephemeralKey&&typeof i.ephemeralKey.length=="number"||aA.isString(i.ephemeralKey))?"ephemeralKey: buffer expected":i.counter!=null&&i.hasOwnProperty("counter")&&!aA.isInteger(i.counter)?"counter: integer expected":i.previousCounter!=null&&i.hasOwnProperty("previousCounter")&&!aA.isInteger(i.previousCounter)?"previousCounter: integer expected":i.ciphertext!=null&&i.hasOwnProperty("ciphertext")&&!(i.ciphertext&&typeof i.ciphertext.length=="number"||aA.isString(i.ciphertext))?"ciphertext: buffer expected":null},r.fromObject=function(i){if(i instanceof Ho.textsecure.WhisperMessage)return i;var e=new Ho.textsecure.WhisperMessage;return i.ephemeralKey!=null&&(typeof i.ephemeralKey=="string"?aA.base64.decode(i.ephemeralKey,e.ephemeralKey=aA.newBuffer(aA.base64.length(i.ephemeralKey)),0):i.ephemeralKey.length&&(e.ephemeralKey=i.ephemeralKey)),i.counter!=null&&(e.counter=i.counter>>>0),i.previousCounter!=null&&(e.previousCounter=i.previousCounter>>>0),i.ciphertext!=null&&(typeof i.ciphertext=="string"?aA.base64.decode(i.ciphertext,e.ciphertext=aA.newBuffer(aA.base64.length(i.ciphertext)),0):i.ciphertext.length&&(e.ciphertext=i.ciphertext)),e},r.toObject=function(i,e){e||(e={});var a={};return e.defaults&&(e.bytes===String?a.ephemeralKey="":(a.ephemeralKey=[],e.bytes!==Array&&(a.ephemeralKey=aA.newBuffer(a.ephemeralKey))),a.counter=0,a.previousCounter=0,e.bytes===String?a.ciphertext="":(a.ciphertext=[],e.bytes!==Array&&(a.ciphertext=aA.newBuffer(a.ciphertext)))),i.ephemeralKey!=null&&i.hasOwnProperty("ephemeralKey")&&(a.ephemeralKey=e.bytes===String?aA.base64.encode(i.ephemeralKey,0,i.ephemeralKey.length):e.bytes===Array?Array.prototype.slice.call(i.ephemeralKey):i.ephemeralKey),i.counter!=null&&i.hasOwnProperty("counter")&&(a.counter=i.counter),i.previousCounter!=null&&i.hasOwnProperty("previousCounter")&&(a.previousCounter=i.previousCounter),i.ciphertext!=null&&i.hasOwnProperty("ciphertext")&&(a.ciphertext=e.bytes===String?aA.base64.encode(i.ciphertext,0,i.ciphertext.length):e.bytes===Array?Array.prototype.slice.call(i.ciphertext):i.ciphertext),a},r.prototype.toJSON=function(){return this.constructor.toObject(this,Qg.util.toJSONOptions)},r})(),n.PreKeyWhisperMessage=(function(){function r(o){if(o)for(var i=Object.keys(o),e=0;e>>3){case 5:A.registrationId=i.uint32();break;case 1:A.preKeyId=i.uint32();break;case 6:A.signedPreKeyId=i.uint32();break;case 2:A.baseKey=i.bytes();break;case 3:A.identityKey=i.bytes();break;case 4:A.message=i.bytes();break;default:i.skipType(t&7);break}}return A},r.decodeDelimited=function(i){return i instanceof io||(i=new io(i)),this.decode(i,i.uint32())},r.verify=function(i){return typeof i!="object"||i===null?"object expected":i.registrationId!=null&&i.hasOwnProperty("registrationId")&&!aA.isInteger(i.registrationId)?"registrationId: integer expected":i.preKeyId!=null&&i.hasOwnProperty("preKeyId")&&!aA.isInteger(i.preKeyId)?"preKeyId: integer expected":i.signedPreKeyId!=null&&i.hasOwnProperty("signedPreKeyId")&&!aA.isInteger(i.signedPreKeyId)?"signedPreKeyId: integer expected":i.baseKey!=null&&i.hasOwnProperty("baseKey")&&!(i.baseKey&&typeof i.baseKey.length=="number"||aA.isString(i.baseKey))?"baseKey: buffer expected":i.identityKey!=null&&i.hasOwnProperty("identityKey")&&!(i.identityKey&&typeof i.identityKey.length=="number"||aA.isString(i.identityKey))?"identityKey: buffer expected":i.message!=null&&i.hasOwnProperty("message")&&!(i.message&&typeof i.message.length=="number"||aA.isString(i.message))?"message: buffer expected":null},r.fromObject=function(i){if(i instanceof Ho.textsecure.PreKeyWhisperMessage)return i;var e=new Ho.textsecure.PreKeyWhisperMessage;return i.registrationId!=null&&(e.registrationId=i.registrationId>>>0),i.preKeyId!=null&&(e.preKeyId=i.preKeyId>>>0),i.signedPreKeyId!=null&&(e.signedPreKeyId=i.signedPreKeyId>>>0),i.baseKey!=null&&(typeof i.baseKey=="string"?aA.base64.decode(i.baseKey,e.baseKey=aA.newBuffer(aA.base64.length(i.baseKey)),0):i.baseKey.length&&(e.baseKey=i.baseKey)),i.identityKey!=null&&(typeof i.identityKey=="string"?aA.base64.decode(i.identityKey,e.identityKey=aA.newBuffer(aA.base64.length(i.identityKey)),0):i.identityKey.length&&(e.identityKey=i.identityKey)),i.message!=null&&(typeof i.message=="string"?aA.base64.decode(i.message,e.message=aA.newBuffer(aA.base64.length(i.message)),0):i.message.length&&(e.message=i.message)),e},r.toObject=function(i,e){e||(e={});var a={};return e.defaults&&(a.preKeyId=0,e.bytes===String?a.baseKey="":(a.baseKey=[],e.bytes!==Array&&(a.baseKey=aA.newBuffer(a.baseKey))),e.bytes===String?a.identityKey="":(a.identityKey=[],e.bytes!==Array&&(a.identityKey=aA.newBuffer(a.identityKey))),e.bytes===String?a.message="":(a.message=[],e.bytes!==Array&&(a.message=aA.newBuffer(a.message))),a.registrationId=0,a.signedPreKeyId=0),i.preKeyId!=null&&i.hasOwnProperty("preKeyId")&&(a.preKeyId=i.preKeyId),i.baseKey!=null&&i.hasOwnProperty("baseKey")&&(a.baseKey=e.bytes===String?aA.base64.encode(i.baseKey,0,i.baseKey.length):e.bytes===Array?Array.prototype.slice.call(i.baseKey):i.baseKey),i.identityKey!=null&&i.hasOwnProperty("identityKey")&&(a.identityKey=e.bytes===String?aA.base64.encode(i.identityKey,0,i.identityKey.length):e.bytes===Array?Array.prototype.slice.call(i.identityKey):i.identityKey),i.message!=null&&i.hasOwnProperty("message")&&(a.message=e.bytes===String?aA.base64.encode(i.message,0,i.message.length):e.bytes===Array?Array.prototype.slice.call(i.message):i.message),i.registrationId!=null&&i.hasOwnProperty("registrationId")&&(a.registrationId=i.registrationId),i.signedPreKeyId!=null&&i.hasOwnProperty("signedPreKeyId")&&(a.signedPreKeyId=i.signedPreKeyId),a},r.prototype.toJSON=function(){return this.constructor.toObject(this,Qg.util.toJSONOptions)},r})(),n.KeyExchangeMessage=(function(){function r(o){if(o)for(var i=Object.keys(o),e=0;e>>3){case 1:A.id=i.uint32();break;case 2:A.baseKey=i.bytes();break;case 3:A.ephemeralKey=i.bytes();break;case 4:A.identityKey=i.bytes();break;case 5:A.baseKeySignature=i.bytes();break;default:i.skipType(t&7);break}}return A},r.decodeDelimited=function(i){return i instanceof io||(i=new io(i)),this.decode(i,i.uint32())},r.verify=function(i){return typeof i!="object"||i===null?"object expected":i.id!=null&&i.hasOwnProperty("id")&&!aA.isInteger(i.id)?"id: integer expected":i.baseKey!=null&&i.hasOwnProperty("baseKey")&&!(i.baseKey&&typeof i.baseKey.length=="number"||aA.isString(i.baseKey))?"baseKey: buffer expected":i.ephemeralKey!=null&&i.hasOwnProperty("ephemeralKey")&&!(i.ephemeralKey&&typeof i.ephemeralKey.length=="number"||aA.isString(i.ephemeralKey))?"ephemeralKey: buffer expected":i.identityKey!=null&&i.hasOwnProperty("identityKey")&&!(i.identityKey&&typeof i.identityKey.length=="number"||aA.isString(i.identityKey))?"identityKey: buffer expected":i.baseKeySignature!=null&&i.hasOwnProperty("baseKeySignature")&&!(i.baseKeySignature&&typeof i.baseKeySignature.length=="number"||aA.isString(i.baseKeySignature))?"baseKeySignature: buffer expected":null},r.fromObject=function(i){if(i instanceof Ho.textsecure.KeyExchangeMessage)return i;var e=new Ho.textsecure.KeyExchangeMessage;return i.id!=null&&(e.id=i.id>>>0),i.baseKey!=null&&(typeof i.baseKey=="string"?aA.base64.decode(i.baseKey,e.baseKey=aA.newBuffer(aA.base64.length(i.baseKey)),0):i.baseKey.length&&(e.baseKey=i.baseKey)),i.ephemeralKey!=null&&(typeof i.ephemeralKey=="string"?aA.base64.decode(i.ephemeralKey,e.ephemeralKey=aA.newBuffer(aA.base64.length(i.ephemeralKey)),0):i.ephemeralKey.length&&(e.ephemeralKey=i.ephemeralKey)),i.identityKey!=null&&(typeof i.identityKey=="string"?aA.base64.decode(i.identityKey,e.identityKey=aA.newBuffer(aA.base64.length(i.identityKey)),0):i.identityKey.length&&(e.identityKey=i.identityKey)),i.baseKeySignature!=null&&(typeof i.baseKeySignature=="string"?aA.base64.decode(i.baseKeySignature,e.baseKeySignature=aA.newBuffer(aA.base64.length(i.baseKeySignature)),0):i.baseKeySignature.length&&(e.baseKeySignature=i.baseKeySignature)),e},r.toObject=function(i,e){e||(e={});var a={};return e.defaults&&(a.id=0,e.bytes===String?a.baseKey="":(a.baseKey=[],e.bytes!==Array&&(a.baseKey=aA.newBuffer(a.baseKey))),e.bytes===String?a.ephemeralKey="":(a.ephemeralKey=[],e.bytes!==Array&&(a.ephemeralKey=aA.newBuffer(a.ephemeralKey))),e.bytes===String?a.identityKey="":(a.identityKey=[],e.bytes!==Array&&(a.identityKey=aA.newBuffer(a.identityKey))),e.bytes===String?a.baseKeySignature="":(a.baseKeySignature=[],e.bytes!==Array&&(a.baseKeySignature=aA.newBuffer(a.baseKeySignature)))),i.id!=null&&i.hasOwnProperty("id")&&(a.id=i.id),i.baseKey!=null&&i.hasOwnProperty("baseKey")&&(a.baseKey=e.bytes===String?aA.base64.encode(i.baseKey,0,i.baseKey.length):e.bytes===Array?Array.prototype.slice.call(i.baseKey):i.baseKey),i.ephemeralKey!=null&&i.hasOwnProperty("ephemeralKey")&&(a.ephemeralKey=e.bytes===String?aA.base64.encode(i.ephemeralKey,0,i.ephemeralKey.length):e.bytes===Array?Array.prototype.slice.call(i.ephemeralKey):i.ephemeralKey),i.identityKey!=null&&i.hasOwnProperty("identityKey")&&(a.identityKey=e.bytes===String?aA.base64.encode(i.identityKey,0,i.identityKey.length):e.bytes===Array?Array.prototype.slice.call(i.identityKey):i.identityKey),i.baseKeySignature!=null&&i.hasOwnProperty("baseKeySignature")&&(a.baseKeySignature=e.bytes===String?aA.base64.encode(i.baseKeySignature,0,i.baseKeySignature.length):e.bytes===Array?Array.prototype.slice.call(i.baseKeySignature):i.baseKeySignature),a},r.prototype.toJSON=function(){return this.constructor.toObject(this,Qg.util.toJSONOptions)},r})(),n})();iV.exports=Ho});var vk=W((GtA,nV)=>{"use strict";var{textsecure:{WhisperMessage:U_e,PreKeyWhisperMessage:H_e}}=oV();nV.exports={WhisperMessage:U_e,PreKeyWhisperMessage:H_e}});var IV=W((FtA,cV)=>{var hm=Mk(),K_e=Ok(),Y_e=Rk(),sV=lm(),us=Xc(),gV=Bg(),Bn=pm(),Bp=vk(),x_e=Nk(),yg=3;function dm(n){if(!(n instanceof Buffer))throw TypeError(`Expected Buffer instead of: ${n.constructor.name}`);return n}var Pk=class{constructor(r,o){if(!(o instanceof K_e))throw new TypeError("protocolAddress must be a ProtocolAddress");this.addr=o,this.storage=r}_encodeTupleByte(r,o){if(r>15||o>15)throw TypeError("Numbers must be 4 bits or less");return r<<4|o}_decodeTupleByte(r){return[r>>4,r&15]}toString(){return``}async getRecord(){let r=await this.storage.loadSession(this.addr.toString());if(r&&!(r instanceof sV))throw new TypeError("SessionRecord type expected from loadSession");return r}async storeRecord(r){r.removeOldSessions(),await this.storage.storeSession(this.addr.toString(),r)}async queueJob(r){return await x_e(this.addr.toString(),r)}async encrypt(r){dm(r);let o=await this.storage.getOurIdentity();return await this.queueJob(async()=>{let i=await this.getRecord();if(!i)throw new Bn.SessionError("No sessions");let e=i.getOpenSession();if(!e)throw new Bn.SessionError("No open session");let a=e.indexInfo.remoteIdentityKey;if(!await this.storage.isTrustedIdentity(this.addr.id,a))throw new Bn.UntrustedIdentityKeyError(this.addr.id,a);let A=e.getChain(e.currentRatchet.ephemeralKeyPair.pubKey);if(A.chainType===hm.RECEIVING)throw new Error("Tried to encrypt on a receiving chain");this.fillMessageKeys(A,A.chainKey.counter+1);let t=us.deriveSecrets(A.messageKeys[A.chainKey.counter],Buffer.alloc(32),Buffer.from("WhisperMessageKeys"));delete A.messageKeys[A.chainKey.counter];let s=Bp.WhisperMessage.create();s.ephemeralKey=e.currentRatchet.ephemeralKeyPair.pubKey,s.counter=A.chainKey.counter,s.previousCounter=e.currentRatchet.previousCounter,s.ciphertext=us.encrypt(t[0],r,t[2].slice(0,16));let g=Bp.WhisperMessage.encode(s).finish(),c=Buffer.alloc(g.byteLength+66+1);c.set(o.pubKey),c.set(e.indexInfo.remoteIdentityKey,33),c[66]=this._encodeTupleByte(yg,yg),c.set(g,67);let I=us.calculateMAC(t[1],c),E=Buffer.alloc(g.byteLength+9);E[0]=this._encodeTupleByte(yg,yg),E.set(g,1),E.set(I.slice(0,8),g.byteLength+1),await this.storeRecord(i);let B,f;if(e.pendingPreKey){B=3;let Q=Bp.PreKeyWhisperMessage.create({identityKey:o.pubKey,registrationId:await this.storage.getOurRegistrationId(),baseKey:e.pendingPreKey.baseKey,signedPreKeyId:e.pendingPreKey.signedKeyId,message:E});e.pendingPreKey.preKeyId&&(Q.preKeyId=e.pendingPreKey.preKeyId),f=Buffer.concat([Buffer.from([this._encodeTupleByte(yg,yg)]),Buffer.from(Bp.PreKeyWhisperMessage.encode(Q).finish())])}else B=1,f=E;return{type:B,body:f,registrationId:e.registrationId}})}async decryptWithSessions(r,o){if(!o.length)throw new Bn.SessionError("No sessions available");let i=[];for(let e of o){let a;try{return a=await this.doDecryptWhisperMessage(r,e),e.indexInfo.used=Date.now(),{session:e,plaintext:a}}catch(A){i.push(A)}}console.error("Failed to decrypt message with any known session...");for(let e of i)console.error("Session error:"+e,e.stack);throw new Bn.SessionError("No matching sessions found for message")}async decryptWhisperMessage(r){return dm(r),await this.queueJob(async()=>{let o=await this.getRecord();if(!o)throw new Bn.SessionError("No session record");let i=await this.decryptWithSessions(r,o.getSessions()),e=i.session.indexInfo.remoteIdentityKey;if(!await this.storage.isTrustedIdentity(this.addr.id,e))throw new Bn.UntrustedIdentityKeyError(this.addr.id,e);return o.isClosed(i.session)&&console.warn("Decrypted message with closed session."),await this.storeRecord(o),i.plaintext})}async decryptPreKeyWhisperMessage(r){dm(r);let o=this._decodeTupleByte(r[0]);if(o[1]>3||o[0]<3)throw new Error("Incompatible version number on PreKeyWhisperMessage");return await this.queueJob(async()=>{let i=await this.getRecord(),e=Bp.PreKeyWhisperMessage.decode(r.slice(1));if(!i){if(e.registrationId==null)throw new Error("No registrationId");i=new sV}let A=await new Y_e(this.storage,this.addr).initIncoming(i,e),t=i.getSession(e.baseKey),s=await this.doDecryptWhisperMessage(e.message,t);return await this.storeRecord(i),A&&await this.storage.removePreKey(A),s})}async doDecryptWhisperMessage(r,o){if(dm(r),!o)throw new TypeError("session required");let i=this._decodeTupleByte(r[0]);if(i[1]>3||i[0]<3)throw new Error("Incompatible version number on WhisperMessage");let e=r.slice(1,-8),a=Bp.WhisperMessage.decode(e);this.maybeStepRatchet(o,a.ephemeralKey,a.previousCounter);let A=o.getChain(a.ephemeralKey);if(A.chainType===hm.SENDING)throw new Error("Tried to decrypt on a sending chain");if(this.fillMessageKeys(A,a.counter),!A.messageKeys.hasOwnProperty(a.counter))throw new Bn.MessageCounterError("Key used already or never filled");let t=A.messageKeys[a.counter];delete A.messageKeys[a.counter];let s=us.deriveSecrets(t,Buffer.alloc(32),Buffer.from("WhisperMessageKeys")),g=await this.storage.getOurIdentity(),c=Buffer.alloc(e.byteLength+66+1);c.set(o.indexInfo.remoteIdentityKey),c.set(g.pubKey,33),c[66]=this._encodeTupleByte(yg,yg),c.set(e,67),us.verifyMAC(c,s[1],r.slice(-8),8);let I=us.decrypt(s[0],a.ciphertext,s[2].slice(0,16));return delete o.pendingPreKey,I}fillMessageKeys(r,o){if(r.chainKey.counter>=o)return;if(o-r.chainKey.counter>2e3)throw new Bn.SessionError("Over 2000 messages into the future!");if(r.chainKey.key===void 0)throw new Bn.SessionError("Chain closed");let i=r.chainKey.key;return r.messageKeys[r.chainKey.counter+1]=us.calculateMAC(i,Buffer.from([1])),r.chainKey.key=us.calculateMAC(i,Buffer.from([2])),r.chainKey.counter+=1,this.fillMessageKeys(r,o)}maybeStepRatchet(r,o,i){if(r.getChain(o))return;let e=r.currentRatchet,a=r.getChain(e.lastRemoteEphemeralKey);a&&(this.fillMessageKeys(a,i),delete a.chainKey.key),this.calculateRatchet(r,o,!1);let A=r.getChain(e.ephemeralKeyPair.pubKey);A&&(e.previousCounter=A.chainKey.counter,r.deleteChain(e.ephemeralKeyPair.pubKey)),e.ephemeralKeyPair=gV.generateKeyPair(),this.calculateRatchet(r,o,!0),e.lastRemoteEphemeralKey=o}calculateRatchet(r,o,i){let e=r.currentRatchet,a=gV.calculateAgreement(o,e.ephemeralKeyPair.privKey),A=us.deriveSecrets(a,e.rootKey,Buffer.from("WhisperRatchet"),2),t=i?e.ephemeralKeyPair.pubKey:o;r.addChain(t,{messageKeys:{},chainKey:{counter:-1,key:A[1]},chainType:i?hm.SENDING:hm.RECEIVING}),e.rootKey=A[0]}async hasOpenSession(){return await this.queueJob(async()=>{let r=await this.getRecord();return r?r.haveOpenSession():!1})}async closeOpenSession(){return await this.queueJob(async()=>{let r=await this.getRecord();if(r){let o=r.getOpenSession();o&&(r.closeSession(o),await this.storeRecord(r))}})}};cV.exports=Pk});var lV=W(Bs=>{"use strict";Bs.crypto=Xc();Bs.curve=Bg();Bs.keyhelper=q8();Bs.ProtocolAddress=Ok();Bs.SessionBuilder=Rk();Bs.SessionCipher=IV();Bs.SessionRecord=lm();Object.assign(Bs,pm())});var Fk=W((YtA,dV)=>{"use strict";dV.exports=function(...n){try{return JSON.stringify(...n)}catch(r){return"[Cannot display object: "+r.message+"]"}}});var Lk=W((uV,BV)=>{"use strict";var Z_e=Fk();BV.exports=class extends Error{constructor(n){let r=n.filter(o=>o!=="").map(o=>typeof o=="string"?o:o instanceof Error?o.message:Z_e(o));super(r.join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,uV.assert)}}});var $c=W((jtA,fV)=>{"use strict";var X_e=Lk();fV.exports=function(n,...r){if(!n)throw r.length===1&&r[0]instanceof Error?r[0]:new X_e(r)}});var id=W((JtA,yV)=>{"use strict";var Uk=$c(),QV={};yV.exports=function(n,r,o){if(r===!1||r===null||r===void 0)return n;o=o||{},typeof o=="string"&&(o={separator:o});let i=Array.isArray(r);Uk(!i||!o.separator,"Separator option is not valid for array-based chain");let e=i?r:r.split(o.separator||"."),a=n;for(let A=0;A{"use strict";var mV={};ka=SV.exports={array:Array.prototype,buffer:Buffer&&Buffer.prototype,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype};mV.typeMap=new Map([["[object Error]",ka.error],["[object Map]",ka.map],["[object Promise]",ka.promise],["[object Set]",ka.set],["[object WeakMap]",ka.weakMap],["[object WeakSet]",ka.weakSet]]);ka.getInternalProto=function(n){if(Array.isArray(n))return ka.array;if(Buffer&&n instanceof Buffer)return ka.buffer;if(n instanceof Date)return ka.date;if(n instanceof RegExp)return ka.regex;if(n instanceof Error)return ka.error;let r=Object.prototype.toString.call(n);return mV.typeMap.get(r)||ka.generic}});var Bm=W(DV=>{"use strict";DV.keys=function(n,r={}){return r.symbols!==!1?Reflect.ownKeys(n):Object.getOwnPropertyNames(n)}});var fm=W((VtA,wV)=>{"use strict";var $_e=id(),wi=Hk(),eNe=Bm(),Qs={needsProtoHack:new Set([wi.set,wi.map,wi.weakSet,wi.weakMap])};wV.exports=Qs.clone=function(n,r={},o=null){if(typeof n!="object"||n===null)return n;let i=Qs.clone,e=o;if(r.shallow){if(r.shallow!==!0)return Qs.cloneWithShallow(n,r);i=s=>s}else if(e){let s=e.get(n);if(s)return s}else e=new Map;let a=wi.getInternalProto(n);if(a===wi.buffer)return Buffer&&Buffer.from(n);if(a===wi.date)return new Date(n.getTime());if(a===wi.regex)return new RegExp(n);let A=Qs.base(n,a,r);if(A===n)return n;if(e&&e.set(n,A),a===wi.set)for(let s of n)A.add(i(s,r,e));else if(a===wi.map)for(let[s,g]of n)A.set(s,i(g,r,e));let t=eNe.keys(n,r);for(let s of t){if(s==="__proto__")continue;if(a===wi.array&&s==="length"){A.length=n.length;continue}let g=Object.getOwnPropertyDescriptor(n,s);g?g.get||g.set?Object.defineProperty(A,s,g):g.enumerable?A[s]=i(n[s],r,e):Object.defineProperty(A,s,{enumerable:!1,writable:!0,configurable:!0,value:i(n[s],r,e)}):Object.defineProperty(A,s,{enumerable:!0,writable:!0,configurable:!0,value:i(n[s],r,e)})}return A};Qs.cloneWithShallow=function(n,r){let o=r.shallow;r=Object.assign({},r),r.shallow=!1;let i=new Map;for(let e of o){let a=$_e(n,e);(typeof a=="object"||typeof a=="function")&&i.set(a,a)}return Qs.clone(n,r,i)};Qs.base=function(n,r,o){if(o.prototype===!1)return Qs.needsProtoHack.has(r)?new r.constructor:r===wi.array?[]:{};let i=Object.getPrototypeOf(n);if(i&&i.isImmutable)return n;if(r===wi.array){let e=[];return i!==r&&Object.setPrototypeOf(e,i),e}if(Qs.needsProtoHack.has(r)){let e=new i.constructor;return i!==r&&Object.setPrototypeOf(e,i),e}return Object.create(i)}});var Yk=W((ztA,MV)=>{"use strict";var Kk=$c(),OV=fm(),ANe=Bm(),bV={};MV.exports=bV.merge=function(n,r,o){if(Kk(n&&typeof n=="object","Invalid target value: must be an object"),Kk(r==null||typeof r=="object","Invalid source value: must be null, undefined, or an object"),!r)return n;if(o=Object.assign({nullOverride:!0,mergeArrays:!0},o),Array.isArray(r)){Kk(Array.isArray(n),"Cannot merge array onto an object"),o.mergeArrays||(n.length=0);for(let e=0;e{"use strict";var Qm=$c(),NV=fm(),TV=Yk(),_V=id(),ym={};RV.exports=function(n,r,o={}){if(Qm(n&&typeof n=="object","Invalid defaults value: must be an object"),Qm(!r||r===!0||typeof r=="object","Invalid source value: must be true, falsy or an object"),Qm(typeof o=="object","Invalid options: must be an object"),!r)return null;if(o.shallow)return ym.applyToDefaultsWithShallow(n,r,o);let i=NV(n);if(r===!0)return i;let e=o.nullOverride!==void 0?o.nullOverride:!1;return TV(i,r,{nullOverride:e,mergeArrays:!1})};ym.applyToDefaultsWithShallow=function(n,r,o){let i=o.shallow;Qm(Array.isArray(i),"Invalid keys");let e=new Map,a=r===!0?null:new Set;for(let s of i){s=Array.isArray(s)?s:s.split(".");let g=_V(n,s);g&&typeof g=="object"?e.set(g,a&&_V(r,s)||g):a&&a.add(s)}let A=NV(n,{},e);if(!a)return A;for(let s of a)ym.reachCopy(A,r,s);let t=o.nullOverride!==void 0?o.nullOverride:!1;return TV(A,r,{nullOverride:t,mergeArrays:!1})};ym.reachCopy=function(n,r,o){for(let a of o){if(!(a in r))return;let A=r[a];if(typeof A!="object"||A===null)return;r=A}let i=r,e=n;for(let a=0;a{"use strict";var xk={};vV.exports=xk.Bench=class{constructor(){this.ts=0,this.reset()}reset(){this.ts=xk.Bench.now()}elapsed(){return xk.Bench.now()-this.ts}static now(){let n=process.hrtime();return n[0]*1e3+n[1]/1e6}}});var jk=W(($tA,GV)=>{"use strict";GV.exports=function(){}});var LV=W((erA,FV)=>{"use strict";var tNe=jk();FV.exports=function(){return new Promise(tNe)}});var Jk=W((ArA,UV)=>{"use strict";var fn=Hk(),Oa={mismatched:null};UV.exports=function(n,r,o){return o=Object.assign({prototype:!0},o),!!Oa.isDeepEqual(n,r,o,[])};Oa.isDeepEqual=function(n,r,o,i){if(n===r)return n!==0||1/n===1/r;let e=typeof n;if(e!==typeof r||n===null||r===null)return!1;if(e==="function"){if(!o.deepFunction||n.toString()!==r.toString())return!1}else if(e!=="object")return n!==n&&r!==r;let a=Oa.getSharedType(n,r,!!o.prototype);switch(a){case fn.buffer:return Buffer&&Buffer.prototype.equals.call(n,r);case fn.promise:return n===r;case fn.regex:return n.toString()===r.toString();case Oa.mismatched:return!1}for(let A=i.length-1;A>=0;--A)if(i[A].isSame(n,r))return!0;i.push(new Oa.SeenEntry(n,r));try{return!!Oa.isDeepEqualObj(a,n,r,o,i)}finally{i.pop()}};Oa.getSharedType=function(n,r,o){if(o)return Object.getPrototypeOf(n)!==Object.getPrototypeOf(r)?Oa.mismatched:fn.getInternalProto(n);let i=fn.getInternalProto(n);return i!==fn.getInternalProto(r)?Oa.mismatched:i};Oa.valueOf=function(n){let r=n.valueOf;if(r===void 0)return n;try{return r.call(n)}catch(o){return o}};Oa.hasOwnEnumerableProperty=function(n,r){return Object.prototype.propertyIsEnumerable.call(n,r)};Oa.isSetSimpleEqual=function(n,r){for(let o of Set.prototype.values.call(n))if(!Set.prototype.has.call(r,o))return!1;return!0};Oa.isDeepEqualObj=function(n,r,o,i,e){let{isDeepEqual:a,valueOf:A,hasOwnEnumerableProperty:t}=Oa,{keys:s,getOwnPropertySymbols:g}=Object;if(n===fn.array)if(i.part){for(let f of r)for(let Q of o)if(a(f,Q,i,e))return!0}else{if(r.length!==o.length)return!1;for(let f=0;f{"use strict";HV.exports=function(n){return n.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}});var YV=W((arA,KV)=>{"use strict";var mm=$c(),rNe=Jk(),aNe=qk(),iNe=Bm(),Oi={};KV.exports=function(n,r,o={}){return typeof r!="object"&&(r=[r]),mm(!Array.isArray(r)||r.length,"Values array cannot be empty"),typeof n=="string"?Oi.string(n,r,o):Array.isArray(n)?Oi.array(n,r,o):(mm(typeof n=="object","Reference must be string or an object"),Oi.object(n,r,o))};Oi.array=function(n,r,o){if(Array.isArray(r)||(r=[r]),!n.length||o.only&&o.once&&n.length!==r.length)return!1;let i,e=new Map;for(let A of r)if(!o.deep||!A||typeof A!="object"){let t=e.get(A);t?++t.allowed:e.set(A,{allowed:1,hits:0})}else{i=i||Oi.compare(o);let t=!1;for(let[s,g]of e.entries())if(i(s,A)){++g.allowed,t=!0;break}t||e.set(A,{allowed:1,hits:0})}let a=0;for(let A of n){let t;if(!o.deep||!A||typeof A!="object")t=e.get(A);else{i=i||Oi.compare(o);for(let[s,g]of e.entries())if(i(s,A)){t=g;break}}if(t&&(++t.hits,++a,o.once&&t.hits>t.allowed))return!1}if(o.only&&a!==n.length)return!1;for(let A of e.values())if(A.hits!==A.allowed&&A.hitsr.propertyIsEnumerable(s)),a=[...Object.keys(r),...e],A=Oi.compare(o),t=new Set(a);for(let s of i){if(!t.has(s)){if(o.only)return!1;continue}if(!A(r[s],n[s]))return!1;t.delete(s)}return t.size?o.part?t.sizes!=="");let i=new Map,e=[];for(let s of r)if(mm(typeof s=="string","Cannot compare string reference to non-string value"),s){let g=i.get(s);g?++g.allowed:(i.set(s,{allowed:1,hits:0}),e.push(aNe(s)))}else if(o.once||o.only)return!1;if(!e.length)return!0;let a=new RegExp(`(${e.join("|")})`,"g"),A=n.replace(a,(s,g)=>(++i.get(g).hits,""));if(o.only&&A)return!1;let t=!1;for(let s of i.values())if(s.hits&&(t=!0),s.hits!==s.allowed&&(s.hitsrNe(e,a,i)};Oi.shallow=function(n,r){return n===r}});var jV=W((irA,xV)=>{"use strict";var oNe=$c();xV.exports=function(n){return oNe(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~\"\\]*$/.test(n),"Bad attribute value ("+n+")"),n.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')}});var qV=W((orA,JV)=>{"use strict";var Sg={};JV.exports=function(n){if(!n)return"";let r="";for(let o=0;o=256?"&#"+n+";":`&#x${n.toString(16).padStart(2,"0")};`)};Sg.isSafe=function(n){return Sg.safeCharCodes.has(n)};Sg.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]);Sg.safeCharCodes=(function(){let n=new Set;for(let r=32;r<123;++r)(r>=97||r>=65&&r<=90||r>=48&&r<=57||r===32||r===46||r===44||r===45||r===58||r===95)&&n.add(r);return n})()});var zV=W((nrA,VV)=>{"use strict";var Sm={};VV.exports=function(n){return n?n.replace(/[<>&\u2028\u2029]/g,Sm.escape):""};Sm.escape=function(n){return Sm.replacements.get(n)};Sm.replacements=new Map([["<","\\u003c"],[">","\\u003e"],["&","\\u0026"],["\u2028","\\u2028"],["\u2029","\\u2029"]])});var XV=W((srA,ZV)=>{"use strict";var WV={};ZV.exports=WV.flatten=function(n,r){let o=r||[];for(let i of n)Array.isArray(i)?WV.flatten(i,o):o.push(i);return o}});var Az=W((grA,ez)=>{"use strict";var $V={};ez.exports=function(n,r,o={}){if(!n||!r)return o.first?null:[];let i=[],e=Array.isArray(n)?new Set(n):n,a=new Set;for(let A of r)if($V.has(e,A)&&!a.has(A)){if(o.first)return A;i.push(A),a.add(A)}return o.first?null:i};$V.has=function(n,r){return typeof n.has=="function"?n.has(r):n[r]!==void 0}});var rz=W((crA,tz)=>{"use strict";tz.exports=function(n){return!!n&&typeof n.then=="function"}});var oz=W((IrA,iz)=>{"use strict";var az={wrapped:Symbol("wrapped")};iz.exports=function(n){if(n[az.wrapped])return n;let r=!1,o=function(...i){r||(r=!0,n(...i))};return o[az.wrapped]=!0,o}});var sz=W((lrA,nz)=>{"use strict";var nNe=id();nz.exports=function(n,r,o){return r.replace(/{([^{}]+)}/g,(i,e)=>{let a=nNe(n,e,o);return a??""})}});var cz=W((prA,gz)=>{"use strict";var sNe={maxTimer:2147483647};gz.exports=function(n,r,o){if(typeof n=="bigint"&&(n=Number(n)),n>=Number.MAX_SAFE_INTEGER&&(n=1/0),typeof n!="number"&&n!==void 0)throw new TypeError("Timeout must be a number or bigint");return new Promise(i=>{let e=o?o.setTimeout:setTimeout,a=()=>{let A=Math.min(n,sNe.maxTimer);n-=A,e(()=>n>0?a():i(r),A)};n!==1/0&&a()})}});var Iz=W(Xt=>{"use strict";Xt.applyToDefaults=kV();Xt.assert=$c();Xt.Bench=PV();Xt.block=LV();Xt.clone=fm();Xt.contain=YV();Xt.deepEqual=Jk();Xt.Error=Lk();Xt.escapeHeaderAttribute=jV();Xt.escapeHtml=qV();Xt.escapeJson=zV();Xt.escapeRegex=qk();Xt.flatten=XV();Xt.ignore=jk();Xt.intersect=Az();Xt.isPromise=rz();Xt.merge=Yk();Xt.once=oz();Xt.reach=id();Xt.reachTemplate=sz();Xt.stringify=Fk();Xt.wait=cz()});var Or=W(Ne=>{"use strict";var eI=Iz(),ai={codes:new Map([[100,"Continue"],[101,"Switching Protocols"],[102,"Processing"],[200,"OK"],[201,"Created"],[202,"Accepted"],[203,"Non-Authoritative Information"],[204,"No Content"],[205,"Reset Content"],[206,"Partial Content"],[207,"Multi-Status"],[300,"Multiple Choices"],[301,"Moved Permanently"],[302,"Moved Temporarily"],[303,"See Other"],[304,"Not Modified"],[305,"Use Proxy"],[307,"Temporary 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 Time-out"],[409,"Conflict"],[410,"Gone"],[411,"Length Required"],[412,"Precondition Failed"],[413,"Request Entity Too Large"],[414,"Request-URI Too Large"],[415,"Unsupported Media Type"],[416,"Requested Range Not Satisfiable"],[417,"Expectation Failed"],[418,"I'm a teapot"],[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 Time-out"],[505,"HTTP Version Not Supported"],[506,"Variant Also Negotiates"],[507,"Insufficient Storage"],[509,"Bandwidth Limit Exceeded"],[510,"Not Extended"],[511,"Network Authentication Required"]])};Ne.Boom=class extends Error{constructor(n,r={}){if(n instanceof Error)return Ne.boomify(eI.clone(n),r);let{statusCode:o=500,data:i=null,ctor:e=Ne.Boom}=r,a=new Error(n||void 0);Error.captureStackTrace(a,e),a.data=i;let A=ai.initialize(a,o);return Object.defineProperty(A,"typeof",{value:e}),r.decorate&&Object.assign(A,r.decorate),A}static[Symbol.hasInstance](n){return this===Ne.Boom?Ne.isBoom(n):this.prototype.isPrototypeOf(n)}};Ne.isBoom=function(n,r){return n instanceof Error&&!!n.isBoom&&(!r||n.output.statusCode===r)};Ne.boomify=function(n,r){return eI.assert(n instanceof Error,"Cannot wrap non-Error object"),r=r||{},r.data!==void 0&&(n.data=r.data),r.decorate&&Object.assign(n,r.decorate),n.isBoom?r.override===!1||!r.statusCode&&!r.message?n:ai.initialize(n,r.statusCode||n.output.statusCode,r.message):ai.initialize(n,r.statusCode||500,r.message)};Ne.badRequest=function(n,r){return new Ne.Boom(n,{statusCode:400,data:r,ctor:Ne.badRequest})};Ne.unauthorized=function(n,r,o){let i=new Ne.Boom(n,{statusCode:401,ctor:Ne.unauthorized});if(!r)return i;if(typeof r!="string")return i.output.headers["WWW-Authenticate"]=r.join(", "),i;let e=`${r}`;return(o||n)&&(i.output.payload.attributes={}),o&&(typeof o=="string"?(e+=" "+eI.escapeHeaderAttribute(o),i.output.payload.attributes=o):e+=" "+Object.keys(o).map(a=>{let A=o[a];return A==null&&(A=""),i.output.payload.attributes[a]=A,`${a}="${eI.escapeHeaderAttribute(A.toString())}"`}).join(", ")),n?(o&&(e+=","),e+=` error="${eI.escapeHeaderAttribute(n)}"`,i.output.payload.attributes.error=n):i.isMissing=!0,i.output.headers["WWW-Authenticate"]=e,i};Ne.paymentRequired=function(n,r){return new Ne.Boom(n,{statusCode:402,data:r,ctor:Ne.paymentRequired})};Ne.forbidden=function(n,r){return new Ne.Boom(n,{statusCode:403,data:r,ctor:Ne.forbidden})};Ne.notFound=function(n,r){return new Ne.Boom(n,{statusCode:404,data:r,ctor:Ne.notFound})};Ne.methodNotAllowed=function(n,r,o){let i=new Ne.Boom(n,{statusCode:405,data:r,ctor:Ne.methodNotAllowed});return typeof o=="string"&&(o=[o]),Array.isArray(o)&&(i.output.headers.Allow=o.join(", ")),i};Ne.notAcceptable=function(n,r){return new Ne.Boom(n,{statusCode:406,data:r,ctor:Ne.notAcceptable})};Ne.proxyAuthRequired=function(n,r){return new Ne.Boom(n,{statusCode:407,data:r,ctor:Ne.proxyAuthRequired})};Ne.clientTimeout=function(n,r){return new Ne.Boom(n,{statusCode:408,data:r,ctor:Ne.clientTimeout})};Ne.conflict=function(n,r){return new Ne.Boom(n,{statusCode:409,data:r,ctor:Ne.conflict})};Ne.resourceGone=function(n,r){return new Ne.Boom(n,{statusCode:410,data:r,ctor:Ne.resourceGone})};Ne.lengthRequired=function(n,r){return new Ne.Boom(n,{statusCode:411,data:r,ctor:Ne.lengthRequired})};Ne.preconditionFailed=function(n,r){return new Ne.Boom(n,{statusCode:412,data:r,ctor:Ne.preconditionFailed})};Ne.entityTooLarge=function(n,r){return new Ne.Boom(n,{statusCode:413,data:r,ctor:Ne.entityTooLarge})};Ne.uriTooLong=function(n,r){return new Ne.Boom(n,{statusCode:414,data:r,ctor:Ne.uriTooLong})};Ne.unsupportedMediaType=function(n,r){return new Ne.Boom(n,{statusCode:415,data:r,ctor:Ne.unsupportedMediaType})};Ne.rangeNotSatisfiable=function(n,r){return new Ne.Boom(n,{statusCode:416,data:r,ctor:Ne.rangeNotSatisfiable})};Ne.expectationFailed=function(n,r){return new Ne.Boom(n,{statusCode:417,data:r,ctor:Ne.expectationFailed})};Ne.teapot=function(n,r){return new Ne.Boom(n,{statusCode:418,data:r,ctor:Ne.teapot})};Ne.badData=function(n,r){return new Ne.Boom(n,{statusCode:422,data:r,ctor:Ne.badData})};Ne.locked=function(n,r){return new Ne.Boom(n,{statusCode:423,data:r,ctor:Ne.locked})};Ne.failedDependency=function(n,r){return new Ne.Boom(n,{statusCode:424,data:r,ctor:Ne.failedDependency})};Ne.tooEarly=function(n,r){return new Ne.Boom(n,{statusCode:425,data:r,ctor:Ne.tooEarly})};Ne.preconditionRequired=function(n,r){return new Ne.Boom(n,{statusCode:428,data:r,ctor:Ne.preconditionRequired})};Ne.tooManyRequests=function(n,r){return new Ne.Boom(n,{statusCode:429,data:r,ctor:Ne.tooManyRequests})};Ne.illegal=function(n,r){return new Ne.Boom(n,{statusCode:451,data:r,ctor:Ne.illegal})};Ne.internal=function(n,r,o=500){return ai.serverError(n,r,o,Ne.internal)};Ne.notImplemented=function(n,r){return ai.serverError(n,r,501,Ne.notImplemented)};Ne.badGateway=function(n,r){return ai.serverError(n,r,502,Ne.badGateway)};Ne.serverUnavailable=function(n,r){return ai.serverError(n,r,503,Ne.serverUnavailable)};Ne.gatewayTimeout=function(n,r){return ai.serverError(n,r,504,Ne.gatewayTimeout)};Ne.badImplementation=function(n,r){let o=ai.serverError(n,r,500,Ne.badImplementation);return o.isDeveloperError=!0,o};ai.initialize=function(n,r,o){let i=parseInt(r,10);if(eI.assert(!isNaN(i)&&i>=400,"First argument must be a number (400+):",r),n.isBoom=!0,n.isServer=i>=500,n.hasOwnProperty("data")||(n.data=null),n.output={statusCode:i,payload:{},headers:{}},Object.defineProperty(n,"reformat",{value:ai.reformat,configurable:!0}),!o&&!n.message&&(n.reformat(),o=n.output.payload.error),o){let e=Object.getOwnPropertyDescriptor(n,"message")||Object.getOwnPropertyDescriptor(Object.getPrototypeOf(n),"message");eI.assert(!e||e.configurable&&!e.get,"The error is not compatible with boom"),n.message=o+(n.message?": "+n.message:""),n.output.payload.message=n.message}return n.reformat(),n};ai.reformat=function(n=!1){this.output.payload.statusCode=this.output.statusCode,this.output.payload.error=ai.codes.get(this.output.statusCode)||"Unknown",this.output.statusCode===500&&n!==!0?this.output.payload.message="An internal server error occurred":this.message&&(this.output.payload.message=this.message)};ai.serverError=function(n,r,o,i){return r instanceof Error&&!r.isBoom?Ne.boomify(r,{statusCode:o,message:n}):new Ne.Boom(n,{statusCode:o,data:r,ctor:i})}});var EW,KNe,YNe,xNe,jNe,JNe,qNe,VNe,zNe,WNe,ZNe,XNe,$Ne,e0e,A0e,w,yn=le(()=>{EW=n=>typeof n<"u"&&n!==null,KNe=n=>typeof n=="object",YNe=n=>Object.prototype.toString.call(n)==="[object Object]",xNe=n=>typeof n=="function",jNe=n=>typeof n=="boolean",JNe=n=>n instanceof Buffer,qNe=n=>{if(EW(n))switch(n.constructor){case Uint8Array:case Uint8ClampedArray:case Int8Array:case Uint16Array:case Int16Array:case Uint32Array:case Int32Array:case Float32Array:case Float64Array:return!0}return!1},VNe=n=>n instanceof ArrayBuffer,zNe=n=>typeof n=="string"&&n.length>0,WNe=n=>typeof n=="number"&&Number.isFinite(n),ZNe=n=>Number.isInteger(n),XNe=(n,r,o)=>n>=r&&n<=o,$Ne=(n,r)=>r.includes(n),e0e=(n,r,o)=>new Error(`Expected ${r} for ${n} but received ${o} of type ${typeof o}`),A0e=(n,r)=>(r.message=n.message,r),w={defined:EW,object:KNe,plainObject:YNe,fn:xNe,bool:jNe,buffer:JNe,typedArray:qNe,arrayBuffer:VNe,string:zNe,number:WNe,integer:ZNe,inRange:XNe,inArray:$Ne,invalidParameterError:e0e,nativeError:A0e}});var dW=W((SaA,hW)=>{"use strict";var CW=()=>process.platform==="linux",Um=null,t0e=()=>{if(!Um)if(CW()&&process.report){let n=process.report.excludeNetwork;process.report.excludeNetwork=!0,Um=process.report.getReport(),process.report.excludeNetwork=n}else Um={};return Um};hW.exports={isLinux:CW,getReport:t0e}});var BW=W((DaA,uW)=>{"use strict";var _p=We("fs"),r0e="/usr/bin/ldd",a0e="/proc/self/exe",Hm=2048,i0e=n=>{let r=_p.openSync(n,"r"),o=Buffer.alloc(Hm),i=_p.readSync(r,o,0,Hm,0);return _p.close(r,()=>{}),o.subarray(0,i)},o0e=n=>new Promise((r,o)=>{_p.open(n,"r",(i,e)=>{if(i)o(i);else{let a=Buffer.alloc(Hm);_p.read(e,a,0,Hm,0,(A,t)=>{r(a.subarray(0,t)),_p.close(e,()=>{})})}})});uW.exports={LDD_PATH:r0e,SELF_PATH:a0e,readFileSync:i0e,readFile:o0e}});var QW=W((waA,fW)=>{"use strict";var n0e=n=>{if(n.length<64||n.readUInt32BE(0)!==2135247942||n.readUInt8(4)!==2||n.readUInt8(5)!==1)return null;let r=n.readUInt32LE(32),o=n.readUInt16LE(54),i=n.readUInt16LE(56);for(let e=0;e{"use strict";var mW=We("child_process"),{isLinux:Np,getReport:SW}=dW(),{LDD_PATH:Km,SELF_PATH:DW,readFile:nv,readFileSync:sv}=BW(),{interpreterPath:wW}=QW(),mn,Sn,Dn,OW="getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true",Ng="",bW=()=>Ng||new Promise(n=>{mW.exec(OW,(r,o)=>{Ng=r?" ":o,n(Ng)})}),MW=()=>{if(!Ng)try{Ng=mW.execSync(OW,{encoding:"utf8"})}catch{Ng=" "}return Ng},ws="glibc",_W=/LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i,oI="musl",s0e=n=>n.includes("libc.musl-")||n.includes("ld-musl-"),NW=()=>{let n=SW();return n.header&&n.header.glibcVersionRuntime?ws:Array.isArray(n.sharedObjects)&&n.sharedObjects.some(s0e)?oI:null},TW=n=>{let[r,o]=n.split(/[\r\n]+/);return r&&r.includes(ws)?ws:o&&o.includes(oI)?oI:null},RW=n=>{if(n){if(n.includes("/ld-musl-"))return oI;if(n.includes("/ld-linux-"))return ws}return null},kW=n=>(n=n.toString(),n.includes("musl")?oI:n.includes("GNU C Library")?ws:null),g0e=async()=>{if(Sn!==void 0)return Sn;Sn=null;try{let n=await nv(Km);Sn=kW(n)}catch{}return Sn},c0e=()=>{if(Sn!==void 0)return Sn;Sn=null;try{let n=sv(Km);Sn=kW(n)}catch{}return Sn},I0e=async()=>{if(mn!==void 0)return mn;mn=null;try{let n=await nv(DW),r=wW(n);mn=RW(r)}catch{}return mn},l0e=()=>{if(mn!==void 0)return mn;mn=null;try{let n=sv(DW),r=wW(n);mn=RW(r)}catch{}return mn},vW=async()=>{let n=null;if(Np()&&(n=await I0e(),!n&&(n=await g0e(),n||(n=NW()),!n))){let r=await bW();n=TW(r)}return n},PW=()=>{let n=null;if(Np()&&(n=l0e(),!n&&(n=c0e(),n||(n=NW()),!n))){let r=MW();n=TW(r)}return n},p0e=async()=>Np()&&await vW()!==ws,E0e=()=>Np()&&PW()!==ws,C0e=async()=>{if(Dn!==void 0)return Dn;Dn=null;try{let r=(await nv(Km)).match(_W);r&&(Dn=r[1])}catch{}return Dn},h0e=()=>{if(Dn!==void 0)return Dn;Dn=null;try{let r=sv(Km).match(_W);r&&(Dn=r[1])}catch{}return Dn},GW=()=>{let n=SW();return n.header&&n.header.glibcVersionRuntime?n.header.glibcVersionRuntime:null},yW=n=>n.trim().split(/\s+/)[1],FW=n=>{let[r,o,i]=n.split(/[\r\n]+/);return r&&r.includes(ws)?yW(r):o&&i&&o.includes(oI)?yW(i):null},d0e=async()=>{let n=null;if(Np()&&(n=await C0e(),n||(n=GW()),!n)){let r=await bW();n=FW(r)}return n},u0e=()=>{let n=null;if(Np()&&(n=h0e(),n||(n=GW()),!n)){let r=MW();n=FW(r)}return n};LW.exports={GLIBC:ws,MUSL:oI,family:vW,familySync:PW,isNonGlibcLinux:p0e,isNonGlibcLinuxSync:E0e,version:d0e,versionSync:u0e}});var Tp=W((baA,UW)=>{"use strict";var B0e="2.0.0",f0e=Number.MAX_SAFE_INTEGER||9007199254740991,Q0e=16,y0e=250,m0e=["major","premajor","minor","preminor","patch","prepatch","prerelease"];UW.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:Q0e,MAX_SAFE_BUILD_LENGTH:y0e,MAX_SAFE_INTEGER:f0e,RELEASE_TYPES:m0e,SEMVER_SPEC_VERSION:B0e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Bd=W((MaA,HW)=>{"use strict";var S0e=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{};HW.exports=S0e});var Rp=W((wn,KW)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:gv,MAX_SAFE_BUILD_LENGTH:D0e,MAX_LENGTH:w0e}=Tp(),O0e=Bd();wn=KW.exports={};var b0e=wn.re=[],M0e=wn.safeRe=[],nA=wn.src=[],_0e=wn.safeSrc=[],sA=wn.t={},N0e=0,cv="[a-zA-Z0-9-]",T0e=[["\\s",1],["\\d",w0e],[cv,D0e]],R0e=n=>{for(let[r,o]of T0e)n=n.split(`${r}*`).join(`${r}{0,${o}}`).split(`${r}+`).join(`${r}{1,${o}}`);return n},YA=(n,r,o)=>{let i=R0e(r),e=N0e++;O0e(n,e,r),sA[n]=e,nA[e]=r,_0e[e]=i,b0e[e]=new RegExp(r,o?"g":void 0),M0e[e]=new RegExp(i,o?"g":void 0)};YA("NUMERICIDENTIFIER","0|[1-9]\\d*");YA("NUMERICIDENTIFIERLOOSE","\\d+");YA("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${cv}*`);YA("MAINVERSION",`(${nA[sA.NUMERICIDENTIFIER]})\\.(${nA[sA.NUMERICIDENTIFIER]})\\.(${nA[sA.NUMERICIDENTIFIER]})`);YA("MAINVERSIONLOOSE",`(${nA[sA.NUMERICIDENTIFIERLOOSE]})\\.(${nA[sA.NUMERICIDENTIFIERLOOSE]})\\.(${nA[sA.NUMERICIDENTIFIERLOOSE]})`);YA("PRERELEASEIDENTIFIER",`(?:${nA[sA.NONNUMERICIDENTIFIER]}|${nA[sA.NUMERICIDENTIFIER]})`);YA("PRERELEASEIDENTIFIERLOOSE",`(?:${nA[sA.NONNUMERICIDENTIFIER]}|${nA[sA.NUMERICIDENTIFIERLOOSE]})`);YA("PRERELEASE",`(?:-(${nA[sA.PRERELEASEIDENTIFIER]}(?:\\.${nA[sA.PRERELEASEIDENTIFIER]})*))`);YA("PRERELEASELOOSE",`(?:-?(${nA[sA.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${nA[sA.PRERELEASEIDENTIFIERLOOSE]})*))`);YA("BUILDIDENTIFIER",`${cv}+`);YA("BUILD",`(?:\\+(${nA[sA.BUILDIDENTIFIER]}(?:\\.${nA[sA.BUILDIDENTIFIER]})*))`);YA("FULLPLAIN",`v?${nA[sA.MAINVERSION]}${nA[sA.PRERELEASE]}?${nA[sA.BUILD]}?`);YA("FULL",`^${nA[sA.FULLPLAIN]}$`);YA("LOOSEPLAIN",`[v=\\s]*${nA[sA.MAINVERSIONLOOSE]}${nA[sA.PRERELEASELOOSE]}?${nA[sA.BUILD]}?`);YA("LOOSE",`^${nA[sA.LOOSEPLAIN]}$`);YA("GTLT","((?:<|>)?=?)");YA("XRANGEIDENTIFIERLOOSE",`${nA[sA.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);YA("XRANGEIDENTIFIER",`${nA[sA.NUMERICIDENTIFIER]}|x|X|\\*`);YA("XRANGEPLAIN",`[v=\\s]*(${nA[sA.XRANGEIDENTIFIER]})(?:\\.(${nA[sA.XRANGEIDENTIFIER]})(?:\\.(${nA[sA.XRANGEIDENTIFIER]})(?:${nA[sA.PRERELEASE]})?${nA[sA.BUILD]}?)?)?`);YA("XRANGEPLAINLOOSE",`[v=\\s]*(${nA[sA.XRANGEIDENTIFIERLOOSE]})(?:\\.(${nA[sA.XRANGEIDENTIFIERLOOSE]})(?:\\.(${nA[sA.XRANGEIDENTIFIERLOOSE]})(?:${nA[sA.PRERELEASELOOSE]})?${nA[sA.BUILD]}?)?)?`);YA("XRANGE",`^${nA[sA.GTLT]}\\s*${nA[sA.XRANGEPLAIN]}$`);YA("XRANGELOOSE",`^${nA[sA.GTLT]}\\s*${nA[sA.XRANGEPLAINLOOSE]}$`);YA("COERCEPLAIN",`(^|[^\\d])(\\d{1,${gv}})(?:\\.(\\d{1,${gv}}))?(?:\\.(\\d{1,${gv}}))?`);YA("COERCE",`${nA[sA.COERCEPLAIN]}(?:$|[^\\d])`);YA("COERCEFULL",nA[sA.COERCEPLAIN]+`(?:${nA[sA.PRERELEASE]})?(?:${nA[sA.BUILD]})?(?:$|[^\\d])`);YA("COERCERTL",nA[sA.COERCE],!0);YA("COERCERTLFULL",nA[sA.COERCEFULL],!0);YA("LONETILDE","(?:~>?)");YA("TILDETRIM",`(\\s*)${nA[sA.LONETILDE]}\\s+`,!0);wn.tildeTrimReplace="$1~";YA("TILDE",`^${nA[sA.LONETILDE]}${nA[sA.XRANGEPLAIN]}$`);YA("TILDELOOSE",`^${nA[sA.LONETILDE]}${nA[sA.XRANGEPLAINLOOSE]}$`);YA("LONECARET","(?:\\^)");YA("CARETTRIM",`(\\s*)${nA[sA.LONECARET]}\\s+`,!0);wn.caretTrimReplace="$1^";YA("CARET",`^${nA[sA.LONECARET]}${nA[sA.XRANGEPLAIN]}$`);YA("CARETLOOSE",`^${nA[sA.LONECARET]}${nA[sA.XRANGEPLAINLOOSE]}$`);YA("COMPARATORLOOSE",`^${nA[sA.GTLT]}\\s*(${nA[sA.LOOSEPLAIN]})$|^$`);YA("COMPARATOR",`^${nA[sA.GTLT]}\\s*(${nA[sA.FULLPLAIN]})$|^$`);YA("COMPARATORTRIM",`(\\s*)${nA[sA.GTLT]}\\s*(${nA[sA.LOOSEPLAIN]}|${nA[sA.XRANGEPLAIN]})`,!0);wn.comparatorTrimReplace="$1$2$3";YA("HYPHENRANGE",`^\\s*(${nA[sA.XRANGEPLAIN]})\\s+-\\s+(${nA[sA.XRANGEPLAIN]})\\s*$`);YA("HYPHENRANGELOOSE",`^\\s*(${nA[sA.XRANGEPLAINLOOSE]})\\s+-\\s+(${nA[sA.XRANGEPLAINLOOSE]})\\s*$`);YA("STAR","(<|>)?=?\\s*\\*");YA("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");YA("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var xm=W((_aA,YW)=>{"use strict";var k0e=Object.freeze({loose:!0}),v0e=Object.freeze({}),P0e=n=>n?typeof n!="object"?k0e:n:v0e;YW.exports=P0e});var Iv=W((NaA,JW)=>{"use strict";var xW=/^[0-9]+$/,jW=(n,r)=>{if(typeof n=="number"&&typeof r=="number")return n===r?0:njW(r,n);JW.exports={compareIdentifiers:jW,rcompareIdentifiers:G0e}});var ra=W((TaA,VW)=>{"use strict";var jm=Bd(),{MAX_LENGTH:qW,MAX_SAFE_INTEGER:Jm}=Tp(),{safeRe:qm,t:Vm}=Rp(),F0e=xm(),{compareIdentifiers:lv}=Iv(),L0e=(n,r)=>{let o=r.split(".");if(o.length>n.length)return!1;for(let i=0;iqW)throw new TypeError(`version is longer than ${qW} characters`);jm("SemVer",r,o),this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease;let i=r.trim().match(o.loose?qm[Vm.LOOSE]:qm[Vm.FULL]);if(!i)throw new TypeError(`Invalid Version: ${r}`);if(this.raw=r,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>Jm||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Jm||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Jm||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){let a=+e;if(a>=0&&ar.major?1:this.minorr.minor?1:this.patchr.patch?1:0}comparePre(r){if(r instanceof n||(r=new n(r,this.options)),this.prerelease.length&&!r.prerelease.length)return-1;if(!this.prerelease.length&&r.prerelease.length)return 1;if(!this.prerelease.length&&!r.prerelease.length)return 0;let o=0;do{let i=this.prerelease[o],e=r.prerelease[o];if(jm("prerelease compare",o,i,e),i===void 0&&e===void 0)return 0;if(e===void 0)return 1;if(i===void 0)return-1;if(i===e)continue;return lv(i,e)}while(++o)}compareBuild(r){r instanceof n||(r=new n(r,this.options));let o=0;do{let i=this.build[o],e=r.build[o];if(jm("build compare",o,i,e),i===void 0&&e===void 0)return 0;if(e===void 0)return 1;if(i===void 0)return-1;if(i===e)continue;return lv(i,e)}while(++o)}inc(r,o,i){if(r.startsWith("pre")){if(!o&&i===!1)throw new Error("invalid increment argument: identifier is empty");if(o){let e=`-${o}`.match(this.options.loose?qm[Vm.PRERELEASELOOSE]:qm[Vm.PRERELEASE]);if(!e||e[1]!==o)throw new Error(`invalid identifier: ${o}`)}}switch(r){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",o,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",o,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",o,i),this.inc("pre",o,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",o,i),this.inc("pre",o,i);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let e=Number(i)?1:0;if(this.prerelease.length===0)this.prerelease=[e];else{let a=this.prerelease.length;for(;--a>=0;)typeof this.prerelease[a]=="number"&&(this.prerelease[a]++,a=-2);if(a===-1){if(o===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(o){let a=[o,e];if(i===!1&&(a=[o]),L0e(this.prerelease,o)){let A=this.prerelease[o.split(".").length];isNaN(A)&&(this.prerelease=a)}else this.prerelease=a}break}default:throw new Error(`invalid increment argument: ${r}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};VW.exports=pv});var Tg=W((RaA,WW)=>{"use strict";var zW=ra(),U0e=(n,r,o=!1)=>{if(n instanceof zW)return n;try{return new zW(n,r)}catch(i){if(!o)return null;throw i}};WW.exports=U0e});var XW=W((kaA,ZW)=>{"use strict";var H0e=Tg(),K0e=(n,r)=>{let o=H0e(n,r);return o?o.version:null};ZW.exports=K0e});var e6=W((vaA,$W)=>{"use strict";var Y0e=Tg(),x0e=(n,r)=>{let o=Y0e(n.trim().replace(/^[=v]+/,""),r);return o?o.version:null};$W.exports=x0e});var r6=W((PaA,t6)=>{"use strict";var A6=ra(),j0e=(n,r,o,i,e)=>{typeof o=="string"&&(e=i,i=o,o=void 0);try{return new A6(n instanceof A6?n.version:n,o).inc(r,i,e).version}catch{return null}};t6.exports=j0e});var o6=W((GaA,i6)=>{"use strict";var a6=Tg(),J0e=(n,r)=>{let o=a6(n,null,!0),i=a6(r,null,!0),e=o.compare(i);if(e===0)return null;let a=e>0,A=a?o:i,t=a?i:o,s=!!A.prerelease.length;if(!!t.prerelease.length&&!s){if(!t.patch&&!t.minor)return"major";if(t.compareMain(A)===0)return t.minor&&!t.patch?"minor":"patch"}let c=s?"pre":"";return o.major!==i.major?c+"major":o.minor!==i.minor?c+"minor":o.patch!==i.patch?c+"patch":"prerelease"};i6.exports=J0e});var s6=W((FaA,n6)=>{"use strict";var q0e=ra(),V0e=(n,r)=>new q0e(n,r).major;n6.exports=V0e});var c6=W((LaA,g6)=>{"use strict";var z0e=ra(),W0e=(n,r)=>new z0e(n,r).minor;g6.exports=W0e});var l6=W((UaA,I6)=>{"use strict";var Z0e=ra(),X0e=(n,r)=>new Z0e(n,r).patch;I6.exports=X0e});var E6=W((HaA,p6)=>{"use strict";var $0e=Tg(),eTe=(n,r)=>{let o=$0e(n,r);return o&&o.prerelease.length?o.prerelease:null};p6.exports=eTe});var no=W((KaA,h6)=>{"use strict";var C6=ra(),ATe=(n,r,o)=>new C6(n,o).compare(new C6(r,o));h6.exports=ATe});var u6=W((YaA,d6)=>{"use strict";var tTe=no(),rTe=(n,r,o)=>tTe(r,n,o);d6.exports=rTe});var f6=W((xaA,B6)=>{"use strict";var aTe=no(),iTe=(n,r)=>aTe(n,r,!0);B6.exports=iTe});var zm=W((jaA,y6)=>{"use strict";var Q6=ra(),oTe=(n,r,o)=>{let i=new Q6(n,o),e=new Q6(r,o);return i.compare(e)||i.compareBuild(e)};y6.exports=oTe});var S6=W((JaA,m6)=>{"use strict";var nTe=zm(),sTe=(n,r)=>n.sort((o,i)=>nTe(o,i,r));m6.exports=sTe});var w6=W((qaA,D6)=>{"use strict";var gTe=zm(),cTe=(n,r)=>n.sort((o,i)=>gTe(i,o,r));D6.exports=cTe});var fd=W((VaA,O6)=>{"use strict";var ITe=no(),lTe=(n,r,o)=>ITe(n,r,o)>0;O6.exports=lTe});var Wm=W((zaA,b6)=>{"use strict";var pTe=no(),ETe=(n,r,o)=>pTe(n,r,o)<0;b6.exports=ETe});var Ev=W((WaA,M6)=>{"use strict";var CTe=no(),hTe=(n,r,o)=>CTe(n,r,o)===0;M6.exports=hTe});var Cv=W((ZaA,_6)=>{"use strict";var dTe=no(),uTe=(n,r,o)=>dTe(n,r,o)!==0;_6.exports=uTe});var Zm=W((XaA,N6)=>{"use strict";var BTe=no(),fTe=(n,r,o)=>BTe(n,r,o)>=0;N6.exports=fTe});var Xm=W(($aA,T6)=>{"use strict";var QTe=no(),yTe=(n,r,o)=>QTe(n,r,o)<=0;T6.exports=yTe});var hv=W((eiA,R6)=>{"use strict";var mTe=Ev(),STe=Cv(),DTe=fd(),wTe=Zm(),OTe=Wm(),bTe=Xm(),MTe=(n,r,o,i)=>{switch(r){case"===":return typeof n=="object"&&(n=n.version),typeof o=="object"&&(o=o.version),n===o;case"!==":return typeof n=="object"&&(n=n.version),typeof o=="object"&&(o=o.version),n!==o;case"":case"=":case"==":return mTe(n,o,i);case"!=":return STe(n,o,i);case">":return DTe(n,o,i);case">=":return wTe(n,o,i);case"<":return OTe(n,o,i);case"<=":return bTe(n,o,i);default:throw new TypeError(`Invalid operator: ${r}`)}};R6.exports=MTe});var v6=W((AiA,k6)=>{"use strict";var _Te=ra(),NTe=Tg(),{safeRe:$m,t:eS}=Rp(),TTe=(n,r)=>{if(n instanceof _Te)return n;if(typeof n=="number"&&(n=String(n)),typeof n!="string")return null;r=r||{};let o=null;if(!r.rtl)o=n.match(r.includePrerelease?$m[eS.COERCEFULL]:$m[eS.COERCE]);else{let s=r.includePrerelease?$m[eS.COERCERTLFULL]:$m[eS.COERCERTL],g;for(;(g=s.exec(n))&&(!o||o.index+o[0].length!==n.length);)(!o||g.index+g[0].length!==o.index+o[0].length)&&(o=g),s.lastIndex=g.index+g[1].length+g[2].length;s.lastIndex=-1}if(o===null)return null;let i=o[2],e=o[3]||"0",a=o[4]||"0",A=r.includePrerelease&&o[5]?`-${o[5]}`:"",t=r.includePrerelease&&o[6]?`+${o[6]}`:"";return NTe(`${i}.${e}.${a}${A}${t}`,r)};k6.exports=TTe});var G6=W((tiA,P6)=>{"use strict";var RTe=Tg(),kTe=Tp(),vTe=ra(),PTe=(n,r,o)=>{if(!kTe.RELEASE_TYPES.includes(r))return null;let i=GTe(n,o);return i&&FTe(i,r)},GTe=(n,r)=>{let o=n instanceof vTe?n.version:n;return RTe(o,r)},FTe=(n,r)=>{if(LTe(r))return n.version;switch(n.prerelease=[],r){case"major":n.minor=0,n.patch=0;break;case"minor":n.patch=0;break}return n.format()},LTe=n=>n.startsWith("pre");P6.exports=PTe});var L6=W((riA,F6)=>{"use strict";var dv=class{constructor(){this.max=1e3,this.map=new Map}get(r){let o=this.map.get(r);if(o!==void 0)return this.map.delete(r),this.map.set(r,o),o}delete(r){return this.map.delete(r)}set(r,o){if(!this.delete(r)&&o!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(r,o)}return this}};F6.exports=dv});var so=W((aiA,Y6)=>{"use strict";var UTe=/\s+/g,uv=class n{constructor(r,o){if(o=KTe(o),r instanceof n)return r.loose===!!o.loose&&r.includePrerelease===!!o.includePrerelease?r:new n(r.raw,o);if(r instanceof Bv)return this.raw=r.value,this.set=[[r]],this.formatted=void 0,this;if(this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease,this.raw=r.trim().replace(UTe," "),this.set=this.raw.split("||").map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(e=>!H6(e[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&ZTe(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let r=0;r0&&(this.formatted+="||");let o=this.set[r];for(let i=0;i0&&(this.formatted+=" "),this.formatted+=o[i].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(r){r=r.replace(WTe,"");let i=((this.options.includePrerelease&&VTe)|(this.options.loose&&zTe))+":"+r,e=U6.get(i);if(e)return e;let a=this.options.loose,A=a?va[aa.HYPHENRANGELOOSE]:va[aa.HYPHENRANGE];r=r.replace(A,sRe(this.options.includePrerelease)),kt("hyphen replace",r),r=r.replace(va[aa.COMPARATORTRIM],jTe),kt("comparator trim",r),r=r.replace(va[aa.TILDETRIM],JTe),kt("tilde trim",r),r=r.replace(va[aa.CARETTRIM],qTe),kt("caret trim",r);let t=r.split(" ").map(I=>XTe(I,this.options)).join(" ").split(/\s+/).map(I=>nRe(I,this.options));a&&(t=t.filter(I=>(kt("loose invalid filter",I,this.options),!!I.match(va[aa.COMPARATORLOOSE])))),kt("range list",t);let s=new Map,g=t.map(I=>new Bv(I,this.options));for(let I of g){if(H6(I))return[I];s.set(I.value,I)}s.size>1&&s.has("")&&s.delete("");let c=[...s.values()];return U6.set(i,c),c}intersects(r,o){if(!(r instanceof n))throw new TypeError("a Range is required");return this.set.some(i=>K6(i,o)&&r.set.some(e=>K6(e,o)&&i.every(a=>e.every(A=>a.intersects(A,o)))))}test(r){if(!r)return!1;if(typeof r=="string")try{r=new YTe(r,this.options)}catch{return!1}for(let o=0;on.value==="<0.0.0-0",ZTe=n=>n.value==="",K6=(n,r)=>{let o=!0,i=n.slice(),e=i.pop();for(;o&&i.length;)o=i.every(a=>e.intersects(a,r)),e=i.pop();return o},XTe=(n,r)=>(n=n.replace(va[aa.BUILD],""),kt("comp",n,r),n=tRe(n,r),kt("caret",n),n=eRe(n,r),kt("tildes",n),n=aRe(n,r),kt("xrange",n),n=oRe(n,r),kt("stars",n),n),Nr=n=>!n||n.toLowerCase()==="x"||n==="*",$Te=(n,r,o)=>Nr(n)&&!Nr(r)||Nr(r)&&o&&!Nr(o),eRe=(n,r)=>n.trim().split(/\s+/).map(o=>ARe(o,r)).join(" "),ARe=(n,r)=>{let o=r.loose?va[aa.TILDELOOSE]:va[aa.TILDE],i=r.includePrerelease?"-0":"";return n.replace(o,(e,a,A,t,s)=>{kt("tilde",n,e,a,A,t,s);let g;return Nr(a)?g="":Nr(A)?g=`>=${a}.0.0${i} <${+a+1}.0.0-0`:Nr(t)?g=`>=${a}.${A}.0${i} <${a}.${+A+1}.0-0`:s?(kt("replaceTilde pr",s),g=`>=${a}.${A}.${t}-${s} <${a}.${+A+1}.0-0`):g=`>=${a}.${A}.${t} <${a}.${+A+1}.0-0`,kt("tilde return",g),g})},tRe=(n,r)=>n.trim().split(/\s+/).map(o=>rRe(o,r)).join(" "),rRe=(n,r)=>{kt("caret",n,r);let o=r.loose?va[aa.CARETLOOSE]:va[aa.CARET],i=r.includePrerelease?"-0":"";return n.replace(o,(e,a,A,t,s)=>{kt("caret",n,e,a,A,t,s);let g;return Nr(a)?g="":Nr(A)?g=`>=${a}.0.0${i} <${+a+1}.0.0-0`:Nr(t)?a==="0"?g=`>=${a}.${A}.0${i} <${a}.${+A+1}.0-0`:g=`>=${a}.${A}.0${i} <${+a+1}.0.0-0`:s?(kt("replaceCaret pr",s),a==="0"?A==="0"?g=`>=${a}.${A}.${t}-${s} <${a}.${A}.${+t+1}-0`:g=`>=${a}.${A}.${t}-${s} <${a}.${+A+1}.0-0`:g=`>=${a}.${A}.${t}-${s} <${+a+1}.0.0-0`):(kt("no pr"),a==="0"?A==="0"?g=`>=${a}.${A}.${t} <${a}.${A}.${+t+1}-0`:g=`>=${a}.${A}.${t} <${a}.${+A+1}.0-0`:g=`>=${a}.${A}.${t} <${+a+1}.0.0-0`),kt("caret return",g),g})},aRe=(n,r)=>(kt("replaceXRanges",n,r),n.split(/\s+/).map(o=>iRe(o,r)).join(" ")),iRe=(n,r)=>{n=n.trim();let o=r.loose?va[aa.XRANGELOOSE]:va[aa.XRANGE];return n.replace(o,(i,e,a,A,t,s)=>{if(kt("xRange",n,i,e,a,A,t,s),$Te(a,A,t))return n;let g=Nr(a),c=g||Nr(A),I=c||Nr(t),E=I;return e==="="&&E&&(e=""),s=r.includePrerelease?"-0":"",g?e===">"||e==="<"?i="<0.0.0-0":i="*":e&&E?(c&&(A=0),t=0,e===">"?(e=">=",c?(a=+a+1,A=0,t=0):(A=+A+1,t=0)):e==="<="&&(e="<",c?a=+a+1:A=+A+1),e==="<"&&(s="-0"),i=`${e+a}.${A}.${t}${s}`):c?i=`>=${a}.0.0${s} <${+a+1}.0.0-0`:I&&(i=`>=${a}.${A}.0${s} <${a}.${+A+1}.0-0`),kt("xRange return",i),i})},oRe=(n,r)=>(kt("replaceStars",n,r),n.trim().replace(va[aa.STAR],"")),nRe=(n,r)=>(kt("replaceGTE0",n,r),n.trim().replace(va[r.includePrerelease?aa.GTE0PRE:aa.GTE0],"")),sRe=n=>(r,o,i,e,a,A,t,s,g,c,I,E)=>(Nr(i)?o="":Nr(e)?o=`>=${i}.0.0${n?"-0":""}`:Nr(a)?o=`>=${i}.${e}.0${n?"-0":""}`:A?o=`>=${o}`:o=`>=${o}${n?"-0":""}`,Nr(g)?s="":Nr(c)?s=`<${+g+1}.0.0-0`:Nr(I)?s=`<${g}.${+c+1}.0-0`:E?s=`<=${g}.${c}.${I}-${E}`:n?s=`<${g}.${c}.${+I+1}-0`:s=`<=${s}`,`${o} ${s}`.trim()),gRe=(n,r,o)=>{for(let i=0;i0){let e=n[i].semver;if(e.major===r.major&&e.minor===r.minor&&e.patch===r.patch)return!0}return!1}return!0}});var Qd=W((iiA,z6)=>{"use strict";var yd=Symbol("SemVer ANY"),yv=class n{static get ANY(){return yd}constructor(r,o){if(o=x6(o),r instanceof n){if(r.loose===!!o.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),Qv("comparator",r,o),this.options=o,this.loose=!!o.loose,this.parse(r),this.semver===yd?this.value="":this.value=this.operator+this.semver.version,Qv("comp",this)}parse(r){let o=this.options.loose?j6[J6.COMPARATORLOOSE]:j6[J6.COMPARATOR],i=r.match(o);if(!i)throw new TypeError(`Invalid comparator: ${r}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new q6(i[2],this.options.loose):this.semver=yd}toString(){return this.value}test(r){if(Qv("Comparator.test",r,this.options.loose),this.semver===yd||r===yd)return!0;if(typeof r=="string")try{r=new q6(r,this.options)}catch{return!1}return fv(r,this.operator,this.semver,this.options)}intersects(r,o){if(!(r instanceof n))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new V6(r.value,o).test(this.value):r.operator===""?r.value===""?!0:new V6(this.value,o).test(r.semver):(o=x6(o),o.includePrerelease&&(this.value==="<0.0.0-0"||r.value==="<0.0.0-0")||!o.includePrerelease&&(this.value.startsWith("<0.0.0")||r.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&r.operator.startsWith(">")||this.operator.startsWith("<")&&r.operator.startsWith("<")||this.semver.version===r.semver.version&&this.operator.includes("=")&&r.operator.includes("=")||fv(this.semver,"<",r.semver,o)&&this.operator.startsWith(">")&&r.operator.startsWith("<")||fv(this.semver,">",r.semver,o)&&this.operator.startsWith("<")&&r.operator.startsWith(">")))}};z6.exports=yv;var x6=xm(),{safeRe:j6,t:J6}=Rp(),fv=hv(),Qv=Bd(),q6=ra(),V6=so()});var md=W((oiA,W6)=>{"use strict";var cRe=so(),IRe=(n,r,o)=>{try{r=new cRe(r,o)}catch{return!1}return r.test(n)};W6.exports=IRe});var X6=W((niA,Z6)=>{"use strict";var lRe=so(),pRe=(n,r)=>new lRe(n,r).set.map(o=>o.map(i=>i.value).join(" ").trim().split(" "));Z6.exports=pRe});var e5=W((siA,$6)=>{"use strict";var ERe=ra(),CRe=so(),hRe=(n,r,o)=>{let i=null,e=null,a=null;try{a=new CRe(r,o)}catch{return null}return n.forEach(A=>{a.test(A)&&(!i||e.compare(A)===-1)&&(i=A,e=new ERe(i,o))}),i};$6.exports=hRe});var t5=W((giA,A5)=>{"use strict";var dRe=ra(),uRe=so(),BRe=(n,r,o)=>{let i=null,e=null,a=null;try{a=new uRe(r,o)}catch{return null}return n.forEach(A=>{a.test(A)&&(!i||e.compare(A)===1)&&(i=A,e=new dRe(i,o))}),i};A5.exports=BRe});var i5=W((ciA,a5)=>{"use strict";var mv=ra(),fRe=so(),r5=fd(),QRe=(n,r)=>{n=new fRe(n,r);let o=new mv("0.0.0");if(n.test(o)||(o=new mv("0.0.0-0"),n.test(o)))return o;o=null;for(let i=0;i{let t=new mv(A.semver.version);switch(A.operator){case">":t.prerelease.length===0?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!a||r5(t,a))&&(a=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${A.operator}`)}}),a&&(!o||r5(o,a))&&(o=a)}return o&&n.test(o)?o:null};a5.exports=QRe});var n5=W((IiA,o5)=>{"use strict";var yRe=so(),mRe=(n,r)=>{try{return new yRe(n,r).range||"*"}catch{return null}};o5.exports=mRe});var AS=W((liA,I5)=>{"use strict";var SRe=ra(),c5=Qd(),{ANY:DRe}=c5,wRe=so(),ORe=md(),s5=fd(),g5=Wm(),bRe=Xm(),MRe=Zm(),_Re=(n,r,o,i)=>{n=new SRe(n,i),r=new wRe(r,i);let e,a,A,t,s;switch(o){case">":e=s5,a=bRe,A=g5,t=">",s=">=";break;case"<":e=g5,a=MRe,A=s5,t="<",s="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ORe(n,r,i))return!1;for(let g=0;g{B.semver===DRe&&(B=new c5(">=0.0.0")),I=I||B,E=E||B,e(B.semver,I.semver,i)?I=B:A(B.semver,E.semver,i)&&(E=B)}),I.operator===t||I.operator===s||(!E.operator||E.operator===t)&&a(n,E.semver))return!1;if(E.operator===s&&A(n,E.semver))return!1}return!0};I5.exports=_Re});var p5=W((piA,l5)=>{"use strict";var NRe=AS(),TRe=(n,r,o)=>NRe(n,r,">",o);l5.exports=TRe});var C5=W((EiA,E5)=>{"use strict";var RRe=AS(),kRe=(n,r,o)=>RRe(n,r,"<",o);E5.exports=kRe});var u5=W((CiA,d5)=>{"use strict";var h5=so(),vRe=(n,r,o)=>(n=new h5(n,o),r=new h5(r,o),n.intersects(r,o));d5.exports=vRe});var f5=W((hiA,B5)=>{"use strict";var PRe=md(),GRe=no();B5.exports=(n,r,o)=>{let i=[],e=null,a=null,A=n.sort((c,I)=>GRe(c,I,o));for(let c of A)PRe(c,r,o)?(a=c,e||(e=c)):(a&&i.push([e,a]),a=null,e=null);e&&i.push([e,null]);let t=[];for(let[c,I]of i)c===I?t.push(c):!I&&c===A[0]?t.push("*"):I?c===A[0]?t.push(`<=${I}`):t.push(`${c} - ${I}`):t.push(`>=${c}`);let s=t.join(" || "),g=typeof r.raw=="string"?r.raw:String(r);return s.length{"use strict";var Q5=so(),wv=Qd(),{ANY:Sv}=wv,Dv=md(),Ov=no(),FRe=(n,r,o={})=>{if(n===r)return!0;n=new Q5(n,o),r=new Q5(r,o);let i=!1;e:for(let e of n.set){for(let a of r.set){let A=URe(e,a,o);if(i=i||A!==null,A)continue e}if(i)return!1}return!0},LRe=[new wv(">=0.0.0-0")],y5=[new wv(">=0.0.0")],URe=(n,r,o)=>{if(n===r)return!0;if(n.length===1&&n[0].semver===Sv){if(r.length===1&&r[0].semver===Sv)return!0;o.includePrerelease?n=LRe:n=y5}if(r.length===1&&r[0].semver===Sv){if(o.includePrerelease)return!0;r=y5}let i=new Set,e,a;for(let B of n)B.operator===">"||B.operator===">="?e=m5(e,B,o):B.operator==="<"||B.operator==="<="?a=S5(a,B,o):i.add(B.semver);if(i.size>1)return null;let A;if(e&&a){if(A=Ov(e.semver,a.semver,o),A>0)return null;if(A===0&&(e.operator!==">="||a.operator!=="<="))return null}for(let B of i){if(e&&!Dv(B,String(e),o)||a&&!Dv(B,String(a),o))return null;for(let f of r)if(!Dv(B,String(f),o))return!1;return!0}let t,s,g,c,I=a&&!o.includePrerelease&&a.semver.prerelease.length?a.semver:!1,E=e&&!o.includePrerelease&&e.semver.prerelease.length?e.semver:!1;I&&I.prerelease.length===1&&a.operator==="<"&&I.prerelease[0]===0&&(I=!1);for(let B of r){if(c=c||B.operator===">"||B.operator===">=",g=g||B.operator==="<"||B.operator==="<=",e){if(E&&B.semver.prerelease&&B.semver.prerelease.length&&B.semver.major===E.major&&B.semver.minor===E.minor&&B.semver.patch===E.patch&&(E=!1),B.operator===">"||B.operator===">="){if(t=m5(e,B,o),t===B&&t!==e)return!1}else if(e.operator===">="&&!B.test(e.semver))return!1}if(a){if(I&&B.semver.prerelease&&B.semver.prerelease.length&&B.semver.major===I.major&&B.semver.minor===I.minor&&B.semver.patch===I.patch&&(I=!1),B.operator==="<"||B.operator==="<="){if(s=S5(a,B,o),s===B&&s!==a)return!1}else if(a.operator==="<="&&!B.test(a.semver))return!1}if(!B.operator&&(a||e)&&A!==0)return!1}return!(e&&g&&!a&&A!==0||a&&c&&!e&&A!==0||E||I)},m5=(n,r,o)=>{if(!n)return r;let i=Ov(n.semver,r.semver,o);return i>0?n:i<0||r.operator===">"&&n.operator===">="?r:n},S5=(n,r,o)=>{if(!n)return r;let i=Ov(n.semver,r.semver,o);return i<0?n:i>0||r.operator==="<"&&n.operator==="<="?r:n};D5.exports=FRe});var _5=W((uiA,M5)=>{"use strict";var bv=Rp(),O5=Tp(),HRe=ra(),b5=Iv(),KRe=Tg(),YRe=XW(),xRe=e6(),jRe=r6(),JRe=o6(),qRe=s6(),VRe=c6(),zRe=l6(),WRe=E6(),ZRe=no(),XRe=u6(),$Re=f6(),eke=zm(),Ake=S6(),tke=w6(),rke=fd(),ake=Wm(),ike=Ev(),oke=Cv(),nke=Zm(),ske=Xm(),gke=hv(),cke=v6(),Ike=G6(),lke=Qd(),pke=so(),Eke=md(),Cke=X6(),hke=e5(),dke=t5(),uke=i5(),Bke=n5(),fke=AS(),Qke=p5(),yke=C5(),mke=u5(),Ske=f5(),Dke=w5();M5.exports={parse:KRe,valid:YRe,clean:xRe,inc:jRe,diff:JRe,major:qRe,minor:VRe,patch:zRe,prerelease:WRe,compare:ZRe,rcompare:XRe,compareLoose:$Re,compareBuild:eke,sort:Ake,rsort:tke,gt:rke,lt:ake,eq:ike,neq:oke,gte:nke,lte:ske,cmp:gke,coerce:cke,truncate:Ike,Comparator:lke,Range:pke,satisfies:Eke,toComparators:Cke,maxSatisfying:hke,minSatisfying:dke,minVersion:uke,validRange:Bke,outside:fke,gtr:Qke,ltr:yke,intersects:mke,simplifyRange:Ske,subset:Dke,SemVer:HRe,re:bv.re,src:bv.src,tokens:bv.t,SEMVER_SPEC_VERSION:O5.SEMVER_SPEC_VERSION,RELEASE_TYPES:O5.RELEASE_TYPES,compareIdentifiers:b5.compareIdentifiers,rcompareIdentifiers:b5.rcompareIdentifiers}});var Os,tS=le(()=>{Os={name:"sharp",description:"High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images",version:"0.35.3",author:"Lovell Fuller ",homepage:"https://sharp.pixelplumbing.com",contributors:["Pierre Inglebert ","Jonathan Ong ","Chanon Sajjamanochai ","Juliano Julio ","Daniel Gasienica ","Julian Walker ","Amit Pitaru ","Brandon Aaron ","Andreas Lind ","Maurus Cuelenaere ","Linus Unneb\xE4ck ","Victor Mateevitsi ","Alaric Holloway ","Bernhard K. Weisshuhn ","Chris Riley ","David Carley ","John Tobin ","Kenton Gray ","Felix B\xFCnemann ","Samy Al Zahrani ","Chintan Thakkar ","F. Orlando Galashan ","Kleis Auke Wolthuizen ","Matt Hirsch ","Matthias Thoemmes ","Patrick Paskaris ","J\xE9r\xE9my Lal ","Rahul Nanwani ","Alice Monday ","Kristo Jorgenson ","YvesBos ","Guy Maliar ","Nicolas Coden ","Matt Parrish ","Marcel Bretschneider ","Matthew McEachen ","Jarda Kot\u011B\u0161ovec ","Kenric D'Souza ","Oleh Aleinyk ","Marcel Bretschneider ","Andrea Bianco ","Rik Heywood ","Thomas Parisot ","Nathan Graves ","Tom Lokhorst ","Espen Hovlandsdal ","Sylvain Dumont ","Alun Davies ","Aidan Hoolachan ","Axel Eirola ","Freezy ","Daiz ","Julian Aubourg ","Keith Belovay ","Michael B. Klein ","Jordan Prudhomme ","Ilya Ovdin ","Andargor ","Paul Neave ","Brendan Kennedy ","Brychan Bennett-Odlum ","Edward Silverton ","Roman Malieiev ","Tomas Szabo ","Robert O'Rourke ","Guillermo Alfonso Varela Chouci\xF1o ","Christian Flintrup ","Manan Jadhav ","Leon Radley ","alza54 ","Jacob Smith ","Michael Nutt ","Brad Parham ","Taneli Vatanen ","Joris Dugu\xE9 ","Chris Banks ","Ompal Singh ","Brodan ","Ankur Parihar ","Brahim Ait elhaj ","Mart Jansink ","Lachlan Newman ","Dennis Beatty ","Ingvar Stepanyan ","Don Denton ","Dmytro Tiapukhin ","Florian Lefebvre "],scripts:{build:"node install/build.js","build:dist":"node scripts/build.mjs",clean:"rm -rf src/build/ test/fixtures/output.*",test:"npm run lint && npm run test-unit",lint:"npm run lint-cpp && npm run lint-js && npm run lint-types && npm run lint-publish","lint-cpp":"cpplint --quiet src/*.h src/*.cc","lint-js":"biome lint","lint-publish":"publint --strict","lint-types":"tsd --files ./test/types/sharp.test-d.{cts,mts}","test-leak":"./test/leak/leak.sh","test-unit":"node --experimental-test-coverage test/unit.mjs","package-from-local-build":"node npm/from-local-build.js","package-wasm-wrappers":"node npm/wasm-wrappers.js","package-release-notes":"node npm/release-notes.js","docs-build":"node docs/build.mjs","docs-serve":"cd docs && npm start","docs-publish":"cd docs && npm run build && npx firebase-tools deploy --project pixelplumbing --only hosting:pixelplumbing-sharp"},type:"commonjs",files:["dist","install","lib/index.d.ts","src/*.{cc,h,gyp}"],main:"./dist/index.cjs",module:"./dist/index.mjs",types:"./dist/index.d.mts",exports:{".":{import:{types:"./dist/index.d.mts",default:"./dist/index.mjs"},require:{types:"./dist/index.d.cts",default:"./dist/index.cjs"}}},sideEffects:!0,repository:{type:"git",url:"git+https://github.com/lovell/sharp.git"},keywords:["jpeg","png","webp","avif","tiff","gif","svg","jp2","dzi","image","resize","thumbnail","crop","embed","libvips","vips"],dependencies:{"@img/colour":"^1.1.0","detect-libc":"^2.1.2",semver:"^7.8.5"},optionalDependencies:{"@img/sharp-darwin-arm64":"0.35.3","@img/sharp-darwin-x64":"0.35.3","@img/sharp-freebsd-wasm32":"0.35.3","@img/sharp-libvips-darwin-arm64":"1.3.2","@img/sharp-libvips-darwin-x64":"1.3.2","@img/sharp-libvips-linux-arm":"1.3.2","@img/sharp-libvips-linux-arm64":"1.3.2","@img/sharp-libvips-linux-ppc64":"1.3.2","@img/sharp-libvips-linux-riscv64":"1.3.2","@img/sharp-libvips-linux-s390x":"1.3.2","@img/sharp-libvips-linux-x64":"1.3.2","@img/sharp-libvips-linuxmusl-arm64":"1.3.2","@img/sharp-libvips-linuxmusl-x64":"1.3.2","@img/sharp-linux-arm":"0.35.3","@img/sharp-linux-arm64":"0.35.3","@img/sharp-linux-ppc64":"0.35.3","@img/sharp-linux-riscv64":"0.35.3","@img/sharp-linux-s390x":"0.35.3","@img/sharp-linux-x64":"0.35.3","@img/sharp-linuxmusl-arm64":"0.35.3","@img/sharp-linuxmusl-x64":"0.35.3","@img/sharp-webcontainers-wasm32":"0.35.3","@img/sharp-win32-arm64":"0.35.3","@img/sharp-win32-ia32":"0.35.3","@img/sharp-win32-x64":"0.35.3"},peerDependenciesMeta:{"@types/node":{optional:!0}},devDependencies:{"@biomejs/biome":"^2.5.1","@cpplint/cli":"^0.1.0","@emnapi/runtime":"^1.11.1","@img/sharp-libvips-dev":"1.3.2","@img/sharp-libvips-dev-wasm32":"1.3.2","@img/sharp-libvips-win32-arm64":"1.3.2","@img/sharp-libvips-win32-ia32":"1.3.2","@img/sharp-libvips-win32-x64":"1.3.2","@types/node":"*",emnapi:"^1.11.1","exif-reader":"^2.0.3","extract-zip":"^2.0.1",icc:"^4.0.0","node-addon-api":"^8.9.0","node-gyp":"^12.4.0",publint:"^0.3.21","tar-fs":"^3.1.3",tsd:"^0.33.0"},license:"Apache-2.0",engines:{node:">=20.9.0"},config:{libvips:">=8.18.3"},funding:{url:"https://opencollective.com/libvips"}}});import{spawnSync as Sd}from"node:child_process";import{createHash as Oke}from"node:crypto";var Dd,_v,bke,T5,Mke,Nv,_ke,R5,Nke,kp,Tke,Rke,kke,vke,k5,Pke,N5,Gke,Fke,v5,Lke,Uke,P5,Mv,Hke,rS,Tv=le(()=>{Dd=Je(_5(),1),_v=Je(Ym(),1);tS();bke=process.env.npm_package_config_libvips||Os.config.libvips,T5=Dd.default.coerce(bke).version,Mke=["darwin-arm64","darwin-x64","freebsd-arm64","freebsd-x64","linux-arm","linux-arm64","linux-ppc64","linux-riscv64","linux-s390x","linux-wasm32","linux-x64","linuxmusl-arm64","linuxmusl-x64","win32-arm64","win32-ia32","win32-x64"],Nv={encoding:"utf8",shell:!0},_ke=n=>{n instanceof Error?console.error(`sharp: Installation error: ${n.message}`):console.log(`sharp: ${n}`)},R5=()=>_v.default.isNonGlibcLinuxSync()?_v.default.familySync():"",Nke=()=>`${process.platform}${R5()}-${process.arch}`,kp=()=>{if(k5())return"wasm32";let{npm_config_arch:n,npm_config_platform:r,npm_config_libc:o}=process.env,i=typeof o=="string"?o:R5();return`${r||process.platform}${i}-${n||process.arch}`},Tke=()=>{try{return We(`@img/sharp-libvips-dev-${kp()}/include`)}catch{try{return We("@img/sharp-libvips-dev/include")}catch{}}return""},Rke=()=>{try{return We("@img/sharp-libvips-dev/cplusplus")}catch{}return""},kke=()=>{try{return We(`@img/sharp-libvips-dev-${kp()}/lib`)}catch{try{return We(`@img/sharp-libvips-${kp()}/lib`)}catch{}}return""},vke=()=>{if(process.release?.name==="node"&&process.versions&&!Dd.default.satisfies(process.versions.node,Os.engines.node))return{found:process.versions.node,expected:Os.engines.node}},k5=()=>{let{CC:n}=process.env;return!!n?.endsWith("/emcc")},Pke=()=>process.platform==="darwin"&&process.arch==="x64"?(Sd("sysctl sysctl.proc_translated",Nv).stdout||"").trim()==="sysctl.proc_translated: 1":!1,N5=n=>Oke("sha512").update(n).digest("hex"),Gke=()=>{try{let n=N5(`imgsharp-libvips-${kp()}`),r=Dd.default.coerce(Os.optionalDependencies[`@img/sharp-libvips-${kp()}`],{includePrerelease:!0}).version;return N5(`${n}npm:${r}`).slice(0,10)}catch{}return""},Fke=()=>Sd(`node-gyp rebuild --directory=src ${k5()?"--nodedir=emscripten":""}`,{...Nv,stdio:"inherit"}).status,v5=()=>process.platform!=="win32"?(Sd("pkg-config --modversion vips-cpp",{...Nv,env:{...process.env,PKG_CONFIG_PATH:P5()}}).stdout||"").trim():"",Lke=()=>{try{let n=(Sd("brew",["--prefix"],{encoding:"utf8"}).stdout||"").trim();if(n)return`${n}/lib/pkgconfig`}catch{}},Uke=()=>{try{let n=(Sd("pkg-config",["--variable","pc_path","pkg-config"],{encoding:"utf8"}).stdout||"").trim();if(n)return n}catch{}},P5=()=>process.platform!=="win32"?[Lke(),Uke(),process.env.PKG_CONFIG_PATH].filter(Boolean).join(":"):"",Mv=(n,r,o)=>(o&&o(`Detected ${r}, skipping search for globally-installed libvips`),n),Hke=n=>{if(process.env.SHARP_IGNORE_GLOBAL_LIBVIPS)return Mv(!1,"SHARP_IGNORE_GLOBAL_LIBVIPS",n);if(process.env.SHARP_FORCE_GLOBAL_LIBVIPS)return Mv(!0,"SHARP_FORCE_GLOBAL_LIBVIPS",n);if(Pke())return Mv(!1,"Rosetta",n);let r=v5();return!!r&&Dd.default.gte(r,T5)},rS={minimumLibvipsVersion:T5,prebuiltPlatforms:Mke,buildPlatformArch:kp,buildSharpLibvipsIncludeDir:Tke,buildSharpLibvipsCPlusPlusDir:Rke,buildSharpLibvipsLibDir:kke,isUnsupportedNodeRuntime:vke,runtimePlatformArch:Nke,log:_ke,yarnLocator:Gke,spawnRebuild:Fke,globalLibvipsVersion:v5,pkgConfigPath:P5,useGlobalLibvips:Hke}});import{createRequire as Kke}from"node:module";var aS,Tr,F5,Yke,G5,xke,jke,bs,Ot,Rg,dt,wd=le(()=>{aS=Je(Ym(),1);Tv();tS();Tr=Kke(import.meta.url),{version:F5}=Os,{runtimePlatformArch:Yke,isUnsupportedNodeRuntime:G5,prebuiltPlatforms:xke,minimumLibvipsVersion:jke}=rS,bs=Yke(),Rg=[];try{Ot=Tr(`../src/build/Release/sharp-${bs}-${F5}.node`)}catch(n){Rg.push(n)}if(!Ot)try{Ot=Tr(`../src/build/Release/sharp-wasm32-${F5}.node`)}catch(n){Rg.push(n)}if(!Ot)try{switch(bs){case"darwin-arm64":Ot=Tr("@img/sharp-darwin-arm64/sharp.node");break;case"darwin-x64":Ot=Tr("@img/sharp-darwin-x64/sharp.node");break;case"linux-arm":Ot=Tr("@img/sharp-linux-arm/sharp.node");break;case"linux-arm64":Ot=Tr("@img/sharp-linux-arm64/sharp.node");break;case"linux-ppc64":Ot=Tr("@img/sharp-linux-ppc64/sharp.node");break;case"linux-riscv64":Ot=Tr("@img/sharp-linux-riscv64/sharp.node");break;case"linux-s390x":Ot=Tr("@img/sharp-linux-s390x/sharp.node");break;case"linux-x64":Ot=Tr("@img/sharp-linux-x64/sharp.node");break;case"linuxmusl-arm64":Ot=Tr("@img/sharp-linuxmusl-arm64/sharp.node");break;case"linuxmusl-x64":Ot=Tr("@img/sharp-linuxmusl-x64/sharp.node");break;case"win32-arm64":Ot=Tr("@img/sharp-win32-arm64/sharp.node");break;case"win32-ia32":Ot=Tr("@img/sharp-win32-ia32/sharp.node");break;case"win32-x64":Ot=Tr("@img/sharp-win32-x64/sharp.node");break;case"freebsd-arm64":case"freebsd-x64":Ot=Tr("@img/sharp-freebsd-wasm32/sharp.node");break;case"linux-wasm32":Ot=Tr("@img/sharp-webcontainers-wasm32/sharp.node");break}if(Ot&&["linux-x64","linuxmusl-x64"].includes(bs)&&!Ot._isUsingX64V2()){let n=new Error("Prebuilt binaries for Linux x64 require v2 microarchitecture");n.code="Unsupported CPU",Rg.push(n),Ot=null}Ot&&process.versions.electron&&bs.startsWith("linux")&&process.emitWarning("Binaries provided by Electron for use on Linux may be incompatible with sharp - see https://sharp.pixelplumbing.com/install#electron-and-linux",{code:"SharpElectronLinux"})}catch(n){Rg.push(n)}if(!Ot)try{Ot=Tr("@img/sharp-wasm32/sharp.node")}catch(n){Rg.push(n)}if(!Ot){let[n,r,o]=["linux","darwin","win32"].map(a=>bs.startsWith(a)),i=[`Could not load the "sharp" module using the ${bs} runtime`];Rg.forEach(a=>{a.code.endsWith("MODULE_NOT_FOUND")||i.push(`${a.code}: ${a.message}`)});let e=Rg.map(a=>a.message).join(" ");if(i.push("Possible solutions:"),G5()){let{found:a,expected:A}=G5();i.push("- Please upgrade Node.js:",` Found ${a}`,` Requires ${A}`)}else if(xke.includes(bs)){let[a,A]=bs.split("-"),t=a.endsWith("musl")?" --libc=musl":"";i.push("- Ensure optional dependencies can be installed:"," npm install --include=optional sharp","- Ensure your package manager supports multi-platform installation:"," See https://sharp.pixelplumbing.com/install#cross-platform","- Add platform-specific dependencies:",` npm install --os=${a.replace("musl","")}${t} --cpu=${A} sharp`)}else i.push(`- Manually install libvips >= ${jke}`," See https://sharp.pixelplumbing.com/install#building-from-source","- Add WebAssembly-based dependencies:"," npm install sharp @img/sharp-wasm32");if(n&&/(symbol not found|CXXABI_)/i.test(e))try{let{config:a}=Tr(`@img/sharp-libvips-${bs}/package`),A=`${(0,aS.familySync)()} ${(0,aS.versionSync)()}`,t=`${a.musl?"musl":"glibc"} ${a.musl||a.glibc}`;i.push("- Update your OS:",` Found ${A}`,` Requires ${t}`)}catch{}throw n&&/\/snap\/core[0-9]{2}/.test(e)&&i.push("- Remove the Node.js Snap, which does not support native modules"," snap remove node"),r&&/Incompatible library version/.test(e)&&i.push("- Update Homebrew:"," brew update && brew upgrade vips"),Rg.some(a=>a.code==="ERR_DLOPEN_DISABLED")&&i.push("- Run Node.js without using the --no-addons flag"),o&&/The specified procedure could not be found/.test(e)&&i.push("- Using the canvas package on Windows?"," See https://sharp.pixelplumbing.com/install#canvas-and-windows","- Check for outdated versions of sharp in the dependency tree:"," npm ls sharp"),i.push("- Consult the installation documentation:"," See https://sharp.pixelplumbing.com/install"),new Error(i.join(` +`))}dt=Ot});import Jke from"node:util";import Rv from"node:stream";function zke(){let n=this.constructor.call(),{debuglog:r,queueListener:o,...i}=this.options;return n.options=structuredClone(i),n.options.debuglog=r,n.options.queueListener=o,this._isStreamInput()&&this.on("finish",()=>{this._flattenBufferIn(),n.options.input.buffer=this.options.input.buffer,n.emit("finish")}),n}var qke,Vke,nI,On,L5=le(()=>{yn();wd();qke=Jke.debuglog("sharp"),Vke=n=>{nI.queue.emit("change",n)},nI=function(n,r){if(arguments.length===1&&!w.defined(n))throw new Error("Invalid input");return this instanceof nI?(Rv.Duplex.call(this),this.options={topOffsetPre:-1,leftOffsetPre:-1,widthPre:-1,heightPre:-1,topOffsetPost:-1,leftOffsetPost:-1,widthPost:-1,heightPost:-1,width:-1,height:-1,canvas:"crop",position:0,resizeBackground:[0,0,0,255],angle:0,rotationAngle:0,rotationBackground:[0,0,0,255],rotateBefore:!1,orientBefore:!1,flip:!1,flop:!1,extendTop:0,extendBottom:0,extendLeft:0,extendRight:0,extendBackground:[0,0,0,255],extendWith:"background",withoutEnlargement:!1,withoutReduction:!1,affineMatrix:[],affineBackground:[0,0,0,255],affineIdx:0,affineIdy:0,affineOdx:0,affineOdy:0,affineInterpolator:this.constructor.interpolators.bilinear,kernel:"lanczos3",fastShrinkOnLoad:!0,tint:[-1,0,0,0],flatten:!1,flattenBackground:[0,0,0],unflatten:!1,negate:!1,negateAlpha:!0,medianSize:0,blurSigma:0,precision:"integer",minAmpl:.2,sharpenSigma:0,sharpenM1:1,sharpenM2:2,sharpenX1:2,sharpenY2:10,sharpenY3:20,threshold:0,thresholdGrayscale:!0,trimBackground:[],trimThreshold:-1,trimLineArt:!1,trimMargin:0,dilateWidth:0,erodeWidth:0,gamma:0,gammaOut:0,greyscale:!1,normalise:!1,normaliseLower:1,normaliseUpper:99,claheWidth:0,claheHeight:0,claheMaxSlope:3,brightness:1,saturation:1,hue:0,lightness:0,booleanBufferIn:null,booleanFileIn:"",joinChannelIn:[],extractChannel:-1,removeAlpha:!1,ensureAlpha:-1,colourspace:"srgb",colourspacePipeline:"last",composite:[],fileOut:"",formatOut:"input",streamOut:!1,typedArrayOut:!1,keepMetadata:0,withMetadataOrientation:-1,withMetadataDensity:0,withIccProfile:"",withExif:{},withExifMerge:!0,withXmp:"",keepGainMap:!1,withGainMap:!1,resolveWithObject:!1,loop:-1,delay:[],jpegQuality:80,jpegProgressive:!1,jpegChromaSubsampling:"4:2:0",jpegTrellisQuantisation:!1,jpegOvershootDeringing:!1,jpegOptimiseScans:!1,jpegOptimiseCoding:!0,jpegQuantisationTable:0,pngProgressive:!1,pngCompressionLevel:6,pngAdaptiveFiltering:!1,pngPalette:!1,pngQuality:100,pngEffort:7,pngBitdepth:8,pngDither:1,jp2Quality:80,jp2TileHeight:512,jp2TileWidth:512,jp2Lossless:!1,jp2ChromaSubsampling:"4:4:4",webpQuality:80,webpAlphaQuality:100,webpLossless:!1,webpNearLossless:!1,webpSmartSubsample:!1,webpSmartDeblock:!1,webpPreset:"default",webpEffort:4,webpMinSize:!1,webpMixed:!1,webpExact:!1,gifBitdepth:8,gifEffort:7,gifDither:1,gifInterFrameMaxError:0,gifInterPaletteMaxError:3,gifKeepDuplicateFrames:!1,gifReuse:!0,gifProgressive:!1,tiffQuality:80,tiffCompression:"jpeg",tiffBigtiff:!1,tiffPredictor:"horizontal",tiffPyramid:!1,tiffMiniswhite:!1,tiffBitdepth:0,tiffTile:!1,tiffTileHeight:256,tiffTileWidth:256,tiffXres:1,tiffYres:1,tiffResolutionUnit:"inch",heifQuality:50,heifLossless:!1,heifCompression:"av1",heifEffort:4,heifChromaSubsampling:"4:4:4",heifBitdepth:8,heifTune:"auto",jxlDistance:1,jxlDecodingTier:0,jxlEffort:7,jxlLossless:!1,rawDepth:"uchar",tileSize:256,tileOverlap:0,tileContainer:"fs",tileLayout:"dz",tileFormat:"last",tileDepth:"last",tileAngle:0,tileSkipBlanks:-1,tileBackground:[255,255,255,255],tileCentre:!1,tileId:"https://example.com/iiif",tileBasename:"",timeoutSeconds:0,linearA:[],linearB:[],pdfBackground:[255,255,255,255],debuglog:o=>{this.emit("warning",o),qke(o)},queueListener:Vke},this.options.input=this._createInputDescriptor(n,r,{allowStream:!0}),this):new nI(n,r)};Object.setPrototypeOf(nI.prototype,Rv.Duplex.prototype);Object.setPrototypeOf(nI,Rv.Duplex);Object.assign(nI.prototype,{clone:zke});On=nI});function U5(n){let r=Zke.filter(o=>w.defined(n[o])).map(o=>[o,n[o]]);return r.length?Object.fromEntries(r):void 0}function Xke(n,r,o){let i={autoOrient:!1,failOn:"warning",limitInputPixels:268402689,limitInputChannels:5,ignoreIcc:!1,unlimited:!1,sequentialRead:!0};if(w.string(n))i.file=n;else if(w.buffer(n)){if(n.length===0)throw Error("Input Buffer is empty");i.buffer=n}else if(w.arrayBuffer(n)){if(n.byteLength===0)throw Error("Input bit Array is empty");i.buffer=Buffer.from(n,0,n.byteLength)}else if(w.typedArray(n)){if(n.length===0)throw Error("Input Bit Array is empty");i.buffer=Buffer.from(n.buffer,n.byteOffset,n.byteLength)}else if(w.plainObject(n)&&!w.defined(r))r=n,U5(r)&&(i.buffer=[]);else if(!w.defined(n)&&!w.defined(r)&&w.object(o)&&o.allowStream)i.buffer=[];else if(Array.isArray(n))if(n.length>1)if(!this.options.joining)this.options.joining=!0,this.options.join=n.map(e=>this._createInputDescriptor(e));else throw new Error("Recursive join is unsupported");else throw new Error("Expected at least two images to join");else throw new Error(`Unsupported input '${n}' of type ${typeof n}${w.defined(r)?` when also providing options of type ${typeof r}`:""}`);if(w.object(r)){if(w.defined(r.failOn))if(w.string(r.failOn)&&w.inArray(r.failOn,["none","truncated","error","warning"]))i.failOn=r.failOn;else throw w.invalidParameterError("failOn","one of: none, truncated, error, warning",r.failOn);if(w.defined(r.autoOrient))if(w.bool(r.autoOrient))i.autoOrient=r.autoOrient;else throw w.invalidParameterError("autoOrient","boolean",r.autoOrient);if(w.defined(r.density))if(w.number(r.density)&&w.inRange(r.density,1,1e5))i.density=r.density;else throw w.invalidParameterError("density","number between 1 and 100000",r.density);if(w.defined(r.ignoreIcc))if(w.bool(r.ignoreIcc))i.ignoreIcc=r.ignoreIcc;else throw w.invalidParameterError("ignoreIcc","boolean",r.ignoreIcc);if(w.defined(r.limitInputPixels))if(w.bool(r.limitInputPixels))i.limitInputPixels=r.limitInputPixels?16383**2:0;else if(w.integer(r.limitInputPixels)&&w.inRange(r.limitInputPixels,0,Number.MAX_SAFE_INTEGER))i.limitInputPixels=r.limitInputPixels;else throw w.invalidParameterError("limitInputPixels","positive integer",r.limitInputPixels);if(w.defined(r.limitInputChannels))if(w.bool(r.limitInputChannels))i.limitInputChannels=r.limitInputChannels?5:0;else if(w.integer(r.limitInputChannels)&&w.inRange(r.limitInputChannels,0,Number.MAX_SAFE_INTEGER))i.limitInputChannels=r.limitInputChannels;else throw w.invalidParameterError("limitInputChannels","positive integer",r.limitInputChannels);if(w.defined(r.unlimited))if(w.bool(r.unlimited))i.unlimited=r.unlimited;else throw w.invalidParameterError("unlimited","boolean",r.unlimited);if(w.defined(r.sequentialRead))if(w.bool(r.sequentialRead))i.sequentialRead=r.sequentialRead;else throw w.invalidParameterError("sequentialRead","boolean",r.sequentialRead);if(w.defined(r.raw)){if(w.object(r.raw)&&w.integer(r.raw.width)&&w.inRange(r.raw.width,1,1e8)&&w.integer(r.raw.height)&&w.inRange(r.raw.height,1,1e8)&&w.integer(r.raw.channels)&&w.inRange(r.raw.channels,1,4))switch(i.rawWidth=r.raw.width,i.rawHeight=r.raw.height,i.rawChannels=r.raw.channels,n.constructor){case Uint8Array:case Uint8ClampedArray:i.rawDepth="uchar";break;case Int8Array:i.rawDepth="char";break;case Uint16Array:i.rawDepth="ushort";break;case Int16Array:i.rawDepth="short";break;case Uint32Array:i.rawDepth="uint";break;case Int32Array:i.rawDepth="int";break;case Float32Array:i.rawDepth="float";break;case Float64Array:i.rawDepth="double";break;default:i.rawDepth="uchar";break}else throw new Error("Expected width, height and channels for raw pixel input");if(i.rawPremultiplied=!1,w.defined(r.raw.premultiplied))if(w.bool(r.raw.premultiplied))i.rawPremultiplied=r.raw.premultiplied;else throw w.invalidParameterError("raw.premultiplied","boolean",r.raw.premultiplied);if(i.rawPageHeight=0,w.defined(r.raw.pageHeight))if(w.integer(r.raw.pageHeight)&&r.raw.pageHeight>0&&r.raw.pageHeight<=r.raw.height){if(r.raw.height%r.raw.pageHeight!==0)throw new Error(`Expected raw.height ${r.raw.height} to be a multiple of raw.pageHeight ${r.raw.pageHeight}`);i.rawPageHeight=r.raw.pageHeight}else throw w.invalidParameterError("raw.pageHeight","positive integer",r.raw.pageHeight)}if(w.defined(r.animated))if(w.bool(r.animated))i.pages=r.animated?-1:1;else throw w.invalidParameterError("animated","boolean",r.animated);if(w.defined(r.pages))if(w.integer(r.pages)&&w.inRange(r.pages,-1,1e5))i.pages=r.pages;else throw w.invalidParameterError("pages","integer between -1 and 100000",r.pages);if(w.defined(r.page))if(w.integer(r.page)&&w.inRange(r.page,0,1e5))i.page=r.page;else throw w.invalidParameterError("page","integer between 0 and 100000",r.page);if(w.object(r.openSlide)&&w.defined(r.openSlide.level))if(w.integer(r.openSlide.level)&&w.inRange(r.openSlide.level,0,256))i.openSlideLevel=r.openSlide.level;else throw w.invalidParameterError("openSlide.level","integer between 0 and 256",r.openSlide.level);else if(w.defined(r.level))if(w.integer(r.level)&&w.inRange(r.level,0,256))i.openSlideLevel=r.level;else throw w.invalidParameterError("level","integer between 0 and 256",r.level);if(w.object(r.tiff)&&w.defined(r.tiff.subifd))if(w.integer(r.tiff.subifd)&&w.inRange(r.tiff.subifd,-1,1e5))i.tiffSubifd=r.tiff.subifd;else throw w.invalidParameterError("tiff.subifd","integer between -1 and 100000",r.tiff.subifd);else if(w.defined(r.subifd))if(w.integer(r.subifd)&&w.inRange(r.subifd,-1,1e5))i.tiffSubifd=r.subifd;else throw w.invalidParameterError("subifd","integer between -1 and 100000",r.subifd);if(w.object(r.svg)){if(w.defined(r.svg.stylesheet))if(w.string(r.svg.stylesheet))i.svgStylesheet=r.svg.stylesheet;else throw w.invalidParameterError("svg.stylesheet","string",r.svg.stylesheet);if(w.defined(r.svg.highBitdepth))if(w.bool(r.svg.highBitdepth))i.svgHighBitdepth=r.svg.highBitdepth;else throw w.invalidParameterError("svg.highBitdepth","boolean",r.svg.highBitdepth)}if(w.object(r.pdf)&&w.defined(r.pdf.background)?i.pdfBackground=this._getBackgroundColourOption(r.pdf.background):w.defined(r.pdfBackground)&&(i.pdfBackground=this._getBackgroundColourOption(r.pdfBackground)),w.object(r.jp2)&&w.defined(r.jp2.oneshot))if(w.bool(r.jp2.oneshot))i.jp2Oneshot=r.jp2.oneshot;else throw w.invalidParameterError("jp2.oneshot","boolean",r.jp2.oneshot);if(w.defined(r.create))if(w.object(r.create)&&w.integer(r.create.width)&&w.inRange(r.create.width,1,1e8)&&w.integer(r.create.height)&&w.inRange(r.create.height,1,1e8)&&w.integer(r.create.channels)){if(i.createWidth=r.create.width,i.createHeight=r.create.height,i.createChannels=r.create.channels,i.createPageHeight=0,w.defined(r.create.pageHeight))if(w.integer(r.create.pageHeight)&&r.create.pageHeight>0&&r.create.pageHeight<=r.create.height){if(r.create.height%r.create.pageHeight!==0)throw new Error(`Expected create.height ${r.create.height} to be a multiple of create.pageHeight ${r.create.pageHeight}`);i.createPageHeight=r.create.pageHeight}else throw w.invalidParameterError("create.pageHeight","positive integer",r.create.pageHeight);if(w.defined(r.create.noise)){if(!w.object(r.create.noise))throw new Error("Expected noise to be an object");if(r.create.noise.type!=="gaussian")throw new Error("Only gaussian noise is supported at the moment");if(i.createNoiseType=r.create.noise.type,!w.inRange(r.create.channels,1,4))throw w.invalidParameterError("create.channels","number between 1 and 4",r.create.channels);if(i.createNoiseMean=128,w.defined(r.create.noise.mean))if(w.number(r.create.noise.mean)&&w.inRange(r.create.noise.mean,0,1e4))i.createNoiseMean=r.create.noise.mean;else throw w.invalidParameterError("create.noise.mean","number between 0 and 10000",r.create.noise.mean);if(i.createNoiseSigma=30,w.defined(r.create.noise.sigma))if(w.number(r.create.noise.sigma)&&w.inRange(r.create.noise.sigma,0,1e4))i.createNoiseSigma=r.create.noise.sigma;else throw w.invalidParameterError("create.noise.sigma","number between 0 and 10000",r.create.noise.sigma)}else if(w.defined(r.create.background)){if(!w.inRange(r.create.channels,3,4))throw w.invalidParameterError("create.channels","number between 3 and 4",r.create.channels);i.createBackground=this._getBackgroundColourOption(r.create.background)}else throw new Error("Expected valid noise or background to create a new input image");delete i.buffer}else throw new Error("Expected valid width, height and channels to create a new input image");if(w.defined(r.text))if(w.object(r.text)&&w.string(r.text.text)){if(i.textValue=r.text.text,w.defined(r.text.height)&&w.defined(r.text.dpi))throw new Error("Expected only one of dpi or height");if(w.defined(r.text.font))if(w.string(r.text.font))i.textFont=r.text.font;else throw w.invalidParameterError("text.font","string",r.text.font);if(w.defined(r.text.fontfile))if(w.string(r.text.fontfile))i.textFontfile=r.text.fontfile;else throw w.invalidParameterError("text.fontfile","string",r.text.fontfile);if(w.defined(r.text.width))if(w.integer(r.text.width)&&w.inRange(r.text.width,1,1e6))i.textWidth=r.text.width;else throw w.invalidParameterError("text.width","integer between 1 and 1000000",r.text.width);if(w.defined(r.text.height))if(w.integer(r.text.height)&&w.inRange(r.text.height,1,1e6))i.textHeight=r.text.height;else throw w.invalidParameterError("text.height","integer between 1 and 1000000",r.text.height);if(w.defined(r.text.align))if(w.string(r.text.align)&&w.string(this.constructor.align[r.text.align]))i.textAlign=this.constructor.align[r.text.align];else throw w.invalidParameterError("text.align","valid alignment",r.text.align);if(w.defined(r.text.justify))if(w.bool(r.text.justify))i.textJustify=r.text.justify;else throw w.invalidParameterError("text.justify","boolean",r.text.justify);if(w.defined(r.text.dpi))if(w.integer(r.text.dpi)&&w.inRange(r.text.dpi,1,1e6))i.textDpi=r.text.dpi;else throw w.invalidParameterError("text.dpi","integer between 1 and 1000000",r.text.dpi);if(w.defined(r.text.rgba))if(w.bool(r.text.rgba))i.textRgba=r.text.rgba;else throw w.invalidParameterError("text.rgba","bool",r.text.rgba);if(w.defined(r.text.spacing))if(w.integer(r.text.spacing)&&w.inRange(r.text.spacing,-1e6,1e6))i.textSpacing=r.text.spacing;else throw w.invalidParameterError("text.spacing","integer between -1000000 and 1000000",r.text.spacing);if(w.defined(r.text.wrap))if(w.string(r.text.wrap)&&w.inArray(r.text.wrap,["word","char","word-char","none"]))i.textWrap=r.text.wrap;else throw w.invalidParameterError("text.wrap","one of: word, char, word-char, none",r.text.wrap);delete i.buffer}else throw new Error("Expected a valid string to create an image with text.");if(w.defined(r.join))if(w.defined(this.options.join)){if(w.defined(r.join.animated))if(w.bool(r.join.animated))i.joinAnimated=r.join.animated;else throw w.invalidParameterError("join.animated","boolean",r.join.animated);if(w.defined(r.join.across))if(w.integer(r.join.across)&&w.inRange(r.join.across,1,1e6))i.joinAcross=r.join.across;else throw w.invalidParameterError("join.across","integer between 1 and 100000",r.join.across);if(w.defined(r.join.shim))if(w.integer(r.join.shim)&&w.inRange(r.join.shim,0,1e6))i.joinShim=r.join.shim;else throw w.invalidParameterError("join.shim","integer between 0 and 100000",r.join.shim);if(w.defined(r.join.background)&&(i.joinBackground=this._getBackgroundColourOption(r.join.background)),w.defined(r.join.halign))if(w.string(r.join.halign)&&w.string(this.constructor.align[r.join.halign]))i.joinHalign=this.constructor.align[r.join.halign];else throw w.invalidParameterError("join.halign","valid alignment",r.join.halign);if(w.defined(r.join.valign))if(w.string(r.join.valign)&&w.string(this.constructor.align[r.join.valign]))i.joinValign=this.constructor.align[r.join.valign];else throw w.invalidParameterError("join.valign","valid alignment",r.join.valign)}else throw new Error("Expected input to be an array of images to join")}else if(w.defined(r))throw new Error(`Invalid input options ${r}`);return i}function $ke(n,r,o){Array.isArray(this.options.input.buffer)?w.buffer(n)?(this.options.input.buffer.length===0&&this.on("finish",()=>{this.streamInFinished=!0}),this.options.input.buffer.push(n),o()):o(new Error("Non-Buffer data on Writable Stream")):o(new Error("Unexpected data on Writable Stream"))}function eve(){this._isStreamInput()&&(this.options.input.buffer=Buffer.concat(this.options.input.buffer))}function Ave(){return Array.isArray(this.options.input.buffer)}function tve(n){let r=Error();return w.fn(n)?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),dt.metadata(this.options,(o,i)=>{o?n(w.nativeError(o,r)):n(null,i)})}):dt.metadata(this.options,(o,i)=>{o?n(w.nativeError(o,r)):n(null,i)}),this):this._isStreamInput()?new Promise((o,i)=>{let e=()=>{this._flattenBufferIn(),dt.metadata(this.options,(a,A)=>{a?i(w.nativeError(a,r)):o(A)})};this.writableFinished?e():this.once("finish",e)}):new Promise((o,i)=>{dt.metadata(this.options,(e,a)=>{e?i(w.nativeError(e,r)):o(a)})})}function rve(n){let r=Error();return w.fn(n)?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),dt.stats(this.options,(o,i)=>{o?n(w.nativeError(o,r)):n(null,i)})}):dt.stats(this.options,(o,i)=>{o?n(w.nativeError(o,r)):n(null,i)}),this):this._isStreamInput()?new Promise((o,i)=>{this.on("finish",function(){this._flattenBufferIn(),dt.stats(this.options,(e,a)=>{e?i(w.nativeError(e,r)):o(a)})})}):new Promise((o,i)=>{dt.stats(this.options,(e,a)=>{e?i(w.nativeError(e,r)):o(a)})})}var Wke,Zke,H5,K5=le(()=>{yn();wd();Wke={left:"low",top:"low",low:"low",center:"centre",centre:"centre",right:"high",bottom:"high",high:"high"},Zke=["failOn","limitInputPixels","limitInputChannels","unlimited","animated","autoOrient","density","ignoreIcc","page","pages","sequentialRead","jp2","openSlide","pdf","raw","svg","tiff","openSlideLevel","pdfBackground","tiffSubifd"];H5=n=>{Object.assign(n.prototype,{_inputOptionsFromObject:U5,_createInputDescriptor:Xke,_write:$ke,_flattenBufferIn:eve,_isStreamInput:Ave,metadata:tve,stats:rve}),n.align=Wke}});function vv(n){return n.angle%360!==0||n.rotationAngle!==0}function iS(n){return n.width!==-1||n.height!==-1}function ove(n,r,o){if(iS(this.options)&&this.options.debuglog("ignoring previous resize options"),this.options.widthPost!==-1&&this.options.debuglog("operation order will be: extract, resize, extract"),w.defined(n))if(w.object(n)&&!w.defined(o))o=n;else if(w.integer(n)&&n>0)this.options.width=n;else throw w.invalidParameterError("width","positive integer",n);else this.options.width=-1;if(w.defined(r))if(w.integer(r)&&r>0)this.options.height=r;else throw w.invalidParameterError("height","positive integer",r);else this.options.height=-1;if(w.object(o)){if(w.defined(o.width))if(w.integer(o.width)&&o.width>0)this.options.width=o.width;else throw w.invalidParameterError("width","positive integer",o.width);if(w.defined(o.height))if(w.integer(o.height)&&o.height>0)this.options.height=o.height;else throw w.invalidParameterError("height","positive integer",o.height);if(w.defined(o.fit)){let i=ive[o.fit];if(w.string(i))this.options.canvas=i;else throw w.invalidParameterError("fit","valid fit",o.fit)}if(w.defined(o.position)){let i=w.integer(o.position)?o.position:J5[o.position]||j5[o.position]||x5[o.position];if(w.integer(i)&&(w.inRange(i,0,8)||w.inRange(i,16,17)))this.options.position=i;else throw w.invalidParameterError("position","valid position/gravity/strategy",o.position)}if(this._setBackgroundColourOption("resizeBackground",o.background),w.defined(o.kernel))if(w.string(kv[o.kernel]))this.options.kernel=kv[o.kernel];else throw w.invalidParameterError("kernel","valid kernel name",o.kernel);w.defined(o.withoutEnlargement)&&this._setBooleanOption("withoutEnlargement",o.withoutEnlargement),w.defined(o.withoutReduction)&&this._setBooleanOption("withoutReduction",o.withoutReduction),w.defined(o.fastShrinkOnLoad)&&this._setBooleanOption("fastShrinkOnLoad",o.fastShrinkOnLoad)}return vv(this.options)&&iS(this.options)&&(this.options.rotateBefore=!0),this}function nve(n){if(w.integer(n))if(w.inRange(n,1,1e4))this.options.extendTop=n,this.options.extendBottom=n,this.options.extendLeft=n,this.options.extendRight=n;else throw w.invalidParameterError("extend","integer between 1 and 10000",n);else if(w.object(n)){if(w.defined(n.top))if(w.integer(n.top)&&w.inRange(n.top,0,1e4))this.options.extendTop=n.top;else throw w.invalidParameterError("top","integer between 0 and 10000",n.top);if(w.defined(n.bottom))if(w.integer(n.bottom)&&w.inRange(n.bottom,0,1e4))this.options.extendBottom=n.bottom;else throw w.invalidParameterError("bottom","integer between 0 and 10000",n.bottom);if(w.defined(n.left))if(w.integer(n.left)&&w.inRange(n.left,0,1e4))this.options.extendLeft=n.left;else throw w.invalidParameterError("left","integer between 0 and 10000",n.left);if(w.defined(n.right))if(w.integer(n.right)&&w.inRange(n.right,0,1e4))this.options.extendRight=n.right;else throw w.invalidParameterError("right","integer between 0 and 10000",n.right);if(this._setBackgroundColourOption("extendBackground",n.background),w.defined(n.extendWith))if(w.string(Y5[n.extendWith]))this.options.extendWith=Y5[n.extendWith];else throw w.invalidParameterError("extendWith","one of: background, copy, repeat, mirror",n.extendWith)}else throw w.invalidParameterError("extend","integer or object",n);return this}function sve(n){let r=iS(this.options)||this.options.widthPre!==-1?"Post":"Pre";return this.options[`width${r}`]!==-1&&this.options.debuglog("ignoring previous extract options"),["left","top","width","height"].forEach(function(o){let i=n[o];if(w.integer(i)&&w.inRange(i,0,1e8))this.options[o+(o==="left"||o==="top"?"Offset":"")+r]=i;else throw w.invalidParameterError(o,"integer between 0 and 100000000",i)},this),vv(this.options)&&!iS(this.options)&&(this.options.widthPre===-1||this.options.widthPost===-1)&&(this.options.rotateBefore=!0),this.options.input.autoOrient&&(this.options.orientBefore=!0),this}function gve(n){if(this.options.trimThreshold=10,w.defined(n))if(w.object(n)){if(w.defined(n.background)&&this._setBackgroundColourOption("trimBackground",n.background),w.defined(n.threshold))if(w.number(n.threshold)&&n.threshold>=0)this.options.trimThreshold=n.threshold;else throw w.invalidParameterError("threshold","positive number",n.threshold);if(w.defined(n.lineArt)&&this._setBooleanOption("trimLineArt",n.lineArt),w.defined(n.margin))if(w.integer(n.margin)&&w.inRange(n.margin,0,1e7))this.options.trimMargin=n.margin;else throw w.invalidParameterError("margin","integer between 0 and 10000000",n.margin)}else throw w.invalidParameterError("trim","object",n);return vv(this.options)&&(this.options.rotateBefore=!0),this}var x5,j5,Y5,J5,kv,ave,ive,q5,V5=le(()=>{yn();x5={center:0,centre:0,north:1,east:2,south:3,west:4,northeast:5,southeast:6,southwest:7,northwest:8},j5={top:1,right:2,bottom:3,left:4,"right top":5,"right bottom":6,"left bottom":7,"left top":8},Y5={background:"background",copy:"copy",repeat:"repeat",mirror:"mirror"},J5={entropy:16,attention:17},kv={nearest:"nearest",linear:"linear",cubic:"cubic",mitchell:"mitchell",lanczos2:"lanczos2",lanczos3:"lanczos3",mks2013:"mks2013",mks2021:"mks2021"},ave={contain:"contain",cover:"cover",fill:"fill",inside:"inside",outside:"outside"},ive={contain:"embed",cover:"crop",fill:"ignore_aspect",inside:"max",outside:"min"};q5=n=>{Object.assign(n.prototype,{resize:ove,extend:nve,extract:sve,trim:gve}),n.gravity=x5,n.strategy=J5,n.kernel=kv,n.fit=ave,n.position=j5}});function cve(n){if(!Array.isArray(n))throw w.invalidParameterError("images to composite","array",n);return this.options.composite=n.map(r=>{if(!w.object(r))throw w.invalidParameterError("image to composite","object",r);let o=this._inputOptionsFromObject(r),i={input:this._createInputDescriptor(r.input,o,{allowStream:!1}),blend:"over",tile:!1,left:0,top:0,hasOffset:!1,gravity:0,premultiplied:!1};if(w.defined(r.blend))if(w.string(Pv[r.blend]))i.blend=Pv[r.blend];else throw w.invalidParameterError("blend","valid blend name",r.blend);if(w.defined(r.tile))if(w.bool(r.tile))i.tile=r.tile;else throw w.invalidParameterError("tile","boolean",r.tile);if(w.defined(r.left))if(w.integer(r.left))i.left=r.left;else throw w.invalidParameterError("left","integer",r.left);if(w.defined(r.top))if(w.integer(r.top))i.top=r.top;else throw w.invalidParameterError("top","integer",r.top);if(w.defined(r.top)!==w.defined(r.left))throw new Error("Expected both left and top to be set");if(i.hasOffset=w.integer(r.top)&&w.integer(r.left),w.defined(r.gravity))if(w.integer(r.gravity)&&w.inRange(r.gravity,0,8))i.gravity=r.gravity;else if(w.string(r.gravity)&&w.integer(this.constructor.gravity[r.gravity]))i.gravity=this.constructor.gravity[r.gravity];else throw w.invalidParameterError("gravity","valid gravity",r.gravity);if(w.defined(r.premultiplied))if(w.bool(r.premultiplied))i.premultiplied=r.premultiplied;else throw w.invalidParameterError("premultiplied","boolean",r.premultiplied);return i}),this}var Pv,z5,W5=le(()=>{yn();Pv={clear:"clear",source:"source",over:"over",in:"in",out:"out",atop:"atop",dest:"dest","dest-over":"dest-over","dest-in":"dest-in","dest-out":"dest-out","dest-atop":"dest-atop",xor:"xor",add:"add",saturate:"saturate",multiply:"multiply",screen:"screen",overlay:"overlay",darken:"darken",lighten:"lighten","colour-dodge":"colour-dodge","color-dodge":"colour-dodge","colour-burn":"colour-burn","color-burn":"colour-burn","hard-light":"hard-light","soft-light":"soft-light",difference:"difference",exclusion:"exclusion"};z5=n=>{n.prototype.composite=cve,n.blend=Pv}});function Ive(n,r){if(!w.defined(n))return this.autoOrient();if((this.options.angle||this.options.rotationAngle)&&(this.options.debuglog("ignoring previous rotate options"),this.options.angle=0,this.options.rotationAngle=0),w.integer(n)&&!(n%90))this.options.angle=n;else if(w.number(n))this.options.rotationAngle=n,w.object(r)&&r.background&&this._setBackgroundColourOption("rotationBackground",r.background);else throw w.invalidParameterError("angle","numeric",n);return this}function lve(){return this.options.input.autoOrient=!0,this}function pve(n){return this.options.flip=w.bool(n)?n:!0,this}function Eve(n){return this.options.flop=w.bool(n)?n:!0,this}function Cve(n,r){let i=Array.isArray(n)&&(n.length===4&&n.every(w.number)||n.length===2&&n.every(e=>Array.isArray(e)&&e.length===2))?n.flat():[];if(i.length===4&&i.every(w.number))this.options.affineMatrix=i;else throw w.invalidParameterError("matrix","1x4 or 2x2 array",n);if(w.defined(r))if(w.object(r)){if(this._setBackgroundColourOption("affineBackground",r.background),w.defined(r.idx))if(w.number(r.idx))this.options.affineIdx=r.idx;else throw w.invalidParameterError("options.idx","number",r.idx);if(w.defined(r.idy))if(w.number(r.idy))this.options.affineIdy=r.idy;else throw w.invalidParameterError("options.idy","number",r.idy);if(w.defined(r.odx))if(w.number(r.odx))this.options.affineOdx=r.odx;else throw w.invalidParameterError("options.odx","number",r.odx);if(w.defined(r.ody))if(w.number(r.ody))this.options.affineOdy=r.ody;else throw w.invalidParameterError("options.ody","number",r.ody);if(w.defined(r.interpolator))if(w.inArray(r.interpolator,Object.values(this.constructor.interpolators)))this.options.affineInterpolator=r.interpolator;else throw w.invalidParameterError("options.interpolator","valid interpolator name",r.interpolator)}else throw w.invalidParameterError("options","object",r);return this}function hve(n){if(w.plainObject(n)){if(w.number(n.sigma)&&w.inRange(n.sigma,1e-6,10))this.options.sharpenSigma=n.sigma;else throw w.invalidParameterError("options.sigma","number between 0.000001 and 10",n.sigma);if(w.defined(n.m1))if(w.number(n.m1)&&w.inRange(n.m1,0,1e6))this.options.sharpenM1=n.m1;else throw w.invalidParameterError("options.m1","number between 0 and 1000000",n.m1);if(w.defined(n.m2))if(w.number(n.m2)&&w.inRange(n.m2,0,1e6))this.options.sharpenM2=n.m2;else throw w.invalidParameterError("options.m2","number between 0 and 1000000",n.m2);if(w.defined(n.x1))if(w.number(n.x1)&&w.inRange(n.x1,0,1e6))this.options.sharpenX1=n.x1;else throw w.invalidParameterError("options.x1","number between 0 and 1000000",n.x1);if(w.defined(n.y2))if(w.number(n.y2)&&w.inRange(n.y2,0,1e6))this.options.sharpenY2=n.y2;else throw w.invalidParameterError("options.y2","number between 0 and 1000000",n.y2);if(w.defined(n.y3))if(w.number(n.y3)&&w.inRange(n.y3,0,1e6))this.options.sharpenY3=n.y3;else throw w.invalidParameterError("options.y3","number between 0 and 1000000",n.y3)}else this.options.sharpenSigma=-1;return this}function dve(n){if(!w.defined(n))this.options.medianSize=3;else if(w.integer(n)&&w.inRange(n,1,1e3))this.options.medianSize=n;else throw w.invalidParameterError("size","integer between 1 and 1000",n);return this}function uve(n){let r;if(w.number(n))r=n;else if(w.plainObject(n)){if(!w.number(n.sigma))throw w.invalidParameterError("options.sigma","number between 0.3 and 1000",r);if(r=n.sigma,"precision"in n)if(w.string(Z5[n.precision]))this.options.precision=Z5[n.precision];else throw w.invalidParameterError("precision","one of: integer, float, approximate",n.precision);if("minAmplitude"in n)if(w.number(n.minAmplitude)&&w.inRange(n.minAmplitude,.001,1))this.options.minAmpl=n.minAmplitude;else throw w.invalidParameterError("minAmplitude","number between 0.001 and 1",n.minAmplitude)}if(!w.defined(n))this.options.blurSigma=-1;else if(w.bool(n))this.options.blurSigma=n?-1:0;else if(w.number(r)&&w.inRange(r,.3,1e3))this.options.blurSigma=r;else throw w.invalidParameterError("sigma","number between 0.3 and 1000",r);return this}function Bve(n){if(!w.defined(n))this.options.dilateWidth=1;else if(w.integer(n)&&w.inRange(n,1,65536))this.options.dilateWidth=n;else throw w.invalidParameterError("width","integer between 1 and 65536",n);return this}function fve(n){if(!w.defined(n))this.options.erodeWidth=1;else if(w.integer(n)&&w.inRange(n,1,65536))this.options.erodeWidth=n;else throw w.invalidParameterError("width","integer between 1 and 65536",n);return this}function Qve(n){return this.options.flatten=w.bool(n)?n:!0,w.object(n)&&this._setBackgroundColourOption("flattenBackground",n.background),this}function yve(){return this.options.unflatten=!0,this}function mve(n,r){if(!w.defined(n))this.options.gamma=2.2;else if(w.number(n)&&w.inRange(n,1,3))this.options.gamma=n;else throw w.invalidParameterError("gamma","number between 1.0 and 3.0",n);if(!w.defined(r))this.options.gammaOut=this.options.gamma;else if(w.number(r)&&w.inRange(r,1,3))this.options.gammaOut=r;else throw w.invalidParameterError("gammaOut","number between 1.0 and 3.0",r);return this}function Sve(n){if(this.options.negate=w.bool(n)?n:!0,w.plainObject(n)&&"alpha"in n)if(w.bool(n.alpha))this.options.negateAlpha=n.alpha;else throw w.invalidParameterError("alpha","should be boolean value",n.alpha);return this}function Dve(n){if(w.plainObject(n)){if(w.defined(n.lower))if(w.number(n.lower)&&w.inRange(n.lower,0,99))this.options.normaliseLower=n.lower;else throw w.invalidParameterError("lower","number between 0 and 99",n.lower);if(w.defined(n.upper))if(w.number(n.upper)&&w.inRange(n.upper,1,100))this.options.normaliseUpper=n.upper;else throw w.invalidParameterError("upper","number between 1 and 100",n.upper)}if(this.options.normaliseLower>=this.options.normaliseUpper)throw w.invalidParameterError("range","lower to be less than upper",`${this.options.normaliseLower} >= ${this.options.normaliseUpper}`);return this.options.normalise=!0,this}function wve(n){return this.normalise(n)}function Ove(n){if(w.plainObject(n)){if(w.integer(n.width)&&w.inRange(n.width,1,65536))this.options.claheWidth=n.width;else throw w.invalidParameterError("width","integer between 1 and 65536",n.width);if(w.integer(n.height)&&w.inRange(n.height,1,65536))this.options.claheHeight=n.height;else throw w.invalidParameterError("height","integer between 1 and 65536",n.height);if(w.defined(n.maxSlope))if(w.integer(n.maxSlope)&&w.inRange(n.maxSlope,0,100))this.options.claheMaxSlope=n.maxSlope;else throw w.invalidParameterError("maxSlope","integer between 0 and 100",n.maxSlope)}else throw w.invalidParameterError("options","plain object",n);return this}function bve(n){if(!w.object(n)||!Array.isArray(n.kernel)||!w.integer(n.width)||!w.integer(n.height)||!w.inRange(n.width,3,1001)||!w.inRange(n.height,3,1001)||n.height*n.width!==n.kernel.length||!n.kernel.every(w.number))throw new Error("Invalid convolution kernel");return w.integer(n.scale)||(n.scale=n.kernel.reduce((r,o)=>r+o,0)),n.scale<1&&(n.scale=1),w.integer(n.offset)||(n.offset=0),this.options.convKernel=n,this}function Mve(n,r){if(!w.defined(n))this.options.threshold=128;else if(w.bool(n))this.options.threshold=n?128:0;else if(w.integer(n)&&w.inRange(n,0,255))this.options.threshold=n;else throw w.invalidParameterError("threshold","integer between 0 and 255",n);return!w.object(r)||r.greyscale===!0||r.grayscale===!0?this.options.thresholdGrayscale=!0:this.options.thresholdGrayscale=!1,this}function _ve(n,r,o){if(this.options.boolean=this._createInputDescriptor(n,o),w.string(r)&&w.inArray(r,["and","or","eor"]))this.options.booleanOp=r;else throw w.invalidParameterError("operator","one of: and, or, eor",r);return this}function Nve(n,r){if(!w.defined(n)&&w.number(r)?n=1:w.number(n)&&!w.defined(r)&&(r=0),!w.defined(n))this.options.linearA=[];else if(w.number(n))this.options.linearA=[n];else if(Array.isArray(n)&&n.length&&n.every(w.number))this.options.linearA=n;else throw w.invalidParameterError("a","number or array of numbers",n);if(!w.defined(r))this.options.linearB=[];else if(w.number(r))this.options.linearB=[r];else if(Array.isArray(r)&&r.length&&r.every(w.number))this.options.linearB=r;else throw w.invalidParameterError("b","number or array of numbers",r);if(this.options.linearA.length!==this.options.linearB.length)throw new Error("Expected a and b to be arrays of the same length");return this}function Tve(n){if(!Array.isArray(n))throw w.invalidParameterError("inputMatrix","array",n);let r=n.length;if(r!==3&&r!==4)throw w.invalidParameterError("inputMatrix","3x3 or 4x4 array",r);if(!n.every(i=>Array.isArray(i)&&i.length===r))throw w.invalidParameterError("inputMatrix",`array of ${r} arrays of length ${r}`,n);let o=n.flat();if(!o.every(w.number))throw w.invalidParameterError("inputMatrix","array of numbers",o);return this.options.recombMatrix=o,this}function Rve(n){if(!w.plainObject(n))throw w.invalidParameterError("options","plain object",n);if("brightness"in n)if(w.number(n.brightness)&&n.brightness>=0)this.options.brightness=n.brightness;else throw w.invalidParameterError("brightness","number above zero",n.brightness);if("saturation"in n)if(w.number(n.saturation)&&n.saturation>=0)this.options.saturation=n.saturation;else throw w.invalidParameterError("saturation","number above zero",n.saturation);if("hue"in n)if(w.integer(n.hue))this.options.hue=n.hue%360;else throw w.invalidParameterError("hue","number",n.hue);if("lightness"in n)if(w.number(n.lightness))this.options.lightness=n.lightness;else throw w.invalidParameterError("lightness","number",n.lightness);return this}var Z5,X5,$5=le(()=>{yn();Z5={integer:"integer",float:"float",approximate:"approximate"};X5=n=>{Object.assign(n.prototype,{autoOrient:lve,rotate:Ive,flip:pve,flop:Eve,affine:Cve,sharpen:hve,erode:fve,dilate:Bve,median:dve,blur:uve,flatten:Qve,unflatten:yve,gamma:mve,negate:Sve,normalise:Dve,normalize:wve,clahe:Ove,convolve:bve,threshold:Mve,boolean:_ve,linear:Nve,recomb:Tve,modulate:Rve})}});var iZ=W((YiA,aZ)=>{var Hv=Object.defineProperty,kve=Object.getOwnPropertyDescriptor,vve=Object.getOwnPropertyNames,Pve=Object.prototype.hasOwnProperty,Gve=(n,r)=>{for(var o in r)Hv(n,o,{get:r[o],enumerable:!0})},Fve=(n,r,o,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let e of vve(r))!Pve.call(n,e)&&e!==o&&Hv(n,e,{get:()=>r[e],enumerable:!(i=kve(r,e))||i.enumerable});return n},Lve=n=>Fve(Hv({},"__esModule",{value:!0}),n),eZ={};Gve(eZ,{default:()=>$ve});aZ.exports=Lve(eZ);var Gv={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};for(let n in Gv)Object.freeze(Gv[n]);var bn=Object.freeze(Gv),AZ=Object.create(null);for(let n in bn)Object.hasOwn(bn,n)&&(AZ[bn[n]]=n);var oi={to:{},get:{}};oi.get=function(n){let r=n.slice(0,3).toLowerCase(),o,i;switch(r){case"hsl":{o=oi.get.hsl(n),i="hsl";break}case"hwb":{o=oi.get.hwb(n),i="hwb";break}default:{o=oi.get.rgb(n),i="rgb";break}}return o?{model:i,value:o}:null};oi.get.rgb=function(n){if(!n)return null;let r=/^#([a-f\d]{3,4})$/i,o=/^#([a-f\d]{6})([a-f\d]{2})?$/i,i=/^rgba?\(\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)\s*(?:[\s,|/]\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(%?)\s*)?\)$/i,e=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/i,a=/^(\w+)$/,A=[0,0,0,1],t,s,g;if(t=n.match(o)){for(g=t[2],t=t[1],s=0;s<3;s++){let c=s*2;A[s]=Number.parseInt(t.slice(c,c+2),16)}g&&(A[3]=Number.parseInt(g,16)/255)}else if(t=n.match(r)){for(t=t[1],g=t[3],s=0;s<3;s++)A[s]=Number.parseInt(t[s]+t[s],16);g&&(A[3]=Number.parseInt(g+g,16)/255)}else if(t=n.match(i)){for(s=0;s<3;s++)A[s]=Number.parseFloat(t[s+1]);t[4]&&(A[3]=t[5]?Number.parseFloat(t[4])*.01:Number.parseFloat(t[4]))}else if(t=n.match(e)){for(s=0;s<3;s++)A[s]=Math.round(Number.parseFloat(t[s+1])*2.55);t[4]&&(A[3]=t[5]?Number.parseFloat(t[4])*.01:Number.parseFloat(t[4]))}else return(t=n.toLowerCase().match(a))?t[1]==="transparent"?[0,0,0,0]:Object.hasOwn(bn,t[1])?(A=bn[t[1]].slice(),A[3]=1,A):null:null;for(s=0;s<3;s++)A[s]=kg(A[s],0,255);return A[3]=kg(A[3],0,1),A};oi.get.hsl=function(n){if(!n)return null;let r=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i,o=n.match(r);if(o){let i=Number.parseFloat(o[4]),e=(Number.parseFloat(o[1])%360+360)%360,a=kg(Number.parseFloat(o[2]),0,100),A=kg(Number.parseFloat(o[3]),0,100),t=kg(Number.isNaN(i)?1:i,0,1);return[e,a,A,t]}return null};oi.get.hwb=function(n){if(!n)return null;let r=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i,o=n.match(r);if(o){let i=Number.parseFloat(o[4]),e=(Number.parseFloat(o[1])%360+360)%360,a=kg(Number.parseFloat(o[2]),0,100),A=kg(Number.parseFloat(o[3]),0,100),t=kg(Number.isNaN(i)?1:i,0,1);return[e,a,A,t]}return null};oi.to.hex=function(...n){return"#"+oS(n[0])+oS(n[1])+oS(n[2])+(n[3]<1?oS(Math.round(n[3]*255)):"")};oi.to.rgb=function(...n){return n.length<4||n[3]===1?"rgb("+Math.round(n[0])+", "+Math.round(n[1])+", "+Math.round(n[2])+")":"rgba("+Math.round(n[0])+", "+Math.round(n[1])+", "+Math.round(n[2])+", "+n[3]+")"};oi.to.rgb.percent=function(...n){let r=Math.round(n[0]/255*100),o=Math.round(n[1]/255*100),i=Math.round(n[2]/255*100);return n.length<4||n[3]===1?"rgb("+r+"%, "+o+"%, "+i+"%)":"rgba("+r+"%, "+o+"%, "+i+"%, "+n[3]+")"};oi.to.hsl=function(...n){return n.length<4||n[3]===1?"hsl("+n[0]+", "+n[1]+"%, "+n[2]+"%)":"hsla("+n[0]+", "+n[1]+"%, "+n[2]+"%, "+n[3]+")"};oi.to.hwb=function(...n){let r="";return n.length>=4&&n[3]!==1&&(r=", "+n[3]),"hwb("+n[0]+", "+n[1]+"%, "+n[2]+"%"+r+")"};oi.to.keyword=function(...n){return AZ[n.slice(0,3)]};function kg(n,r,o){return Math.min(Math.max(r,n),o)}function oS(n){let r=Math.round(n).toString(16).toUpperCase();return r.length<2?"0"+r:r}var vp=oi,tZ={};for(let n of Object.keys(bn))tZ[bn[n]]=n;var iA={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},sI=iA,Ms=(6/29)**3;function Gp(n){let r=n>.0031308?1.055*n**.4166666666666667-.055:n*12.92;return Math.min(Math.max(0,r),1)}function Fp(n){return n>.04045?((n+.055)/1.055)**2.4:n/12.92}for(let n of Object.keys(iA)){if(!("channels"in iA[n]))throw new Error("missing channels property: "+n);if(!("labels"in iA[n]))throw new Error("missing channel labels property: "+n);if(iA[n].labels.length!==iA[n].channels)throw new Error("channel and label counts mismatch: "+n);let{channels:r,labels:o}=iA[n];delete iA[n].channels,delete iA[n].labels,Object.defineProperty(iA[n],"channels",{value:r}),Object.defineProperty(iA[n],"labels",{value:o})}iA.rgb.hsl=function(n){let r=n[0]/255,o=n[1]/255,i=n[2]/255,e=Math.min(r,o,i),a=Math.max(r,o,i),A=a-e,t,s;switch(a){case e:{t=0;break}case r:{t=(o-i)/A;break}case o:{t=2+(i-r)/A;break}case i:{t=4+(r-o)/A;break}}t=Math.min(t*60,360),t<0&&(t+=360);let g=(e+a)/2;return a===e?s=0:g<=.5?s=A/(a+e):s=A/(2-a-e),[t,s*100,g*100]};iA.rgb.hsv=function(n){let r,o,i,e,a,A=n[0]/255,t=n[1]/255,s=n[2]/255,g=Math.max(A,t,s),c=g-Math.min(A,t,s),I=function(E){return(g-E)/6/c+1/2};if(c===0)e=0,a=0;else{switch(a=c/g,r=I(A),o=I(t),i=I(s),g){case A:{e=i-o;break}case t:{e=1/3+r-i;break}case s:{e=2/3+o-r;break}}e<0?e+=1:e>1&&(e-=1)}return[e*360,a*100,g*100]};iA.rgb.hwb=function(n){let r=n[0],o=n[1],i=n[2],e=iA.rgb.hsl(n)[0],a=1/255*Math.min(r,Math.min(o,i));return i=1-1/255*Math.max(r,Math.max(o,i)),[e,a*100,i*100]};iA.rgb.oklab=function(n){let r=Fp(n[0]/255),o=Fp(n[1]/255),i=Fp(n[2]/255),e=Math.cbrt(.4122214708*r+.5363325363*o+.0514459929*i),a=Math.cbrt(.2119034982*r+.6806995451*o+.1073969566*i),A=Math.cbrt(.0883024619*r+.2817188376*o+.6299787005*i),t=.2104542553*e+.793617785*a-.0040720468*A,s=1.9779984951*e-2.428592205*a+.4505937099*A,g=.0259040371*e+.7827717662*a-.808675766*A;return[t*100,s*100,g*100]};iA.rgb.cmyk=function(n){let r=n[0]/255,o=n[1]/255,i=n[2]/255,e=Math.min(1-r,1-o,1-i),a=(1-r-e)/(1-e)||0,A=(1-o-e)/(1-e)||0,t=(1-i-e)/(1-e)||0;return[a*100,A*100,t*100,e*100]};function Uve(n,r){return(n[0]-r[0])**2+(n[1]-r[1])**2+(n[2]-r[2])**2}iA.rgb.keyword=function(n){let r=tZ[n];if(r)return r;let o=Number.POSITIVE_INFINITY,i;for(let e of Object.keys(bn)){let a=bn[e],A=Uve(n,a);AMs?o**(1/3):7.787*o+16/116,i=i>Ms?i**(1/3):7.787*i+16/116,e=e>Ms?e**(1/3):7.787*e+16/116;let a=116*i-16,A=500*(o-i),t=200*(i-e);return[a,A,t]};iA.hsl.rgb=function(n){let r=n[0]/360,o=n[1]/100,i=n[2]/100,e,a;if(o===0)return a=i*255,[a,a,a];let A=i<.5?i*(1+o):i+o-i*o,t=2*i-A,s=[0,0,0];for(let g=0;g<3;g++)e=r+1/3*-(g-1),e<0&&e++,e>1&&e--,6*e<1?a=t+(A-t)*6*e:2*e<1?a=A:3*e<2?a=t+(A-t)*(2/3-e)*6:a=t,s[g]=a*255;return s};iA.hsl.hsv=function(n){let r=n[0],o=n[1]/100,i=n[2]/100,e=o,a=Math.max(i,.01);i*=2,o*=i<=1?i:2-i,e*=a<=1?a:2-a;let A=(i+o)/2,t=i===0?2*e/(a+e):2*o/(i+o);return[r,t*100,A*100]};iA.hsv.rgb=function(n){let r=n[0]/60,o=n[1]/100,i=n[2]/100,e=Math.floor(r)%6,a=r-Math.floor(r),A=255*i*(1-o),t=255*i*(1-o*a),s=255*i*(1-o*(1-a));switch(i*=255,e){case 0:return[i,s,A];case 1:return[t,i,A];case 2:return[A,i,s];case 3:return[A,t,i];case 4:return[s,A,i];case 5:return[i,A,t]}};iA.hsv.hsl=function(n){let r=n[0],o=n[1]/100,i=n[2]/100,e=Math.max(i,.01),a,A;A=(2-o)*i;let t=(2-o)*e;return a=o*e,a/=t<=1?t:2-t,a=a||0,A/=2,[r,a*100,A*100]};iA.hwb.rgb=function(n){let r=n[0]/360,o=n[1]/100,i=n[2]/100,e=o+i,a;e>1&&(o/=e,i/=e);let A=Math.floor(6*r),t=1-i;a=6*r-A,(A&1)!==0&&(a=1-a);let s=o+a*(t-o),g,c,I;switch(A){default:case 6:case 0:{g=t,c=s,I=o;break}case 1:{g=s,c=t,I=o;break}case 2:{g=o,c=t,I=s;break}case 3:{g=o,c=s,I=t;break}case 4:{g=s,c=o,I=t;break}case 5:{g=t,c=o,I=s;break}}return[g*255,c*255,I*255]};iA.cmyk.rgb=function(n){let r=n[0]/100,o=n[1]/100,i=n[2]/100,e=n[3]/100,a=1-Math.min(1,r*(1-e)+e),A=1-Math.min(1,o*(1-e)+e),t=1-Math.min(1,i*(1-e)+e);return[a*255,A*255,t*255]};iA.xyz.rgb=function(n){let r=n[0]/100,o=n[1]/100,i=n[2]/100,e,a,A;return e=r*3.2404542+o*-1.5371385+i*-.4985314,a=r*-.969266+o*1.8760108+i*.041556,A=r*.0556434+o*-.2040259+i*1.0572252,e=Gp(e),a=Gp(a),A=Gp(A),[e*255,a*255,A*255]};iA.xyz.lab=function(n){let r=n[0],o=n[1],i=n[2];r/=95.047,o/=100,i/=108.883,r=r>Ms?r**(1/3):7.787*r+16/116,o=o>Ms?o**(1/3):7.787*o+16/116,i=i>Ms?i**(1/3):7.787*i+16/116;let e=116*o-16,a=500*(r-o),A=200*(o-i);return[e,a,A]};iA.xyz.oklab=function(n){let r=n[0]/100,o=n[1]/100,i=n[2]/100,e=Math.cbrt(.8189330101*r+.3618667424*o-.1288597137*i),a=Math.cbrt(.0329845436*r+.9293118715*o+.0361456387*i),A=Math.cbrt(.0482003018*r+.2643662691*o+.633851707*i),t=.2104542553*e+.793617785*a-.0040720468*A,s=1.9779984951*e-2.428592205*a+.4505937099*A,g=.0259040371*e+.7827717662*a-.808675766*A;return[t*100,s*100,g*100]};iA.oklab.oklch=function(n){return iA.lab.lch(n)};iA.oklab.xyz=function(n){let r=n[0]/100,o=n[1]/100,i=n[2]/100,e=(.999999998*r+.396337792*o+.215803758*i)**3,a=(1.000000008*r-.105561342*o-.063854175*i)**3,A=(1.000000055*r-.089484182*o-1.291485538*i)**3,t=1.227013851*e-.55779998*a+.281256149*A,s=-.040580178*e+1.11225687*a-.071676679*A,g=-.076381285*e-.421481978*a+1.58616322*A;return[t*100,s*100,g*100]};iA.oklab.rgb=function(n){let r=n[0]/100,o=n[1]/100,i=n[2]/100,e=(r+.3963377774*o+.2158037573*i)**3,a=(r-.1055613458*o-.0638541728*i)**3,A=(r-.0894841775*o-1.291485548*i)**3,t=Gp(4.0767416621*e-3.3077115913*a+.2309699292*A),s=Gp(-1.2684380046*e+2.6097574011*a-.3413193965*A),g=Gp(-.0041960863*e-.7034186147*a+1.707614701*A);return[t*255,s*255,g*255]};iA.oklch.oklab=function(n){return iA.lch.lab(n)};iA.lab.xyz=function(n){let r=n[0],o=n[1],i=n[2],e,a,A;a=(r+16)/116,e=o/500+a,A=a-i/200;let t=a**3,s=e**3,g=A**3;return a=t>Ms?t:(a-16/116)/7.787,e=s>Ms?s:(e-16/116)/7.787,A=g>Ms?g:(A-16/116)/7.787,e*=95.047,a*=100,A*=108.883,[e,a,A]};iA.lab.lch=function(n){let r=n[0],o=n[1],i=n[2],e;e=Math.atan2(i,o)*360/2/Math.PI,e<0&&(e+=360);let A=Math.sqrt(o*o+i*i);return[r,A,e]};iA.lch.lab=function(n){let r=n[0],o=n[1],e=n[2]/360*2*Math.PI,a=o*Math.cos(e),A=o*Math.sin(e);return[r,a,A]};iA.rgb.ansi16=function(n,r=null){let[o,i,e]=n,a=r===null?iA.rgb.hsv(n)[2]:r;if(a=Math.round(a/50),a===0)return 30;let A=30+(Math.round(e/255)<<2|Math.round(i/255)<<1|Math.round(o/255));return a===2&&(A+=60),A};iA.hsv.ansi16=function(n){return iA.rgb.ansi16(iA.hsv.rgb(n),n[2])};iA.rgb.ansi256=function(n){let r=n[0],o=n[1],i=n[2];return r>>4===o>>4&&o>>4===i>>4?r<8?16:r>248?231:Math.round((r-8)/247*24)+232:16+36*Math.round(r/255*5)+6*Math.round(o/255*5)+Math.round(i/255*5)};iA.ansi16.rgb=function(n){n=n[0];let r=n%10;if(r===0||r===7)return n>50&&(r+=3.5),r=r/10.5*255,[r,r,r];let o=(Math.trunc(n>50)+1)*.5,i=(r&1)*o*255,e=(r>>1&1)*o*255,a=(r>>2&1)*o*255;return[i,e,a]};iA.ansi256.rgb=function(n){if(n=n[0],n>=232){let a=(n-232)*10+8;return[a,a,a]}n-=16;let r,o=Math.floor(n/36)/5*255,i=Math.floor((r=n%36)/6)/5*255,e=r%6/5*255;return[o,i,e]};iA.rgb.hex=function(n){let o=(((Math.round(n[0])&255)<<16)+((Math.round(n[1])&255)<<8)+(Math.round(n[2])&255)).toString(16).toUpperCase();return"000000".slice(o.length)+o};iA.hex.rgb=function(n){let r=n.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!r)return[0,0,0];let o=r[0];r[0].length===3&&(o=[...o].map(t=>t+t).join(""));let i=Number.parseInt(o,16),e=i>>16&255,a=i>>8&255,A=i&255;return[e,a,A]};iA.rgb.hcg=function(n){let r=n[0]/255,o=n[1]/255,i=n[2]/255,e=Math.max(Math.max(r,o),i),a=Math.min(Math.min(r,o),i),A=e-a,t,s=A<1?a/(1-A):0;return A<=0?t=0:e===r?t=(o-i)/A%6:e===o?t=2+(i-r)/A:t=4+(r-o)/A,t/=6,t%=1,[t*360,A*100,s*100]};iA.hsl.hcg=function(n){let r=n[1]/100,o=n[2]/100,i=o<.5?2*r*o:2*r*(1-o),e=0;return i<1&&(e=(o-.5*i)/(1-i)),[n[0],i*100,e*100]};iA.hsv.hcg=function(n){let r=n[1]/100,o=n[2]/100,i=r*o,e=0;return i<1&&(e=(o-i)/(1-i)),[n[0],i*100,e*100]};iA.hcg.rgb=function(n){let r=n[0]/360,o=n[1]/100,i=n[2]/100;if(o===0)return[i*255,i*255,i*255];let e=[0,0,0],a=r%1*6,A=a%1,t=1-A,s=0;switch(Math.floor(a)){case 0:{e[0]=1,e[1]=A,e[2]=0;break}case 1:{e[0]=t,e[1]=1,e[2]=0;break}case 2:{e[0]=0,e[1]=1,e[2]=A;break}case 3:{e[0]=0,e[1]=t,e[2]=1;break}case 4:{e[0]=A,e[1]=0,e[2]=1;break}default:e[0]=1,e[1]=0,e[2]=t}return s=(1-o)*i,[(o*e[0]+s)*255,(o*e[1]+s)*255,(o*e[2]+s)*255]};iA.hcg.hsv=function(n){let r=n[1]/100,o=n[2]/100,i=r+o*(1-r),e=0;return i>0&&(e=r/i),[n[0],e*100,i*100]};iA.hcg.hsl=function(n){let r=n[1]/100,i=n[2]/100*(1-r)+.5*r,e=0;return i>0&&i<.5?e=r/(2*i):i>=.5&&i<1&&(e=r/(2*(1-i))),[n[0],e*100,i*100]};iA.hcg.hwb=function(n){let r=n[1]/100,o=n[2]/100,i=r+o*(1-r);return[n[0],(i-r)*100,(1-i)*100]};iA.hwb.hcg=function(n){let r=n[1]/100,i=1-n[2]/100,e=i-r,a=0;return e<1&&(a=(i-e)/(1-e)),[n[0],e*100,a*100]};iA.apple.rgb=function(n){return[n[0]/65535*255,n[1]/65535*255,n[2]/65535*255]};iA.rgb.apple=function(n){return[n[0]/255*65535,n[1]/255*65535,n[2]/255*65535]};iA.gray.rgb=function(n){return[n[0]/100*255,n[0]/100*255,n[0]/100*255]};iA.gray.hsl=function(n){return[0,0,n[0]]};iA.gray.hsv=iA.gray.hsl;iA.gray.hwb=function(n){return[0,100,n[0]]};iA.gray.cmyk=function(n){return[0,0,0,n[0]]};iA.gray.lab=function(n){return[n[0],0,0]};iA.gray.hex=function(n){let r=Math.round(n[0]/100*255)&255,i=((r<<16)+(r<<8)+r).toString(16).toUpperCase();return"000000".slice(i.length)+i};iA.rgb.gray=function(n){return[(n[0]+n[1]+n[2])/3/255*100]};function Hve(){let n={},r=Object.keys(sI);for(let{length:o}=r,i=0;i0;){let i=o.pop(),e=Object.keys(sI[i]);for(let{length:a}=e,A=0;A1&&(o=i),n(o))};return"conversion"in n&&(r.conversion=n.conversion),r}function zve(n){let r=function(...o){let i=o[0];if(i==null)return i;i.length>1&&(o=i);let e=n(o);if(typeof e=="object")for(let{length:a}=e,A=0;A0){this.model=r||"rgb",i=bi[this.model].channels;let e=Array.prototype.slice.call(n,0,i);this.color=Uv(e,i),this.valpha=typeof n[i]=="number"?n[i]:1}else if(typeof n=="number")this.model="rgb",this.color=[n>>16&255,n>>8&255,n&255],this.valpha=1;else{this.valpha=1;let e=Object.keys(n);"alpha"in n&&(e.splice(e.indexOf("alpha"),1),this.valpha=typeof n.alpha=="number"?n.alpha:0);let a=e.sort().join("");if(!(a in Fv))throw new Error("Unable to parse color from object: "+JSON.stringify(n));this.model=Fv[a];let{labels:A}=bi[this.model],t=[];for(o=0;o(n%360+360)%360),saturationl:gr("hsl",1,Rr(100)),lightness:gr("hsl",2,Rr(100)),saturationv:gr("hsv",1,Rr(100)),value:gr("hsv",2,Rr(100)),chroma:gr("hcg",1,Rr(100)),gray:gr("hcg",2,Rr(100)),white:gr("hwb",1,Rr(100)),wblack:gr("hwb",2,Rr(100)),cyan:gr("cmyk",0,Rr(100)),magenta:gr("cmyk",1,Rr(100)),yellow:gr("cmyk",2,Rr(100)),black:gr("cmyk",3,Rr(100)),x:gr("xyz",0,Rr(95.047)),y:gr("xyz",1,Rr(100)),z:gr("xyz",2,Rr(108.833)),l:gr("lab",0,Rr(100)),a:gr("lab",1),b:gr("lab",2),keyword(n){return n!==void 0?new Jr(n):bi[this.model].keyword(this.color)},hex(n){return n!==void 0?new Jr(n):vp.to.hex(...this.rgb().round().color)},hexa(n){if(n!==void 0)return new Jr(n);let r=this.rgb().round().color,o=Math.round(this.valpha*255).toString(16).toUpperCase();return o.length===1&&(o="0"+o),vp.to.hex(...r)+o},rgbNumber(){let n=this.rgb().color;return(n[0]&255)<<16|(n[1]&255)<<8|n[2]&255},luminosity(){let n=this.rgb().color,r=[];for(let[o,i]of n.entries()){let e=i/255;r[o]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return .2126*r[0]+.7152*r[1]+.0722*r[2]},contrast(n){let r=this.luminosity(),o=n.luminosity();return r>o?(r+.05)/(o+.05):(o+.05)/(r+.05)},level(n){let r=this.contrast(n);return r>=7?"AAA":r>=4.5?"AA":""},isDark(){let n=this.rgb().color;return(n[0]*2126+n[1]*7152+n[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let n=this.rgb();for(let r=0;r<3;r++)n.color[r]=255-n.color[r];return n},lighten(n){let r=this.hsl();return r.color[2]+=r.color[2]*n,r},darken(n){let r=this.hsl();return r.color[2]-=r.color[2]*n,r},saturate(n){let r=this.hsl();return r.color[1]+=r.color[1]*n,r},desaturate(n){let r=this.hsl();return r.color[1]-=r.color[1]*n,r},whiten(n){let r=this.hwb();return r.color[1]+=r.color[1]*n,r},blacken(n){let r=this.hwb();return r.color[2]+=r.color[2]*n,r},grayscale(){let n=this.rgb().color,r=n[0]*.3+n[1]*.59+n[2]*.11;return Jr.rgb(r,r,r)},fade(n){return this.alpha(this.valpha-this.valpha*n)},opaquer(n){return this.alpha(this.valpha+this.valpha*n)},rotate(n){let r=this.hsl(),o=r.color[0];return o=(o+n)%360,o=o<0?360+o:o,r.color[0]=o,r},mix(n,r){if(!n||!n.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof n);let o=n.rgb(),i=this.rgb(),e=r===void 0?.5:r,a=2*e-1,A=o.alpha()-i.alpha(),t=((a*A===-1?a:(a+A)/(1+a*A))+1)/2,s=1-t;return Jr.rgb(t*o.red()+s*i.red(),t*o.green()+s*i.green(),t*o.blue()+s*i.blue(),o.alpha()*e+i.alpha()*(1-e))}};for(let n of Object.keys(bi)){if(rZ.includes(n))continue;let{channels:r}=bi[n];Jr.prototype[n]=function(...o){return this.model===n?new Jr(this):o.length>0?new Jr(o,n):new Jr([...Xve(bi[this.model][n].raw(this.color)),this.valpha],n)},Jr[n]=function(...o){let i=o[0];return typeof i=="number"&&(i=Uv(o,r)),new Jr(i,n)}}function Wve(n,r){return Number(n.toFixed(r))}function Zve(n){return function(r){return Wve(r,n)}}function gr(n,r,o){n=Array.isArray(n)?n:[n];for(let i of n)(Lv[i]||=[])[r]=o;return n=n[0],function(i){let e;return i!==void 0?(o&&(i=o(i)),e=this[n](),e.color[r]=i,e):(e=this[n]().color[r],o&&(e=o(e)),e)}}function Rr(n){return function(r){return Math.max(0,Math.min(n,r))}}function Xve(n){return Array.isArray(n)?n:[n]}function Uv(n,r){for(let o=0;o{oZ.exports=iZ().default});function ePe(n){return this._setBackgroundColourOption("tint",n),this}function APe(n){return this.options.greyscale=w.bool(n)?n:!0,this}function tPe(n){return this.greyscale(n)}function rPe(n){if(!w.string(n))throw w.invalidParameterError("colourspace","string",n);return this.options.colourspacePipeline=n,this}function aPe(n){return this.pipelineColourspace(n)}function iPe(n){if(!w.string(n))throw w.invalidParameterError("colourspace","string",n);return this.options.colourspace=n,this}function oPe(n){return this.toColourspace(n)}function cZ(n){if(w.object(n)||w.string(n)&&n.length>=3&&n.length<=200){let r=(0,gZ.default)(n),o=r.red(),i=r.green(),e=r.blue(),a=Math.round(r.alpha()*255);for(let[A,t]of[["red",o],["green",i],["blue",e],["alpha",a]])if(!w.number(t))throw w.invalidParameterError(`background.${A}`,"number",t);return[o,i,e,a]}else throw w.invalidParameterError("background","object or string",n)}function nPe(n,r){w.defined(r)&&(this.options[n]=cZ(r))}var gZ,sZ,IZ,lZ=le(()=>{gZ=Je(nZ(),1);yn();sZ={multiband:"multiband","b-w":"b-w",bw:"b-w",cmyk:"cmyk",srgb:"srgb"};IZ=n=>{Object.assign(n.prototype,{tint:ePe,greyscale:APe,grayscale:tPe,pipelineColourspace:rPe,pipelineColorspace:aPe,toColourspace:iPe,toColorspace:oPe,_getBackgroundColourOption:cZ,_setBackgroundColourOption:nPe}),n.colourspace=sZ,n.colorspace=sZ}});function gPe(){return this.options.removeAlpha=!0,this}function cPe(n){if(w.defined(n))if(w.number(n)&&w.inRange(n,0,1))this.options.ensureAlpha=n;else throw w.invalidParameterError("alpha","number between 0 and 1",n);else this.options.ensureAlpha=1;return this}function IPe(n){let r={red:0,green:1,blue:2,alpha:3};if(Object.keys(r).includes(n)&&(n=r[n]),w.integer(n)&&w.inRange(n,0,4))this.options.extractChannel=n;else throw w.invalidParameterError("channel","integer or one of: red, green, blue, alpha",n);return this}function lPe(n,r){return Array.isArray(n)?n.forEach(function(o){this.options.joinChannelIn.push(this._createInputDescriptor(o,r))},this):this.options.joinChannelIn.push(this._createInputDescriptor(n,r)),this}function pPe(n){if(w.string(n)&&w.inArray(n,["and","or","eor"]))this.options.bandBoolOp=n;else throw w.invalidParameterError("boolOp","one of: and, or, eor",n);return this}var sPe,pZ,EZ=le(()=>{yn();sPe={and:"and",or:"or",eor:"eor"};pZ=n=>{Object.assign(n.prototype,{removeAlpha:gPe,ensureAlpha:cPe,extractChannel:IPe,joinChannel:lPe,bandbool:pPe}),n.bool=sPe}});import Kv from"node:path";function CPe(n,r){let o;if(w.string(n)?w.string(this.options.input.file)&&Kv.resolve(this.options.input.file)===Kv.resolve(n)?o=new Error("Cannot use same file for input and output"):EPe.test(Kv.extname(n))&&!this.constructor.format.jp2.output.file&&(o=hZ()):o=new Error("Missing output file path"),o)if(w.fn(r))r(o);else return Promise.reject(o);else{this.options.fileOut=n;let i=Error();return this._pipeline(r,i)}return this}function hPe(n,r){w.object(n)?this._setBooleanOption("resolveWithObject",n.resolveWithObject):this.options.resolveWithObject&&(this.options.resolveWithObject=!1),this.options.fileOut="";let o=Error();return this._pipeline(w.fn(n)?n:r,o)}function dPe(){this.options.resolveWithObject=!0,this.options.typedArrayOut=!0;let n=Error();return this._pipeline(null,n)}function uPe(n){if(w.number(n)&&n>0)this.options.withMetadataDensity=n;else throw w.invalidParameterError("density","positive number",n);return this.keepExif()}function BPe(){return this.options.keepMetadata|=1,this}function fPe(n){if(w.object(n))for(let[r,o]of Object.entries(n))if(w.object(o))for(let[i,e]of Object.entries(o))if(w.string(e))this.options.withExif[`exif-${r.toLowerCase()}-${i}`]=e;else throw w.invalidParameterError(`${r}.${i}`,"string",e);else throw w.invalidParameterError(r,"object",o);else throw w.invalidParameterError("exif","object",n);return this.options.withExifMerge=!1,this.keepExif()}function QPe(n){return this.withExif(n),this.options.withExifMerge=!0,this}function yPe(){return this.options.keepMetadata|=8,this}function mPe(n,r){if(w.string(n))this.options.withIccProfile=n;else throw w.invalidParameterError("icc","string",n);if(this.keepIccProfile(),w.object(r)&&w.defined(r.attach))if(w.bool(r.attach))r.attach||(this.options.keepMetadata&=-9);else throw w.invalidParameterError("attach","boolean",r.attach);return this}function SPe(){return this.options.keepGainMap=!0,this.options.withGainMap=!1,this.options.keepMetadata|=32,this}function DPe(){return this.options.withGainMap=!0,this.options.keepGainMap=!1,this.options.colourspace="scrgb",this}function wPe(){return this.options.keepMetadata|=2,this}function OPe(n){if(w.string(n)&&n.length>0)this.options.withXmp=n,this.options.keepMetadata|=2;else throw w.invalidParameterError("xmp","non-empty string",n);return this}function bPe(){return this.options.keepMetadata|=31,this}function MPe(n){if(this.keepMetadata(),this.withIccProfile("srgb"),w.object(n)){if(w.defined(n.orientation))if(w.integer(n.orientation)&&w.inRange(n.orientation,1,8))this.options.withMetadataOrientation=n.orientation;else throw w.invalidParameterError("orientation","integer between 1 and 8",n.orientation);if(w.defined(n.density))if(w.number(n.density)&&n.density>0)this.options.withMetadataDensity=n.density;else throw w.invalidParameterError("density","positive number",n.density);w.defined(n.icc)&&this.withIccProfile(n.icc),w.defined(n.exif)&&this.withExifMerge(n.exif)}return this}function _Pe(n,r){let o=CZ.get((w.object(n)&&w.string(n.id)?n.id:n).toLowerCase());if(!o)throw w.invalidParameterError("format",`one of: ${[...CZ.keys()].join(", ")}`,n);return this[o](r)}function NPe(n){if(w.object(n)){if(w.defined(n.quality))if(w.integer(n.quality)&&w.inRange(n.quality,1,100))this.options.jpegQuality=n.quality;else throw w.invalidParameterError("quality","integer between 1 and 100",n.quality);if(w.defined(n.progressive)&&this._setBooleanOption("jpegProgressive",n.progressive),w.defined(n.chromaSubsampling))if(w.string(n.chromaSubsampling)&&w.inArray(n.chromaSubsampling,["4:2:0","4:4:4"]))this.options.jpegChromaSubsampling=n.chromaSubsampling;else throw w.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",n.chromaSubsampling);let r=w.bool(n.optimizeCoding)?n.optimizeCoding:n.optimiseCoding;if(w.defined(r)&&this._setBooleanOption("jpegOptimiseCoding",r),w.defined(n.mozjpeg))if(w.bool(n.mozjpeg))n.mozjpeg&&(this.options.jpegTrellisQuantisation=!0,this.options.jpegOvershootDeringing=!0,this.options.jpegOptimiseScans=!0,this.options.jpegProgressive=!0,this.options.jpegQuantisationTable=3);else throw w.invalidParameterError("mozjpeg","boolean",n.mozjpeg);let o=w.bool(n.trellisQuantization)?n.trellisQuantization:n.trellisQuantisation;w.defined(o)&&this._setBooleanOption("jpegTrellisQuantisation",o),w.defined(n.overshootDeringing)&&this._setBooleanOption("jpegOvershootDeringing",n.overshootDeringing);let i=w.bool(n.optimizeScans)?n.optimizeScans:n.optimiseScans;w.defined(i)&&(this._setBooleanOption("jpegOptimiseScans",i),i&&(this.options.jpegProgressive=!0));let e=w.number(n.quantizationTable)?n.quantizationTable:n.quantisationTable;if(w.defined(e))if(w.integer(e)&&w.inRange(e,0,8))this.options.jpegQuantisationTable=e;else throw w.invalidParameterError("quantisationTable","integer between 0 and 8",e)}return this._updateFormatOut("jpeg",n)}function TPe(n){if(w.object(n)){if(w.defined(n.progressive)&&this._setBooleanOption("pngProgressive",n.progressive),w.defined(n.compressionLevel))if(w.integer(n.compressionLevel)&&w.inRange(n.compressionLevel,0,9))this.options.pngCompressionLevel=n.compressionLevel;else throw w.invalidParameterError("compressionLevel","integer between 0 and 9",n.compressionLevel);w.defined(n.adaptiveFiltering)&&this._setBooleanOption("pngAdaptiveFiltering",n.adaptiveFiltering);let r=n.colours||n.colors;if(w.defined(r))if(w.integer(r)&&w.inRange(r,2,256))this.options.pngBitdepth=dZ(r);else throw w.invalidParameterError("colours","integer between 2 and 256",r);if(w.defined(n.palette)?this._setBooleanOption("pngPalette",n.palette):[n.quality,n.effort,n.colours,n.colors,n.dither].some(w.defined)&&this._setBooleanOption("pngPalette",!0),this.options.pngPalette){if(w.defined(n.quality))if(w.integer(n.quality)&&w.inRange(n.quality,0,100))this.options.pngQuality=n.quality;else throw w.invalidParameterError("quality","integer between 0 and 100",n.quality);if(w.defined(n.effort))if(w.integer(n.effort)&&w.inRange(n.effort,1,10))this.options.pngEffort=n.effort;else throw w.invalidParameterError("effort","integer between 1 and 10",n.effort);if(w.defined(n.dither))if(w.number(n.dither)&&w.inRange(n.dither,0,1))this.options.pngDither=n.dither;else throw w.invalidParameterError("dither","number between 0.0 and 1.0",n.dither)}}return this._updateFormatOut("png",n)}function RPe(n){if(w.object(n)){if(w.defined(n.quality))if(w.integer(n.quality)&&w.inRange(n.quality,1,100))this.options.webpQuality=n.quality;else throw w.invalidParameterError("quality","integer between 1 and 100",n.quality);if(w.defined(n.alphaQuality))if(w.integer(n.alphaQuality)&&w.inRange(n.alphaQuality,0,100))this.options.webpAlphaQuality=n.alphaQuality;else throw w.invalidParameterError("alphaQuality","integer between 0 and 100",n.alphaQuality);if(w.defined(n.lossless)&&this._setBooleanOption("webpLossless",n.lossless),w.defined(n.nearLossless)&&this._setBooleanOption("webpNearLossless",n.nearLossless),w.defined(n.smartSubsample)&&this._setBooleanOption("webpSmartSubsample",n.smartSubsample),w.defined(n.smartDeblock)&&this._setBooleanOption("webpSmartDeblock",n.smartDeblock),w.defined(n.preset))if(w.string(n.preset)&&w.inArray(n.preset,["default","photo","picture","drawing","icon","text"]))this.options.webpPreset=n.preset;else throw w.invalidParameterError("preset","one of: default, photo, picture, drawing, icon, text",n.preset);if(w.defined(n.effort))if(w.integer(n.effort)&&w.inRange(n.effort,0,6))this.options.webpEffort=n.effort;else throw w.invalidParameterError("effort","integer between 0 and 6",n.effort);w.defined(n.minSize)&&this._setBooleanOption("webpMinSize",n.minSize),w.defined(n.mixed)&&this._setBooleanOption("webpMixed",n.mixed),w.defined(n.exact)&&this._setBooleanOption("webpExact",n.exact)}return Yv(n,this.options),this._updateFormatOut("webp",n)}function kPe(n){if(w.object(n)){w.defined(n.reuse)&&this._setBooleanOption("gifReuse",n.reuse),w.defined(n.progressive)&&this._setBooleanOption("gifProgressive",n.progressive);let r=n.colours||n.colors;if(w.defined(r))if(w.integer(r)&&w.inRange(r,2,256))this.options.gifBitdepth=dZ(r);else throw w.invalidParameterError("colours","integer between 2 and 256",r);if(w.defined(n.effort))if(w.integer(n.effort)&&w.inRange(n.effort,1,10))this.options.gifEffort=n.effort;else throw w.invalidParameterError("effort","integer between 1 and 10",n.effort);if(w.defined(n.dither))if(w.number(n.dither)&&w.inRange(n.dither,0,1))this.options.gifDither=n.dither;else throw w.invalidParameterError("dither","number between 0.0 and 1.0",n.dither);if(w.defined(n.interFrameMaxError))if(w.number(n.interFrameMaxError)&&w.inRange(n.interFrameMaxError,0,32))this.options.gifInterFrameMaxError=n.interFrameMaxError;else throw w.invalidParameterError("interFrameMaxError","number between 0.0 and 32.0",n.interFrameMaxError);if(w.defined(n.interPaletteMaxError))if(w.number(n.interPaletteMaxError)&&w.inRange(n.interPaletteMaxError,0,256))this.options.gifInterPaletteMaxError=n.interPaletteMaxError;else throw w.invalidParameterError("interPaletteMaxError","number between 0.0 and 256.0",n.interPaletteMaxError);if(w.defined(n.keepDuplicateFrames))if(w.bool(n.keepDuplicateFrames))this._setBooleanOption("gifKeepDuplicateFrames",n.keepDuplicateFrames);else throw w.invalidParameterError("keepDuplicateFrames","boolean",n.keepDuplicateFrames)}return Yv(n,this.options),this._updateFormatOut("gif",n)}function vPe(n){if(!this.constructor.format.jp2.output.buffer)throw hZ();if(w.object(n)){if(w.defined(n.quality))if(w.integer(n.quality)&&w.inRange(n.quality,1,100))this.options.jp2Quality=n.quality;else throw w.invalidParameterError("quality","integer between 1 and 100",n.quality);if(w.defined(n.lossless))if(w.bool(n.lossless))this.options.jp2Lossless=n.lossless;else throw w.invalidParameterError("lossless","boolean",n.lossless);if(w.defined(n.tileWidth))if(w.integer(n.tileWidth)&&w.inRange(n.tileWidth,1,32768))this.options.jp2TileWidth=n.tileWidth;else throw w.invalidParameterError("tileWidth","integer between 1 and 32768",n.tileWidth);if(w.defined(n.tileHeight))if(w.integer(n.tileHeight)&&w.inRange(n.tileHeight,1,32768))this.options.jp2TileHeight=n.tileHeight;else throw w.invalidParameterError("tileHeight","integer between 1 and 32768",n.tileHeight);if(w.defined(n.chromaSubsampling))if(w.string(n.chromaSubsampling)&&w.inArray(n.chromaSubsampling,["4:2:0","4:4:4"]))this.options.jp2ChromaSubsampling=n.chromaSubsampling;else throw w.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",n.chromaSubsampling)}return this._updateFormatOut("jp2",n)}function Yv(n,r){if(w.object(n)&&w.defined(n.loop))if(w.integer(n.loop)&&w.inRange(n.loop,0,65535))r.loop=n.loop;else throw w.invalidParameterError("loop","integer between 0 and 65535",n.loop);if(w.object(n)&&w.defined(n.delay))if(w.integer(n.delay)&&w.inRange(n.delay,0,65535))r.delay=[n.delay];else if(Array.isArray(n.delay)&&n.delay.every(w.integer)&&n.delay.every(o=>w.inRange(o,0,65535)))r.delay=n.delay;else throw w.invalidParameterError("delay","integer or an array of integers between 0 and 65535",n.delay)}function PPe(n){if(w.object(n)){if(w.defined(n.quality))if(w.integer(n.quality)&&w.inRange(n.quality,1,100))this.options.tiffQuality=n.quality;else throw w.invalidParameterError("quality","integer between 1 and 100",n.quality);if(w.defined(n.bitdepth))if(w.integer(n.bitdepth)&&w.inArray(n.bitdepth,[1,2,4]))this.options.tiffBitdepth=n.bitdepth;else throw w.invalidParameterError("bitdepth","1, 2 or 4",n.bitdepth);if(w.defined(n.tile)&&this._setBooleanOption("tiffTile",n.tile),w.defined(n.tileWidth))if(w.integer(n.tileWidth)&&w.inRange(n.tileWidth,1,32768))this.options.tiffTileWidth=n.tileWidth;else throw w.invalidParameterError("tileWidth","integer between 1 and 32768",n.tileWidth);if(w.defined(n.tileHeight))if(w.integer(n.tileHeight)&&w.inRange(n.tileHeight,1,32768))this.options.tiffTileHeight=n.tileHeight;else throw w.invalidParameterError("tileHeight","integer between 1 and 32768",n.tileHeight);if(w.defined(n.miniswhite)&&this._setBooleanOption("tiffMiniswhite",n.miniswhite),w.defined(n.pyramid)&&this._setBooleanOption("tiffPyramid",n.pyramid),w.defined(n.xres))if(w.number(n.xres)&&w.inRange(n.xres,.001,1e6))this.options.tiffXres=n.xres;else throw w.invalidParameterError("xres","number between 0.001 and 1000000",n.xres);if(w.defined(n.yres))if(w.number(n.yres)&&w.inRange(n.yres,.001,1e6))this.options.tiffYres=n.yres;else throw w.invalidParameterError("yres","number between 0.001 and 1000000",n.yres);if(w.defined(n.compression))if(w.string(n.compression)&&w.inArray(n.compression,["none","jpeg","deflate","packbits","ccittfax4","lzw","webp","zstd","jp2k"]))this.options.tiffCompression=n.compression;else throw w.invalidParameterError("compression","one of: none, jpeg, deflate, packbits, ccittfax4, lzw, webp, zstd, jp2k",n.compression);if(w.defined(n.bigtiff)&&this._setBooleanOption("tiffBigtiff",n.bigtiff),w.defined(n.predictor))if(w.string(n.predictor)&&w.inArray(n.predictor,["none","horizontal","float"]))this.options.tiffPredictor=n.predictor;else throw w.invalidParameterError("predictor","one of: none, horizontal, float",n.predictor);if(w.defined(n.resolutionUnit))if(w.string(n.resolutionUnit)&&w.inArray(n.resolutionUnit,["inch","cm"]))this.options.tiffResolutionUnit=n.resolutionUnit;else throw w.invalidParameterError("resolutionUnit","one of: inch, cm",n.resolutionUnit)}return this._updateFormatOut("tiff",n)}function GPe(n){return this.heif({...n,compression:"av1"})}function FPe(n){if(w.object(n)){if(w.string(n.compression)&&w.inArray(n.compression,["av1","hevc"]))this.options.heifCompression=n.compression;else throw w.invalidParameterError("compression","one of: av1, hevc",n.compression);if(w.defined(n.quality))if(w.integer(n.quality)&&w.inRange(n.quality,1,100))this.options.heifQuality=n.quality;else throw w.invalidParameterError("quality","integer between 1 and 100",n.quality);if(w.defined(n.lossless))if(w.bool(n.lossless))this.options.heifLossless=n.lossless;else throw w.invalidParameterError("lossless","boolean",n.lossless);if(w.defined(n.effort))if(w.integer(n.effort)&&w.inRange(n.effort,0,9))this.options.heifEffort=n.effort;else throw w.invalidParameterError("effort","integer between 0 and 9",n.effort);if(w.defined(n.chromaSubsampling))if(w.string(n.chromaSubsampling)&&w.inArray(n.chromaSubsampling,["4:2:0","4:4:4"]))this.options.heifChromaSubsampling=n.chromaSubsampling;else throw w.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",n.chromaSubsampling);if(w.defined(n.bitdepth))if(w.integer(n.bitdepth)&&w.inArray(n.bitdepth,[8,10,12]))this.options.heifBitdepth=n.bitdepth;else throw w.invalidParameterError("bitdepth","8, 10 or 12",n.bitdepth);if(w.defined(n.tune))if(w.string(n.tune)&&w.inArray(n.tune,["auto","iq","psnr","ssim"]))this.options.heifLossless&&n.tune==="iq"?this.options.heifTune="ssim":this.options.heifTune=n.tune;else throw w.invalidParameterError("tune","one of: auto, iq, psnr, ssim",n.tune)}else throw w.invalidParameterError("options","Object",n);return this._updateFormatOut("heif",n)}function LPe(n){if(w.object(n)){if(w.defined(n.quality))if(w.integer(n.quality)&&w.inRange(n.quality,1,100))this.options.jxlDistance=n.quality>=30?.1+(100-n.quality)*.09:53/3e3*n.quality*n.quality-23/20*n.quality+25;else throw w.invalidParameterError("quality","integer between 1 and 100",n.quality);else if(w.defined(n.distance))if(w.number(n.distance)&&w.inRange(n.distance,0,15))this.options.jxlDistance=n.distance;else throw w.invalidParameterError("distance","number between 0.0 and 15.0",n.distance);if(w.defined(n.decodingTier))if(w.integer(n.decodingTier)&&w.inRange(n.decodingTier,0,4))this.options.jxlDecodingTier=n.decodingTier;else throw w.invalidParameterError("decodingTier","integer between 0 and 4",n.decodingTier);if(w.defined(n.lossless))if(w.bool(n.lossless))this.options.jxlLossless=n.lossless;else throw w.invalidParameterError("lossless","boolean",n.lossless);if(w.defined(n.effort))if(w.integer(n.effort)&&w.inRange(n.effort,1,9))this.options.jxlEffort=n.effort;else throw w.invalidParameterError("effort","integer between 1 and 9",n.effort)}return Yv(n,this.options),this._updateFormatOut("jxl",n)}function UPe(n){if(w.object(n)&&w.defined(n.depth))if(w.string(n.depth)&&w.inArray(n.depth,["char","uchar","short","ushort","int","uint","float","complex","double","dpcomplex"]))this.options.rawDepth=n.depth;else throw w.invalidParameterError("depth","one of: char, uchar, short, ushort, int, uint, float, complex, double, dpcomplex",n.depth);return this._updateFormatOut("raw")}function HPe(n){if(w.object(n)){if(w.defined(n.size))if(w.integer(n.size)&&w.inRange(n.size,1,8192))this.options.tileSize=n.size;else throw w.invalidParameterError("size","integer between 1 and 8192",n.size);if(w.defined(n.overlap))if(w.integer(n.overlap)&&w.inRange(n.overlap,0,8192)){if(n.overlap>this.options.tileSize)throw w.invalidParameterError("overlap",`<= size (${this.options.tileSize})`,n.overlap);this.options.tileOverlap=n.overlap}else throw w.invalidParameterError("overlap","integer between 0 and 8192",n.overlap);if(w.defined(n.container))if(w.string(n.container)&&w.inArray(n.container,["fs","zip"]))this.options.tileContainer=n.container;else throw w.invalidParameterError("container","one of: fs, zip",n.container);if(w.defined(n.layout))if(w.string(n.layout)&&w.inArray(n.layout,["dz","google","iiif","iiif3","zoomify"]))this.options.tileLayout=n.layout;else throw w.invalidParameterError("layout","one of: dz, google, iiif, iiif3, zoomify",n.layout);if(w.defined(n.angle))if(w.integer(n.angle)&&!(n.angle%90))this.options.tileAngle=n.angle;else throw w.invalidParameterError("angle","positive/negative multiple of 90",n.angle);if(this._setBackgroundColourOption("tileBackground",n.background),w.defined(n.depth))if(w.string(n.depth)&&w.inArray(n.depth,["onepixel","onetile","one"]))this.options.tileDepth=n.depth;else throw w.invalidParameterError("depth","one of: onepixel, onetile, one",n.depth);if(w.defined(n.skipBlanks))if(w.integer(n.skipBlanks)&&w.inRange(n.skipBlanks,-1,65535))this.options.tileSkipBlanks=n.skipBlanks;else throw w.invalidParameterError("skipBlanks","integer between -1 and 255/65535",n.skipBlanks);else w.defined(n.layout)&&n.layout==="google"&&(this.options.tileSkipBlanks=5);let r=w.bool(n.center)?n.center:n.centre;if(w.defined(r)&&this._setBooleanOption("tileCentre",r),w.defined(n.id))if(w.string(n.id))this.options.tileId=n.id;else throw w.invalidParameterError("id","string",n.id);if(w.defined(n.basename))if(w.string(n.basename))this.options.tileBasename=n.basename;else throw w.invalidParameterError("basename","string",n.basename)}if(w.inArray(this.options.formatOut,["jpeg","png","webp"]))this.options.tileFormat=this.options.formatOut;else if(this.options.formatOut!=="input")throw w.invalidParameterError("format","one of: jpeg, png, webp",this.options.formatOut);return this._updateFormatOut("dz")}function KPe(n){if(!w.plainObject(n))throw w.invalidParameterError("options","object",n);if(w.integer(n.seconds)&&w.inRange(n.seconds,0,3600))this.options.timeoutSeconds=n.seconds;else throw w.invalidParameterError("seconds","integer between 0 and 3600",n.seconds);return this}function YPe(n,r){return w.object(r)&&r.force===!1||(this.options.formatOut=n),this}function xPe(n,r){if(w.bool(r))this.options[n]=r;else throw w.invalidParameterError(n,"boolean",r)}function jPe(){if(!this.options.streamOut){this.options.streamOut=!0;let n=Error();this._pipeline(void 0,n)}}function JPe(n,r){return typeof n=="function"?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),dt.pipeline(this.options,(o,i,e)=>{o?n(w.nativeError(o,r)):n(null,i,e)})}):dt.pipeline(this.options,(o,i,e)=>{o?n(w.nativeError(o,r)):n(null,i,e)}),this):this.options.streamOut?(this._isStreamInput()?(this.once("finish",()=>{this._flattenBufferIn(),dt.pipeline(this.options,(o,i,e)=>{o?this.emit("error",w.nativeError(o,r)):(this.emit("info",e),this.push(i)),this.push(null),this.on("end",()=>this.emit("close"))})}),this.streamInFinished&&this.emit("finish")):dt.pipeline(this.options,(o,i,e)=>{o?this.emit("error",w.nativeError(o,r)):(this.emit("info",e),this.push(i)),this.push(null),this.on("end",()=>this.emit("close"))}),this):this._isStreamInput()?new Promise((o,i)=>{this.once("finish",()=>{this._flattenBufferIn(),dt.pipeline(this.options,(e,a,A)=>{e?i(w.nativeError(e,r)):this.options.resolveWithObject?o({data:a,info:A}):o(a)})})}):new Promise((o,i)=>{dt.pipeline(this.options,(e,a,A)=>{e?i(w.nativeError(e,r)):this.options.resolveWithObject?o({data:a,info:A}):o(a)})})}var CZ,EPe,hZ,dZ,uZ,BZ=le(()=>{yn();wd();CZ=new Map([["heic","heif"],["heif","heif"],["avif","avif"],["jpeg","jpeg"],["jpg","jpeg"],["jpe","jpeg"],["tile","tile"],["dz","tile"],["png","png"],["raw","raw"],["tiff","tiff"],["tif","tiff"],["webp","webp"],["gif","gif"],["jp2","jp2"],["jpx","jp2"],["j2k","jp2"],["j2c","jp2"],["jxl","jxl"]]),EPe=/\.(jp[2x]|j2[kc])$/i,hZ=()=>new Error("JP2 output requires libvips with support for OpenJPEG"),dZ=n=>1<<31-Math.clz32(Math.ceil(Math.log2(n)));uZ=n=>{Object.assign(n.prototype,{toFile:CPe,toBuffer:hPe,toUint8Array:dPe,withDensity:uPe,keepExif:BPe,withExif:fPe,withExifMerge:QPe,keepIccProfile:yPe,withIccProfile:mPe,keepGainMap:SPe,withGainMap:DPe,keepXmp:wPe,withXmp:OPe,keepMetadata:bPe,withMetadata:MPe,toFormat:_Pe,jpeg:NPe,jp2:vPe,png:TPe,webp:RPe,tiff:PPe,avif:GPe,heif:FPe,jxl:LPe,gif:kPe,raw:UPe,tile:HPe,timeout:KPe,_updateFormatOut:YPe,_setBooleanOption:xPe,_read:jPe,_pipeline:JPe})}});import qPe from"node:events";import{createRequire as VPe}from"node:module";import{availableParallelism as zPe}from"node:os";function QZ(n){if(w.bool(n))return n?dt.cache(50,20,100):dt.cache(0,0,0);if(w.object(n)){for(let r of["memory","files","items"]){let o=n[r];if(w.defined(o)&&!(w.integer(o)&&o>=0))throw w.invalidParameterError(r,"a positive integer",o)}return dt.cache(n.memory,n.files,n.items)}else return dt.cache()}function ZPe(n){return dt.concurrency(w.integer(n)?n:null)}function $Pe(){return dt.counters()}function eGe(n){return dt.simd(w.bool(n)?n:null)}function AGe(n){if(w.object(n))if(Array.isArray(n.operation)&&n.operation.every(w.string))dt.block(n.operation,!0);else throw w.invalidParameterError("operation","Array",n.operation);else throw w.invalidParameterError("options","object",n)}function tGe(n){if(w.object(n))if(Array.isArray(n.operation)&&n.operation.every(w.string))dt.block(n.operation,!1);else throw w.invalidParameterError("operation","Array",n.operation);else throw w.invalidParameterError("options","object",n)}var Od,xv,fZ,jv,vg,WPe,Lp,XPe,yZ,mZ=le(()=>{Od=Je(Ym(),1);yn();Tv();wd();tS();xv=VPe(import.meta.url),fZ=rS.runtimePlatformArch(),jv=dt.libvipsVersion(),vg=dt.format();vg.heif.output.alias=["avif","heic"];vg.jpeg.output.alias=["jpe","jpg"];vg.tiff.output.alias=["tif"];vg.jp2.output.alias=["j2c","j2k","jp2","jpx"];WPe={nearest:"nearest",bilinear:"bilinear",bicubic:"bicubic",locallyBoundedBicubic:"lbb",nohalo:"nohalo",vertexSplitQuadraticBasisSpline:"vsqbs"},Lp={vips:jv.semver};if(!jv.isGlobal)if(jv.isWasm)try{Lp=xv("@img/sharp-wasm32/versions")}catch{}else try{Lp=xv(`@img/sharp-${fZ}/versions`)}catch{try{Lp=xv(`@img/sharp-libvips-${fZ}/versions`)}catch{}}Lp.sharp=Os.version;Lp.heif&&vg.heif&&(vg.heif.input.fileSuffix=[".avif"],vg.heif.output.alias=["avif"]);QZ(!0);!process.env.MALLOC_ARENA_MAX&&Od.default.familySync()===Od.default.GLIBC&&!dt._isUsingJemalloc()?dt.concurrency(1):Od.default.familySync()===Od.default.MUSL&&dt.concurrency()===1024&&dt.concurrency(zPe());XPe=new qPe.EventEmitter;yZ=n=>{n.cache=QZ,n.concurrency=ZPe,n.counters=$Pe,n.simd=eGe,n.format=vg,n.interpolators=WPe,n.versions=Lp,n.queue=XPe,n.block=AGe,n.unblock=tGe}});var SZ={};Qr(SZ,{default:()=>rGe});var rGe,DZ=le(()=>{L5();K5();V5();W5();$5();lZ();EZ();BZ();mZ();H5(On);q5(On);z5(On);X5(On);IZ(On);pZ(On);uZ(On);yZ(On);rGe=On});var aGe,NA,Pg,bd=le(()=>{aGe="End-Of-Stream",NA=class extends Error{constructor(){super(aGe),this.name="EndOfStreamError"}},Pg=class extends Error{constructor(r="The operation was aborted"){super(r),this.name="AbortError"}}});var nS,wZ=le(()=>{nS=class{constructor(){this.resolve=()=>null,this.reject=()=>null,this.promise=new Promise((r,o)=>{this.reject=o,this.resolve=r})}}});var Gg,sS=le(()=>{bd();Gg=class{constructor(){this.endOfStream=!1,this.interrupted=!1,this.peekQueue=[]}async peek(r,o=!1){let i=await this.read(r,o);return this.peekQueue.push(r.subarray(0,i)),i}async read(r,o=!1){if(r.length===0)return 0;let i=this.readFromPeekBuffer(r);if(this.endOfStream||(i+=await this.readRemainderFromStream(r.subarray(i),o)),i===0&&!o)throw new NA;return i}readFromPeekBuffer(r){let o=r.length,i=0;for(;this.peekQueue.length>0&&o>0;){let e=this.peekQueue.pop();if(!e)throw new Error("peekData should be defined");let a=Math.min(e.length,o);r.set(e.subarray(0,a),i),i+=a,o-=a,a{bd();wZ();sS();Md=class extends Gg{constructor(r){if(super(),this.s=r,this.deferred=null,!r.read||!r.once)throw new Error("Expected an instance of stream.Readable");this.s.once("end",()=>{this.endOfStream=!0,this.deferred&&this.deferred.resolve(0)}),this.s.once("error",o=>this.reject(o)),this.s.once("close",()=>this.abort())}async readFromStream(r,o){if(r.length===0)return 0;let i=this.s.read(r.length);if(i)return r.set(i),i.length;let e={buffer:r,mayBeLess:o,deferred:new nS};return this.deferred=e.deferred,this.s.once("readable",()=>{this.readDeferred(e)}),e.deferred.promise}readDeferred(r){let o=this.s.read(r.buffer.length);o?(r.buffer.set(o),r.deferred.resolve(o.length),this.deferred=null):this.s.once("readable",()=>{this.readDeferred(r)})}reject(r){this.interrupted=!0,this.deferred&&(this.deferred.reject(r),this.deferred=null)}async abort(){this.reject(new Pg)}async close(){return this.abort()}}});var gS,bZ=le(()=>{sS();gS=class extends Gg{constructor(r){super(),this.reader=r}async abort(){return this.close()}async close(){this.reader.releaseLock()}}});var _d,Jv=le(()=>{bZ();_d=class extends gS{async readFromStream(r,o){if(r.length===0)return 0;let i=await this.reader.read(new Uint8Array(r.length),{min:o?void 0:r.length});return i.done&&(this.endOfStream=i.done),i.value?(r.set(i.value),i.value.length):0}}});var Up,qv=le(()=>{bd();sS();Up=class extends Gg{constructor(r){super(),this.reader=r,this.buffer=null}writeChunk(r,o){let i=Math.min(o.length,r.length);return r.set(o.subarray(0,i)),i{Jv();qv()});var Fg=le(()=>{bd();OZ();Jv();qv();MZ()});var qo,Hp=le(()=>{Fg();qo=class{constructor(r){this.numBuffer=new Uint8Array(8),this.position=0,this.onClose=r?.onClose,r?.abortSignal&&r.abortSignal.addEventListener("abort",()=>{this.abort()})}async readToken(r,o=this.position){let i=new Uint8Array(r.len);if(await this.readBuffer(i,{position:o})o)return this.position+=o,o}return this.position+=r,r}async close(){await this.abort(),await this.onClose?.()}normalizeOptions(r,o){if(!this.supportsRandomAccess()&&o&&o.position!==void 0&&o.position{Hp();Fg();iGe=256e3,Nd=class extends qo{constructor(r,o){super(o),this.streamReader=r,this.fileInfo=o?.fileInfo??{}}async readBuffer(r,o){let i=this.normalizeOptions(r,o),e=i.position-this.position;if(e>0)return await this.ignore(e),this.readBuffer(r,o);if(e<0)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");if(i.length===0)return 0;let a=await this.streamReader.read(r.subarray(0,i.length),i.mayBeLess);if(this.position+=a,(!o||!o.mayBeLess)&&a0){let A=new Uint8Array(i.length+a);return e=await this.peekBuffer(A,{mayBeLess:i.mayBeLess}),r.set(A.subarray(a)),e-a}if(a<0)throw new Error("Cannot peek from a negative offset in a stream")}if(i.length>0){try{e=await this.streamReader.peek(r.subarray(0,i.length),i.mayBeLess)}catch(a){if(o?.mayBeLess&&a instanceof NA)return 0;throw a}if(!i.mayBeLess&&e{Fg();Hp();cS=class extends qo{constructor(r,o){super(o),this.uint8Array=r,this.fileInfo={...o?.fileInfo??{},size:r.length}}async readBuffer(r,o){o?.position&&(this.position=o.position);let i=await this.peekBuffer(r,o);return this.position+=i,i}async peekBuffer(r,o){let i=this.normalizeOptions(r,o),e=Math.min(this.uint8Array.length-i.position,i.length);if(!i.mayBeLess&&e{Fg();Hp();IS=class extends qo{constructor(r,o){super(o),this.blob=r,this.fileInfo={...o?.fileInfo??{},size:r.size,mimeType:r.type}}async readBuffer(r,o){o?.position&&(this.position=o.position);let i=await this.peekBuffer(r,o);return this.position+=i,i}async peekBuffer(r,o){let i=this.normalizeOptions(r,o),e=Math.min(this.blob.size-i.position,i.length);if(!i.mayBeLess&&e{if(await o.close(),e)return e()},new Nd(o,i)}function lS(n,r){let o=Vv(n),i=r??{},e=i.onClose;return i.onClose=async()=>{if(await o.close(),e)return e()},new Nd(o,i)}function Mi(n,r){return new cS(n,r)}function pS(n,r){return new IS(n,r)}var ES=le(()=>{Fg();_Z();NZ();TZ();Fg();Hp()});import{open as nGe}from"node:fs/promises";var Kp,zv=le(()=>{Hp();Fg();Kp=class n extends qo{static async fromFile(r){let o=await nGe(r,"r"),i=await o.stat();return new n(o,{fileInfo:{path:r,size:i.size}})}constructor(r,o){super(o),this.fileHandle=r,this.fileInfo=o.fileInfo}async readBuffer(r,o){let i=this.normalizeOptions(r,o);if(this.position=i.position,i.length===0)return 0;let e=await this.fileHandle.read(r,0,i.length,i.position);if(this.position+=e.bytesRead,e.bytesRead{ES();zv();zv();ES();kZ=Kp.fromFile});var vZ=W(Zv=>{Zv.read=function(n,r,o,i,e){var a,A,t=e*8-i-1,s=(1<>1,c=-7,I=o?e-1:0,E=o?-1:1,B=n[r+I];for(I+=E,a=B&(1<<-c)-1,B>>=-c,c+=t;c>0;a=a*256+n[r+I],I+=E,c-=8);for(A=a&(1<<-c)-1,a>>=-c,c+=i;c>0;A=A*256+n[r+I],I+=E,c-=8);if(a===0)a=1-g;else{if(a===s)return A?NaN:(B?-1:1)*(1/0);A=A+Math.pow(2,i),a=a-g}return(B?-1:1)*A*Math.pow(2,a-i)};Zv.write=function(n,r,o,i,e,a){var A,t,s,g=a*8-e-1,c=(1<>1,E=e===23?Math.pow(2,-24)-Math.pow(2,-77):0,B=i?0:a-1,f=i?1:-1,Q=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(t=isNaN(r)?1:0,A=c):(A=Math.floor(Math.log(r)/Math.LN2),r*(s=Math.pow(2,-A))<1&&(A--,s*=2),A+I>=1?r+=E/s:r+=E*Math.pow(2,1-I),r*s>=2&&(A++,s/=2),A+I>=c?(t=0,A=c):A+I>=1?(t=(r*s-1)*Math.pow(2,e),A=A+I):(t=r*Math.pow(2,I-1)*Math.pow(2,e),A=0));e>=8;n[o+B]=t&255,B+=f,t/=256,e-=8);for(A=A<0;n[o+B]=A&255,B+=f,A/=256,g-=8);n[o+B-f]|=Q*128}});function gGe(){if(!(typeof globalThis.TextDecoder>"u"))return CS??(CS=new globalThis.TextDecoder("utf-8"))}function cGe(){if(!(typeof globalThis.TextEncoder>"u"))return hS??(hS=new globalThis.TextEncoder)}function lr(n,r="utf-8"){switch(r.toLowerCase()){case"utf-8":case"utf8":{let o=gGe();return o?o.decode(n):lGe(n)}case"utf-16le":return pGe(n);case"us-ascii":case"ascii":return EGe(n);case"latin1":case"iso-8859-1":return CGe(n);case"windows-1252":return hGe(n);default:throw new RangeError(`Encoding '${r}' not supported`)}}function GZ(n="",r="utf-8"){switch(r.toLowerCase()){case"utf-8":case"utf8":{let o=cGe();return o?o.encode(n):dGe(n)}case"utf-16le":return uGe(n);case"us-ascii":case"ascii":return BGe(n);case"latin1":case"iso-8859-1":return fGe(n);case"windows-1252":return QGe(n);default:throw new RangeError(`Encoding '${r}' not supported`)}}function $v(n,r){r.length!==0&&(n.push(String.fromCharCode.apply(null,r)),r.length=0)}function ur(n,r,o){r.push(o),r.length>=Yp&&$v(n,r)}function IGe(n,r,o){if(o<=65535){ur(n,r,o);return}o-=65536,ur(n,r,55296+(o>>10)),ur(n,r,56320+(o&1023))}function lGe(n){let r=[],o=[],i=0;for(n.length>=3&&n[0]===239&&n[1]===187&&n[2]===191&&(i=3);i244){ur(r,o,ia),i++;continue}if(e<=223){if(i+1>=n.length){ur(r,o,ia),i++;continue}let c=n[i+1];if((c&192)!==128){ur(r,o,ia),i++;continue}let I=(e&31)<<6|c&63;ur(r,o,I),i+=2;continue}if(e<=239){if(i+2>=n.length){ur(r,o,ia),i++;continue}let c=n[i+1],I=n[i+2];if(!((c&192)===128&&(I&192)===128&&!(e===224&&c<160)&&!(e===237&&c>=160))){ur(r,o,ia),i++;continue}let B=(e&15)<<12|(c&63)<<6|I&63;ur(r,o,B),i+=3;continue}if(i+3>=n.length){ur(r,o,ia),i++;continue}let a=n[i+1],A=n[i+2],t=n[i+3];if(!((a&192)===128&&(A&192)===128&&(t&192)===128&&!(e===240&&a<144)&&!(e===244&&a>143))){ur(r,o,ia),i++;continue}let g=(e&7)<<18|(a&63)<<12|(A&63)<<6|t&63;IGe(r,o,g),i+=4}return $v(r,o),r.join("")}function pGe(n){let r=[],o=[],i=n.length,e=0;for(;e+1=55296&&a<=56319){if(e+1=56320&&A<=57343?(ur(r,o,a),ur(r,o,A),e+=2):ur(r,o,ia)}else ur(r,o,ia);continue}if(a>=56320&&a<=57343){ur(r,o,ia);continue}ur(r,o,a)}return e=128&&e<=159?PZ[e]:void 0;o+=a??String.fromCharCode(e),o.length>=Yp&&(r.push(o),o="")}return o&&r.push(o),r.join("")}function dGe(n){let r=[];for(let o=0;o=55296&&i<=56319)if(o+1=56320&&e<=57343?(i=65536+(i-55296<<10)+(e-56320),o++):i=ia}else i=ia;else i>=56320&&i<=57343&&(i=ia);i<128?r.push(i):i<2048?r.push(192|i>>6,128|i&63):i<65536?r.push(224|i>>12,128|i>>6&63,128|i&63):r.push(240|i>>18,128|i>>12&63,128|i>>6&63,128|i&63)}return new Uint8Array(r)}function uGe(n){let r=[];for(let i=0;i=55296&&e<=56319){if(i+1=56320&&a<=57343?(r.push(e,a),i++):r.push(ia)}else r.push(ia);continue}if(e>=56320&&e<=57343){r.push(ia);continue}r.push(e)}let o=new Uint8Array(r.length*2);for(let i=0;i>>8}return o}function BGe(n){let r=new Uint8Array(n.length);for(let o=0;o=0&&e<=127||e>=160&&e<=255){r[o]=e;continue}r[o]=63}return r}var PZ,Xv,CS,hS,Yp,ia,Mn=le(()=>{PZ={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"},Xv={};for(let[n,r]of Object.entries(PZ))Xv[r]=Number.parseInt(n,10);Yp=32*1024,ia=65533});var JA={};Qr(JA,{AnsiStringType:()=>AP,Float16_BE:()=>SGe,Float16_LE:()=>DGe,Float32_BE:()=>rP,Float32_LE:()=>wGe,Float64_BE:()=>uS,Float64_LE:()=>OGe,Float80_BE:()=>bGe,Float80_LE:()=>MGe,INT16_BE:()=>co,INT16_LE:()=>yGe,INT24_BE:()=>dS,INT24_LE:()=>mGe,INT32_BE:()=>Pa,INT32_LE:()=>$t,INT64_BE:()=>tP,INT64_LE:()=>kd,INT8:()=>Nn,IgnoreType:()=>eP,StringType:()=>je,UINT16_BE:()=>PA,UINT16_LE:()=>yA,UINT24_BE:()=>Br,UINT24_LE:()=>Rd,UINT32_BE:()=>Ue,UINT32_LE:()=>ve,UINT64_BE:()=>Tn,UINT64_LE:()=>fr,UINT8:()=>uA,Uint8ArrayType:()=>ut});function jA(n){return new DataView(n.buffer,n.byteOffset)}var _n,uA,yA,PA,Rd,Br,ve,Ue,Nn,co,yGe,mGe,dS,Pa,$t,fr,kd,Tn,tP,SGe,DGe,rP,wGe,uS,OGe,bGe,MGe,eP,ut,je,AP,SA=le(()=>{_n=Je(vZ(),1);Mn();uA={len:1,get(n,r){return jA(n).getUint8(r)},put(n,r,o){return jA(n).setUint8(r,o),r+1}},yA={len:2,get(n,r){return jA(n).getUint16(r,!0)},put(n,r,o){return jA(n).setUint16(r,o,!0),r+2}},PA={len:2,get(n,r){return jA(n).getUint16(r)},put(n,r,o){return jA(n).setUint16(r,o),r+2}},Rd={len:3,get(n,r){let o=jA(n);return o.getUint8(r)+(o.getUint16(r+1,!0)<<8)},put(n,r,o){let i=jA(n);return i.setUint8(r,o&255),i.setUint16(r+1,o>>8,!0),r+3}},Br={len:3,get(n,r){let o=jA(n);return(o.getUint16(r)<<8)+o.getUint8(r+2)},put(n,r,o){let i=jA(n);return i.setUint16(r,o>>8),i.setUint8(r+2,o&255),r+3}},ve={len:4,get(n,r){return jA(n).getUint32(r,!0)},put(n,r,o){return jA(n).setUint32(r,o,!0),r+4}},Ue={len:4,get(n,r){return jA(n).getUint32(r)},put(n,r,o){return jA(n).setUint32(r,o),r+4}},Nn={len:1,get(n,r){return jA(n).getInt8(r)},put(n,r,o){return jA(n).setInt8(r,o),r+1}},co={len:2,get(n,r){return jA(n).getInt16(r)},put(n,r,o){return jA(n).setInt16(r,o),r+2}},yGe={len:2,get(n,r){return jA(n).getInt16(r,!0)},put(n,r,o){return jA(n).setInt16(r,o,!0),r+2}},mGe={len:3,get(n,r){let o=Rd.get(n,r);return o>8388607?o-16777216:o},put(n,r,o){let i=jA(n);return i.setUint8(r,o&255),i.setUint16(r+1,o>>8,!0),r+3}},dS={len:3,get(n,r){let o=Br.get(n,r);return o>8388607?o-16777216:o},put(n,r,o){let i=jA(n);return i.setUint16(r,o>>8),i.setUint8(r+2,o&255),r+3}},Pa={len:4,get(n,r){return jA(n).getInt32(r)},put(n,r,o){return jA(n).setInt32(r,o),r+4}},$t={len:4,get(n,r){return jA(n).getInt32(r,!0)},put(n,r,o){return jA(n).setInt32(r,o,!0),r+4}},fr={len:8,get(n,r){return jA(n).getBigUint64(r,!0)},put(n,r,o){return jA(n).setBigUint64(r,o,!0),r+8}},kd={len:8,get(n,r){return jA(n).getBigInt64(r,!0)},put(n,r,o){return jA(n).setBigInt64(r,o,!0),r+8}},Tn={len:8,get(n,r){return jA(n).getBigUint64(r)},put(n,r,o){return jA(n).setBigUint64(r,o),r+8}},tP={len:8,get(n,r){return jA(n).getBigInt64(r)},put(n,r,o){return jA(n).setBigInt64(r,o),r+8}},SGe={len:2,get(n,r){return _n.read(n,r,!1,10,this.len)},put(n,r,o){return _n.write(n,o,r,!1,10,this.len),r+this.len}},DGe={len:2,get(n,r){return _n.read(n,r,!0,10,this.len)},put(n,r,o){return _n.write(n,o,r,!0,10,this.len),r+this.len}},rP={len:4,get(n,r){return jA(n).getFloat32(r)},put(n,r,o){return jA(n).setFloat32(r,o),r+4}},wGe={len:4,get(n,r){return jA(n).getFloat32(r,!0)},put(n,r,o){return jA(n).setFloat32(r,o,!0),r+4}},uS={len:8,get(n,r){return jA(n).getFloat64(r)},put(n,r,o){return jA(n).setFloat64(r,o),r+8}},OGe={len:8,get(n,r){return jA(n).getFloat64(r,!0)},put(n,r,o){return jA(n).setFloat64(r,o,!0),r+8}},bGe={len:10,get(n,r){return _n.read(n,r,!1,63,this.len)},put(n,r,o){return _n.write(n,o,r,!1,63,this.len),r+this.len}},MGe={len:10,get(n,r){return _n.read(n,r,!0,63,this.len)},put(n,r,o){return _n.write(n,o,r,!0,63,this.len),r+this.len}},eP=class{constructor(r){this.len=r}get(r,o){}},ut=class{constructor(r){this.len=r}get(r,o){return r.subarray(o,o+this.len)}},je=class{constructor(r,o){this.len=r,this.encoding=o}get(r,o=0){let i=r.subarray(o,o+this.len);return lr(i,this.encoding)}},AP=class extends je{constructor(r){super(r,"windows-1252")}}});var gI,aP,FZ,LZ,UZ,HZ=le(()=>{SA();gI={LocalFileHeader:67324752,DataDescriptor:134695760,CentralFileHeader:33639248,EndOfCentralDirectory:101010256},aP={get(n){return{signature:ve.get(n,0),compressedSize:ve.get(n,8),uncompressedSize:ve.get(n,12)}},len:16},FZ={get(n){let r=yA.get(n,6);return{signature:ve.get(n,0),minVersion:yA.get(n,4),dataDescriptor:!!(r&8),compressedMethod:yA.get(n,8),compressedSize:ve.get(n,18),uncompressedSize:ve.get(n,22),filenameLength:yA.get(n,26),extraFieldLength:yA.get(n,28),filename:null}},len:30},LZ={get(n){return{signature:ve.get(n,0),nrOfThisDisk:yA.get(n,4),nrOfThisDiskWithTheStart:yA.get(n,6),nrOfEntriesOnThisDisk:yA.get(n,8),nrOfEntriesOfSize:yA.get(n,10),sizeOfCd:ve.get(n,12),offsetOfStartOfCd:ve.get(n,16),zipFileCommentLength:yA.get(n,20)}},len:22},UZ={get(n){let r=yA.get(n,8);return{signature:ve.get(n,0),minVersion:yA.get(n,6),dataDescriptor:!!(r&8),compressedMethod:yA.get(n,10),compressedSize:ve.get(n,20),uncompressedSize:ve.get(n,24),filenameLength:yA.get(n,28),extraFieldLength:yA.get(n,30),fileCommentLength:yA.get(n,32),relativeOffsetOfLocalHeader:ve.get(n,42),filename:null}},len:46}});function YZ(n){let r=new Uint8Array(ve.len);return ve.put(r,0,n),r}function NGe(n,r){let o=n.length,i=r.length;if(i>o)return-1;for(let e=0;e<=o-i;e++){let a=!0;for(let A=0;Ae+a.length,0),o=new Uint8Array(r),i=0;for(let e of n)o.set(e,i),i+=e.length;return o}var KZ,Rn,iP,_Ge,BS,cI,xZ=le(()=>{SA();KZ=Je(at(),1);HZ();Rn=(0,KZ.default)("tokenizer:inflate"),iP=256*1024,_Ge=YZ(gI.DataDescriptor),BS=YZ(gI.EndOfCentralDirectory),cI=class n{constructor(r){this.tokenizer=r,this.syncBuffer=new Uint8Array(iP)}async isZip(){return await this.peekSignature()===gI.LocalFileHeader}peekSignature(){return this.tokenizer.peekToken(ve)}async findEndOfCentralDirectoryLocator(){let r=this.tokenizer,o=Math.min(16*1024,r.fileInfo.size),i=this.syncBuffer.subarray(0,o);await this.tokenizer.readBuffer(i,{position:r.fileInfo.size-o});for(let e=i.length-4;e>=0;e--)if(i[e]===BS[0]&&i[e+1]===BS[1]&&i[e+2]===BS[2]&&i[e+3]===BS[3])return r.fileInfo.size-o+e;return-1}async readCentralDirectory(){if(!this.tokenizer.supportsRandomAccess()){Rn("Cannot reading central-directory without random-read support");return}Rn("Reading central-directory...");let r=this.tokenizer.position,o=await this.findEndOfCentralDirectoryLocator();if(o>0){Rn("Central-directory 32-bit signature found");let i=await this.tokenizer.readToken(LZ,o),e=[];this.tokenizer.setPosition(i.offsetOfStartOfCd);for(let a=0;a=0?g:s;if(a.handler){let I=new Uint8Array(c);await this.tokenizer.readBuffer(I),t.push(I)}else await this.tokenizer.ignore(c)}Rn(`Found data-descriptor-signature at pos=${this.tokenizer.position}`),a.handler&&await this.inflate(e,TGe(t),a.handler)}else a.handler?(Rn(`Reading compressed-file-data: ${e.compressedSize} bytes`),A=new Uint8Array(e.compressedSize),await this.tokenizer.readBuffer(A),await this.inflate(e,A,a.handler)):(Rn(`Ignoring compressed-file-data: ${e.compressedSize} bytes`),await this.tokenizer.ignore(e.compressedSize));if(Rn(`Reading data-descriptor at pos=${this.tokenizer.position}`),e.dataDescriptor&&(await this.tokenizer.readToken(aP)).signature!==134695760)throw new Error(`Expected data-descriptor-signature at position ${this.tokenizer.position-aP.len}`)}while(!i)}async iterateOverCentralDirectory(r,o){for(let i of r){let e=o(i);if(e.handler){this.tokenizer.setPosition(i.relativeOffsetOfLocalHeader);let a=await this.readLocalFileHeader();if(a){await this.tokenizer.ignore(a.extraFieldLength);let A=new Uint8Array(i.compressedSize);await this.tokenizer.readBuffer(A),await this.inflate(a,A,e.handler)}}if(e.stop)break}}async inflate(r,o,i){if(r.compressedMethod===0)return i(o);if(r.compressedMethod!==8)throw new Error(`Unsupported ZIP compression method: ${r.compressedMethod}`);Rn(`Decompress filename=${r.filename}, compressed-size=${o.length}`);let e=await n.decompressDeflateRaw(o);return i(e)}static async decompressDeflateRaw(r){let o=new ReadableStream({start(a){a.enqueue(r),a.close()}}),i=new DecompressionStream("deflate-raw"),e=o.pipeThrough(i);try{let A=await new Response(e).arrayBuffer();return new Uint8Array(A)}catch(a){let A=a instanceof Error?`Failed to deflate ZIP entry: ${a.message}`:"Unknown decompression error in ZIP entry";throw new TypeError(A)}}async readLocalFileHeader(){let r=await this.tokenizer.peekToken(ve);if(r===gI.LocalFileHeader){let o=await this.tokenizer.readToken(FZ);return o.filename=await this.tokenizer.readToken(new je(o.filenameLength,"utf-8")),o}if(r===gI.CentralFileHeader)return!1;throw r===3759263696?new Error("Encrypted ZIP"):new Error("Unexpected signature")}}});var vd,jZ=le(()=>{vd=class{constructor(r){this.tokenizer=r}inflate(){let r=this.tokenizer;return new ReadableStream({async pull(o){let i=new Uint8Array(1024),e=await r.readBuffer(i,{mayBeLess:!0});if(e===0){o.close();return}o.enqueue(i.subarray(0,e))}}).pipeThrough(new DecompressionStream("gzip"))}}});var JZ=le(()=>{xZ();jZ()});function vGe(n,r,o){return n?n.constructor===r?!0:RGe.call(n)===o:!1}function PGe(n){return vGe(n,Uint8Array,kGe)}function GGe(n){if(!PGe(n))throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof n}\``)}function fS(n){GGe(n);let r="";for(let o=0;o{RGe=Object.prototype.toString,kGe="[object Uint8Array]";SnA={utf8:new globalThis.TextDecoder("utf8")},DnA=new globalThis.TextEncoder,FGe=Array.from({length:256},(n,r)=>r.toString(16).padStart(2,"0"))});function qZ(n,r){if(r==="utf-16le"){let o=[];for(let i=0;i>8&255)}return o}if(r==="utf-16be"){let o=[];for(let i=0;i>8&255,e&255)}return o}return[...n].map(o=>o.charCodeAt(0))}function VZ(n,r=0){let o=Number.parseInt(new je(6).get(n,148).replace(/\0.*$/,"").trim(),8);if(Number.isNaN(o))return!1;let i=256;for(let e=r;e{SA();zZ={get:(n,r)=>n[r+3]&127|n[r+2]<<7|n[r+1]<<14|n[r]<<21,len:4}});var ZZ,XZ,$Z=le(()=>{ZZ=["jpg","png","apng","gif","webp","flif","xcf","cr2","cr3","orf","arw","dng","nef","rw2","raf","tif","bmp","icns","jxr","psd","indd","zip","tar","rar","gz","bz2","7z","dmg","mp4","mid","mkv","webm","mov","avi","mpg","mp2","mp3","m4a","oga","ogg","ogv","opus","flac","wav","spx","amr","pdf","epub","elf","macho","exe","swf","rtf","wasm","woff","woff2","eot","ttf","otf","ttc","ico","flv","ps","xz","sqlite","nes","crx","xpi","cab","deb","ar","rpm","Z","lz","cfb","mxf","mts","blend","bpg","docx","pptx","xlsx","3gp","3g2","j2c","jp2","jpm","jpx","mj2","aif","qcp","odt","ods","odp","xml","mobi","heic","cur","ktx","ape","wv","dcm","ics","glb","pcap","dsf","lnk","alias","voc","ac3","m4v","m4p","m4b","f4v","f4p","f4b","f4a","mie","asf","ogm","ogx","mpc","arrow","shp","aac","mp1","it","s3m","xm","skp","avif","eps","lzh","pgp","asar","stl","chm","3mf","zst","jxl","vcf","jls","pst","dwg","parquet","class","arj","cpio","ace","avro","icc","fbx","vsdx","vtt","apk","drc","lz4","potx","xltx","dotx","xltm","ott","ots","otp","odg","otg","xlsm","docm","dotm","potm","pptm","jar","jmp","rm","sav","ppsm","ppsx","tar.gz","reg","dat"],XZ=["image/jpeg","image/png","image/gif","image/webp","image/flif","image/x-xcf","image/x-canon-cr2","image/x-canon-cr3","image/tiff","image/bmp","image/vnd.ms-photo","image/vnd.adobe.photoshop","application/x-indesign","application/epub+zip","application/x-xpinstall","application/vnd.ms-powerpoint.slideshow.macroenabled.12","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/zip","application/x-tar","application/x-rar-compressed","application/gzip","application/x-bzip2","application/x-7z-compressed","application/x-apple-diskimage","application/vnd.apache.arrow.file","video/mp4","audio/midi","video/matroska","video/webm","video/quicktime","video/vnd.avi","audio/wav","audio/qcelp","audio/x-ms-asf","video/x-ms-asf","application/vnd.ms-asf","video/mpeg","video/3gpp","audio/mpeg","audio/mp4","video/ogg","audio/ogg","audio/ogg; codecs=opus","application/ogg","audio/flac","audio/ape","audio/wavpack","audio/amr","application/pdf","application/x-elf","application/x-mach-binary","application/x-msdownload","application/x-shockwave-flash","application/rtf","application/wasm","font/woff","font/woff2","application/vnd.ms-fontobject","font/ttf","font/otf","font/collection","image/x-icon","video/x-flv","application/postscript","application/eps","application/x-xz","application/x-sqlite3","application/x-nintendo-nes-rom","application/x-google-chrome-extension","application/vnd.ms-cab-compressed","application/x-deb","application/x-unix-archive","application/x-rpm","application/x-compress","application/x-lzip","application/x-cfb","application/x-mie","application/mxf","video/mp2t","application/x-blender","image/bpg","image/j2c","image/jp2","image/jpx","image/jpm","image/mj2","audio/aiff","application/xml","application/x-mobipocket-ebook","image/heif","image/heif-sequence","image/heic","image/heic-sequence","image/icns","image/ktx","application/dicom","audio/x-musepack","text/calendar","text/vcard","text/vtt","model/gltf-binary","application/vnd.tcpdump.pcap","audio/x-dsf","application/x.ms.shortcut","application/x.apple.alias","audio/x-voc","audio/vnd.dolby.dd-raw","audio/x-m4a","image/apng","image/x-olympus-orf","image/x-sony-arw","image/x-adobe-dng","image/x-nikon-nef","image/x-panasonic-rw2","image/x-fujifilm-raf","video/x-m4v","video/3gpp2","application/x-esri-shape","audio/aac","audio/x-it","audio/x-s3m","audio/x-xm","video/MP1S","video/MP2P","application/vnd.sketchup.skp","image/avif","application/x-lzh-compressed","application/pgp-encrypted","application/x-asar","model/stl","application/vnd.ms-htmlhelp","model/3mf","image/jxl","application/zstd","image/jls","application/vnd.ms-outlook","image/vnd.dwg","application/vnd.apache.parquet","application/java-vm","application/x-arj","application/x-cpio","application/x-ace-compressed","application/avro","application/vnd.iccprofile","application/x.autodesk.fbx","application/vnd.visio","application/vnd.android.package-archive","application/vnd.google.draco","application/x-lz4","application/vnd.openxmlformats-officedocument.presentationml.template","application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/vnd.ms-excel.template.macroenabled.12","application/vnd.oasis.opendocument.text-template","application/vnd.oasis.opendocument.spreadsheet-template","application/vnd.oasis.opendocument.presentation-template","application/vnd.oasis.opendocument.graphics","application/vnd.oasis.opendocument.graphics-template","application/vnd.ms-excel.sheet.macroenabled.12","application/vnd.ms-word.document.macroenabled.12","application/vnd.ms-word.template.macroenabled.12","application/vnd.ms-powerpoint.template.macroenabled.12","application/vnd.ms-powerpoint.presentation.macroenabled.12","application/java-archive","application/vnd.rn-realmedia","application/x-spss-sav","application/x-ms-regedit","application/x-ft-windows-registry-hive","application/x-jmp-data"]});function XGe(n){let r=n?.streamReader;if(r?.constructor?.name!=="WebStreamByobReader")return n;let{reader:o}=r,i=async()=>{await o.cancel(),o.releaseLock()};return r.close=i,r.abort=async()=>{r.interrupted=!0,await i()},n}function gP(n,r,o){if(!Number.isFinite(n)||n<0||n>r)throw new _s(`${o} has invalid size ${n} (maximum ${r} bytes)`);return n}async function Lg(n,r,{maximumLength:o=Io,reason:i="skip"}={}){let e=gP(r,o,i);await n.ignore(e)}async function nP(n,r,o,{maximumLength:i=r.length,reason:e="read"}={}){let a=o?.length??r.length,A=gP(a,i,e);return n.readBuffer(r,{...o,length:A})}async function $Ge(n,{maximumLength:r=vn}={}){let e=new ReadableStream({start(g){g.enqueue(n),g.close()}}).pipeThrough(new DecompressionStream("deflate-raw")).getReader(),a=[],A=0;try{for(;;){let{done:g,value:c}=await e.read();if(g)break;if(A+=c.length,A>r)throw await e.cancel(),new Error(`ZIP entry decompressed data exceeds ${r} bytes`);a.push(c)}}finally{e.releaseLock()}let t=new Uint8Array(A),s=0;for(let g of a)t.set(g,s),s+=g.length;return t}function AFe(n,r){if(n.length=0?0:t===e?Math.min(eFe,t-1):0,c=s>=0?s:t-g;if(c===0)break;if(A+=c,A>o)throw new Error(`ZIP entry compressed data exceeds ${o} bytes`);if(r){let I=new Uint8Array(c);await n.tokenizer.readBuffer(I),a.push(I)}else await n.tokenizer.ignore(c);if(s>=0)break}if(Ga(n.tokenizer)||(n.knownSizeDescriptorScannedBytes+=A),!!r)return rFe(a,A)}function iFe(n,r){return Ga(n.tokenizer)?Math.max(0,Io-(n.tokenizer.position-r)):Math.max(0,vn-n.knownSizeDescriptorScannedBytes)}async function oFe(n,r,{shouldBuffer:o,maximumDescriptorLength:i=vn}={}){if(r.dataDescriptor&&r.compressedSize===0)return aFe(n,{shouldBuffer:o,maximumLength:i});if(!o){await Lg(n.tokenizer,r.compressedSize,{maximumLength:Ga(n.tokenizer)?vn:n.tokenizer.fileInfo.size,reason:"ZIP entry compressed data"});return}let e=lFe(n.tokenizer);if(!Number.isFinite(r.compressedSize)||r.compressedSize<0||r.compressedSize>e)throw new Error(`ZIP entry compressed data exceeds ${e} bytes`);let a=new Uint8Array(r.compressedSize);return await n.tokenizer.readBuffer(a),a}function nFe(n,r){let o=n.getReader(),i=0,e=!1,a=!1,A=async t=>{e||a||(a=!0,await o.cancel(t))};return new ReadableStream({async pull(t){if(i>=r){t.close(),await A();return}let{done:s,value:g}=await o.read();if(s||!g){e=!0,t.close();return}let c=r-i;if(g.length>c){t.enqueue(g.subarray(0,c)),i+=c,t.close(),await A();return}t.enqueue(g),i+=g.length},async cancel(t){await A(t)}})}async function Ud(n,r){return new sP(r).fromBuffer(n)}function g9(n){switch(n=n.toLowerCase(),n){case"application/epub+zip":return{ext:"epub",mime:n};case"application/vnd.oasis.opendocument.text":return{ext:"odt",mime:n};case"application/vnd.oasis.opendocument.text-template":return{ext:"ott",mime:n};case"application/vnd.oasis.opendocument.spreadsheet":return{ext:"ods",mime:n};case"application/vnd.oasis.opendocument.spreadsheet-template":return{ext:"ots",mime:n};case"application/vnd.oasis.opendocument.presentation":return{ext:"odp",mime:n};case"application/vnd.oasis.opendocument.presentation-template":return{ext:"otp",mime:n};case"application/vnd.oasis.opendocument.graphics":return{ext:"odg",mime:n};case"application/vnd.oasis.opendocument.graphics-template":return{ext:"otg",mime:n};case"application/vnd.openxmlformats-officedocument.presentationml.slideshow":return{ext:"ppsx",mime:n};case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":return{ext:"xlsx",mime:n};case"application/vnd.ms-excel.sheet.macroenabled":return{ext:"xlsm",mime:"application/vnd.ms-excel.sheet.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.spreadsheetml.template":return{ext:"xltx",mime:n};case"application/vnd.ms-excel.template.macroenabled":return{ext:"xltm",mime:"application/vnd.ms-excel.template.macroenabled.12"};case"application/vnd.ms-powerpoint.slideshow.macroenabled":return{ext:"ppsm",mime:"application/vnd.ms-powerpoint.slideshow.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return{ext:"docx",mime:n};case"application/vnd.ms-word.document.macroenabled":return{ext:"docm",mime:"application/vnd.ms-word.document.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.template":return{ext:"dotx",mime:n};case"application/vnd.ms-word.template.macroenabledtemplate":return{ext:"dotm",mime:"application/vnd.ms-word.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.template":return{ext:"potx",mime:n};case"application/vnd.ms-powerpoint.template.macroenabled":return{ext:"potm",mime:"application/vnd.ms-powerpoint.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.presentation":return{ext:"pptx",mime:n};case"application/vnd.ms-powerpoint.presentation.macroenabled":return{ext:"pptm",mime:"application/vnd.ms-powerpoint.presentation.macroenabled.12"};case"application/vnd.ms-visio.drawing":return{ext:"vsdx",mime:"application/vnd.visio"};case"application/vnd.ms-package.3dmanufacturing-3dmodel+xml":return{ext:"3mf",mime:"model/3mf"};default:}}function kn(n,r,o){o={offset:0,...o};for(let[i,e]of r.entries())if(o.mask){if(e!==(o.mask[i]&n[i+o.offset]))return!1}else if(e!==n[i+o.offset])return!1;return!0}function sFe(n){return Number.isFinite(n)?Math.max(1,Math.trunc(n)):Fd}function gFe(n,r,o){return o===void 0?n.read(r):(o.throwIfAborted(),new Promise((i,e)=>{let a=()=>{o.removeEventListener("abort",A)},A=()=>{let t=o.reason;a(),(async()=>{try{await n.cancel(t)}catch{}})(),e(t)};o.addEventListener("abort",A,{once:!0}),(async()=>{try{let t=await n.read(r);a(),i(t)}catch(t){a(),e(t)}})()}))}function cFe(n){return Number.isFinite(n)?Math.max(0,Math.min(LGe,Math.trunc(n))):0}function IFe(n){return Number.isFinite(n)?Math.max(0,n):Number.MAX_SAFE_INTEGER}function Ga(n){let r=n.fileInfo.size;return!Number.isFinite(r)||r===Number.MAX_SAFE_INTEGER}function Ld(n,r,o){return Ga(n)&&n.position-r>o}function lFe(n){let r=n.fileInfo.size,o=Number.isFinite(r)?Math.max(0,r-n.position):Number.MAX_SAFE_INTEGER;return Math.min(o,UGe)}function pFe(n){if(n instanceof NA||n instanceof _s)return!0;if(!(n instanceof Error))return!1;if(zGe.has(n.message)||ZGe.has(n.code))return!0;for(let r of WGe)if(n.message.startsWith(r))return!0;return!1}function c9(n,r=vn){let o=[n.compressedSize,n.uncompressedSize];for(let i of o)if(!Number.isFinite(i)||i<0||i>r)return!1;return!0}function EFe(){return{hasContentTypesEntry:!1,hasParsedContentTypesEntry:!1,isParsingContentTypes:!1,hasUnparseableContentTypes:!1,hasWordDirectory:!1,hasPresentationDirectory:!1,hasSpreadsheetDirectory:!1,hasThreeDimensionalModelEntry:!1}}function CFe(n,r){r.startsWith("word/")&&(n.hasWordDirectory=!0),r.startsWith("ppt/")&&(n.hasPresentationDirectory=!0),r.startsWith("xl/")&&(n.hasSpreadsheetDirectory=!0),r.startsWith("3D/")&&r.endsWith(".model")&&(n.hasThreeDimensionalModelEntry=!0)}function I9(n){if(!(!n.hasContentTypesEntry||n.hasUnparseableContentTypes||n.isParsingContentTypes||n.hasParsedContentTypesEntry)){if(n.hasWordDirectory)return{ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};if(n.hasPresentationDirectory)return{ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};if(n.hasSpreadsheetDirectory)return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};if(n.hasThreeDimensionalModelEntry)return{ext:"3mf",mime:"model/3mf"}}}function hFe(n){let r=n.indexOf('.main+xml"');if(r===-1){let e="application/vnd.ms-package.3dmanufacturing-3dmodel+xml";return n.includes(`ContentType="${e}"`)?e:void 0}let o=n.slice(0,r),i=o.lastIndexOf('"');return o.slice(i+1)}var Fd,LGe,vn,e9,UGe,Io,yS,A9,HGe,KGe,t9,oP,r9,a9,YGe,xGe,jGe,JGe,qGe,i9,o9,n9,VGe,s9,zGe,WGe,ZGe,_s,l9,QS,eFe,sP,dFe,uFe,p9=le(()=>{SA();ES();JZ();Gd();WZ();$Z();Fd=4100,LGe=Fd-2,vn=1024*1024,e9=1024,UGe=2**31-1,Io=16*1024*1024,yS=vn,A9=vn,HGe=Io,KGe=1,t9=100,oP=Io,r9=64,a9=yS,YGe=256,xGe=512,jGe=Io,JGe=512,qGe=512,i9=256,o9=yS,n9=yS,VGe=yS,s9=Io,zGe=new Set(["Unexpected signature","Encrypted ZIP","Expected Central-File-Header signature"]),WGe=["ZIP entry count exceeds ","Unsupported ZIP compression method:","ZIP entry compressed data exceeds ","ZIP entry decompressed data exceeds ","Expected data-descriptor-signature at position "],ZGe=new Set(["Z_BUF_ERROR","Z_DATA_ERROR","ERR_INVALID_STATE"]),_s=class extends Error{};l9=134695760,QS=16,eFe=QS-1;cI.prototype.inflate=async function(n,r,o){if(n.compressedMethod===0)return o(r);if(n.compressedMethod!==8)throw new Error(`Unsupported ZIP compression method: ${n.compressedMethod}`);let i=await $Ge(r,{maximumLength:vn});return o(i)};cI.prototype.unzip=async function(n){let r=!1,o=0,i=this.tokenizer.position;this.knownSizeDescriptorScannedBytes=0;do{if(Ld(this.tokenizer,i,Io))throw new _s(`ZIP stream probing exceeds ${Io} bytes`);let e=await this.readLocalFileHeader();if(!e)break;if(o++,o>e9)throw new Error(`ZIP entry count exceeds ${e9}`);let a=n(e);r=!!a.stop,await this.tokenizer.ignore(e.extraFieldLength);let A=await oFe(this,e,{shouldBuffer:!!a.handler,maximumDescriptorLength:Math.min(vn,iFe(this,i))});if(a.handler&&await this.inflate(e,A,a.handler),e.dataDescriptor){let t=new Uint8Array(QS);if(await this.tokenizer.readBuffer(t),ve.get(t,0)!==l9)throw new Error(`Expected data-descriptor-signature at position ${this.tokenizer.position-t.length}`)}if(Ld(this.tokenizer,i,Io))throw new _s(`ZIP stream probing exceeds ${Io} bytes`)}while(!r)};sP=class n{constructor(r){let o=cFe(r?.mpegOffsetTolerance);this.options={...r,mpegOffsetTolerance:o},this.detectors=[...this.options.customDetectors??[],{id:"core",detect:this.detectConfident},{id:"core.imprecise",detect:this.detectImprecise}],this.tokenizerOptions={abortSignal:this.options.signal},this.gzipProbeDepth=0}getTokenizerOptions(){return{...this.tokenizerOptions}}createTokenizerFromWebStream(r){return XGe(lS(r,this.getTokenizerOptions()))}async parseTokenizer(r,o=0){this.detectionReentryCount=o;let i=r.position;for(let e of this.detectors){let a;try{a=await e.detect(r)}catch(A){if(A instanceof NA||A instanceof _s)return;throw A}if(a)return a;if(i!==r.position)return}}async fromTokenizer(r){try{return await this.parseTokenizer(r)}finally{await r.close()}}async fromBuffer(r){if(!(r instanceof Uint8Array||r instanceof ArrayBuffer))throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof r}\``);let o=r instanceof Uint8Array?r:new Uint8Array(r);if(o?.length>1)return this.fromTokenizer(Mi(o,this.getTokenizerOptions()))}async fromBlob(r){this.options.signal?.throwIfAborted();let o=pS(r,this.getTokenizerOptions());return this.fromTokenizer(o)}async fromStream(r){this.options.signal?.throwIfAborted();let o=this.createTokenizerFromWebStream(r);return this.fromTokenizer(o)}async toDetectionStream(r,o){let i=sFe(o?.sampleSize??Fd),e,a,A=r.getReader({mode:"byob"});try{let{value:g,done:c}=await gFe(A,new Uint8Array(i),this.options.signal);if(a=g,!c&&g)try{e=await this.fromBuffer(g.subarray(0,i))}catch(I){if(!(I instanceof NA))throw I;e=void 0}a=g}finally{A.releaseLock()}let t=new TransformStream({async start(g){g.enqueue(a)},transform(g,c){c.enqueue(g)}}),s=r.pipeThrough(t);return s.fileType=e,s}async detectGzip(r){if(this.gzipProbeDepth>=KGe)return{ext:"gz",mime:"application/gzip"};let o=new vd(r),i=nFe(o.inflate(),HGe),e=Ga(r),a,A,t,s;if(e){let g=new AbortController;a=setTimeout(()=>{g.abort(new DOMException(`Operation timed out after ${t9} ms`,"TimeoutError"))},t9),A=this.options.signal===void 0?g.signal:AbortSignal.any([this.options.signal,g.signal]),t=new n({...this.options,signal:A}),t.gzipProbeDepth=this.gzipProbeDepth+1}else this.gzipProbeDepth++;try{s=await(t??this).fromStream(i)}catch(g){if(g?.name==="AbortError"&&A?.reason?.name!=="TimeoutError")throw g}finally{clearTimeout(a),e||this.gzipProbeDepth--}return s?.ext==="tar"?{ext:"tar.gz",mime:"application/gzip"}:{ext:"gz",mime:"application/gzip"}}check(r,o){return kn(this.buffer,r,o)}checkString(r,o){return this.check(qZ(r,o?.encoding),o)}detectConfident=async r=>{if(this.buffer=new Uint8Array(Fd),r.fileInfo.size===void 0&&(r.fileInfo.size=Number.MAX_SAFE_INTEGER),this.tokenizer=r,Ga(r)&&(await r.peekBuffer(this.buffer,{length:3,mayBeLess:!0}),this.check([31,139,8])))return this.detectGzip(r);if(await r.peekBuffer(this.buffer,{length:32,mayBeLess:!0}),this.check([66,77]))return{ext:"bmp",mime:"image/bmp"};if(this.check([11,119]))return{ext:"ac3",mime:"audio/vnd.dolby.dd-raw"};if(this.check([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(this.check([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if(this.check([37,33]))return await r.peekBuffer(this.buffer,{length:24,mayBeLess:!0}),this.checkString("PS-Adobe-",{offset:2})&&this.checkString(" EPSF-",{offset:14})?{ext:"eps",mime:"application/eps"}:{ext:"ps",mime:"application/postscript"};if(this.check([31,160])||this.check([31,157]))return{ext:"Z",mime:"application/x-compress"};if(this.check([199,113]))return{ext:"cpio",mime:"application/x-cpio"};if(this.check([96,234]))return{ext:"arj",mime:"application/x-arj"};if(this.check([239,187,191]))return this.detectionReentryCount>=i9?void 0:(this.detectionReentryCount++,await this.tokenizer.ignore(3),this.detectConfident(r));if(this.check([71,73,70]))return{ext:"gif",mime:"image/gif"};if(this.check([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(this.check([31,139,8]))return this.detectGzip(r);if(this.check([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(this.checkString("ID3")){await Lg(r,6,{maximumLength:6,reason:"ID3 header prefix"});let o=await r.readToken(zZ),i=Ga(r);if(!Number.isFinite(o)||o<0||i&&(o>oP||r.position+o>oP))return;if(r.position+o>r.fileInfo.size)return i?void 0:{ext:"mp3",mime:"audio/mpeg"};try{await Lg(r,o,{maximumLength:i?oP:r.fileInfo.size,reason:"ID3 payload"})}catch(e){if(e instanceof NA)return;throw e}return this.detectionReentryCount>=i9?void 0:(this.detectionReentryCount++,this.parseTokenizer(r,this.detectionReentryCount))}if(this.checkString("MP+"))return{ext:"mpc",mime:"audio/x-musepack"};if((this.buffer[0]===67||this.buffer[0]===70)&&this.check([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(this.check([255,216,255]))return this.check([247],{offset:3})?{ext:"jls",mime:"image/jls"}:{ext:"jpg",mime:"image/jpeg"};if(this.check([79,98,106,1]))return{ext:"avro",mime:"application/avro"};if(this.checkString("FLIF"))return{ext:"flif",mime:"image/flif"};if(this.checkString("8BPS"))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(this.checkString("MPCK"))return{ext:"mpc",mime:"audio/x-musepack"};if(this.checkString("FORM"))return{ext:"aif",mime:"audio/aiff"};if(this.checkString("icns",{offset:0}))return{ext:"icns",mime:"image/icns"};if(this.check([80,75,3,4])){let o,i=EFe();try{await new cI(r).unzip(e=>{CFe(i,e.filename);let a=e.filename==="[Content_Types].xml",A=I9(i);if(!a&&A)return o=A,{stop:!0};switch(e.filename){case"META-INF/mozilla.rsa":return o={ext:"xpi",mime:"application/x-xpinstall"},{stop:!0};case"META-INF/MANIFEST.MF":return o={ext:"jar",mime:"application/java-archive"},{stop:!0};case"mimetype":return c9(e,A9)?{async handler(t){let s=new TextDecoder("utf-8").decode(t).trim();o=g9(s)},stop:!0}:{};case"[Content_Types].xml":return i.hasContentTypesEntry=!0,c9(e,A9)?(i.isParsingContentTypes=!0,{async handler(t){let s=new TextDecoder("utf-8").decode(t),g=hFe(s);g&&(o=g9(g)),i.hasParsedContentTypesEntry=!0,i.isParsingContentTypes=!1},stop:!0}):(i.hasUnparseableContentTypes=!0,{});default:return/classes\d*\.dex/.test(e.filename)?(o={ext:"apk",mime:"application/vnd.android.package-archive"},{stop:!0}):{}}})}catch(e){if(!pFe(e))throw e;i.isParsingContentTypes&&(i.isParsingContentTypes=!1,i.hasUnparseableContentTypes=!0)}return o??I9(i)??{ext:"zip",mime:"application/zip"}}if(this.checkString("OggS")){await r.ignore(28);let o=new Uint8Array(8);return await r.readBuffer(o),kn(o,[79,112,117,115,72,101,97,100])?{ext:"opus",mime:"audio/ogg; codecs=opus"}:kn(o,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:kn(o,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:kn(o,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:kn(o,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:kn(o,[1,118,111,114,98,105,115])?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"}}if(this.check([80,75])&&(this.buffer[2]===3||this.buffer[2]===5||this.buffer[2]===7)&&(this.buffer[3]===4||this.buffer[3]===6||this.buffer[3]===8))return{ext:"zip",mime:"application/zip"};if(this.checkString("MThd"))return{ext:"mid",mime:"audio/midi"};if(this.checkString("wOFF")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff",mime:"font/woff"};if(this.checkString("wOF2")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(this.check([212,195,178,161])||this.check([161,178,195,212]))return{ext:"pcap",mime:"application/vnd.tcpdump.pcap"};if(this.checkString("DSD "))return{ext:"dsf",mime:"audio/x-dsf"};if(this.checkString("LZIP"))return{ext:"lz",mime:"application/x-lzip"};if(this.checkString("fLaC"))return{ext:"flac",mime:"audio/flac"};if(this.check([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(this.checkString("wvpk"))return{ext:"wv",mime:"audio/wavpack"};if(this.checkString("%PDF"))return{ext:"pdf",mime:"application/pdf"};if(this.check([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(this.check([73,73])){let o=await this.readTiffHeader(!1);if(o)return o}if(this.check([77,77])){let o=await this.readTiffHeader(!0);if(o)return o}if(this.checkString("MAC "))return{ext:"ape",mime:"audio/ape"};if(this.check([26,69,223,163])){async function o(){let s=await r.peekNumber(uA),g=128,c=0;for(;(s&g)===0&&g!==0;)++c,g>>=1;let I=new Uint8Array(c+1);return await nP(r,I,void 0,{maximumLength:I.length,reason:"EBML field"}),I}async function i(){let s=await o(),g=await o();g[0]^=128>>g.length-1;let c=Math.min(6,g.length),I=new DataView(s.buffer),E=new DataView(g.buffer,g.length-c,c);return{id:Pd(I),len:Pd(E)}}async function e(s){let g=0;for(;s>0;){if(g++,g>YGe||Ld(r,A,Io))return;let c=r.position,I=await i();if(I.id===17026){if(I.len>r9)return;let E=gP(I.len,r9,"EBML DocType");return(await r.readToken(new je(E))).replaceAll(/\00.*$/g,"")}if(Ga(r)&&(!Number.isFinite(I.len)||I.len<0||I.len>a9)||(await Lg(r,I.len,{maximumLength:Ga(r)?a9:r.fileInfo.size,reason:"EBML payload"}),--s,r.position<=c))return}}let a=await i(),A=r.position;switch(await e(a.len)){case"webm":return{ext:"webm",mime:"video/webm"};case"matroska":return{ext:"mkv",mime:"video/matroska"};default:return}}if(this.checkString("SQLi"))return{ext:"sqlite",mime:"application/x-sqlite3"};if(this.check([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(this.checkString("Cr24"))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(this.checkString("MSCF")||this.checkString("ISc("))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(this.check([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(this.check([197,208,211,198]))return{ext:"eps",mime:"application/eps"};if(this.check([40,181,47,253]))return{ext:"zst",mime:"application/zstd"};if(this.check([127,69,76,70]))return{ext:"elf",mime:"application/x-elf"};if(this.check([33,66,68,78]))return{ext:"pst",mime:"application/vnd.ms-outlook"};if(this.checkString("PAR1")||this.checkString("PARE"))return{ext:"parquet",mime:"application/vnd.apache.parquet"};if(this.checkString("ttcf"))return{ext:"ttc",mime:"font/collection"};if(this.check([254,237,250,206])||this.check([254,237,250,207])||this.check([206,250,237,254])||this.check([207,250,237,254]))return{ext:"macho",mime:"application/x-mach-binary"};if(this.check([4,34,77,24]))return{ext:"lz4",mime:"application/x-lz4"};if(this.checkString("regf"))return{ext:"dat",mime:"application/x-ft-windows-registry-hive"};if(this.checkString("$FL2")||this.checkString("$FL3"))return{ext:"sav",mime:"application/x-spss-sav"};if(this.check([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(this.checkString("#!AMR"))return{ext:"amr",mime:"audio/amr"};if(this.checkString("{\\rtf"))return{ext:"rtf",mime:"application/rtf"};if(this.check([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(this.checkString("IMPM"))return{ext:"it",mime:"audio/x-it"};if(this.checkString("-lh0-",{offset:2})||this.checkString("-lh1-",{offset:2})||this.checkString("-lh2-",{offset:2})||this.checkString("-lh3-",{offset:2})||this.checkString("-lh4-",{offset:2})||this.checkString("-lh5-",{offset:2})||this.checkString("-lh6-",{offset:2})||this.checkString("-lh7-",{offset:2})||this.checkString("-lzs-",{offset:2})||this.checkString("-lz4-",{offset:2})||this.checkString("-lz5-",{offset:2})||this.checkString("-lhd-",{offset:2}))return{ext:"lzh",mime:"application/x-lzh-compressed"};if(this.check([0,0,1,186])){if(this.check([33],{offset:4,mask:[241]}))return{ext:"mpg",mime:"video/MP1S"};if(this.check([68],{offset:4,mask:[196]}))return{ext:"mpg",mime:"video/MP2P"}}if(this.checkString("ITSF"))return{ext:"chm",mime:"application/vnd.ms-htmlhelp"};if(this.check([202,254,186,190])){let o=Ue.get(this.buffer,4),i=PA.get(this.buffer,6);if(o>0&&o<=30)return{ext:"macho",mime:"application/x-mach-binary"};if(i>30)return{ext:"class",mime:"application/java-vm"}}if(this.checkString(".RMF"))return{ext:"rm",mime:"application/vnd.rn-realmedia"};if(this.checkString("DRACO"))return{ext:"drc",mime:"application/vnd.google.draco"};if(this.check([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(this.checkString("=1e3&&o<=1050)return{ext:"dwg",mime:"image/vnd.dwg"}}if(this.checkString("070707"))return{ext:"cpio",mime:"application/x-cpio"};if(this.checkString("BLENDER"))return{ext:"blend",mime:"application/x-blender"};if(this.checkString("!"))return await r.ignore(8),await r.readToken(new je(13,"ascii"))==="debian-binary"?{ext:"deb",mime:"application/x-deb"}:{ext:"ar",mime:"application/x-unix-archive"};if(this.checkString("WEBVTT")&&[` +`,"\r"," "," ","\0"].some(o=>this.checkString(o,{offset:6})))return{ext:"vtt",mime:"text/vtt"};if(this.check([137,80,78,71,13,10,26,10])){let o={ext:"png",mime:"image/png"},i={ext:"apng",mime:"image/apng"};await r.ignore(8);async function e(){return{length:await r.readToken(Pa),type:await r.readToken(new je(4,"latin1"))}}let a=Ga(r),A=r.position,t=0,s=!1;do{if(t++,t>xGe||Ld(r,A,jGe))break;let g=r.position,c=await e();if(c.length<0)return;if(c.type==="IHDR"){if(c.length!==13)return;s=!0}switch(c.type){case"IDAT":return o;case"acTL":return i;default:if(!s&&c.type!=="CgBI")return;if(a&&c.length>o9)return s&&tFe(c.type)?o:void 0;try{await Lg(r,c.length+4,{maximumLength:a?o9+4:r.fileInfo.size,reason:"PNG chunk payload"})}catch(I){if(!a&&(I instanceof _s||I instanceof NA))return o;throw I}}if(r.position<=g)break}while(r.position+8JGe||Ld(r,a,Io)));){let t=r.position,s=await i(),g=s.size-24;if(!Number.isFinite(g)||g<0){o=!0;break}if(kn(s.id,[145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101])){let c=new Uint8Array(16);if(g-=await nP(r,c,void 0,{maximumLength:c.length,reason:"ASF stream type GUID"}),kn(c,[64,158,105,248,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"audio/x-ms-asf"};if(kn(c,[192,239,25,188,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"video/x-ms-asf"};break}if(e&&g>n9){o=!0;break}if(await Lg(r,g,{maximumLength:e?n9:r.fileInfo.size,reason:"ASF header payload"}),r.position<=t){o=!0;break}}}catch(i){if(i instanceof NA||i instanceof _s)Ga(r)&&(o=!0);else throw i}return o?void 0:{ext:"asf",mime:"application/vnd.ms-asf"}}if(this.check([171,75,84,88,32,49,49,187,13,10,26,10]))return{ext:"ktx",mime:"image/ktx"};if((this.check([126,16,4])||this.check([126,24,4]))&&this.check([48,77,73,69],{offset:4}))return{ext:"mie",mime:"application/x-mie"};if(this.check([39,10,0,0,0,0,0,0,0,0,0,0],{offset:2}))return{ext:"shp",mime:"application/x-esri-shape"};if(this.check([255,79,255,81]))return{ext:"j2c",mime:"image/j2c"};if(this.check([0,0,0,12,106,80,32,32,13,10,135,10]))switch(await r.ignore(20),await r.readToken(new je(4,"ascii"))){case"jp2 ":return{ext:"jp2",mime:"image/jp2"};case"jpx ":return{ext:"jpx",mime:"image/jpx"};case"jpm ":return{ext:"jpm",mime:"image/jpm"};case"mjp2":return{ext:"mj2",mime:"image/mj2"};default:return}if(this.check([255,10])||this.check([0,0,0,12,74,88,76,32,13,10,135,10]))return{ext:"jxl",mime:"image/jxl"};if(this.check([254,255]))return this.checkString("=16){let o=new DataView(this.buffer.buffer).getUint32(12,!0);if(o>12&&this.buffer.length>=o+16)try{let i=new TextDecoder().decode(this.buffer.subarray(16,o+16));if(JSON.parse(i).files)return{ext:"asar",mime:"application/x-asar"}}catch{}}if(this.check([6,14,43,52,2,5,1,1,13,1,2,1,1,2]))return{ext:"mxf",mime:"application/mxf"};if(this.checkString("SCRM",{offset:44}))return{ext:"s3m",mime:"audio/x-s3m"};if(this.check([71])&&this.check([71],{offset:188}))return{ext:"mts",mime:"video/mp2t"};if(this.check([71],{offset:4})&&this.check([71],{offset:196}))return{ext:"mts",mime:"video/mp2t"};if(this.check([66,79,79,75,77,79,66,73],{offset:60}))return{ext:"mobi",mime:"application/x-mobipocket-ebook"};if(this.check([68,73,67,77],{offset:128}))return{ext:"dcm",mime:"application/dicom"};if(this.check([76,0,0,0,1,20,2,0,0,0,0,0,192,0,0,0,0,0,0,70]))return{ext:"lnk",mime:"application/x.ms.shortcut"};if(this.check([98,111,111,107,0,0,0,0,109,97,114,107,0,0,0,0]))return{ext:"alias",mime:"application/x.apple.alias"};if(this.checkString("Kaydara FBX Binary \0"))return{ext:"fbx",mime:"application/x.autodesk.fbx"};if(this.check([76,80],{offset:34})&&(this.check([0,0,1],{offset:8})||this.check([1,0,2],{offset:8})||this.check([2,0,2],{offset:8})))return{ext:"eot",mime:"application/vnd.ms-fontobject"};if(this.check([6,6,237,245,216,29,70,229,189,49,239,231,254,116,183,29]))return{ext:"indd",mime:"application/x-indesign"};if(this.check([255,255,0,0,7,0,0,0,4,0,0,0,1,0,1,0])||this.check([0,0,255,255,0,0,0,7,0,0,0,4,0,1,0,1]))return{ext:"jmp",mime:"application/x-jmp-data"};if(await r.peekBuffer(this.buffer,{length:Math.min(512,r.fileInfo.size),mayBeLess:!0}),this.checkString("ustar",{offset:257})&&(this.checkString("\0",{offset:262})||this.checkString(" ",{offset:262}))||this.check([0,0,0,0,0,0],{offset:257})&&VZ(this.buffer))return{ext:"tar",mime:"application/x-tar"};if(this.check([255,254])){let o="utf-16le";return this.checkString("{this.buffer=new Uint8Array(Fd);let o=IFe(r.fileInfo.size);if(await r.peekBuffer(this.buffer,{length:Math.min(8,o),mayBeLess:!0}),this.check([0,0,1,186])||this.check([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(this.check([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(this.check([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(this.check([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(await r.peekBuffer(this.buffer,{length:Math.min(2+this.options.mpegOffsetTolerance,o),mayBeLess:!0}),this.buffer.length>=2+this.options.mpegOffsetTolerance)for(let i=0;i<=this.options.mpegOffsetTolerance;++i){let e=this.scanMpeg(i);if(e)return e}};async readTiffTag(r){let o=await this.tokenizer.readToken(r?PA:yA);switch(await this.tokenizer.ignore(10),o){case 50341:return{ext:"arw",mime:"image/x-sony-arw"};case 50706:return{ext:"dng",mime:"image/x-adobe-dng"};default:}}async readTiffIFD(r){let o=await this.tokenizer.readToken(r?PA:yA);if(!(o>qGe)&&!(Ga(this.tokenizer)&&2+o*12>s9))for(let i=0;i=6){if(this.checkString("CR",{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(e>=8){let t=(r?PA:yA).get(this.buffer,8),s=(r?PA:yA).get(this.buffer,10);if(t===28&&s===254||t===31&&s===11)return{ext:"nef",mime:"image/x-nikon-nef"}}}if(Ga(this.tokenizer)&&e>VGe)return o;let a=Ga(this.tokenizer)?s9:this.tokenizer.fileInfo.size;try{await Lg(this.tokenizer,e,{maximumLength:a,reason:"TIFF IFD offset"})}catch(t){if(t instanceof NA)return;throw t}let A;try{A=await this.readTiffIFD(r)}catch(t){if(t instanceof NA)return;throw t}return A??o}if(i===43)return o}scanMpeg(r){if(this.check([255,224],{offset:r,mask:[255,224]})){if(this.check([16],{offset:r+1,mask:[22]}))return this.check([8],{offset:r+1,mask:[8]})?{ext:"aac",mime:"audio/aac"}:{ext:"aac",mime:"audio/aac"};if(this.check([2],{offset:r+1,mask:[6]}))return{ext:"mp3",mime:"audio/mpeg"};if(this.check([4],{offset:r+1,mask:[6]}))return{ext:"mp2",mime:"audio/mpeg"};if(this.check([6],{offset:r+1,mask:[6]}))return{ext:"mp1",mime:"audio/mpeg"}}}},dFe=new Set(ZZ),uFe=new Set(XZ)});var cP=le(()=>{go();p9()});var f9=W(mS=>{"use strict";Object.defineProperty(mS,"__esModule",{value:!0});mS.format=yFe;mS.parse=mFe;var BFe=/^[\u0009\u0020-\u007e\u0080-\u00ff]*$/,C9=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,fFe=/[\\"]/g,QFe=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,h9=(()=>{let n=function(){};return n.prototype=Object.create(null),n})();function yFe(n){let{type:r,parameters:o}=n;if(!r||!QFe.test(r))throw new TypeError(`Invalid type: ${r}`);let i=r;if(o)for(let e of Object.keys(o)){if(!C9.test(e))throw new TypeError(`Invalid parameter name: ${e}`);i+=`; ${e}=${bFe(o[e])}`}return i}function mFe(n,r){let o=r?.comma===!0?wFe:65536,i=n.length,e=lP(n,r?.start??0,i),a=e;e=IP(n,e,i,o);let A=pP(n,a,e),t=n.slice(a,A).toLowerCase();return r?.parameters===!1?{type:t,index:e,parameters:new h9}:OFe(n,t,e,i,o)}var d9=32,u9=9,B9=59,SFe=61,E9=34,DFe=92,wFe=44;function OFe(n,r,o,i,e){let a=new h9;e:for(;or;){let i=n.charCodeAt(o-1);if(i!==d9&&i!==u9)break;o--}return o}function bFe(n){if(C9.test(n))return n;if(BFe.test(n))return`"${n.replace(fFe,"\\$&")}"`;throw new TypeError(`Invalid parameter value: ${n}`)}});function Q9(n){if(!MFe.test(n))throw new TypeError(`Invalid media type: ${n}`);let r=n.indexOf("/"),o=n.slice(0,r).toLowerCase(),i=n.slice(r+1).toLowerCase(),e,a=i.lastIndexOf("+");return a!==-1&&(e=i.slice(a+1),i=i.slice(0,a)),{type:o,subtype:i,suffix:e}}var MFe,y9=le(()=>{MFe=/^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}\/[A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}$/});var m9,qr,EP,CP=le(()=>{m9={10:"shot",20:"scene",30:"track",40:"part",50:"album",60:"edition",70:"collection"},qr={video:1,audio:2,complex:3,logo:4,subtitle:17,button:18,control:32},EP={[qr.video]:"video",[qr.audio]:"audio",[qr.complex]:"complex",[qr.logo]:"logo",[qr.subtitle]:"subtitle",[qr.button]:"button",[qr.control]:"control"}});var xp,Ug,Hg,hP,lo,II,pt,Ht=le(()=>{xp=n=>class extends Error{constructor(o){super(o),this.name=n}},Ug=class extends xp("CouldNotDetermineFileTypeError"){},Hg=class extends xp("UnsupportedFileTypeError"){},hP=class extends xp("UnexpectedFileContentError"){constructor(r,o){super(o),this.fileType=r}toString(){return`${this.name} (FileType: ${this.fileType}): ${this.message}`}},lo=class extends xp("FieldDecodingError"){},II=class extends xp("InternalParserError"){},pt=n=>class extends hP{constructor(r){super(n,r)}}});function kA(n,r,o){return(n[r]&1<>a;let t=8-a,s=i-t;return s<0?A>>=8-a-i:s>0&&(A<<=s,A|=qA(n,r,o+t,s)),A}function oa(n,r,o){return qA(n,r,o,1)===1}function D9(n){let r=[];for(let o=0,i=n.length;oo.trim().toLowerCase());if(r.length>=1){let o=Number.parseFloat(r[0]);return r.length===2&&r[1]==="db"?{dB:o,ratio:NFe(o)}:{dB:_Fe(o),ratio:o}}}function dP(n){if(n.length===0)throw new Error("decodeUintBE: empty Uint8Array");let r=new DataView(n.buffer,n.byteOffset,n.byteLength);return Pd(r)}var Kt=le(()=>{SA();Ht();Gd()});var jp,Jp,qp,uP,Hd,BP,Vp,DS,fP,Kg=le(()=>{SA();Kt();jp={0:"Other",1:"32x32 pixels 'file icon' (PNG only)",2:"Other file icon",3:"Cover (front)",4:"Cover (back)",5:"Leaflet page",6:"Media (e.g. label side of CD)",7:"Lead artist/lead performer/soloist",8:"Artist/performer",9:"Conductor",10:"Band/Orchestra",11:"Composer",12:"Lyricist/text writer",13:"Recording Location",14:"During recording",15:"During performance",16:"Movie/video screen capture",17:"A bright coloured fish",18:"Illustration",19:"Band/artist logotype",20:"Publisher/Studio logotype"},Jp={other:0,lyrics:1,text:2,movement_part:3,events:4,chord:5,trivia_pop:6},qp={notSynchronized:0,mpegFrameNumber:1,milliseconds:2},uP={get:(n,r)=>n[r+3]&127|n[r+2]<<7|n[r+1]<<14|n[r]<<21,len:4},Hd={len:10,get:(n,r)=>({fileIdentifier:new je(3,"ascii").get(n,r),version:{major:Nn.get(n,r+3),revision:Nn.get(n,r+4)},flags:{unsynchronisation:kA(n,r+5,7),isExtendedHeader:kA(n,r+5,6),expIndicator:kA(n,r+5,5),footer:kA(n,r+5,4)},size:uP.get(n,r+6)})},BP={len:10,get:(n,r)=>({size:Ue.get(n,r),extendedFlags:PA.get(n,r+4),sizeOfPadding:Ue.get(n,r+6),crcDataPresent:kA(n,r+4,31)})},Vp={len:1,get:(n,r)=>{switch(n[r]){case 0:return{encoding:"latin1"};case 1:return{encoding:"utf-16le",bom:!0};case 2:return{encoding:"utf-16be",bom:!1};case 3:return{encoding:"utf8",bom:!1};default:return{encoding:"utf8",bom:!1}}}},DS={len:4,get:(n,r)=>({encoding:Vp.get(n,r),language:new je(3,"latin1").get(n,r+1)})},fP={len:6,get:(n,r)=>{let o=DS.get(n,r);return{encoding:o.encoding,language:o.language,timeStampFormat:uA.get(n,r+4),contentType:uA.get(n,r+5)}}}});var lI=le(()=>{CP();Kg()});function O9(n){return wS[n]&&!wS[n].multiple}function b9(n){return!wS[n].multiple||wS[n].unique||!1}var Xe,wS,M9=le(()=>{Xe={multiple:!1},wS={year:Xe,track:Xe,disk:Xe,title:Xe,artist:Xe,artists:{multiple:!0,unique:!0},albumartist:Xe,albumartists:{multiple:!0,unique:!0},album:Xe,date:Xe,originaldate:Xe,originalyear:Xe,releasedate:Xe,comment:{multiple:!0,unique:!1},genre:{multiple:!0,unique:!0},picture:{multiple:!0,unique:!0},composer:{multiple:!0,unique:!0},lyrics:{multiple:!0,unique:!1},albumsort:{multiple:!1,unique:!0},titlesort:{multiple:!1,unique:!0},work:{multiple:!1,unique:!0},artistsort:{multiple:!1,unique:!0},albumartistsort:{multiple:!1,unique:!0},composersort:{multiple:!1,unique:!0},lyricist:{multiple:!0,unique:!0},writer:{multiple:!0,unique:!0},conductor:{multiple:!0,unique:!0},remixer:{multiple:!0,unique:!0},arranger:{multiple:!0,unique:!0},engineer:{multiple:!0,unique:!0},producer:{multiple:!0,unique:!0},technician:{multiple:!0,unique:!0},djmixer:{multiple:!0,unique:!0},mixer:{multiple:!0,unique:!0},label:{multiple:!0,unique:!0},grouping:Xe,subtitle:{multiple:!0},discsubtitle:Xe,totaltracks:Xe,totaldiscs:Xe,compilation:Xe,rating:{multiple:!0},bpm:Xe,mood:Xe,media:Xe,catalognumber:{multiple:!0,unique:!0},tvShow:Xe,tvShowSort:Xe,tvSeason:Xe,tvEpisode:Xe,tvEpisodeId:Xe,tvNetwork:Xe,podcast:Xe,podcasturl:Xe,releasestatus:Xe,releasetype:{multiple:!0},releasecountry:Xe,script:Xe,language:Xe,copyright:Xe,license:Xe,encodedby:Xe,encodersettings:Xe,gapless:Xe,barcode:Xe,isrc:{multiple:!0},asin:Xe,musicbrainz_recordingid:Xe,musicbrainz_trackid:Xe,musicbrainz_albumid:Xe,musicbrainz_artistid:{multiple:!0},musicbrainz_albumartistid:{multiple:!0},musicbrainz_releasegroupid:Xe,musicbrainz_workid:Xe,musicbrainz_trmid:Xe,musicbrainz_discid:Xe,acoustid_id:Xe,acoustid_fingerprint:Xe,musicip_puid:Xe,musicip_fingerprint:Xe,website:Xe,"performer:instrument":{multiple:!0,unique:!0},averageLevel:Xe,peakLevel:Xe,notes:{multiple:!0,unique:!1},key:Xe,originalalbum:Xe,originalartist:Xe,discogs_artist_id:{multiple:!0,unique:!0},discogs_release_id:Xe,discogs_label_id:Xe,discogs_master_release_id:Xe,discogs_votes:Xe,discogs_rating:Xe,replaygain_track_peak:Xe,replaygain_track_gain:Xe,replaygain_album_peak:Xe,replaygain_album_gain:Xe,replaygain_track_minmax:Xe,replaygain_album_minmax:Xe,replaygain_undo:Xe,description:{multiple:!0},longDescription:Xe,category:{multiple:!0},hdVideo:Xe,keywords:{multiple:!0},movement:Xe,movementIndex:Xe,movementTotal:Xe,podcastId:Xe,showMovement:Xe,stik:Xe,playCounter:Xe}});var er,Ns=le(()=>{er=class{static toIntOrNull(r){let o=Number.parseInt(r,10);return Number.isNaN(o)?null:o}static normalizeTrack(r){let o=r.toString().split("/");return{no:Number.parseInt(o[0],10)||null,of:Number.parseInt(o[1],10)||null}}constructor(r,o){this.tagTypes=r,this.tagMap=o}mapGenericTag(r,o){r={id:r.id,value:r.value},this.postMap(r,o);let i=this.getCommonName(r.id);return i?{id:i,value:r.value}:null}getCommonName(r){return this.tagMap[r]}postMap(r,o){}};er.maxRatingScore=1});var TFe,OS,_9=le(()=>{Ns();TFe={title:"title",artist:"artist",album:"album",year:"year",comment:"comment",track:"track",genre:"genre"},OS=class extends er{constructor(){super(["ID3v1"],TFe)}}});var Eo,zp=le(()=>{Ns();Eo=class extends er{constructor(r,o){let i={};for(let e of Object.keys(o))i[e.toUpperCase()]=o[e];super(r,i)}getCommonName(r){return this.tagMap[r.toUpperCase()]}}});var RFe,bS,N9=le(()=>{SA();Ns();zp();Kt();RFe={TIT2:"title",TPE1:"artist","TXXX:Artists":"artists",TPE2:"albumartist",TALB:"album",TDRV:"date",TORY:"originalyear",TPOS:"disk",TCON:"genre",APIC:"picture",TCOM:"composer",USLT:"lyrics",TSOA:"albumsort",TSOT:"titlesort",TOAL:"originalalbum",TSOP:"artistsort",TSO2:"albumartistsort",TSOC:"composersort",TEXT:"lyricist","TXXX:Writer":"writer",TPE3:"conductor",TPE4:"remixer","IPLS:arranger":"arranger","IPLS:engineer":"engineer","IPLS:producer":"producer","IPLS:DJ-mix":"djmixer","IPLS:mix":"mixer",TPUB:"label",TIT1:"grouping",TIT3:"subtitle",TRCK:"track",TCMP:"compilation",POPM:"rating",TBPM:"bpm",TMED:"media","TXXX:CATALOGNUMBER":"catalognumber","TXXX:MusicBrainz Album Status":"releasestatus","TXXX:MusicBrainz Album Type":"releasetype","TXXX:MusicBrainz Album Release Country":"releasecountry","TXXX:RELEASECOUNTRY":"releasecountry","TXXX:SCRIPT":"script",TLAN:"language",TCOP:"copyright",WCOP:"license",TENC:"encodedby",TSSE:"encodersettings","TXXX:BARCODE":"barcode","TXXX:ISRC":"isrc",TSRC:"isrc","TXXX:ASIN":"asin","TXXX:originalyear":"originalyear","UFID:http://musicbrainz.org":"musicbrainz_recordingid","TXXX:MusicBrainz Release Track Id":"musicbrainz_trackid","TXXX:MusicBrainz Album Id":"musicbrainz_albumid","TXXX:MusicBrainz Artist Id":"musicbrainz_artistid","TXXX:MusicBrainz Album Artist Id":"musicbrainz_albumartistid","TXXX:MusicBrainz Release Group Id":"musicbrainz_releasegroupid","TXXX:MusicBrainz Work Id":"musicbrainz_workid","TXXX:MusicBrainz TRM Id":"musicbrainz_trmid","TXXX:MusicBrainz Disc Id":"musicbrainz_discid","TXXX:ACOUSTID_ID":"acoustid_id","TXXX:Acoustid Id":"acoustid_id","TXXX:Acoustid Fingerprint":"acoustid_fingerprint","TXXX:MusicIP PUID":"musicip_puid","TXXX:MusicMagic Fingerprint":"musicip_fingerprint",WOAR:"website",TDRC:"date",TYER:"year",TDOR:"originaldate","TIPL:arranger":"arranger","TIPL:engineer":"engineer","TIPL:producer":"producer","TIPL:DJ-mix":"djmixer","TIPL:mix":"mixer",TMOO:"mood",SYLT:"lyrics",TSST:"discsubtitle",TKEY:"key",COMM:"comment",TOPE:"originalartist","PRIV:AverageLevel":"averageLevel","PRIV:PeakLevel":"peakLevel","TXXX:DISCOGS_ARTIST_ID":"discogs_artist_id","TXXX:DISCOGS_ARTISTS":"artists","TXXX:DISCOGS_ARTIST_NAME":"artists","TXXX:DISCOGS_ALBUM_ARTISTS":"albumartist","TXXX:DISCOGS_CATALOG":"catalognumber","TXXX:DISCOGS_COUNTRY":"releasecountry","TXXX:DISCOGS_DATE":"originaldate","TXXX:DISCOGS_LABEL":"label","TXXX:DISCOGS_LABEL_ID":"discogs_label_id","TXXX:DISCOGS_MASTER_RELEASE_ID":"discogs_master_release_id","TXXX:DISCOGS_RATING":"discogs_rating","TXXX:DISCOGS_RELEASED":"date","TXXX:DISCOGS_RELEASE_ID":"discogs_release_id","TXXX:DISCOGS_VOTES":"discogs_votes","TXXX:CATALOGID":"catalognumber","TXXX:STYLE":"genre","TXXX:REPLAYGAIN_TRACK_PEAK":"replaygain_track_peak","TXXX:REPLAYGAIN_TRACK_GAIN":"replaygain_track_gain","TXXX:REPLAYGAIN_ALBUM_PEAK":"replaygain_album_peak","TXXX:REPLAYGAIN_ALBUM_GAIN":"replaygain_album_gain","TXXX:MP3GAIN_MINMAX":"replaygain_track_minmax","TXXX:MP3GAIN_ALBUM_MINMAX":"replaygain_album_minmax","TXXX:MP3GAIN_UNDO":"replaygain_undo",MVNM:"movement",MVIN:"movementIndex",PCST:"podcast",TCAT:"category",TDES:"description",TDRL:"releasedate",TGID:"podcastId",TKWD:"keywords",WFED:"podcasturl",GRP1:"grouping",PCNT:"playCounter"},bS=class n extends Eo{static toRating(r){return{source:r.email,rating:r.rating>0?(r.rating-1)/254*er.maxRatingScore:void 0}}constructor(){super(["ID3v2.3","ID3v2.4"],RFe)}postMap(r,o){switch(r.id){case"UFID":{let i=r.value;i.owner_identifier==="http://musicbrainz.org"&&(r.id+=`:${i.owner_identifier}`,r.value=Vr(i.identifier,"latin1"))}break;case"PRIV":{let i=r.value;switch(i.owner_identifier){case"AverageLevel":case"PeakValue":r.id+=`:${i.owner_identifier}`,r.value=i.data.length===4?ve.get(i.data,0):null,r.value===null&&o.addWarning("Failed to parse PRIV:PeakValue");break;default:o.addWarning(`Unknown PRIV owner-identifier: ${i.data}`)}}break;case"POPM":r.value=n.toRating(r.value);break;default:break}}}});var kFe,MS,T9=le(()=>{Ns();kFe={Title:"title",Author:"artist","WM/AlbumArtist":"albumartist","WM/AlbumTitle":"album","WM/Year":"date","WM/OriginalReleaseTime":"originaldate","WM/OriginalReleaseYear":"originalyear",Description:"comment","WM/TrackNumber":"track","WM/PartOfSet":"disk","WM/Genre":"genre","WM/Composer":"composer","WM/Lyrics":"lyrics","WM/AlbumSortOrder":"albumsort","WM/TitleSortOrder":"titlesort","WM/ArtistSortOrder":"artistsort","WM/AlbumArtistSortOrder":"albumartistsort","WM/ComposerSortOrder":"composersort","WM/Writer":"lyricist","WM/Conductor":"conductor","WM/ModifiedBy":"remixer","WM/Engineer":"engineer","WM/Producer":"producer","WM/DJMixer":"djmixer","WM/Mixer":"mixer","WM/Publisher":"label","WM/ContentGroupDescription":"grouping","WM/SubTitle":"subtitle","WM/SetSubTitle":"discsubtitle","WM/IsCompilation":"compilation","WM/SharedUserRating":"rating","WM/BeatsPerMinute":"bpm","WM/Mood":"mood","WM/Media":"media","WM/CatalogNo":"catalognumber","MusicBrainz/Album Status":"releasestatus","MusicBrainz/Album Type":"releasetype","MusicBrainz/Album Release Country":"releasecountry","WM/Script":"script","WM/Language":"language",Copyright:"copyright",LICENSE:"license","WM/EncodedBy":"encodedby","WM/EncodingSettings":"encodersettings","WM/Barcode":"barcode","WM/ISRC":"isrc","MusicBrainz/Track Id":"musicbrainz_recordingid","MusicBrainz/Release Track Id":"musicbrainz_trackid","MusicBrainz/Album Id":"musicbrainz_albumid","MusicBrainz/Artist Id":"musicbrainz_artistid","MusicBrainz/Album Artist Id":"musicbrainz_albumartistid","MusicBrainz/Release Group Id":"musicbrainz_releasegroupid","MusicBrainz/Work Id":"musicbrainz_workid","MusicBrainz/TRM Id":"musicbrainz_trmid","MusicBrainz/Disc Id":"musicbrainz_discid","Acoustid/Id":"acoustid_id","Acoustid/Fingerprint":"acoustid_fingerprint","MusicIP/PUID":"musicip_puid","WM/ARTISTS":"artists","WM/InitialKey":"key",ASIN:"asin","WM/Work":"work","WM/AuthorURL":"website","WM/Picture":"picture"},MS=class n extends er{static toRating(r){return{rating:Number.parseFloat(r+1)/5}}constructor(){super(["asf"],kFe)}postMap(r){switch(r.id){case"WM/SharedUserRating":{let o=r.id.split(":");r.value=n.toRating(r.value),r.id=o[0];break}}}}});var vFe,_S,R9=le(()=>{zp();vFe={TT2:"title",TP1:"artist",TP2:"albumartist",TAL:"album",TYE:"year",COM:"comment",TRK:"track",TPA:"disk",TCO:"genre",PIC:"picture",TCM:"composer",TOR:"originaldate",TOT:"originalalbum",TXT:"lyricist",TP3:"conductor",TPB:"label",TT1:"grouping",TT3:"subtitle",TLA:"language",TCR:"copyright",WCP:"license",TEN:"encodedby",TSS:"encodersettings",WAR:"website",PCS:"podcast",TCP:"compilation",TDR:"date",TS2:"albumartistsort",TSA:"albumsort",TSC:"composersort",TSP:"artistsort",TST:"titlesort",WFD:"podcasturl",TBP:"bpm",GP1:"grouping"},_S=class extends Eo{constructor(){super(["ID3v2.2"],vFe)}}});var PFe,NS,k9=le(()=>{zp();PFe={Title:"title",Artist:"artist",Artists:"artists","Album Artist":"albumartist",Album:"album",Year:"date",Originalyear:"originalyear",Originaldate:"originaldate",Releasedate:"releasedate",Comment:"comment",Track:"track",Disc:"disk",DISCNUMBER:"disk",Genre:"genre","Cover Art (Front)":"picture","Cover Art (Back)":"picture",Composer:"composer",Lyrics:"lyrics",ALBUMSORT:"albumsort",TITLESORT:"titlesort",WORK:"work",ARTISTSORT:"artistsort",ALBUMARTISTSORT:"albumartistsort",COMPOSERSORT:"composersort",Lyricist:"lyricist",Writer:"writer",Conductor:"conductor",MixArtist:"remixer",Arranger:"arranger",Engineer:"engineer",Producer:"producer",DJMixer:"djmixer",Mixer:"mixer",Label:"label",Grouping:"grouping",Subtitle:"subtitle",DiscSubtitle:"discsubtitle",Compilation:"compilation",BPM:"bpm",Mood:"mood",Media:"media",CatalogNumber:"catalognumber",MUSICBRAINZ_ALBUMSTATUS:"releasestatus",MUSICBRAINZ_ALBUMTYPE:"releasetype",RELEASECOUNTRY:"releasecountry",Script:"script",Language:"language",Copyright:"copyright",LICENSE:"license",EncodedBy:"encodedby",EncoderSettings:"encodersettings",Barcode:"barcode",ISRC:"isrc",ASIN:"asin",musicbrainz_trackid:"musicbrainz_recordingid",musicbrainz_releasetrackid:"musicbrainz_trackid",MUSICBRAINZ_ALBUMID:"musicbrainz_albumid",MUSICBRAINZ_ARTISTID:"musicbrainz_artistid",MUSICBRAINZ_ALBUMARTISTID:"musicbrainz_albumartistid",MUSICBRAINZ_RELEASEGROUPID:"musicbrainz_releasegroupid",MUSICBRAINZ_WORKID:"musicbrainz_workid",MUSICBRAINZ_TRMID:"musicbrainz_trmid",MUSICBRAINZ_DISCID:"musicbrainz_discid",Acoustid_Id:"acoustid_id",ACOUSTID_FINGERPRINT:"acoustid_fingerprint",MUSICIP_PUID:"musicip_puid",Weblink:"website",REPLAYGAIN_TRACK_GAIN:"replaygain_track_gain",REPLAYGAIN_TRACK_PEAK:"replaygain_track_peak",MP3GAIN_MINMAX:"replaygain_track_minmax",MP3GAIN_UNDO:"replaygain_undo"},NS=class extends Eo{constructor(){super(["APEv2"],PFe)}}});var GFe,FFe,Kd,v9=le(()=>{zp();GFe={"\xA9nam":"title","\xA9ART":"artist",aART:"albumartist","----:com.apple.iTunes:Band":"albumartist","\xA9alb":"album","\xA9day":"date","\xA9cmt":"comment","\xA9com":"comment",trkn:"track",disk:"disk","\xA9gen":"genre",covr:"picture","\xA9wrt":"composer","\xA9lyr":"lyrics",soal:"albumsort",sonm:"titlesort",soar:"artistsort",soaa:"albumartistsort",soco:"composersort","----:com.apple.iTunes:LYRICIST":"lyricist","----:com.apple.iTunes:CONDUCTOR":"conductor","----:com.apple.iTunes:REMIXER":"remixer","----:com.apple.iTunes:ENGINEER":"engineer","----:com.apple.iTunes:PRODUCER":"producer","----:com.apple.iTunes:DJMIXER":"djmixer","----:com.apple.iTunes:MIXER":"mixer","----:com.apple.iTunes:LABEL":"label","\xA9grp":"grouping","----:com.apple.iTunes:SUBTITLE":"subtitle","----:com.apple.iTunes:DISCSUBTITLE":"discsubtitle",cpil:"compilation",tmpo:"bpm","----:com.apple.iTunes:MOOD":"mood","----:com.apple.iTunes:MEDIA":"media","----:com.apple.iTunes:CATALOGNUMBER":"catalognumber",tvsh:"tvShow",tvsn:"tvSeason",tves:"tvEpisode",sosn:"tvShowSort",tven:"tvEpisodeId",tvnn:"tvNetwork",pcst:"podcast",purl:"podcasturl","----:com.apple.iTunes:MusicBrainz Album Status":"releasestatus","----:com.apple.iTunes:MusicBrainz Album Type":"releasetype","----:com.apple.iTunes:MusicBrainz Album Release Country":"releasecountry","----:com.apple.iTunes:SCRIPT":"script","----:com.apple.iTunes:LANGUAGE":"language",cprt:"copyright","\xA9cpy":"copyright","----:com.apple.iTunes:LICENSE":"license","\xA9too":"encodedby",pgap:"gapless","----:com.apple.iTunes:BARCODE":"barcode","----:com.apple.iTunes:ISRC":"isrc","----:com.apple.iTunes:ASIN":"asin","----:com.apple.iTunes:NOTES":"comment","----:com.apple.iTunes:MusicBrainz Track Id":"musicbrainz_recordingid","----:com.apple.iTunes:MusicBrainz Release Track Id":"musicbrainz_trackid","----:com.apple.iTunes:MusicBrainz Album Id":"musicbrainz_albumid","----:com.apple.iTunes:MusicBrainz Artist Id":"musicbrainz_artistid","----:com.apple.iTunes:MusicBrainz Album Artist Id":"musicbrainz_albumartistid","----:com.apple.iTunes:MusicBrainz Release Group Id":"musicbrainz_releasegroupid","----:com.apple.iTunes:MusicBrainz Work Id":"musicbrainz_workid","----:com.apple.iTunes:MusicBrainz TRM Id":"musicbrainz_trmid","----:com.apple.iTunes:MusicBrainz Disc Id":"musicbrainz_discid","----:com.apple.iTunes:Acoustid Id":"acoustid_id","----:com.apple.iTunes:Acoustid Fingerprint":"acoustid_fingerprint","----:com.apple.iTunes:MusicIP PUID":"musicip_puid","----:com.apple.iTunes:fingerprint":"musicip_fingerprint","----:com.apple.iTunes:replaygain_track_gain":"replaygain_track_gain","----:com.apple.iTunes:replaygain_track_peak":"replaygain_track_peak","----:com.apple.iTunes:replaygain_album_gain":"replaygain_album_gain","----:com.apple.iTunes:replaygain_album_peak":"replaygain_album_peak","----:com.apple.iTunes:replaygain_track_minmax":"replaygain_track_minmax","----:com.apple.iTunes:replaygain_album_minmax":"replaygain_album_minmax","----:com.apple.iTunes:replaygain_undo":"replaygain_undo",gnre:"genre","----:com.apple.iTunes:ALBUMARTISTSORT":"albumartistsort","----:com.apple.iTunes:ARTISTS":"artists","----:com.apple.iTunes:ORIGINALDATE":"originaldate","----:com.apple.iTunes:ORIGINALYEAR":"originalyear","----:com.apple.iTunes:RELEASEDATE":"releasedate",desc:"description",ldes:"longDescription","\xA9mvn":"movement","\xA9mvi":"movementIndex","\xA9mvc":"movementTotal","\xA9wrk":"work",catg:"category",egid:"podcastId",hdvd:"hdVideo",keyw:"keywords",shwm:"showMovement",stik:"stik",rate:"rating"},FFe="iTunes",Kd=class extends Eo{constructor(){super([FFe],GFe)}postMap(r,o){switch(r.id){case"rate":r.value={source:void 0,rating:Number.parseFloat(r.value)/100};break}}}});var LFe,TS,P9=le(()=>{Ns();LFe={TITLE:"title",ARTIST:"artist",ARTISTS:"artists",ALBUMARTIST:"albumartist","ALBUM ARTIST":"albumartist",ALBUM:"album",DATE:"date",ORIGINALDATE:"originaldate",ORIGINALYEAR:"originalyear",RELEASEDATE:"releasedate",COMMENT:"comment",TRACKNUMBER:"track",DISCNUMBER:"disk",GENRE:"genre",METADATA_BLOCK_PICTURE:"picture",COMPOSER:"composer",LYRICS:"lyrics",ALBUMSORT:"albumsort",TITLESORT:"titlesort",WORK:"work",ARTISTSORT:"artistsort",ALBUMARTISTSORT:"albumartistsort",COMPOSERSORT:"composersort",LYRICIST:"lyricist",WRITER:"writer",CONDUCTOR:"conductor",REMIXER:"remixer",ARRANGER:"arranger",ENGINEER:"engineer",PRODUCER:"producer",DJMIXER:"djmixer",MIXER:"mixer",LABEL:"label",GROUPING:"grouping",SUBTITLE:"subtitle",DISCSUBTITLE:"discsubtitle",TRACKTOTAL:"totaltracks",DISCTOTAL:"totaldiscs",COMPILATION:"compilation",RATING:"rating",BPM:"bpm",KEY:"key",MOOD:"mood",MEDIA:"media",CATALOGNUMBER:"catalognumber",RELEASESTATUS:"releasestatus",RELEASETYPE:"releasetype",RELEASECOUNTRY:"releasecountry",SCRIPT:"script",LANGUAGE:"language",COPYRIGHT:"copyright",LICENSE:"license",ENCODEDBY:"encodedby",ENCODERSETTINGS:"encodersettings",BARCODE:"barcode",ISRC:"isrc",ASIN:"asin",MUSICBRAINZ_TRACKID:"musicbrainz_recordingid",MUSICBRAINZ_RELEASETRACKID:"musicbrainz_trackid",MUSICBRAINZ_ALBUMID:"musicbrainz_albumid",MUSICBRAINZ_ARTISTID:"musicbrainz_artistid",MUSICBRAINZ_ALBUMARTISTID:"musicbrainz_albumartistid",MUSICBRAINZ_RELEASEGROUPID:"musicbrainz_releasegroupid",MUSICBRAINZ_WORKID:"musicbrainz_workid",MUSICBRAINZ_TRMID:"musicbrainz_trmid",MUSICBRAINZ_DISCID:"musicbrainz_discid",ACOUSTID_ID:"acoustid_id",ACOUSTID_ID_FINGERPRINT:"acoustid_fingerprint",MUSICIP_PUID:"musicip_puid",WEBSITE:"website",NOTES:"notes",TOTALTRACKS:"totaltracks",TOTALDISCS:"totaldiscs",DISCOGS_ARTIST_ID:"discogs_artist_id",DISCOGS_ARTISTS:"artists",DISCOGS_ARTIST_NAME:"artists",DISCOGS_ALBUM_ARTISTS:"albumartist",DISCOGS_CATALOG:"catalognumber",DISCOGS_COUNTRY:"releasecountry",DISCOGS_DATE:"originaldate",DISCOGS_LABEL:"label",DISCOGS_LABEL_ID:"discogs_label_id",DISCOGS_MASTER_RELEASE_ID:"discogs_master_release_id",DISCOGS_RATING:"discogs_rating",DISCOGS_RELEASED:"date",DISCOGS_RELEASE_ID:"discogs_release_id",DISCOGS_VOTES:"discogs_votes",CATALOGID:"catalognumber",STYLE:"genre",REPLAYGAIN_TRACK_GAIN:"replaygain_track_gain",REPLAYGAIN_TRACK_PEAK:"replaygain_track_peak",REPLAYGAIN_ALBUM_GAIN:"replaygain_album_gain",REPLAYGAIN_ALBUM_PEAK:"replaygain_album_peak",REPLAYGAIN_MINMAX:"replaygain_track_minmax",REPLAYGAIN_ALBUM_MINMAX:"replaygain_album_minmax",REPLAYGAIN_UNDO:"replaygain_undo"},TS=class n extends er{static toRating(r,o,i){return{source:r?r.toLowerCase():void 0,rating:Number.parseFloat(o)/i*er.maxRatingScore}}constructor(){super(["vorbis"],LFe)}postMap(r){if(r.id==="RATING")r.value=n.toRating(void 0,r.value,100);else if(r.id.indexOf("RATING:")===0){let o=r.id.split(":");r.value=n.toRating(o[1],r.value,1),r.id=o[0]}}}});var UFe,RS,G9=le(()=>{Ns();UFe={IART:"artist",ICRD:"date",INAM:"title",TITL:"title",IPRD:"album",ITRK:"track",IPRT:"track",COMM:"comment",ICMT:"comment",ICNT:"releasecountry",GNRE:"genre",IWRI:"writer",RATE:"rating",YEAR:"year",ISFT:"encodedby",CODE:"encodedby",TURL:"website",IGNR:"genre",IENG:"engineer",ITCH:"technician",IMED:"media",IRPD:"album"},RS=class extends er{constructor(){super(["exif"],UFe)}}});var HFe,kS,F9=le(()=>{zp();HFe={"segment:title":"title","album:ARTIST":"albumartist","album:ARTISTSORT":"albumartistsort","album:TITLE":"album","album:DATE_RECORDED":"originaldate","album:DATE_RELEASED":"releasedate","album:PART_NUMBER":"disk","album:TOTAL_PARTS":"totaltracks","track:ARTIST":"artist","track:ARTISTSORT":"artistsort","track:TITLE":"title","track:PART_NUMBER":"track","track:MUSICBRAINZ_TRACKID":"musicbrainz_recordingid","track:MUSICBRAINZ_ALBUMID":"musicbrainz_albumid","track:MUSICBRAINZ_ARTISTID":"musicbrainz_artistid","track:PUBLISHER":"label","track:GENRE":"genre","track:ENCODER":"encodedby","track:ENCODER_OPTIONS":"encodersettings","edition:TOTAL_PARTS":"totaldiscs",picture:"picture"},kS=class extends Eo{constructor(){super(["matroska"],HFe)}}});var KFe,vS,L9=le(()=>{Ns();KFe={NAME:"title",AUTH:"artist","(c) ":"copyright",ANNO:"comment"},vS=class extends er{constructor(){super(["AIFF"],KFe)}}});var PS,U9=le(()=>{_9();N9();T9();R9();k9();v9();P9();G9();F9();L9();Ht();PS=class{constructor(){this.tagMappers={},[new OS,new _S,new bS,new Kd,new Kd,new TS,new NS,new MS,new RS,new kS,new vS].forEach(r=>{this.registerTagMapper(r)})}mapTag(r,o,i){if(this.tagMappers[r])return this.tagMappers[r].mapGenericTag(o,i);throw new II(`No generic tag mapper defined for tag-format: ${r}`)}registerTagMapper(r){for(let o of r.tagTypes)this.tagMappers[o]=r}}});function H9(n){return QP.test(n)?xFe(n):YFe(n)}function YFe(n){return{contentType:Jp.lyrics,timeStampFormat:qp.notSynchronized,text:n.trim(),syncText:[]}}function xFe(n){let r=n.split(` `),o=[];for(let i of r){let e=i.match(QP);if(e){let a=Number.parseInt(e[1],10),A=Number.parseInt(e[2],10),t=e[3].length===3?Number.parseInt(e[3],10):Number.parseInt(e[3],10)*10,s=(a*60+A)*1e3+t,g=i.replace(QP,"").trim();o.push({timestamp:s,text:g})}}return{contentType:Jp.lyrics,timeStampFormat:qp.milliseconds,text:o.map(i=>i.text).join(` -`),syncText:o}}var QP,K9=le(()=>{lI();QP=/\[(\d{2}):(\d{2})\.(\d{2,3})]/});function YFe(n){return n.length>2?`${n.slice(0,n.length-1).join(", ")} & ${n[n.length-1]}`:n.join(" & ")}var Y9,pI,KFe,GS,x9=le(()=>{lI();Y9=Je(at(),1);M9();U9();Ns();Kt();cP();K9();pI=(0,Y9.default)("music-metadata:collector"),KFe=["matroska","APEv2","vorbis","ID3v2.4","ID3v2.3","ID3v2.2","exif","asf","iTunes","AIFF","ID3v1"],GS=class{constructor(r){this.format={tagTypes:[],trackInfo:[]},this.native={},this.common={track:{no:null,of:null},disk:{no:null,of:null},movementIndex:{no:null,of:null}},this.quality={warnings:[]},this.commonOrigin={},this.originPriority={},this.tagMapper=new PS,this.opts=r;let o=1;for(let i of KFe)this.originPriority[i]=o++;this.originPriority.artificial=500,this.originPriority.id3v1=600}hasAny(){return Object.keys(this.native).length>0}addStreamInfo(r){pI(`streamInfo: type=${r.type?EP[r.type]:"?"}, codec=${r.codecName}`),this.format.trackInfo.push(r)}setFormat(r,o){pI(`format: ${r} = ${o}`),this.format[r]=o,this.opts?.observer&&this.opts.observer({metadata:this,tag:{type:"format",id:r,value:o}})}setAudioOnly(){this.setFormat("hasAudio",!0),this.setFormat("hasVideo",!1)}async addTag(r,o,i){pI(`tag ${r}.${o} = ${i}`),this.native[r]||(this.format.tagTypes.push(r),this.native[r]=[]),this.native[r].push({id:o,value:i}),await this.toCommon(r,o,i)}addWarning(r){this.quality.warnings.push({message:r})}async postMap(r,o){switch(o.id){case"artist":return this.handleSingularArtistTag(r,o,"artist","artists");case"albumartist":return this.handleSingularArtistTag(r,o,"albumartist","albumartists");case"artists":return this.handlePluralArtistTag(r,o,"artist","artists");case"albumartists":return this.handlePluralArtistTag(r,o,"albumartist","albumartists");case"picture":return this.postFixPicture(o.value).then(i=>{i!==null&&(o.value=i,this.setGenericTag(r,o))});case"totaltracks":this.common.track.of=er.toIntOrNull(o.value);return;case"totaldiscs":this.common.disk.of=er.toIntOrNull(o.value);return;case"movementTotal":this.common.movementIndex.of=er.toIntOrNull(o.value);return;case"track":case"disk":case"movementIndex":{let i=this.common[o.id].of;this.common[o.id]=er.normalizeTrack(o.value),this.common[o.id].of=i??this.common[o.id].of;return}case"bpm":case"year":case"originalyear":o.value=Number.parseInt(o.value,10);break;case"date":{let i=Number.parseInt(o.value.substr(0,4),10);Number.isNaN(i)||(this.common.year=i);break}case"discogs_label_id":case"discogs_release_id":case"discogs_master_release_id":case"discogs_artist_id":case"discogs_votes":o.value=typeof o.value=="string"?Number.parseInt(o.value,10):o.value;break;case"replaygain_track_gain":case"replaygain_track_peak":case"replaygain_album_gain":case"replaygain_album_peak":o.value=w9(o.value);break;case"replaygain_track_minmax":o.value=o.value.split(",").map(i=>Number.parseInt(i,10));break;case"replaygain_undo":{let i=o.value.split(",").map(e=>Number.parseInt(e,10));o.value={leftChannel:i[0],rightChannel:i[1]};break}case"gapless":case"compilation":case"podcast":case"showMovement":o.value=o.value==="1"||o.value===1;break;case"isrc":{let i=this.common[o.id];if(i&&i.indexOf(o.value)!==-1)return;break}case"comment":typeof o.value=="string"&&(o.value={text:o.value}),o.value.descriptor==="iTunPGAP"&&this.setGenericTag(r,{id:"gapless",value:o.value.text==="1"});break;case"lyrics":typeof o.value=="string"&&(o.value=H9(o.value));break;default:}o.value!==null&&this.setGenericTag(r,o)}toCommonMetadata(){return{format:this.format,native:this.native,quality:this.quality,common:this.common}}handleSingularArtistTag(r,o,i,e){if(this.commonOrigin[i]===this.originPriority[r])return this.postMap("artificial",{id:e,value:o.value});this.common[e]||this.setGenericTag("artificial",{id:e,value:o.value}),this.setGenericTag(r,o)}handlePluralArtistTag(r,o,i,e){if((!this.common[i]||this.commonOrigin[i]===this.originPriority.artificial)&&(!this.common[e]||this.common[e].indexOf(o.value)===-1)){let a=(this.common[e]||[]).concat([o.value]),A=YFe(a);this.setGenericTag("artificial",{id:i,value:A})}this.setGenericTag(r,o)}async postFixPicture(r){if(r.data&&r.data.length>0){if(!r.format){let o=await Ud(Uint8Array.from(r.data));if(o)r.format=o.mime;else return null}switch(r.format=r.format.toLocaleLowerCase(),r.format){case"image/jpg":r.format="image/jpeg"}return r}return this.addWarning("Empty picture tag found"),null}async toCommon(r,o,i){let e={id:o,value:i},a=this.tagMapper.mapTag(r,e,this);a&&await this.postMap(r,a)}setGenericTag(r,o){pI(`common.${o.id} = ${o.value}`);let i=this.commonOrigin[o.id]||1e3,e=this.originPriority[r];if(O9(o.id))if(e<=i)this.common[o.id]=o.value,this.commonOrigin[o.id]=e;else return pI(`Ignore native tag (singleton): ${r}.${o.id} = ${o.value}`);else if(e===i)!b9(o.id)||this.common[o.id].indexOf(o.value)===-1?this.common[o.id].push(o.value):pI(`Ignore duplicate value: ${r}.${o.id} = ${o.value}`);else if(e{Qt=class{constructor(r,o,i){this.metadata=r,this.tokenizer=o,this.options=i}}});var xFe,XA,Fa=le(()=>{Mn();Kt();Ht();xFe=/^[\x21-\x7e©][\x20-\x7e\x00()]{3}/,XA={len:4,get:(n,r)=>{let o=lr(n.subarray(r,r+XA.len),"latin1");if(!o.match(xFe))throw new lo(`FourCC contains invalid characters: ${D9(o)} "${o}"`);return o},put:(n,r,o)=>{let i=GZ(o,"latin1");if(i.length!==4)throw new II("Invalid length");return n.set(i,r),r+4}}});function J9(n){return{containsHeader:FS(n,31),containsFooter:FS(n,30),isHeader:FS(n,29),readOnly:FS(n,0),dataType:(n&6)>>1}}function FS(n,r){return(n&1<{SA();Fa();Yd={text_utf8:0,binary:1,external_info:2,reserved:3},yP={len:52,get:(n,r)=>({ID:XA.get(n,r),version:ve.get(n,r+4)/1e3,descriptorBytes:ve.get(n,r+8),headerBytes:ve.get(n,r+12),seekTableBytes:ve.get(n,r+16),headerDataBytes:ve.get(n,r+20),apeFrameDataBytes:ve.get(n,r+24),apeFrameDataBytesHigh:ve.get(n,r+28),terminatingDataBytes:ve.get(n,r+32),fileMD5:new ut(16).get(n,r+36)})},j9={len:24,get:(n,r)=>({compressionLevel:yA.get(n,r),formatFlags:yA.get(n,r+2),blocksPerFrame:ve.get(n,r+4),finalFrameBlocks:ve.get(n,r+8),totalFrames:ve.get(n,r+12),bitsPerSample:yA.get(n,r+16),channel:yA.get(n,r+18),sampleRate:ve.get(n,r+20)})},si={len:32,get:(n,r)=>({ID:new je(8,"ascii").get(n,r),version:ve.get(n,r+8),size:ve.get(n,r+12),fields:ve.get(n,r+16),flags:J9(ve.get(n,r+20))})},LS={len:8,get:(n,r)=>({size:ve.get(n,r),flags:J9(ve.get(n,r+4))})}});var Z9={};Qr(Z9,{APEv2Parser:()=>xg,ApeContentError:()=>Wp,tryParseApeHeader:()=>EI});function EI(n,r,o){return new xg(n,r,o).tryParseApeHeader()}var W9,Yg,V9,z9,Wp,xg,CI=le(()=>{W9=Je(at(),1);go();SA();Kt();ni();q9();Ht();Mn();Yg=(0,W9.default)("music-metadata:parser:APEv2"),V9="APEv2",z9="APETAGEX",Wp=class extends pt("APEv2"){};xg=class n extends Qt{constructor(){super(...arguments),this.ape={}}static calculateDuration(r){let o=r.totalFrames>1?r.blocksPerFrame*(r.totalFrames-1):0;return o+=r.finalFrameBlocks,o/r.sampleRate}static async findApeFooterOffset(r,o){let i=new Uint8Array(si.len),e=r.position;if(o<=si.len){Yg(`Offset is too small to read APE footer: offset=${o}`);return}if(o>si.len){await r.readBuffer(i,{position:o-si.len}),r.setPosition(e);let a=si.get(i,0);if(a.ID==="APETAGEX")return a.flags.isHeader?Yg(`APE Header found at offset=${o-si.len}`):(Yg(`APE Footer found at offset=${o-si.len}`),o-=a.size),{footer:a,offset:o}}}static parseTagFooter(r,o,i){let e=si.get(o,o.length-si.len);if(e.ID!==z9)throw new Wp("Unexpected APEv2 Footer ID preamble value");return Mi(o),new n(r,Mi(o),i).parseTags(e)}async tryParseApeHeader(){if(this.tokenizer.fileInfo.size&&this.tokenizer.fileInfo.size-this.tokenizer.position0?this.parseDescriptorExpansion(o):this.parseHeader());return this.metadata.setAudioOnly(),await this.tokenizer.ignore(i.forwardBytes),this.tryParseApeHeader()}async parseTags(r){let o=new Uint8Array(256),i=r.size-si.len;Yg(`Parse APE tags at offset=${this.tokenizer.position}, size=${i}`);for(let e=0;ethis.metadata.addTag(V9,t,c)));break}case Yd.binary:if(this.options.skipCovers)await this.tokenizer.ignore(a.size);else{let s=new Uint8Array(a.size);await this.tokenizer.readBuffer(s),A=Pn(s);let g=lr(s.subarray(0,A),"utf-8"),c=s.subarray(A+1);await this.metadata.addTag(V9,t,{description:g,data:c})}break;case Yd.external_info:Yg(`Ignore external info ${t}`),await this.tokenizer.ignore(a.size);break;case Yd.reserved:Yg(`Ignore external info ${t}`),this.metadata.addWarning(`APEv2 header declares a reserved datatype for "${t}"`),await this.tokenizer.ignore(a.size);break}}}async parseDescriptorExpansion(r){return await this.tokenizer.ignore(r),this.parseHeader()}async parseHeader(){let r=await this.tokenizer.readToken(j9);if(this.metadata.setFormat("lossless",!0),this.metadata.setFormat("container","Monkey's Audio"),this.metadata.setFormat("bitsPerSample",r.bitsPerSample),this.metadata.setFormat("sampleRate",r.sampleRate),this.metadata.setFormat("numberOfChannels",r.channel),this.metadata.setFormat("duration",n.calculateDuration(r)),!this.ape.descriptor)throw new Wp("Missing APE descriptor");return{forwardBytes:this.ape.descriptor.seekTableBytes+this.ape.descriptor.headerDataBytes+this.ape.descriptor.apeFrameDataBytes+this.ape.descriptor.terminatingDataBytes}}}});async function $9(n){if(n.fileInfo.size>=128){let r=new Uint8Array(3),o=n.position;return await n.readBuffer(r,{position:n.fileInfo.size-128}),n.setPosition(o),lr(r,"latin1")==="TAG"}return!1}var X9,US,Zp,HS,jg,KS,xd=le(()=>{X9=Je(at(),1);SA();Kt();ni();CI();Mn();US=(0,X9.default)("music-metadata:parser:ID3v1"),Zp=["Blues","Classic Rock","Country","Dance","Disco","Funk","Grunge","Hip-Hop","Jazz","Metal","New Age","Oldies","Other","Pop","R&B","Rap","Reggae","Rock","Techno","Industrial","Alternative","Ska","Death Metal","Pranks","Soundtrack","Euro-Techno","Ambient","Trip-Hop","Vocal","Jazz+Funk","Fusion","Trance","Classical","Instrumental","Acid","House","Game","Sound Clip","Gospel","Noise","Alt. Rock","Bass","Soul","Punk","Space","Meditative","Instrumental Pop","Instrumental Rock","Ethnic","Gothic","Darkwave","Techno-Industrial","Electronic","Pop-Folk","Eurodance","Dream","Southern Rock","Comedy","Cult","Gangsta Rap","Top 40","Christian Rap","Pop/Funk","Jungle","Native American","Cabaret","New Wave","Psychedelic","Rave","Showtunes","Trailer","Lo-Fi","Tribal","Acid Punk","Acid Jazz","Polka","Retro","Musical","Rock & Roll","Hard Rock","Folk","Folk/Rock","National Folk","Swing","Fast-Fusion","Bebob","Latin","Revival","Celtic","Bluegrass","Avantgarde","Gothic Rock","Progressive Rock","Psychedelic Rock","Symphonic Rock","Slow Rock","Big Band","Chorus","Easy Listening","Acoustic","Humour","Speech","Chanson","Opera","Chamber Music","Sonata","Symphony","Booty Bass","Primus","Porn Groove","Satire","Slow Jam","Club","Tango","Samba","Folklore","Ballad","Power Ballad","Rhythmic Soul","Freestyle","Duet","Punk Rock","Drum Solo","A Cappella","Euro-House","Dance Hall","Goa","Drum & Bass","Club-House","Hardcore","Terror","Indie","BritPop","Negerpunk","Polsk Punk","Beat","Christian Gangsta Rap","Heavy Metal","Black Metal","Crossover","Contemporary Christian","Christian Rock","Merengue","Salsa","Thrash Metal","Anime","JPop","Synthpop","Abstract","Art Rock","Baroque","Bhangra","Big Beat","Breakbeat","Chillout","Downtempo","Dub","EBM","Eclectic","Electro","Electroclash","Emo","Experimental","Garage","Global","IDM","Illbient","Industro-Goth","Jam Band","Krautrock","Leftfield","Lounge","Math Rock","New Romantic","Nu-Breakz","Post-Punk","Post-Rock","Psytrance","Shoegaze","Space Rock","Trop Rock","World Music","Neoclassical","Audiobook","Audio Theatre","Neue Deutsche Welle","Podcast","Indie Rock","G-Funk","Dubstep","Garage Rock","Psybient"],HS={len:128,get:(n,r)=>{let o=new jg(3).get(n,r);return o==="TAG"?{header:o,title:new jg(30).get(n,r+3),artist:new jg(30).get(n,r+33),album:new jg(30).get(n,r+63),year:new jg(4).get(n,r+93),comment:new jg(28).get(n,r+97),zeroByte:uA.get(n,r+127),track:uA.get(n,r+126),genre:uA.get(n,r+127)}:null}},jg=class{constructor(r){this.len=r,this.stringType=new je(r,"latin1")}get(r,o){let i=this.stringType.get(r,o);return i=SS(i),i=i.trim(),i.length>0?i:void 0}},KS=class n extends Qt{constructor(r,o,i){super(r,o,i),this.apeHeader=i.apeHeader}static getGenre(r){if(rr){US("Already consumed the last 128 bytes");return}let o=await this.tokenizer.readToken(HS,r);if(o){US("ID3v1 header found at: pos=%s",this.tokenizer.fileInfo.size-HS.len);let i=["title","artist","album","comment","track","year"];for(let a of i)o[a]&&o[a]!==""&&await this.addTag(a,o[a]);let e=n.getGenre(o.genre);e&&await this.addTag("genre",e)}else US("ID3v1 header not found at: pos=%s",this.tokenizer.fileInfo.size-HS.len)}async addTag(r,o){await this.metadata.addTag("ID3v1",r,o)}}});var mP,eX=le(()=>{SA();mP={len:16,get:(n,r)=>{let o=Ue.get(n,r+8),i=Ue.get(n,r+12);return{startTime:Ue.get(n,r),endTime:Ue.get(n,r+4),startOffset:o===4294967295?void 0:o,endOffset:i===4294967295?void 0:i}}}});function jd(n){switch(n){case 2:return 6;case 3:case 4:return 10;default:throw AX(n)}}function jFe(n,r){return r===3?{status:{tag_alter_preservation:kA(n,0,7),file_alter_preservation:kA(n,0,6),read_only:kA(n,0,5)},format:{compression:kA(n,1,7),encryption:kA(n,1,6),grouping_identity:kA(n,1,5),unsynchronisation:!1,data_length_indicator:!1}}:{status:{tag_alter_preservation:kA(n,0,6),file_alter_preservation:kA(n,0,5),read_only:kA(n,0,4)},format:{grouping_identity:kA(n,1,6),compression:kA(n,1,3),encryption:kA(n,1,2),unsynchronisation:kA(n,1,1),data_length_indicator:kA(n,1,0)}}}function Jd(n,r,o){switch(r){case 2:return JFe(n,r,o);case 3:case 4:return qFe(n,r,o);default:throw AX(r)}}function JFe(n,r,o){let i={id:lr(n.subarray(0,3),"ascii"),length:Br.get(n,3)};return i.id.match(/^[A-Z0-9]{3}$/)||o.addWarning(`Invalid ID3v2.${r} frame-header-ID: ${i.id}`),i}function qFe(n,r,o){let i={id:lr(n.subarray(0,4),"ascii"),length:(r===4?uP:Ue).get(n,4),flags:jFe(n.subarray(8,10),r)};return i.id.match(/^[A-Z0-9]{4}$/)||o.addWarning(`Invalid ID3v2.${r} frame-header-ID: ${i.id}`),i}function AX(n){throw new Jg(`Unexpected majorVer: ${n}`)}var SP=le(()=>{SA();Kt();Kg();Mn();DP()});function VFe(n){let r=[],o,i="";for(let e of n)if(typeof o=="string")if(e==="("&&o==="")i+="(",o=void 0;else if(e===")"){i!==""&&(r.push(i),i="");let a=tX(o);a&&r.push(a),o=void 0}else o+=e;else e==="("?o="":i+=e;return i&&(r.length===0&&i.match(/^\d*$/)&&(i=tX(i)),i&&r.push(i)),r}function tX(n){if(n==="RX")return"Remix";if(n==="CR")return"Cover";if(n.match(/^\d*$/))return Zp[Number.parseInt(n,10)]}function zFe(n){throw new Jg(`Unexpected majorVer: ${n}`)}var rX,YS,Co,wP,xS,Jg,DP=le(()=>{rX=Je(at(),1);SA();Kt();Kg();xd();Ht();Kt();eX();SP();YS=(0,rX.default)("music-metadata:id3v2:frame-parser"),Co="latin1",wP={encoding:Co,bom:!1};xS=class n{constructor(r,o){this.major=r,this.warningCollector=o}readData(r,o,i){if(r.length===0){this.warningCollector.addWarning(`id3v2.${this.major} header has empty tag type=${o}`);return}let{encoding:e,bom:a}=Vp.get(r,0),A=r.length,t=0,s=[],g=n.getNullTerminatorLength(e),c;switch(YS(`Parsing tag type=${o}, encoding=${e}, bom=${a}`),o!=="TXXX"&&o[0]==="T"?"T*":o){case"T*":case"GRP1":case"GP1":case"IPLS":case"MVIN":case"MVNM":case"PCS":case"PCST":{let I;try{I=n.trimNullPadding(Vr(r.subarray(1),e))}catch(E){if(E instanceof Error){this.warningCollector.addWarning(`id3v2.${this.major} type=${o} header has invalid string value: ${E.message}`);break}throw E}switch(o){case"TMCL":case"TIPL":case"IPLS":s=n.functionList(this.splitValue(o,I));break;case"TRK":case"TRCK":case"TPOS":case"TIT1":case"TIT2":case"TIT3":s=I;break;case"TCOM":case"TEXT":case"TOLY":case"TOPE":case"TPE1":case"TSRC":s=this.splitValue(o,I);break;case"TCO":case"TCON":s=this.splitValue(o,I).map(E=>VFe(E)).reduce((E,B)=>E.concat(B),[]);break;case"PCS":case"PCST":s=this.major>=4?this.splitValue(o,I):[I],s=Array.isArray(s)&&s[0]===""?1:0;break;default:s=this.major>=4?this.splitValue(o,I):[I]}break}case"TXXX":{let I=n.readIdentifierAndData(r.subarray(1),e);s={description:I.id,text:this.splitValue(o,Vr(I.data,e).replace(/\x00+$/,""))};break}case"PIC":case"APIC":if(i){let I={};switch(r=r.subarray(1),this.major){case 2:I.format=Vr(r.subarray(0,3),"latin1"),r=r.subarray(3);break;case 3:case 4:c=Pn(r,Co),I.format=Vr(r.subarray(0,c),Co),r=r.subarray(c+1);break;default:throw zFe(this.major)}I.format=n.fixPictureMimeType(I.format),I.type=jp[r[0]],r=r.subarray(1),c=Pn(r,e),I.description=Vr(r.subarray(0,c),e),r=r.subarray(c+g),I.data=r,s=I}break;case"CNT":case"PCNT":s=dP(r);break;case"SYLT":{let I=fP.get(r,0);r=r.subarray(fP.len);let E={descriptor:"",language:I.language,contentType:I.contentType,timeStampFormat:I.timeStampFormat,syncText:[]},B=!1;for(;r.length>0;){let f=n.readNullTerminatedString(r,I.encoding);if(r=r.subarray(f.len),B){let Q=Ue.get(r,0);r=r.subarray(Ue.len),E.syncText.push({text:f.text,timestamp:Q})}else E.descriptor=f.text,B=!0}s=E;break}case"ULT":case"USLT":case"COM":case"COMM":{let I=DS.get(r,t);t+=DS.len;let E=n.readNullTerminatedString(r.subarray(t),I.encoding);t+=E.len;let B=n.readNullTerminatedString(r.subarray(t),I.encoding);s={language:I.language,descriptor:E.text,text:B.text};break}case"UFID":{let I=n.readIdentifierAndData(r,Co);s={owner_identifier:I.id,identifier:I.data};break}case"PRIV":{let I=n.readIdentifierAndData(r,Co);s={owner_identifier:I.id,data:I.data};break}case"POPM":{r=r.subarray(t);let I=n.readNullTerminatedString(r,wP),E=I.text;if(r=r.subarray(I.len),r.length===0){this.warningCollector.addWarning(`id3v2.${this.major} type=${o} POPM frame missing rating byte`),s={email:E,rating:0,counter:void 0};break}let B=uA.get(r,0),f=r.subarray(uA.len);s={email:E,rating:B,counter:f.length>0?dP(f):void 0};break}case"GEOB":{let I=Vp.get(r,0);r=r.subarray(1);let E=n.readNullTerminatedString(r,wP),B=E.text;r=r.subarray(E.len);let f=n.readNullTerminatedString(r,I),Q=f.text;r=r.subarray(f.len);let y=n.readNullTerminatedString(r,I),m=y.text;r=r.subarray(y.len),s={type:B,filename:Q,description:m,data:r};break}case"WCOM":case"WCOP":case"WOAF":case"WOAR":case"WOAS":case"WORS":case"WPAY":case"WPUB":s=n.readNullTerminatedString(r,wP).text;break;case"WXXX":{let I=Vp.get(r,0);r=r.subarray(1);let E=n.readNullTerminatedString(r,I),B=E.text;r=r.subarray(E.len),s={description:B,url:n.trimNullPadding(Vr(r,Co))};break}case"WFD":case"WFED":{let I=Vp.get(r,0);r=r.subarray(1),s=n.readNullTerminatedString(r,I).text;break}case"MCDI":{s=r.subarray(0,A);break}case"CHAP":{YS("Reading CHAP"),c=Pn(r,Co);let I={label:Vr(r.subarray(0,c),Co),info:mP.get(r,c+1),frames:new Map};for(t+=c+1+mP.len;t=a.length)return{text:Vr(r,o.encoding),len:e};let t=r.subarray(0,i+A);return{text:Vr(t,o.encoding),len:i+A+n.getNullTerminatorLength(o.encoding)}}static fixPictureMimeType(r){switch(r=r.toLocaleLowerCase(),r){case"jpg":return"image/jpeg";case"png":return"image/png"}return r}static functionList(r){let o={};for(let i=0;i+11?this.warningCollector.addWarning(`ID3v2.${this.major} ${r} uses non standard null-separator.`):i=o.split(/\//g)):i=o.split(/\x00/g),n.trimArray(i)}static trimArray(r){return r.map(o=>n.trimNullPadding(o).trim())}static trimNullPadding(r){let o=r.length;for(;o>0&&r.charCodeAt(o-1)===0;)o--;return o===r.length?r:r.slice(0,o)}static readIdentifierAndData(r,o){let i=n.readNullTerminatedString(r,{encoding:o,bom:!1});return{id:i.text,data:r.subarray(i.len)}}static getNullTerminatorLength(r){return r.startsWith("utf-16")?2:1}},Jg=class extends pt("id3v2"){}});function WFe(n){throw new Jg(`Unexpected majorVer: ${n}`)}var ho,Xp=le(()=>{SA();DP();Kg();SP();ho=class n{constructor(){this.tokenizer=void 0,this.id3Header=void 0,this.metadata=void 0,this.headerType=void 0,this.options=void 0}static removeUnsyncBytes(r){let o=0,i=0;for(;o0?this.parseExtendedHeaderData(o,r.size):this.parseId3Data(this.id3Header.size-r.size)}async parseExtendedHeaderData(r,o){return await this.tokenizer.ignore(r),this.parseId3Data(this.id3Header.size-o)}async parseId3Data(r){let o=await this.tokenizer.readToken(new ut(r));for(let i of this.parseMetadata(o))switch(i.id){case"TXXX":i.value&&await this.handleTag(i,i.value.text,()=>i.value.description);break;default:await(Array.isArray(i.value)?Promise.all(i.value.map(e=>this.addTag(i.id,e))):this.addTag(i.id,i.value))}}async handleTag(r,o,i,e=a=>a){await Promise.all(o.map(a=>this.addTag(n.makeDescriptionTagName(r.id,i(a)),e(a))))}async addTag(r,o){await this.metadata.addTag(this.headerType,r,o)}parseMetadata(r){let o=0,i=[];for(;o!==r.length;){let e=jd(this.id3Header.version.major);if(o+e>r.length){this.metadata.addWarning("Illegal ID3v2 tag length");break}let a=r.subarray(o,o+e);o+=e;let A=Jd(a,this.id3Header.version.major,this.metadata),t=r.subarray(o,o+A.length);o+=A.length;let s=n.readFrameData(t,A,this.id3Header.version.major,!this.options.skipCovers,this.metadata);s&&i.push({id:A.id,value:s})}return i}static mapId3v2Chapters(r){if(!r)return;let o=r.filter(g=>g.id==="CHAP");if(!o?.length)return;let e=r.filter(g=>g.id==="CTOC")?.find(g=>g.value.flags?.topLevel),a=new Map;for(let g of o)a.set(g.value.label,g.value);let A=e?.value.childElementIds,t=[],s=A??[...a.keys()];for(let g of s){let c=a.get(g);if(!c)continue;let I=c.frames,E=I.get("TIT2");E&&t.push({id:g,title:E,url:I.get("WXXX"),start:c.info.startTime/1e3,end:c.info.endTime/1e3,image:I.get("APIC")})}return A||t.sort((g,c)=>g.start-c.start),t.length?t:void 0}}});var aX,OP,Gn,qd=le(()=>{go();aX=Je(at(),1);Kg();Xp();xd();ni();OP=(0,aX.default)("music-metadata:parser:ID3"),Gn=class extends Qt{constructor(){super(...arguments),this.id3parser=new ho}static async startsWithID3v2Header(r){return(await r.peekToken(Hd)).fileIdentifier==="ID3"}async parse(){try{await this.parseID3v2()}catch(r){if(r instanceof NA)OP("End-of-stream");else throw r}}finalize(){}async parseID3v2(){await this.tryReadId3v2Headers(),OP("End of ID3v2 header, go to MPEG-parser: pos=%s",this.tokenizer.position),await this.postId3v2Parse(),this.options.skipPostHeaders&&this.metadata.hasAny()?this.finalize():(await new KS(this.metadata,this.tokenizer,this.options).parse(),this.finalize())}async tryReadId3v2Headers(){if((await this.tokenizer.peekToken(Hd)).fileIdentifier==="ID3")return OP("Found ID3v2 header, pos=%s",this.tokenizer.position),await this.id3parser.parse(this.metadata,this.tokenizer,this.options),this.tryReadId3v2Headers()}}});var bP,iX=le(()=>{Kt();bP={len:2,get:(n,r)=>{let o=qA(n,r,0,3),i=qA(n,r,6,1),e=qA(n,r,7,9)/10;if(o>0)return{type:qA(n,r,0,3),origin:qA(n,r,3,3),adjustment:i?-e:e}}}});var oX,nX=le(()=>{SA();Kt();iX();oX={len:27,get:(n,r)=>{let o=Ue.get(n,r+2);return{revision:qA(n,r,0,4),vbr_method:qA(n,r,4,4),lowpass_filter:100*uA.get(n,r+1),track_peak:o===0?null:o/2**23,track_gain:bP.get(n,6),album_gain:bP.get(n,8),music_length:Ue.get(n,r+20),music_crc:uA.get(n,r+24),header_crc:PA.get(n,r+24)}}}});async function sX(n){let r=await n.readToken(ZFe),o={numFrames:null,streamSize:null,vbrScale:null};if(r.frames&&(o.numFrames=await n.readToken(Ue)),r.bytes&&(o.streamSize=await n.readToken(Ue)),r.toc&&(o.toc=new Uint8Array(100),await n.readBuffer(o.toc)),r.vbrScale&&(o.vbrScale=await n.readToken(Ue)),await n.peekToken(new je(4,"ascii"))==="LAME"){await n.ignore(4),o.lame={version:await n.readToken(new je(5,"ascii"))};let e=o.lame.version.match(/\d+.\d+/g);if(e!==null){let A=e[0].split(".").map(t=>Number.parseInt(t,10));A[0]>=3&&A[1]>=90&&(o.lame.extended=await n.readToken(oX))}}return o}var MP,jS,ZFe,gX=le(()=>{SA();Kt();nX();MP=new je(4,"ascii"),jS=new je(6,"ascii"),ZFe={len:4,get:(n,r)=>({frames:oa(n,r,31),bytes:oa(n,r,30),toc:oa(n,r,29),vbrScale:oa(n,r,28)})}});var EX={};Qr(EX,{MpegContentError:()=>hI,MpegParser:()=>_P});function $Fe(n){return`V${Math.floor((100-n)/10)}`}var pX,_i,hI,cX,IX,XFe,Ni,lX,_P,CX=le(()=>{SA();go();pX=Je(at(),1);Kt();qd();gX();Ht();_i=(0,pX.default)("music-metadata:parser:mpeg"),hI=class extends pt("MPEG"){},cX=1024,IX={AudioObjectTypes:["AAC Main","AAC LC","AAC SSR","AAC LTP"],SamplingFrequencies:[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350,null,null,null]},XFe=[void 0,["front-center"],["front-left","front-right"],["front-center","front-left","front-right"],["front-center","front-left","front-right","back-center"],["front-center","front-left","front-right","back-left","back-right"],["front-center","front-left","front-right","back-left","back-right","LFE-channel"],["front-center","front-left","front-right","side-left","side-right","back-left","back-right","LFE-channel"]],Ni=class n{constructor(r,o){this.bitrateIndex=null,this.sampRateFreqIndex=null,this.padding=null,this.privateBit=null,this.channelModeIndex=null,this.modeExtension=null,this.isOriginalMedia=null,this.version=null,this.bitrate=null,this.samplingRate=null,this.frameLength=0,this.versionIndex=qA(r,o+1,3,2),this.layer=n.LayerDescription[qA(r,o+1,5,2)],this.versionIndex>1&&this.layer===0?this.parseAdtsHeader(r,o):this.parseMpegHeader(r,o),this.isProtectedByCRC=!oa(r,o+1,7)}calcDuration(r){return this.samplingRate==null?null:r*this.calcSamplesPerFrame()/this.samplingRate}calcSamplesPerFrame(){return n.samplesInFrameTable[this.version===1?0:1][this.layer]}calculateSideInfoLength(){if(this.layer!==3)return 2;if(this.channelModeIndex===3){if(this.version===1)return 17;if(this.version===2||this.version===2.5)return 9}else{if(this.version===1)return 32;if(this.version===2||this.version===2.5)return 17}return null}calcSlotSize(){return[null,4,1,1][this.layer]}parseMpegHeader(r,o){this.container="MPEG",this.bitrateIndex=qA(r,o+2,0,4),this.sampRateFreqIndex=qA(r,o+2,4,2),this.padding=oa(r,o+2,6),this.privateBit=oa(r,o+2,7),this.channelModeIndex=qA(r,o+3,0,2),this.modeExtension=qA(r,o+3,2,2),this.isCopyrighted=oa(r,o+3,4),this.isOriginalMedia=oa(r,o+3,5),this.emphasis=qA(r,o+3,7,2),this.version=n.VersionID[this.versionIndex],this.channelMode=n.ChannelMode[this.channelModeIndex],this.codec=`MPEG ${this.version} Layer ${this.layer}`;let i=this.calcBitrate();if(!i)throw new hI("Cannot determine bit-rate");if(this.bitrate=i*1e3,this.samplingRate=this.calcSamplingRate(),this.samplingRate==null)throw new hI("Cannot determine sampling-rate")}parseAdtsHeader(r,o){_i("layer=0 => ADTS"),this.version=this.versionIndex===2?4:2,this.container=`ADTS/MPEG-${this.version}`;let i=qA(r,o+2,0,2);this.codec="AAC",this.codecProfile=IX.AudioObjectTypes[i],_i(`MPEG-4 audio-codec=${this.codec}`);let e=qA(r,o+2,2,4);this.samplingRate=IX.SamplingFrequencies[e],_i(`sampling-rate=${this.samplingRate}`);let a=qA(r,o+2,7,3);this.mp4ChannelConfig=XFe[a],_i(`channel-config=${this.mp4ChannelConfig?this.mp4ChannelConfig.join("+"):"?"}`),this.frameLength=qA(r,o+3,6,2)<<11}calcBitrate(){if(this.bitrateIndex===0||this.bitrateIndex===15)return null;if(this.version&&this.bitrateIndex){let r=10*Math.floor(this.version)+this.layer;return n.bitrate_index[this.bitrateIndex][r]}return null}calcSamplingRate(){return this.sampRateFreqIndex===3||this.version===null||this.sampRateFreqIndex==null?null:n.sampling_rate_freq_index[this.version][this.sampRateFreqIndex]}};Ni.SyncByte1=255;Ni.SyncByte2=224;Ni.VersionID=[2.5,null,2,1];Ni.LayerDescription=[0,3,2,1];Ni.ChannelMode=["stereo","joint_stereo","dual_channel","mono"];Ni.bitrate_index={1:{11:32,12:32,13:32,21:32,22:8,23:8},2:{11:64,12:48,13:40,21:48,22:16,23:16},3:{11:96,12:56,13:48,21:56,22:24,23:24},4:{11:128,12:64,13:56,21:64,22:32,23:32},5:{11:160,12:80,13:64,21:80,22:40,23:40},6:{11:192,12:96,13:80,21:96,22:48,23:48},7:{11:224,12:112,13:96,21:112,22:56,23:56},8:{11:256,12:128,13:112,21:128,22:64,23:64},9:{11:288,12:160,13:128,21:144,22:80,23:80},10:{11:320,12:192,13:160,21:160,22:96,23:96},11:{11:352,12:224,13:192,21:176,22:112,23:112},12:{11:384,12:256,13:224,21:192,22:128,23:128},13:{11:416,12:320,13:256,21:224,22:144,23:144},14:{11:448,12:384,13:320,21:256,22:160,23:160}};Ni.sampling_rate_freq_index={1:{0:44100,1:48e3,2:32e3},2:{0:22050,1:24e3,2:16e3},2.5:{0:11025,1:12e3,2:8e3}};Ni.samplesInFrameTable=[[0,384,1152,1152],[0,384,1152,576]];lX={len:4,get:(n,r)=>new Ni(n,r)};_P=class extends Gn{constructor(){super(...arguments),this.frameCount=0,this.syncFrameCount=-1,this.totalDataLength=0,this.bitrates=[],this.offset=0,this.frame_size=0,this.calculateEofDuration=!1,this.samplesPerFrame=null,this.buf_frame_header=new Uint8Array(4),this.mpegOffset=null,this.syncPeek={buf:new Uint8Array(cX),len:0}}async postId3v2Parse(){this.metadata.setFormat("lossless",!1),this.metadata.setAudioOnly();try{let r=!1;for(;!r;)await this.sync(),r=await this.parseCommonMpegHeader()}catch(r){if(r instanceof NA){if(_i("End-of-stream"),this.calculateEofDuration&&this.samplesPerFrame!==null){let o=this.frameCount*this.samplesPerFrame;if(this.metadata.setFormat("numberOfSamples",o),this.metadata.format.sampleRate){let i=o/this.metadata.format.sampleRate;_i(`Calculate duration at EOF: ${i} sec.`,i),this.metadata.setFormat("duration",i)}}}else throw r}}finalize(){let r=this.metadata.format,o=!!this.metadata.native.ID3v1;if(this.mpegOffset!==null){if(r.duration&&this.tokenizer.fileInfo.size){let i=this.tokenizer.fileInfo.size-this.mpegOffset-(o?128:0);r.codecProfile&&r.codecProfile[0]==="V"&&this.metadata.setFormat("bitrate",i*8/r.duration)}if(this.tokenizer.fileInfo.size&&r.codecProfile==="CBR"){let i=this.tokenizer.fileInfo.size-this.mpegOffset-(o?128:0);if(this.frame_size!==null&&this.samplesPerFrame!==null){let e=Math.round(i/this.frame_size)*this.samplesPerFrame;if(this.metadata.setFormat("numberOfSamples",e),r.sampleRate&&!r.duration){let a=e/r.sampleRate;_i("Calculate CBR duration based on file size: %s",a),this.metadata.setFormat("duration",a)}}}}}async sync(){let r=!1;for(;;){let o=0;if(this.syncPeek.len=await this.tokenizer.peekBuffer(this.syncPeek.buf,{length:cX,mayBeLess:!0}),this.syncPeek.len<=163)throw new NA;for(;;){if(r&&(this.syncPeek.buf[o]&224)===224){this.buf_frame_header[0]=Ni.SyncByte1,this.buf_frame_header[1]=this.syncPeek.buf[o],await this.tokenizer.ignore(o),_i(`Sync at offset=${this.tokenizer.position-1}, frameCount=${this.frameCount}`),this.syncFrameCount===this.frameCount&&(_i(`Re-synced MPEG stream, frameCount=${this.frameCount}`),this.frameCount=0,this.frame_size=0),this.syncFrameCount=this.frameCount;return}if(r=!1,o=this.syncPeek.buf.indexOf(Ni.SyncByte1,o),o===-1){if(this.syncPeek.len=2&&r.layer===0?this.parseAdts(r):this.parseAudioFrameHeader(r)}async parseAudioFrameHeader(r){this.metadata.setFormat("numberOfChannels",r.channelMode==="mono"?1:2),this.metadata.setFormat("bitrate",r.bitrate),this.frameCount<20*1e4&&_i("offset=%s MP%s bitrate=%s sample-rate=%s",this.tokenizer.position-4,r.layer,r.bitrate,r.samplingRate);let o=r.calcSlotSize();if(o===null)throw new hI("invalid slot_size");let i=r.calcSamplesPerFrame();_i(`samples_per_frame=${i}`);let e=i/8;if(r.bitrate!==null&&r.samplingRate!=null){let a=e*r.bitrate/r.samplingRate+(r.padding?o:0);this.frame_size=Math.floor(a)}if(this.audioFrameHeader=r,r.bitrate!==null&&this.bitrates.push(r.bitrate),this.frameCount===1)return this.offset=lX.len,await this.skipSideInformation(),!1;if(this.frameCount===4){if(this.areAllSame(this.bitrates)){if(this.samplesPerFrame=i,this.metadata.setFormat("codecProfile","CBR"),this.tokenizer.fileInfo.size)return!0}else if(this.metadata.format.duration)return!0;if(!this.options.duration)return!0}return this.options.duration&&this.frameCount===4&&(this.samplesPerFrame=i,this.calculateEofDuration=!0),this.offset=4,r.isProtectedByCRC?(await this.parseCrc(),!1):(await this.skipSideInformation(),!1)}async parseAdts(r){let o=new Uint8Array(3);if(await this.tokenizer.readBuffer(o),r.frameLength+=qA(o,0,0,11),this.totalDataLength+=r.frameLength,this.samplesPerFrame=1024,r.samplingRate!==null){let i=r.samplingRate/this.samplesPerFrame,a=8*(this.frameCount===0?0:this.totalDataLength/this.frameCount)*i+.5;this.metadata.setFormat("bitrate",a),_i(`frame-count=${this.frameCount}, size=${r.frameLength} bytes, bit-rate=${a}`)}if(await this.tokenizer.ignore(r.frameLength>7?r.frameLength-7:1),this.frameCount===3)if(this.metadata.setFormat("codecProfile",r.codecProfile),r.mp4ChannelConfig&&this.metadata.setFormat("numberOfChannels",r.mp4ChannelConfig.length),this.options.duration)this.calculateEofDuration=!0;else return!0;return!1}async parseCrc(){return await this.tokenizer.ignore(co.len),this.offset+=co.len,this.skipSideInformation()}async skipSideInformation(){if(this.audioFrameHeader){let r=this.audioFrameHeader.calculateSideInfoLength();if(r!==null){await this.tokenizer.readToken(new ut(r)),this.offset+=r,await this.readXtraInfoHeader();return}}}async readXtraInfoHeader(){let r=await this.tokenizer.readToken(MP);switch(this.offset+=MP.len,r){case"Info":return this.metadata.setFormat("codecProfile","CBR"),this.readXingInfoHeader();case"Xing":{let i=await this.readXingInfoHeader();if(i.vbrScale!==null){let e=$Fe(i.vbrScale);this.metadata.setFormat("codecProfile",e)}return null}case"Xtra":break;case"LAME":{let i=await this.tokenizer.readToken(jS);if(this.frame_size!==null&&this.frame_size>=this.offset+jS.len)return this.offset+=jS.len,this.metadata.setFormat("tool",`LAME ${i}`),await this.skipFrameData(this.frame_size-this.offset),null;this.metadata.addWarning("Corrupt LAME header");break}}let o=this.frame_size-this.offset;return o<0?this.metadata.addWarning(`Frame ${this.frameCount}corrupt: negative frameDataLeft`):await this.skipFrameData(o),null}async readXingInfoHeader(){let r=this.tokenizer.position,o=await sX(this.tokenizer);if(this.offset+=this.tokenizer.position-r,o.lame&&(this.metadata.setFormat("tool",`LAME ${po(o.lame.version)}`),o.lame.extended&&(this.metadata.setFormat("trackPeakLevel",o.lame.extended.track_peak),o.lame.extended.track_gain&&this.metadata.setFormat("trackGain",o.lame.extended.track_gain.adjustment),o.lame.extended.album_gain&&this.metadata.setFormat("albumGain",o.lame.extended.album_gain.adjustment),this.metadata.setFormat("duration",o.lame.extended.music_length/1e3))),o.streamSize&&this.audioFrameHeader&&o.numFrames!==null){let e=this.audioFrameHeader.calcDuration(o.numFrames);return this.metadata.setFormat("duration",e),_i("Get duration from Xing header: %s",this.metadata.format.duration),o}let i=this.frame_size-this.offset;return await this.skipFrameData(i),o}async skipFrameData(r){if(r<0)throw new hI("frame-data-left cannot be negative");await this.tokenizer.ignore(r)}areAllSame(r){let o=r[0];return r.every(i=>i===o)}}});var hX,dX=le(()=>{hX={parserType:"mpeg",extensions:[".mp2",".mp3",".m2a",".aac","aacp"],mimeTypes:["audio/mpeg","audio/mp3","audio/aacs","audio/aacp"],async load(){return(await Promise.resolve().then(()=>(CX(),EX))).MpegParser}}});var uX,BX=le(()=>{uX={parserType:"apev2",extensions:[".ape"],mimeTypes:["audio/ape","audio/monkeys-audio"],async load(){return(await Promise.resolve().then(()=>(CI(),Z9))).APEv2Parser}}});function NP(n){let r=n.trim();if(r.length!==36||r[8]!=="-"||r[13]!=="-"||r[18]!=="-"||r[23]!=="-")throw new Error(`Invalid GUID format: ${n}`);let o,i=new Uint8Array(16);o=parseInt(r.slice(0,8),16),i[0]=o&255,i[1]=o>>>8&255,i[2]=o>>>16&255,i[3]=o>>>24&255,o=parseInt(r.slice(9,13),16),i[4]=o&255,i[5]=o>>>8&255,o=parseInt(r.slice(14,18),16),i[6]=o&255,i[7]=o>>>8&255,o=parseInt(r.slice(19,23),16),i[8]=o>>>8&255,i[9]=o&255,o=parseInt(r.slice(24,32),16),i[10]=o>>>24&255,i[11]=o>>>16&255,i[12]=o>>>8&255,i[13]=o&255,o=parseInt(r.slice(32,36),16),i[14]=o>>>8&255,i[15]=o&255;for(let e=0;e<16;e++)if(!Number.isFinite(i[e]))throw new Error(`Invalid GUID format: ${n}`);if(!/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(r))throw new Error(`Invalid GUID format: ${n}`);return i}var JS,fX=le(()=>{JS=class n{constructor(r){if(r.length!==16)throw new Error("GUID must be exactly 16 bytes");this.bytes=r}static fromString(r){return new n(NP(r))}toString(){let r=this.bytes,o=s=>s.toString(16).padStart(2,"0"),i=o(r[3])+o(r[2])+o(r[1])+o(r[0]),e=o(r[5])+o(r[4]),a=o(r[7])+o(r[6]),A=o(r[8])+o(r[9]),t=o(r[10])+o(r[11])+o(r[12])+o(r[13])+o(r[14])+o(r[15]);return`${i}-${e}-${a}-${A}-${t}`.toUpperCase()}equals(r,o=0){if(o<0||r.length-o<16)return!1;let i=this.bytes;for(let e=0;e<16;e++)if(r[o+e]!==i[e])return!1;return!0}}});var He,Yt,TP=le(()=>{fX();He=class n{static fromBin(r,o=0){return new n(n.decode(r,o))}static decode(r,o=0){return new JS(r.subarray(o,o+16)).toString()}static decodeMediaType(r){switch(r.str){case n.AudioMedia.str:return"audio";case n.VideoMedia.str:return"video";case n.CommandMedia.str:return"command";case n.Degradable_JPEG_Media.str:return"degradable-jpeg";case n.FileTransferMedia.str:return"file-transfer";case n.BinaryMedia.str:return"binary"}}static encode(r){return NP(r)}constructor(r){this.str=r}equals(r){return this.str===r.str}toBin(){return n.encode(this.str)}};He.HeaderObject=new He("75B22630-668E-11CF-A6D9-00AA0062CE6C");He.DataObject=new He("75B22636-668E-11CF-A6D9-00AA0062CE6C");He.SimpleIndexObject=new He("33000890-E5B1-11CF-89F4-00A0C90349CB");He.IndexObject=new He("D6E229D3-35DA-11D1-9034-00A0C90349BE");He.MediaObjectIndexObject=new He("FEB103F8-12AD-4C64-840F-2A1D2F7AD48C");He.TimecodeIndexObject=new He("3CB73FD0-0C4A-4803-953D-EDF7B6228F0C");He.FilePropertiesObject=new He("8CABDCA1-A947-11CF-8EE4-00C00C205365");He.StreamPropertiesObject=new He("B7DC0791-A9B7-11CF-8EE6-00C00C205365");He.HeaderExtensionObject=new He("5FBF03B5-A92E-11CF-8EE3-00C00C205365");He.CodecListObject=new He("86D15240-311D-11D0-A3A4-00A0C90348F6");He.ScriptCommandObject=new He("1EFB1A30-0B62-11D0-A39B-00A0C90348F6");He.MarkerObject=new He("F487CD01-A951-11CF-8EE6-00C00C205365");He.BitrateMutualExclusionObject=new He("D6E229DC-35DA-11D1-9034-00A0C90349BE");He.ErrorCorrectionObject=new He("75B22635-668E-11CF-A6D9-00AA0062CE6C");He.ContentDescriptionObject=new He("75B22633-668E-11CF-A6D9-00AA0062CE6C");He.ExtendedContentDescriptionObject=new He("D2D0A440-E307-11D2-97F0-00A0C95EA850");He.ContentBrandingObject=new He("2211B3FA-BD23-11D2-B4B7-00A0C955FC6E");He.StreamBitratePropertiesObject=new He("7BF875CE-468D-11D1-8D82-006097C9A2B2");He.ContentEncryptionObject=new He("2211B3FB-BD23-11D2-B4B7-00A0C955FC6E");He.ExtendedContentEncryptionObject=new He("298AE614-2622-4C17-B935-DAE07EE9289C");He.DigitalSignatureObject=new He("2211B3FC-BD23-11D2-B4B7-00A0C955FC6E");He.PaddingObject=new He("1806D474-CADF-4509-A4BA-9AABCB96AAE8");He.ExtendedStreamPropertiesObject=new He("14E6A5CB-C672-4332-8399-A96952065B5A");He.AdvancedMutualExclusionObject=new He("A08649CF-4775-4670-8A16-6E35357566CD");He.GroupMutualExclusionObject=new He("D1465A40-5A79-4338-B71B-E36B8FD6C249");He.StreamPrioritizationObject=new He("D4FED15B-88D3-454F-81F0-ED5C45999E24");He.BandwidthSharingObject=new He("A69609E6-517B-11D2-B6AF-00C04FD908E9");He.LanguageListObject=new He("7C4346A9-EFE0-4BFC-B229-393EDE415C85");He.MetadataObject=new He("C5F8CBEA-5BAF-4877-8467-AA8C44FA4CCA");He.MetadataLibraryObject=new He("44231C94-9498-49D1-A141-1D134E457054");He.IndexParametersObject=new He("D6E229DF-35DA-11D1-9034-00A0C90349BE");He.MediaObjectIndexParametersObject=new He("6B203BAD-3F11-48E4-ACA8-D7613DE2CFA7");He.TimecodeIndexParametersObject=new He("F55E496D-9797-4B5D-8C8B-604DFE9BFB24");He.CompatibilityObject=new He("26F18B5D-4584-47EC-9F5F-0E651F0452C9");He.AdvancedContentEncryptionObject=new He("43058533-6981-49E6-9B74-AD12CB86D58C");He.AudioMedia=new He("F8699E40-5B4D-11CF-A8FD-00805F5C442B");He.VideoMedia=new He("BC19EFC0-5B4D-11CF-A8FD-00805F5C442B");He.CommandMedia=new He("59DACFC0-59E6-11D0-A3AC-00A0C90348F6");He.JFIF_Media=new He("B61BE100-5B4E-11CF-A8FD-00805F5C442B");He.Degradable_JPEG_Media=new He("35907DE0-E415-11CF-A917-00805F5C442B");He.FileTransferMedia=new He("91BD222C-F21C-497A-8B6D-5AA86BFC0185");He.BinaryMedia=new He("3AFB65E2-47EF-40F2-AC2C-70A90D71D343");He.ASF_Index_Placeholder_Object=new He("D9AADE20-7C17-4F9C-BC28-8555DD98E2A2");Yt=He});function yX(n){return eLe[n]}function Vd(n){return po(Vr(n,"utf-16le"))}function QX(n){return new Uint8Array(n)}function ALe(n,r=0){return mX(n,r)===1}function tLe(n,r=0){return ve.get(n,r)}function rLe(n,r=0){return fr.get(n,r)}function mX(n,r=0){return yA.get(n,r)}var eLe,SX=le(()=>{SA();Kt();eLe=[Vd,QX,ALe,tLe,rLe,mX,QX]});async function DX(n){let r=await n.readNumber(yA);return(await n.readToken(new je(r*2,"utf-16le"))).replace("\0","")}async function OX(n){let r=await n.readToken(aLe),o=[];for(let i=0;i{SA();Kt();TP();SX();Kg();Ht();$p=class extends pt("ASF"){},wX={len:30,get:(n,r)=>({objectId:Yt.fromBin(n,r),objectSize:Number(fr.get(n,r+16)),numberOfHeaderObjects:ve.get(n,r+24)})},qg={len:24,get:(n,r)=>({objectId:Yt.fromBin(n,r),objectSize:Number(fr.get(n,r+16))})},Ts=class{constructor(r){this.len=Number(r.objectSize)-qg.len}postProcessTag(r,o,i,e){if(o==="WM/Picture")r.push({id:o,value:RP.fromBuffer(e)});else{let a=yX(i);if(!a)throw new $p(`unexpected value headerType: ${i}`);r.push({id:o,value:a(e)})}}},zd=class extends Ts{get(r,o){return null}},eE=class extends Ts{get(r,o){return{fileId:Yt.fromBin(r,o),fileSize:fr.get(r,o+16),creationDate:fr.get(r,o+24),dataPacketsCount:fr.get(r,o+32),playDuration:fr.get(r,o+40),sendDuration:fr.get(r,o+48),preroll:fr.get(r,o+56),flags:{broadcast:kA(r,o+64,24),seekable:kA(r,o+64,25)},minimumDataPacketSize:ve.get(r,o+68),maximumDataPacketSize:ve.get(r,o+72),maximumBitrate:ve.get(r,o+76)}}};eE.guid=Yt.FilePropertiesObject;AE=class extends Ts{get(r,o){return{streamType:Yt.decodeMediaType(Yt.fromBin(r,o)),errorCorrectionType:Yt.fromBin(r,o+8)}}};AE.guid=Yt.StreamPropertiesObject;tE=class{constructor(){this.len=22}get(r,o){let i=new DataView(r.buffer,o);return{reserved1:Yt.fromBin(r,o),reserved2:i.getUint16(16,!0),extensionDataSize:i.getUint16(18,!0)}}};tE.guid=Yt.HeaderExtensionObject;aLe={len:20,get:(n,r)=>({entryCount:new DataView(n.buffer,r).getUint16(16,!0)})};dI=class n extends Ts{get(r,o){let i=[],e=new DataView(r.buffer,o),a=10;for(let A=0;A0){let s=n.contentDescTags[A],g=a+t;i.push({id:s,value:Vd(r.subarray(o+a,o+g))}),a=g}}return i}};dI.guid=Yt.ContentDescriptionObject;dI.contentDescTags=["Title","Author","Copyright","Description","Rating"];rE=class extends Ts{get(r,o){let i=[],e=new DataView(r.buffer,o),a=e.getUint16(0,!0),A=2;for(let t=0;tPP});var bX,vP,sLe,PP,_X=le(()=>{bX=Je(at(),1);lI();TP();kP();ni();kP();vP=(0,bX.default)("music-metadata:parser:ASF"),sLe="asf",PP=class extends Qt{async parse(){let r=await this.tokenizer.readToken(wX);if(!r.objectId.equals(Yt.HeaderObject))throw new $p(`expected asf header; but was not found; got: ${r.objectId.str}`);await this.parseObjectHeader(r.numberOfHeaderObjects)}async parseObjectHeader(r){let o;do{let i=await this.tokenizer.readToken(qg);switch(vP("header GUID=%s",i.objectId.str),i.objectId.str){case eE.guid.str:{let e=await this.tokenizer.readToken(new eE(i));this.metadata.setFormat("duration",Number(e.playDuration/BigInt(1e3))/1e4-Number(e.preroll)/1e3),this.metadata.setFormat("bitrate",e.maximumBitrate);break}case AE.guid.str:{let e=await this.tokenizer.readToken(new AE(i));this.metadata.setFormat("container",`ASF/${e.streamType}`);break}case tE.guid.str:{let e=await this.tokenizer.readToken(new tE);await this.parseExtensionObject(e.extensionDataSize);break}case dI.guid.str:o=await this.tokenizer.readToken(new dI(i)),await this.addTags(o);break;case rE.guid.str:o=await this.tokenizer.readToken(new rE(i)),await this.addTags(o);break;case Yt.CodecListObject.str:{let e=await OX(this.tokenizer);e.forEach(A=>{this.metadata.addStreamInfo({type:A.type.videoCodec?qr.video:qr.audio,codecName:A.codecName})});let a=e.filter(A=>A.type.audioCodec).map(A=>A.codecName).join("/");this.metadata.setFormat("codec",a);break}case Yt.StreamBitratePropertiesObject.str:await this.tokenizer.ignore(i.objectSize-qg.len);break;case Yt.PaddingObject.str:vP("Padding: %s bytes",i.objectSize-qg.len),await this.tokenizer.ignore(i.objectSize-qg.len);break;default:this.metadata.addWarning(`Ignore ASF-Object-GUID: ${i.objectId.str}`),vP("Ignore ASF-Object-GUID: %s",i.objectId.str),await this.tokenizer.readToken(new zd(i))}}while(--r)}async addTags(r){await Promise.all(r.map(({id:o,value:i})=>this.metadata.addTag(sLe,o,i)))}async parseExtensionObject(r){do{let o=await this.tokenizer.readToken(qg),i=o.objectSize-qg.len;if(i<0)throw new $p(`Invalid ASF header object size: ${o.objectSize}`);switch(o.objectId.str){case aE.guid.str:await this.tokenizer.readToken(new aE(o));break;case uI.guid.str:{let e=await this.tokenizer.readToken(new uI(o));await this.addTags(e);break}case iE.guid.str:{let e=await this.tokenizer.readToken(new iE(o));await this.addTags(e);break}case Yt.PaddingObject.str:await this.tokenizer.ignore(i);break;case Yt.CompatibilityObject.str:await this.tokenizer.ignore(i);break;case Yt.ASF_Index_Placeholder_Object.str:await this.tokenizer.ignore(i);break;default:this.metadata.addWarning(`Ignore ASF-Object-GUID: ${o.objectId.str}`),await this.tokenizer.readToken(new zd(o));break}r-=o.objectSize}while(r>0)}}});var NX,TX=le(()=>{NX={parserType:"asf",extensions:[".asf",".wma",".wmv"],mimeTypes:["audio/ms-wma","video/ms-wmv","audio/ms-asf","video/ms-asf","application/vnd.ms-asf"],async load(){return(await Promise.resolve().then(()=>(_X(),MX))).AsfParser}}});var BI,RX=le(()=>{SA();Fa();BI={len:12,get:(n,r)=>({chunkID:XA.get(n,r),chunkSize:tP.get(n,r+4)})}});var vX={};Qr(vX,{DsdiffContentParseError:()=>oE,DsdiffParser:()=>GP});var kX,La,oE,GP,PX=le(()=>{SA();kX=Je(at(),1);go();Fa();ni();Xp();RX();Ht();La=(0,kX.default)("music-metadata:parser:aiff"),oE=class extends pt("DSDIFF"){},GP=class extends Qt{async parse(){let r=await this.tokenizer.readToken(BI);if(r.chunkID!=="FRM8")throw new oE("Unexpected chunk-ID");this.metadata.setAudioOnly();let o=(await this.tokenizer.readToken(XA)).trim();switch(o){case"DSD":return this.metadata.setFormat("container",`DSDIFF/${o}`),this.metadata.setFormat("lossless",!0),this.readFmt8Chunks(r.chunkSize-BigInt(XA.len));default:throw new oE(`Unsupported DSDIFF type: ${o}`)}}async readFmt8Chunks(r){for(;r>=BI.len;){let o=await this.tokenizer.readToken(BI);La(`Chunk id=${o.chunkID}`),await this.readData(o),r-=BigInt(BI.len)+o.chunkSize}}async readData(r){La(`Reading data of chunk[ID=${r.chunkID}, size=${r.chunkSize}]`);let o=this.tokenizer.position;switch(r.chunkID.trim()){case"FVER":{let e=await this.tokenizer.readToken(ve);La(`DSDIFF version=${e}`);break}case"PROP":{if(await this.tokenizer.readToken(XA)!=="SND ")throw new oE("Unexpected PROP-chunk ID");await this.handleSoundPropertyChunks(r.chunkSize-BigInt(XA.len));break}case"ID3":{let e=await this.tokenizer.readToken(new ut(Number(r.chunkSize))),a=Mi(e);await new ho().parse(this.metadata,a,this.options);break}case"DSD":this.metadata.format.numberOfChannels&&this.metadata.setFormat("numberOfSamples",Number(r.chunkSize*BigInt(8)/BigInt(this.metadata.format.numberOfChannels))),this.metadata.format.numberOfSamples&&this.metadata.format.sampleRate&&this.metadata.setFormat("duration",this.metadata.format.numberOfSamples/this.metadata.format.sampleRate);break;default:La(`Ignore chunk[ID=${r.chunkID}, size=${r.chunkSize}]`);break}let i=r.chunkSize-BigInt(this.tokenizer.position-o);i>0&&(La(`After Parsing chunk, remaining ${i} bytes`),await this.tokenizer.ignore(Number(i)))}async handleSoundPropertyChunks(r){for(La(`Parsing sound-property-chunks, remainingSize=${r}`);r>0;){let o=await this.tokenizer.readToken(BI);La(`Sound-property-chunk[ID=${o.chunkID}, size=${o.chunkSize}]`);let i=this.tokenizer.position;switch(o.chunkID.trim()){case"FS":{let a=await this.tokenizer.readToken(Ue);this.metadata.setFormat("sampleRate",a);break}case"CHNL":{let a=await this.tokenizer.readToken(PA);this.metadata.setFormat("numberOfChannels",a),await this.handleChannelChunks(o.chunkSize-BigInt(PA.len));break}case"CMPR":{let a=(await this.tokenizer.readToken(XA)).trim(),A=await this.tokenizer.readToken(uA),t=await this.tokenizer.readToken(new je(A,"ascii"));a==="DSD"&&(this.metadata.setFormat("lossless",!0),this.metadata.setFormat("bitsPerSample",1)),this.metadata.setFormat("codec",`${a} (${t})`);break}case"ABSS":{let a=await this.tokenizer.readToken(PA),A=await this.tokenizer.readToken(uA),t=await this.tokenizer.readToken(uA),s=await this.tokenizer.readToken(Ue);La(`ABSS ${a}:${A}:${t}.${s}`);break}case"LSCO":{let a=await this.tokenizer.readToken(PA);La(`LSCO lsConfig=${a}`);break}default:La(`Unknown sound-property-chunk[ID=${o.chunkID}, size=${o.chunkSize}]`),await this.tokenizer.ignore(Number(o.chunkSize))}let e=o.chunkSize-BigInt(this.tokenizer.position-i);e>0&&(La(`After Parsing sound-property-chunk ${o.chunkSize}, remaining ${e} bytes`),await this.tokenizer.ignore(Number(e))),r-=BigInt(BI.len)+o.chunkSize,La(`Parsing sound-property-chunks, remainingSize=${r}`)}if(this.metadata.format.lossless&&this.metadata.format.sampleRate&&this.metadata.format.numberOfChannels&&this.metadata.format.bitsPerSample){let o=this.metadata.format.sampleRate*this.metadata.format.numberOfChannels*this.metadata.format.bitsPerSample;this.metadata.setFormat("bitrate",o)}}async handleChannelChunks(r){La(`Parsing channel-chunks, remainingSize=${r}`);let o=[];for(;r>=XA.len;){let i=await this.tokenizer.readToken(XA);La(`Channel[ID=${i}]`),o.push(i),r-=BigInt(XA.len)}return La(`Channels: ${o.join(", ")}`),o}}});var GX,FX=le(()=>{GX={parserType:"dsdiff",extensions:[".dff"],mimeTypes:["audio/dsf","audio/dsd"],async load(){return(await Promise.resolve().then(()=>(PX(),vX))).DsdiffParser}}});var LX,Vg,qS,FP=le(()=>{SA();Fa();Ht();LX={NONE:"not compressed PCM Apple Computer",sowt:"PCM (byte swapped)",fl32:"32-bit floating point IEEE 32-bit float",fl64:"64-bit floating point IEEE 64-bit float Apple Computer",alaw:"ALaw 2:1 8-bit ITU-T G.711 A-law",ulaw:"\xB5Law 2:1 8-bit ITU-T G.711 \xB5-law Apple Computer",ULAW:"CCITT G.711 u-law 8-bit ITU-T G.711 \xB5-law",ALAW:"CCITT G.711 A-law 8-bit ITU-T G.711 A-law",FL32:"Float 32 IEEE 32-bit float "},Vg=class extends pt("AIFF"){},qS=class{constructor(r,o){this.isAifc=o;let i=o?22:18;if(r.chunkSize>Math.abs(i):e<22){let A=uA.get(r,o+22);if(A>0){let t=(A+1)%2;if(23+A+t===this.len)a.compressionName=new je(A,"latin1").get(r,o+23);else throw new Vg("Illegal pstring length")}else a.compressionName=void 0}}else a.compressionName="PCM";return a}}});var VS,UX=le(()=>{SA();Fa();VS={len:8,get:(n,r)=>({chunkID:XA.get(n,r),chunkSize:Number(BigInt(Ue.get(n,r+4)))})}});var KX={};Qr(KX,{AIFFParser:()=>UP});var HX,LP,UP,YX=le(()=>{SA();HX=Je(at(),1);go();Xp();Fa();ni();FP();FP();UX();LP=(0,HX.default)("music-metadata:parser:aiff"),UP=class extends Qt{constructor(){super(...arguments),this.isCompressed=null}async parse(){if((await this.tokenizer.readToken(VS)).chunkID!=="FORM")throw new Vg("Invalid Chunk-ID, expected 'FORM'");let o=await this.tokenizer.readToken(XA);switch(o){case"AIFF":this.metadata.setFormat("container",o),this.isCompressed=!1;break;case"AIFC":this.metadata.setFormat("container","AIFF-C"),this.isCompressed=!0;break;default:throw new Vg(`Unsupported AIFF type: ${o}`)}this.metadata.setFormat("lossless",!this.isCompressed),this.metadata.setAudioOnly();try{for(;!this.tokenizer.fileInfo.size||this.tokenizer.fileInfo.size-this.tokenizer.position>=VS.len;){LP(`Reading AIFF chunk at offset=${this.tokenizer.position}`);let i=await this.tokenizer.readToken(VS),e=2*Math.round(i.chunkSize/2),a=await this.readData(i);await this.tokenizer.ignore(e-a)}}catch(i){if(i instanceof NA)LP("End-of-stream");else throw i}}async readData(r){switch(r.chunkID){case"COMM":{if(this.isCompressed===null)throw new Vg("Failed to parse AIFF.COMM chunk when compression type is unknown");let o=await this.tokenizer.readToken(new qS(r,this.isCompressed));return this.metadata.setFormat("bitsPerSample",o.sampleSize),this.metadata.setFormat("sampleRate",o.sampleRate),this.metadata.setFormat("numberOfChannels",o.numChannels),this.metadata.setFormat("numberOfSamples",o.numSampleFrames),this.metadata.setFormat("duration",o.numSampleFrames/o.sampleRate),(o.compressionName||o.compressionType)&&this.metadata.setFormat("codec",o.compressionName??LX[o.compressionType]),r.chunkSize}case"ID3 ":{let o=await this.tokenizer.readToken(new ut(r.chunkSize)),i=Mi(o);return await new ho().parse(this.metadata,i,this.options),r.chunkSize}case"SSND":return this.metadata.format.duration&&this.metadata.setFormat("bitrate",8*r.chunkSize/this.metadata.format.duration),0;case"NAME":case"AUTH":case"(c) ":case"ANNO":return this.readTextChunk(r);default:return LP(`Ignore chunk id=${r.chunkID}, size=${r.chunkSize}`),0}}async readTextChunk(r){let i=(await this.tokenizer.readToken(new je(r.chunkSize,"ascii"))).split("\0").map(e=>e.trim()).filter(e=>e?.length);return await Promise.all(i.map(e=>this.metadata.addTag("AIFF",r.chunkID,e))),r.chunkSize}}});var xX,jX=le(()=>{xX={parserType:"aiff",extensions:[".aif","aiff","aifc"],mimeTypes:["audio/aiff","audio/aif","audio/aifc","application/aiff"],async load(){return(await Promise.resolve().then(()=>(YX(),KX))).AIFFParser}}});var Wd,JX,qX,VX=le(()=>{SA();Fa();Wd={len:12,get:(n,r)=>({id:XA.get(n,r),size:fr.get(n,r+4)})},JX={len:16,get:(n,r)=>({fileSize:kd.get(n,r),metadataPointer:kd.get(n,r+8)})},qX={len:40,get:(n,r)=>({formatVersion:$t.get(n,r),formatID:$t.get(n,r+4),channelType:$t.get(n,r+8),channelNum:$t.get(n,r+12),samplingFrequency:$t.get(n,r+16),bitsPerSample:$t.get(n,r+20),sampleCount:kd.get(n,r+24),blockSizePerChannel:$t.get(n,r+32)})}});var WX={};Qr(WX,{DsdContentParseError:()=>zS,DsfParser:()=>KP});var zX,HP,zS,KP,ZX=le(()=>{zX=Je(at(),1);qd();VX();Xp();Ht();HP=(0,zX.default)("music-metadata:parser:DSF"),zS=class extends pt("DSD"){},KP=class extends Gn{async postId3v2Parse(){let r=this.tokenizer.position,o=await this.tokenizer.readToken(Wd);if(o.id!=="DSD ")throw new zS("Invalid chunk signature");this.metadata.setFormat("container","DSF"),this.metadata.setFormat("lossless",!0),this.metadata.setAudioOnly();let i=await this.tokenizer.readToken(JX);if(i.metadataPointer===BigInt(0))HP("No ID3v2 tag present");else return HP(`expect ID3v2 at offset=${i.metadataPointer}`),await this.parseChunks(i.fileSize-o.size),await this.tokenizer.ignore(Number(i.metadataPointer)-this.tokenizer.position-r),new ho().parse(this.metadata,this.tokenizer,this.options)}async parseChunks(r){for(;r>=Wd.len;){let o=await this.tokenizer.readToken(Wd);switch(HP(`Parsing chunk name=${o.id} size=${o.size}`),o.id){case"fmt ":{let i=await this.tokenizer.readToken(qX);this.metadata.setFormat("numberOfChannels",i.channelNum),this.metadata.setFormat("sampleRate",i.samplingFrequency),this.metadata.setFormat("bitsPerSample",i.bitsPerSample),this.metadata.setFormat("numberOfSamples",i.sampleCount),this.metadata.setFormat("duration",Number(i.sampleCount)/i.samplingFrequency);let e=i.bitsPerSample*i.samplingFrequency*i.channelNum;this.metadata.setFormat("bitrate",e);return}default:this.tokenizer.ignore(Number(o.size)-Wd.len);break}r-=o.size}}}});var XX,$X=le(()=>{XX={parserType:"dsf",extensions:[".dsf"],mimeTypes:["audio/dsf"],async load(){return(await Promise.resolve().then(()=>(ZX(),WX))).DsfParser}}});var zg,Zd,e7,WS=le(()=>{SA();Kg();zg=class n{static fromBase64(r){return n.fromBuffer(Uint8Array.from(atob(r),o=>o.charCodeAt(0)))}static fromBuffer(r){return new n(r.length).get(r,0)}constructor(r){this.len=r}get(r,o){let i=jp[Ue.get(r,o)];o+=4;let e=Ue.get(r,o);o+=4;let a=new je(e,"utf-8").get(r,o);o+=e;let A=Ue.get(r,o);o+=4;let t=new je(A,"utf-8").get(r,o);o+=A;let s=Ue.get(r,o);o+=4;let g=Ue.get(r,o);o+=4;let c=Ue.get(r,o);o+=4;let I=Ue.get(r,o);o+=4;let E=Ue.get(r,o);o+=4;let B=r.slice(o,o+E);return{type:i,format:a,description:t,width:s,height:g,colour_depth:c,indexed_color:I,data:B}}},Zd={len:7,get:(n,r)=>({packetType:uA.get(n,r),vorbis:new je(6,"ascii").get(n,r+1)})},e7={len:23,get:(n,r)=>({version:ve.get(n,r+0),channelMode:uA.get(n,r+4),sampleRate:ve.get(n,r+5),bitrateMax:ve.get(n,r+9),bitrateNominal:ve.get(n,r+13),bitrateMin:ve.get(n,r+17)})}});var nE,YP=le(()=>{SA();Mn();nE=class{constructor(r,o){this.data=r,this.offset=o}readInt32(){let r=ve.get(this.data,this.offset);return this.offset+=4,r}readStringUtf8(){let r=this.readInt32(),o=lr(this.data.subarray(this.offset,this.offset+r),"utf-8");return this.offset+=r,o}parseUserComment(){let r=this.offset,o=this.readStringUtf8(),i=o.indexOf("=");return{key:o.substring(0,i).toUpperCase(),value:o.substring(i+1),len:this.offset-r}}}});var A7,sE,Xd,Fn,$d=le(()=>{SA();A7=Je(at(),1);YP();WS();Ht();sE=(0,A7.default)("music-metadata:parser:ogg:vorbis1"),Xd=class extends pt("Vorbis"){},Fn=class n{constructor(r,o){this.pageSegments=[],this.durationOnLastPage=!0,this.metadata=r,this.options=o}async parsePage(r,o){if(this.lastPageHeader=r,r.headerType.firstPage)this.parseFirstPage(r,o);else{if(r.headerType.continued){if(this.pageSegments.length===0)throw new Xd("Cannot continue on previous page");this.pageSegments.push(o)}if(r.headerType.lastPage||!r.headerType.continued){if(this.pageSegments.length>0){let i=n.mergeUint8Arrays(this.pageSegments);await this.parseFullPage(i)}this.pageSegments=r.headerType.lastPage?[]:[o]}}}static mergeUint8Arrays(r){let o=r.reduce((e,a)=>e+a.length,0),i=new Uint8Array(o);return r.forEach((e,a,A)=>{let t=A.slice(0,a).reduce((s,g)=>s+g.length,0);i.set(e,t)}),i}async flush(){await this.parseFullPage(n.mergeUint8Arrays(this.pageSegments))}async parseUserComment(r,o){let e=new nE(r,o).parseUserComment();return await this.addTag(e.key,e.value),e.len}async addTag(r,o){if(r==="METADATA_BLOCK_PICTURE"&&typeof o=="string"){if(this.options.skipCovers){sE("Ignore picture");return}o=zg.fromBase64(o),sE(`Push picture: id=${r}, format=${o.format}`)}else sE(`Push tag: id=${r}, value=${o}`);await this.metadata.addTag("vorbis",r,o)}calculateDuration(r){this.lastPageHeader&&(r||this.lastPageHeader.headerType.lastPage)&&this.metadata.format.sampleRate&&this.lastPageHeader.absoluteGranulePosition>=0&&(this.metadata.setFormat("numberOfSamples",this.lastPageHeader.absoluteGranulePosition),this.metadata.setFormat("duration",this.lastPageHeader.absoluteGranulePosition/this.metadata.format.sampleRate))}parseFirstPage(r,o){this.metadata.setFormat("codec","Vorbis I"),this.metadata.setFormat("hasAudio",!0),sE("Parse first page");let i=Zd.get(o,0);if(i.vorbis!=="vorbis")throw new Xd("Metadata does not look like Vorbis");if(i.packetType===1){let e=e7.get(o,Zd.len);this.metadata.setFormat("sampleRate",e.sampleRate),this.metadata.setFormat("bitrate",e.bitrateNominal),this.metadata.setFormat("numberOfChannels",e.channelMode),sE("sample-rate=%s[hz], bitrate=%s[b/s], channel-mode=%s",e.sampleRate,e.bitrateNominal,e.channelMode)}else throw new Xd("First Ogg page should be type 1: the identification header")}async parseFullPage(r){let o=Zd.get(r,0);switch(sE("Parse full page: type=%s, byteLength=%s",o.packetType,r.byteLength),o.packetType){case 3:return this.parseUserCommentList(r,Zd.len);case 1:case 5:break}}async parseUserCommentList(r,o){let i=ve.get(r,o);o+=4,o+=i;let e=ve.get(r,o);for(o+=4;e-- >0;)o+=await this.parseUserComment(r,o)}}});var Ua,eu,Au,xP=le(()=>{Kt();SA();Ua={STREAMINFO:0,PADDING:1,APPLICATION:2,SEEKTABLE:3,VORBIS_COMMENT:4,CUESHEET:5,PICTURE:6},eu={len:4,get:(n,r)=>({lastBlock:kA(n,r,7),type:qA(n,r,1,7),length:Br.get(n,r+1)})},Au={len:34,get:(n,r)=>({minimumBlockSize:PA.get(n,r),maximumBlockSize:PA.get(n,r+2)/1e3,minimumFrameSize:Br.get(n,r+4),maximumFrameSize:Br.get(n,r+7),sampleRate:Br.get(n,r+10)>>4,channels:qA(n,r+12,4,3)+1,bitsPerSample:qA(n,r+12,7,5)+1,totalSamples:qA(n,r+13,4,36),fileMD5:new ut(16).get(n,r+18)})}});var a7={};Qr(a7,{FlacParser:()=>tu});var r7,ILe,ZS,tu,jP=le(()=>{r7=Je(at(),1);SA();WS();qd();Fa();$d();YP();Ht();xP();ILe=(0,r7.default)("music-metadata:parser:FLAC"),ZS=class extends pt("FLAC"){},tu=class extends Gn{constructor(){super(...arguments),this.vorbisParser=new Fn(this.metadata,this.options)}async postId3v2Parse(){if((await this.tokenizer.readToken(XA)).toString()!=="fLaC")throw new ZS("Invalid FLAC preamble");let o;do o=await this.tokenizer.readToken(eu),await this.parseDataBlock(o);while(!o.lastBlock);if(this.tokenizer.fileInfo.size&&this.metadata.format.duration){let i=this.tokenizer.fileInfo.size-this.tokenizer.position;this.metadata.setFormat("bitrate",8*i/this.metadata.format.duration)}}async parseDataBlock(r){switch(ILe(`blockHeader type=${r.type}, length=${r.length}`),r.type){case Ua.STREAMINFO:return this.readBlockStreamInfo(r.length);case Ua.PADDING:break;case Ua.APPLICATION:break;case Ua.SEEKTABLE:break;case Ua.VORBIS_COMMENT:return this.readComment(r.length);case Ua.CUESHEET:break;case Ua.PICTURE:await this.parsePicture(r.length);return;default:this.metadata.addWarning(`Unknown block type: ${r.type}`)}return this.tokenizer.ignore(r.length).then()}async readBlockStreamInfo(r){if(r!==Au.len)throw new ZS("Unexpected block-stream-info length");let o=await this.tokenizer.readToken(Au);this.metadata.setFormat("container","FLAC"),this.processsStreamInfo(o)}processsStreamInfo(r){this.metadata.setFormat("codec","FLAC"),this.metadata.setFormat("hasAudio",!0),this.metadata.setFormat("lossless",!0),this.metadata.setFormat("numberOfChannels",r.channels),this.metadata.setFormat("bitsPerSample",r.bitsPerSample),this.metadata.setFormat("sampleRate",r.sampleRate),r.totalSamples>0&&this.metadata.setFormat("duration",r.totalSamples/r.sampleRate)}async readComment(r){let o=await this.tokenizer.readToken(new ut(r));return this.parseComment(o)}async parseComment(r){let o=new nE(r,0),i=o.readStringUtf8();i.length>0&&this.metadata.setFormat("tool",i);let e=o.readInt32(),a=new Array(e);for(let A=0;A(A.key==="ENCODER"&&this.metadata.setFormat("tool",A.value),this.addTag(A.key,A.value))))}async parsePicture(r){return this.options.skipCovers?this.tokenizer.ignore(r):this.addPictureTag(await this.tokenizer.readToken(new zg(r)))}addPictureTag(r){return this.addTag("METADATA_BLOCK_PICTURE",r)}addTag(r,o){return this.vorbisParser.addTag(r,o)}}});var i7,o7=le(()=>{i7={parserType:"flac",extensions:[".flac"],mimeTypes:["audio/flac"],async load(){return(await Promise.resolve().then(()=>(jP(),a7))).FlacParser}}});var Oe,JP=le(()=>{Oe={string:0,uint:1,uid:2,bool:3,binary:4,float:5}});var n7,s7=le(()=>{JP();n7={name:"dtd",container:{440786851:{name:"ebml",container:{17030:{name:"ebmlVersion",value:Oe.uint},17143:{name:"ebmlReadVersion",value:Oe.uint},17138:{name:"ebmlMaxIDWidth",value:Oe.uint},17139:{name:"ebmlMaxSizeWidth",value:Oe.uint},17026:{name:"docType",value:Oe.string},17031:{name:"docTypeVersion",value:Oe.uint},17029:{name:"docTypeReadVersion",value:Oe.uint}}},408125543:{name:"segment",container:{290298740:{name:"seekHead",container:{19899:{name:"seek",multiple:!0,container:{21419:{name:"id",value:Oe.binary},21420:{name:"position",value:Oe.uint}}}}},357149030:{name:"info",container:{29604:{name:"uid",value:Oe.uid},29572:{name:"filename",value:Oe.string},3979555:{name:"prevUID",value:Oe.uid},3965867:{name:"prevFilename",value:Oe.string},4110627:{name:"nextUID",value:Oe.uid},4096955:{name:"nextFilename",value:Oe.string},2807729:{name:"timecodeScale",value:Oe.uint},17545:{name:"duration",value:Oe.float},17505:{name:"dateUTC",value:Oe.uint},31657:{name:"title",value:Oe.string},19840:{name:"muxingApp",value:Oe.string},22337:{name:"writingApp",value:Oe.string}}},524531317:{name:"cluster",multiple:!0,container:{231:{name:"timecode",value:Oe.uid},22743:{name:"silentTracks ",multiple:!0},167:{name:"position",value:Oe.uid},171:{name:"prevSize",value:Oe.uid},160:{name:"blockGroup"},163:{name:"simpleBlock"}}},374648427:{name:"tracks",container:{174:{name:"entries",multiple:!0,container:{215:{name:"trackNumber",value:Oe.uint},29637:{name:"uid",value:Oe.uid},131:{name:"trackType",value:Oe.uint},185:{name:"flagEnabled",value:Oe.bool},136:{name:"flagDefault",value:Oe.bool},21930:{name:"flagForced",value:Oe.bool},156:{name:"flagLacing",value:Oe.bool},28135:{name:"minCache",value:Oe.uint},28136:{name:"maxCache",value:Oe.uint},2352003:{name:"defaultDuration",value:Oe.uint},2306383:{name:"timecodeScale",value:Oe.float},21358:{name:"name",value:Oe.string},2274716:{name:"language",value:Oe.string},134:{name:"codecID",value:Oe.string},25506:{name:"codecPrivate",value:Oe.binary},2459272:{name:"codecName",value:Oe.string},3839639:{name:"codecSettings",value:Oe.string},3883072:{name:"codecInfoUrl",value:Oe.string},2536e3:{name:"codecDownloadUrl",value:Oe.string},170:{name:"codecDecodeAll",value:Oe.bool},28587:{name:"trackOverlay",value:Oe.uint},224:{name:"video",container:{154:{name:"flagInterlaced",value:Oe.bool},21432:{name:"stereoMode",value:Oe.uint},176:{name:"pixelWidth",value:Oe.uint},186:{name:"pixelHeight",value:Oe.uint},21680:{name:"displayWidth",value:Oe.uint},21690:{name:"displayHeight",value:Oe.uint},21683:{name:"aspectRatioType",value:Oe.uint},3061028:{name:"colourSpace",value:Oe.uint},3126563:{name:"gammaValue",value:Oe.float}}},225:{name:"audio",container:{181:{name:"samplingFrequency",value:Oe.float},30901:{name:"outputSamplingFrequency",value:Oe.float},159:{name:"channels",value:Oe.uint},148:{name:"channels",value:Oe.uint},32123:{name:"channelPositions",value:Oe.binary},25188:{name:"bitDepth",value:Oe.uint}}},28032:{name:"contentEncodings",container:{25152:{name:"contentEncoding",container:{20529:{name:"order",value:Oe.uint},20530:{name:"scope",value:Oe.bool},20531:{name:"type",value:Oe.uint},20532:{name:"contentEncoding",container:{16980:{name:"contentCompAlgo",value:Oe.uint},16981:{name:"contentCompSettings",value:Oe.binary}}},20533:{name:"contentEncoding",container:{18401:{name:"contentEncAlgo",value:Oe.uint},18402:{name:"contentEncKeyID",value:Oe.binary},18403:{name:"contentSignature ",value:Oe.binary},18404:{name:"ContentSigKeyID ",value:Oe.binary},18405:{name:"contentSigAlgo ",value:Oe.uint},18406:{name:"contentSigHashAlgo ",value:Oe.uint}}},25188:{name:"bitDepth",value:Oe.uint}}}}}}}}},475249515:{name:"cues",container:{187:{name:"cuePoint",container:{179:{name:"cueTime",value:Oe.uid},183:{name:"positions",container:{247:{name:"track",value:Oe.uint},241:{name:"clusterPosition",value:Oe.uint},21368:{name:"blockNumber",value:Oe.uint},234:{name:"codecState",value:Oe.uint},219:{name:"reference",container:{150:{name:"time",value:Oe.uint},151:{name:"cluster",value:Oe.uint},21343:{name:"number",value:Oe.uint},235:{name:"codecState",value:Oe.uint}}},240:{name:"relativePosition",value:Oe.uint}}}}}}},423732329:{name:"attachments",container:{24999:{name:"attachedFiles",multiple:!0,container:{18046:{name:"description",value:Oe.string},18030:{name:"name",value:Oe.string},18016:{name:"mimeType",value:Oe.string},18012:{name:"data",value:Oe.binary},18094:{name:"uid",value:Oe.uid}}}}},272869232:{name:"chapters",container:{17849:{name:"editionEntry",container:{182:{name:"chapterAtom",container:{29636:{name:"uid",value:Oe.uid},145:{name:"timeStart",value:Oe.uint},146:{name:"timeEnd",value:Oe.uid},152:{name:"hidden",value:Oe.bool},17816:{name:"enabled",value:Oe.uid},143:{name:"track",container:{137:{name:"trackNumber",value:Oe.uid},128:{name:"display",container:{133:{name:"string",value:Oe.string},17276:{name:"language ",value:Oe.string},17278:{name:"country ",value:Oe.string}}}}}}}}}}},307544935:{name:"tags",container:{29555:{name:"tag",multiple:!0,container:{25536:{name:"target",container:{25541:{name:"tagTrackUID",value:Oe.uid},25540:{name:"tagChapterUID",value:Oe.uint},25542:{name:"tagAttachmentUID",value:Oe.uid},25546:{name:"targetType",value:Oe.string},26826:{name:"targetTypeValue",value:Oe.uint},25545:{name:"tagEditionUID",value:Oe.uid}}},26568:{name:"simpleTags",multiple:!0,container:{17827:{name:"name",value:Oe.string},17543:{name:"string",value:Oe.string},17541:{name:"binary",value:Oe.binary},17530:{name:"language",value:Oe.string},17531:{name:"languageIETF",value:Oe.string},17540:{name:"default",value:Oe.bool}}}}}}}}}}}});function qP(n,r){return Number(lLe(n,r))}function lLe(n,r){let o=new Uint8Array(8),i=n.subarray(0,r);try{return o.set(i,8-r),Tn.get(o,0)}catch{return BigInt(-1)}}function c7(n){return n.container&&Object.keys(n.container).map(r=>{let o=n.container[r];return o.id=Number.parseInt(r,10),o}).forEach(r=>{r.parent=n,c7(r)}),n}function fI(n){let r="";return n.parent&&n.parent.name!=="dtd"&&(r+=`${fI(n.parent)}/`),r+n.name}var g7,gE,XS,Ln,$S,I7=le(()=>{SA();g7=Je(at(),1);go();JP();SA();Ht();gE=(0,g7.default)("music-metadata:parser:ebml"),XS=class extends pt("EBML"){},Ln={ReadNext:0,IgnoreElement:2,SkipSiblings:3,TerminateParsing:4,SkipElement:5},$S=class{constructor(r){this.parserMap=new Map,this.ebmlMaxIDLength=4,this.ebmlMaxSizeLength=8,this.tokenizer=r,this.parserMap.set(Oe.uint,o=>this.readUint(o)),this.parserMap.set(Oe.string,o=>this.readString(o)),this.parserMap.set(Oe.binary,o=>this.readBuffer(o)),this.parserMap.set(Oe.uid,async o=>this.readBuffer(o)),this.parserMap.set(Oe.bool,o=>this.readFlag(o)),this.parserMap.set(Oe.float,o=>this.readFloat(o))}async iterate(r,o,i){return this.parseContainer(c7(r),o,i)}async parseContainer(r,o,i){let e={};for(;this.tokenizer.position=0?this.tokenizer.position+a.len:-1,i);t.multiple?(e[t.name]||(e[t.name]=[]),e[t.name].push(g)):e[t.name]=g,await i.elementValue(t,g,A)}else{let g=this.parserMap.get(t.value);if(typeof g=="function"){let c=await g(a);e[t.name]=c,await i.elementValue(t,c,A)}}break;case Ln.SkipElement:gE(`Go to next element: name=${fI(t)}, element.id=0x${a.id}, container=${!!t.container} at position=${A}`);break;case Ln.IgnoreElement:gE(`Ignore element: name=${fI(t)}, element.id=0x${a.id}, container=${!!t.container} at position=${A}`),await this.tokenizer.ignore(a.len);break;case Ln.SkipSiblings:gE(`Ignore remaining container, at: name=${fI(t)}, element.id=0x${a.id}, container=${!!t.container} at position=${A}`),await this.tokenizer.ignore(o-this.tokenizer.position);break;case Ln.TerminateParsing:return gE(`Terminate parsing at element: name=${fI(t)}, element.id=0x${a.id}, container=${!!t.container} at position=${A}`),e}else switch(a.id){case 236:await this.tokenizer.ignore(a.len);break;default:gE(`parseEbml: parent=${fI(r)}, unknown child: id=${a.id.toString(16)} at position=${A}`),await this.tokenizer.ignore(a.len)}}return e}async readVintData(r){let o=await this.tokenizer.peekNumber(uA),i=128,e=1;for(;(o&i)===0;){if(e>r)throw new XS("VINT value exceeding maximum size");++e,i>>=1}let a=new Uint8Array(e);return await this.tokenizer.readBuffer(a),a}async readElement(){let r=await this.readVintData(this.ebmlMaxIDLength),o=await this.readVintData(this.ebmlMaxSizeLength);return o[0]^=128>>o.length-1,{id:qP(r,r.length),len:qP(o,o.length)}}async readFloat(r){switch(r.len){case 0:return 0;case 4:return this.tokenizer.readNumber(rP);case 8:return this.tokenizer.readNumber(uS);case 10:return this.tokenizer.readNumber(uS);default:throw new XS(`Invalid IEEE-754 float length: ${r.len}`)}}async readFlag(r){return await this.readUint(r)===1}async readUint(r){let o=await this.readBuffer(r);return qP(o,r.len)}async readString(r){return(await this.tokenizer.readToken(new je(r.len,"utf-8"))).replace(/\x00.*$/g,"")}async readBuffer(r){let o=new Uint8Array(r.len);return await this.tokenizer.readBuffer(o),o}}});var p7={};Qr(p7,{MatroskaParser:()=>VP});var l7,eD,VP,E7=le(()=>{l7=Je(at(),1);ni();s7();CP();I7();eD=(0,l7.default)("music-metadata:parser:matroska"),VP=class extends Qt{constructor(){super(...arguments),this.seekHeadOffset=0,this.flagUseIndexToSkipClusters=this.options.mkvUseIndex??!1}async parse(){let r=this.tokenizer.fileInfo.size??Number.MAX_SAFE_INTEGER,o=new $S(this.tokenizer);eD("Initializing DTD end MatroskaIterator"),await o.iterate(n7,r,{startNext:i=>{switch(i.id){case 475249515:return eD(`Skip element: name=${i.name}, id=0x${i.id.toString(16)}`),Ln.IgnoreElement;case 524531317:if(this.flagUseIndexToSkipClusters&&this.seekHead){let e=this.seekHead.seek.find(a=>a.position+this.seekHeadOffset>this.tokenizer.position);if(e){let a=e.position+this.seekHeadOffset-this.tokenizer.position;return eD(`Use index to go to next position, ignoring ${a} bytes`),this.tokenizer.ignore(a),Ln.SkipElement}}return Ln.IgnoreElement;default:return Ln.ReadNext}},elementValue:async(i,e,a)=>{switch(eD(`Received: name=${i.name}, value=${e}`),i.id){case 17026:this.metadata.setFormat("container",`EBML/${e}`);break;case 290298740:this.seekHead=e,this.seekHeadOffset=a;break;case 357149030:{let A=e,t=A.timecodeScale?A.timecodeScale:1e6;if(typeof A.duration=="number"){let s=A.duration*t/1e9;await this.addTag("segment:title",A.title),this.metadata.setFormat("duration",Number(s))}}break;case 374648427:{let A=e;if(A?.entries){A.entries.forEach(s=>{let g={codecName:s.codecID.replace("A_","").replace("V_",""),codecSettings:s.codecSettings,flagDefault:s.flagDefault,flagLacing:s.flagLacing,flagEnabled:s.flagEnabled,language:s.language,name:s.name,type:s.trackType,audio:s.audio,video:s.video};this.metadata.addStreamInfo(g)});let t=A.entries.filter(s=>s.trackType===qr.audio).reduce((s,g)=>!s||g.flagDefault&&!s.flagDefault||g.trackNumber{let s=t.target,g=s?.targetTypeValue?m9[s.targetTypeValue]:s?.targetType?s.targetType:"track";await Promise.all(t.simpleTags.map(async c=>{let I=c.string?c.string:c.binary;await this.addTag(`${g}:${c.name}`,I)}))}))}break;case 423732329:{let A=e;await Promise.all(A.attachedFiles.filter(t=>t.mimeType.startsWith("image/")).map(t=>this.addTag("picture",{data:t.data,format:t.mimeType,description:t.description,name:t.name})))}break}}})}async addTag(r,o){await this.metadata.addTag("matroska",r,o)}}});var C7,h7=le(()=>{C7={parserType:"matroska",extensions:[".mka",".mkv",".mk3d",".mks","webm"],mimeTypes:["audio/matroska","video/matroska","audio/webm","video/webm"],async load(){return(await Promise.resolve().then(()=>(E7(),p7))).MatroskaParser}}});function Q7(n,r,o,i,e){if(WP(`remainingLen=${i}, numberOfEntries=${e} * token-len=${r.len}`),i===0)return[];if(i!==e*r.len)throw new Rs("mismatch number-of-entries with remaining atom-length");let a=[];for(let A=0;A{SA();u7=Je(at(),1);Fa();Ht();Kt();Ht();WP=(0,u7.default)("music-metadata:parser:MP4:atom"),Rs=class extends pt("MP4"){},QI={len:8,get:(n,r)=>{let o=Ue.get(n,r);if(o<0)throw new Rs("Invalid atom header length");return{length:BigInt(o),name:new je(4,"latin1").get(n,r+4)}},put:(n,r,o)=>(Ue.put(n,r,Number(o.length)),XA.put(n,r+4,o.name))},B7=Tn,ZP={len:4,get:(n,r)=>({type:new je(4,"ascii").get(n,r)})},AD=class{constructor(r,o,i){if(ro&&WP(`Warning: atom ${i} expected to be ${o}, but was actually ${r} bytes long.`),this.len=r}},cE={len:4,get:(n,r)=>{let o=Ue.get(n,r)-2082844800;return new Date(o*1e3)}},IE={len:8,get:(n,r)=>{let o=Number(Tn.get(n,r))-2082844800;return new Date(o*1e3)}},tD=class extends AD{constructor(r){super(r,24,"mdhd")}get(r,o){let i=uA.get(r,o+0),e=Br.get(r,o+1);switch(i){case 0:return{version:i,flags:e,creationTime:cE.get(r,o+4),modificationTime:cE.get(r,o+8),timeScale:Ue.get(r,o+12),duration:Ue.get(r,o+16),language:PA.get(r,o+20),quality:PA.get(r,o+22)};case 1:return{version:i,flags:e,creationTime:IE.get(r,o+4),modificationTime:IE.get(r,o+12),timeScale:Ue.get(r,o+20),duration:Number(Tn.get(r,o+24)),language:PA.get(r,o+32),quality:PA.get(r,o+34)};default:throw new lo("Invalid mdhd version header")}}},rD=class extends AD{constructor(r){super(r,100,"mvhd")}get(r,o){let i=uA.get(r,o),e=Br.get(r,o+1);return i===1?{version:i,flags:e,creationTime:IE.get(r,o+4),modificationTime:IE.get(r,o+12),timeScale:Ue.get(r,o+20),duration:Number(Tn.get(r,o+24)),preferredRate:Ue.get(r,o+32),preferredVolume:PA.get(r,o+36),previewTime:Ue.get(r,o+84),previewDuration:Ue.get(r,o+88),posterTime:Ue.get(r,o+92),selectionTime:Ue.get(r,o+96),selectionDuration:Ue.get(r,o+100),currentTime:Ue.get(r,o+104),nextTrackID:Ue.get(r,o+108)}:{version:i,flags:e,creationTime:cE.get(r,o+4),modificationTime:cE.get(r,o+8),timeScale:Ue.get(r,o+12),duration:Ue.get(r,o+16),preferredRate:Ue.get(r,o+20),preferredVolume:PA.get(r,o+24),previewTime:Ue.get(r,o+72),previewDuration:Ue.get(r,o+76),posterTime:Ue.get(r,o+80),selectionTime:Ue.get(r,o+84),selectionDuration:Ue.get(r,o+88),currentTime:Ue.get(r,o+92),nextTrackID:Ue.get(r,o+96)}}},aD=class{constructor(r){this.len=r}get(r,o){return{type:{set:uA.get(r,o+0),type:Br.get(r,o+1)},locale:Br.get(r,o+4),value:new ut(this.len-8).get(r,o+8)}}},iD=class{constructor(r){this.len=r}get(r,o){return{version:uA.get(r,o),flags:Br.get(r,o+1),name:new je(this.len-4,"utf-8").get(r,o+4)}}},oD=class{constructor(r){this.len=r}get(r,o){let i=uA.get(r,o),e=Br.get(r,o+1);switch(i){case 0:return{version:i,flags:e,creationTime:cE.get(r,o+4),modificationTime:cE.get(r,o+8),trackId:Ue.get(r,o+12),duration:Ue.get(r,o+20),layer:PA.get(r,o+32),alternateGroup:PA.get(r,o+34),volume:PA.get(r,o+36)};case 1:return{version:i,flags:e,creationTime:IE.get(r,o+4),modificationTime:IE.get(r,o+12),trackId:Ue.get(r,o+20),duration:Number(Tn.get(r,o+28)),layer:PA.get(r,o+44),alternateGroup:PA.get(r,o+46),volume:PA.get(r,o+48)};default:throw new lo("Invalid tkhd version header")}}},d7={len:8,get:(n,r)=>({version:uA.get(n,r),flags:Br.get(n,r+1),numberOfEntries:Ue.get(n,r+4)})},zP=class{constructor(r){this.len=r}get(r,o){let i=this.len-12;return{dataFormat:XA.get(r,o),dataReferenceIndex:PA.get(r,o+10),description:i>0?new ut(i).get(r,o+12):void 0}}},ru=class{constructor(r){this.len=r}get(r,o){let i=d7.get(r,o);o+=d7.len;let e=[];for(let a=0;a=this.len){WP("TrackRunBox size mismatch");break}let t={};e.flags.sampleDurationPresent&&(t.sampleDuration=Ue.get(r,a),a+=4),e.flags.sampleSizePresent&&(t.sampleSize=Ue.get(r,a),a+=4),e.flags.sampleFlagsPresent&&(t.sampleFlags=Ue.get(r,a),a+=4),e.flags.sampleCompositionTimeOffsetsPresent&&(t.sampleCompositionTimeOffset=Ue.get(r,a),a+=4),e.samples.push(t)}return e}},pD=class{constructor(r){this.len=r}get(r,o){let i=o+1,e=new je(4,"utf-8");return{version:Nn.get(r,o),flags:Br.get(r,o+1),componentType:e.get(r,o+4),handlerType:e.get(r,o+8),componentName:new je(this.len-28,"utf-8").get(r,o+28)}}},ED=class{constructor(r){this.len=r}get(r,o){let i=0,e=[];for(;i{S7=Je(at(),1);ou();ou();m7=(0,S7.default)("music-metadata:parser:MP4:Atom"),CD=class n{static async readAtom(r,o,i,e){let a=r.position;m7(`Reading next token on offset=${a}...`);let A=await r.readToken(QI),t=A.length===1n;t&&(A.length=await r.readToken(B7));let s=new n(A,t,i),g=s.getPayloadLength(e);return m7(`parse atom name=${s.atomPath}, extended=${s.extended}, offset=${a}, len=${s.header.length}`),await s.readData(r,o,g),s}constructor(r,o,i){this.header=r,this.extended=o,this.parent=i,this.children=[],this.atomPath=(this.parent?`${this.parent.atomPath}.`:"")+this.header.name}getHeaderLength(){return this.extended?16:8}getPayloadLength(r){return(this.header.length===0n?r:Number(this.header.length))-this.getHeaderLength()}async readAtoms(r,o,i){for(;i>0;){let e=await n.readAtom(r,o,this,i);this.children.push(e),i-=e.header.length===0n?i:Number(e.header.length)}}async readData(r,o,i){switch(this.header.name){case"moov":case"udta":case"mdia":case"minf":case"stbl":case"":case"ilst":case"tref":case"moof":return this.readAtoms(r,o,this.getPayloadLength(i));case"meta":{let a=(await r.peekToken(QI)).name==="hdlr"?0:4;return await r.ignore(a),this.readAtoms(r,o,this.getPayloadLength(i)-a)}default:return o(this,i)}}}});var M7={};Qr(M7,{MP4Parser:()=>$P});function O7(n,r,o){return o.indexOf(n)===r}var b7,gi,CLe,w7,$P,_7=le(()=>{b7=Je(at(),1);SA();ni();xd();D7();ou();ou();lI();Gd();Mn();gi=(0,b7.default)("music-metadata:parser:MP4"),CLe="iTunes",w7={raw:{lossy:!1,format:"raw"},MAC3:{lossy:!0,format:"MACE 3:1"},MAC6:{lossy:!0,format:"MACE 6:1"},ima4:{lossy:!0,format:"IMA 4:1"},ulaw:{lossy:!0,format:"uLaw 2:1"},alaw:{lossy:!0,format:"uLaw 2:1"},Qclp:{lossy:!0,format:"QUALCOMM PureVoice"},".mp3":{lossy:!0,format:"MPEG-1 layer 3"},alac:{lossy:!1,format:"ALAC"},"ac-3":{lossy:!0,format:"AC-3"},mp4a:{lossy:!0,format:"MPEG-4/AAC"},mp4s:{lossy:!0,format:"MP4S"},c608:{lossy:!0,format:"CEA-608"},c708:{lossy:!0,format:"CEA-708"}};$P=class n extends Qt{constructor(){super(...arguments),this.tracks=new Map,this.hasVideoTrack=!1,this.hasAudioTrack=!0,this.atomParsers={mvhd:async r=>{let o=await this.tokenizer.readToken(new rD(r));this.metadata.setFormat("creationTime",o.creationTime),this.metadata.setFormat("modificationTime",o.modificationTime)},chap:async r=>{let o=this.getTrackDescription(),i=[];for(;r>=Ue.len;)i.push(await this.tokenizer.readNumber(Ue)),r-=Ue.len;o.chapterList=i},mdat:async r=>{if(this.options.includeChapters){let o=[...this.tracks.values()].filter(i=>i.chapterList);if(o.length===1){let i=o[0].chapterList,e=[...this.tracks.values()].filter(a=>i.indexOf(a.header.trackId)!==-1);if(e.length===1)return this.parseChapterTrack(e[0],o[0],r)}}await this.tokenizer.ignore(r)},ftyp:async r=>{let o=[];for(;r>0;){let e=await this.tokenizer.readToken(ZP);r-=ZP.len;let a=e.type.replace(/\W/g,"");a.length>0&&o.push(a)}gi(`ftyp: ${o.join("/")}`);let i=o.filter(O7).join("/");this.metadata.setFormat("container",i)},stsd:async r=>{let o=await this.tokenizer.readToken(new ru(r)),i=this.getTrackDescription();i.soundSampleDescription=o.table.map(e=>this.parseSoundSampleDescription(e))},stsz:async r=>{let o=await this.tokenizer.readToken(new iu(r)),i=this.getTrackDescription();i.sampleSize=o.sampleSize,i.sampleSizeTable=o.entries},date:async r=>{let o=await this.tokenizer.readToken(new je(r,"utf-8"));await this.addTag("date",o)}}}static read_BE_Integer(r,o){let i=(o?"INT":"UINT")+r.length*8+(r.length>1?"_BE":""),e=JA[i];if(!e)throw new Rs(`Token for integer type not found: "${i}"`);return Number(e.get(r,0))}async parse(){this.hasVideoTrack=!1,this.hasAudioTrack=!0,this.tracks.clear();let r=this.tokenizer.fileInfo.size||0;for(;!this.tokenizer.fileInfo.size||r>0;){try{if((await this.tokenizer.peekToken(QI)).name==="\0\0\0\0"){let A=`Error at offset=${this.tokenizer.position}: box.id=0`;gi(A),this.addWarning(A);break}}catch(a){if(a instanceof Error){let A=`Error at offset=${this.tokenizer.position}: ${a.message}`;gi(A),this.addWarning(A)}else throw a;break}let e=await CD.readAtom(this.tokenizer,(a,A)=>this.handleAtom(a,A),null,r);r-=e.header.length===BigInt(0)?r:Number(e.header.length)}let o=[];this.tracks.forEach(e=>{let a=[];e.soundSampleDescription.forEach(A=>{let t={},s=w7[A.dataFormat];if(s?(a.push(s.format),t.codecName=s.format):t.codecName=`<${A.dataFormat}>`,A.description){let{description:g}=A;g.sampleRate>0&&(t.type=qr.audio,t.audio={samplingFrequency:g.sampleRate,bitDepth:g.sampleSize,channels:g.numAudioChannels})}this.metadata.addStreamInfo(t)}),a.length>=1&&o.push(a.join("/"))}),o.length>0&&this.metadata.setFormat("codec",o.filter(O7).join("+"));let i=[...this.tracks.values()].filter(e=>e.soundSampleDescription.length>=1&&e.soundSampleDescription[0].description&&e.soundSampleDescription[0].description.numAudioChannels>0);for(let e of i){if(e.media.header&&e.media.header.timeScale>0)if(e.sampleRate=e.media.header.timeScale,e.media.header.duration>0&&(gi("Using duration defined on audio track"),e.samples=e.media.header.duration,e.duration=e.samples/e.sampleRate),e.fragments.length>0){gi("Calculate duration defined in track fragments");let t=0;e.sizeInBytes=0;for(let s of e.fragments)for(let g of s.trackRun.samples){let c=g.sampleDuration??s.header.defaultSampleDuration??0,I=g.sampleSize??s.header.defaultSampleSize??0;if(c===0)throw new Error("Missing sampleDuration and no defaultSampleDuration in track fragment header");if(I===0)throw new Error("Missing sampleSize and no defaultSampleSize in track fragment header");t+=c,e.sizeInBytes+=I}e.samples||(e.samples=t),e.duration||(e.duration=t/e.sampleRate)}else e.sampleSizeTable.length>0&&(e.sizeInBytes=e.sampleSizeTable.reduce((t,s)=>t+s,0));let a=e.soundSampleDescription[0];if(a.description&&e.media.header&&(this.metadata.setFormat("sampleRate",a.description.sampleRate),this.metadata.setFormat("bitsPerSample",a.description.sampleSize),this.metadata.setFormat("numberOfChannels",a.description.numAudioChannels),e.media.header.timeScale===0&&e.timeToSampleTable.length>0)){let t=e.timeToSampleTable.map(s=>s.count*s.duration).reduce((s,g)=>s+g);e.duration=t/a.description.sampleRate}let A=w7[a.dataFormat];A&&this.metadata.setFormat("lossless",!A.lossy)}if(i.length>=1){let e=i[0];e.duration&&(this.metadata.setFormat("duration",e.duration),e.sizeInBytes&&this.metadata.setFormat("bitrate",8*e.sizeInBytes/e.duration))}this.metadata.setFormat("hasAudio",this.hasAudioTrack),this.metadata.setFormat("hasVideo",this.hasVideoTrack)}async handleAtom(r,o){if(r.parent)switch(r.parent.header.name){case"ilst":case"":return this.parseMetadataItemData(r);case"moov":switch(r.header.name){case"trak":return this.parseTrackBox(r);case"udta":return this.parseTrackBox(r)}break;case"moof":switch(r.header.name){case"traf":return this.parseTrackFragmentBox(r)}}if(this.atomParsers[r.header.name])return this.atomParsers[r.header.name](o);gi(`No parser for atom path=${r.atomPath}, payload-len=${o}, ignoring atom`),await this.tokenizer.ignore(o)}getTrackDescription(){let r=[...this.tracks.values()];return r[r.length-1]}async addTag(r,o){await this.metadata.addTag(CLe,r,o)}addWarning(r){gi(`Warning: ${r}`),this.metadata.addWarning(r)}parseMetadataItemData(r){let o=r.header.name;return r.readAtoms(this.tokenizer,async(i,e)=>{let a=i.getPayloadLength(e);switch(i.header.name){case"data":return this.parseValueAtom(o,i);case"name":case"mean":case"rate":{let A=await this.tokenizer.readToken(new iD(a));o+=`:${A.name}`;break}default:{let A=await this.tokenizer.readToken(new ut(a));this.addWarning(`Unsupported meta-item: ${o}[${i.header.name}] => value=${fS(A)} ascii=${lr(A,"ascii")}`)}}},r.getPayloadLength(0))}async parseValueAtom(r,o){let i=await this.tokenizer.readToken(new aD(Number(o.header.length)-QI.len));if(i.type.set!==0)throw new Rs(`Unsupported type-set != 0: ${i.type.set}`);switch(i.type.type){case 0:switch(r){case"trkn":case"disk":{let e=uA.get(i.value,3),a=uA.get(i.value,5);await this.addTag(r,`${e}/${a}`);break}case"gnre":{let e=uA.get(i.value,1),a=Zp[e-1];await this.addTag(r,a);break}case"rate":{let e=lr(i.value,"ascii");await this.addTag(r,e);break}default:gi(`unknown proprietary value type for: ${o.atomPath}`)}break;case 1:case 18:await this.addTag(r,lr(i.value));break;case 13:if(this.options.skipCovers)break;await this.addTag(r,{format:"image/jpeg",data:Uint8Array.from(i.value)});break;case 14:if(this.options.skipCovers)break;await this.addTag(r,{format:"image/png",data:Uint8Array.from(i.value)});break;case 21:await this.addTag(r,n.read_BE_Integer(i.value,!0));break;case 22:await this.addTag(r,n.read_BE_Integer(i.value,!1));break;case 65:await this.addTag(r,uA.get(i.value,0));break;case 66:await this.addTag(r,PA.get(i.value,0));break;case 67:await this.addTag(r,Ue.get(i.value,0));break;default:this.addWarning(`atom key=${r}, has unknown well-known-type (data-type): ${i.type.type}`)}}async parseTrackBox(r){let o={media:{},fragments:[]};await r.readAtoms(this.tokenizer,async(i,e)=>{let a=i.getPayloadLength(e);switch(i.header.name){case"chap":{let A=await this.tokenizer.readToken(new ED(e));o.chapterList=A;break}case"tkhd":o.header=await this.tokenizer.readToken(new oD(a));break;case"hdlr":o.handler=await this.tokenizer.readToken(new pD(a)),o.isAudio=()=>o.handler.handlerType==="audi"||o.handler.handlerType==="soun",o.isVideo=()=>o.handler.handlerType==="vide",o.isAudio()?this.hasAudioTrack=!0:o.isVideo()&&(this.hasVideoTrack=!0);break;case"mdhd":{let A=await this.tokenizer.readToken(new tD(a));o.media.header=A;break}case"stco":{let A=await this.tokenizer.readToken(new gD(a));o.chunkOffsetTable=A.entries;break}case"stsc":{let A=await this.tokenizer.readToken(new sD(a));o.sampleToChunkTable=A.entries;break}case"stsd":{let A=await this.tokenizer.readToken(new ru(a));o.soundSampleDescription=A.table.map(t=>this.parseSoundSampleDescription(t));break}case"stts":{let A=await this.tokenizer.readToken(new nD(a));o.timeToSampleTable=A.entries;break}case"stsz":{let A=await this.tokenizer.readToken(new iu(a));o.sampleSize=A.sampleSize,o.sampleSizeTable=A.entries;break}case"dinf":case"vmhd":case"smhd":gi(`Ignoring: ${i.header.name}`),await this.tokenizer.ignore(a);break;default:gi(`Unexpected track box: ${i.header.name}`),await this.tokenizer.ignore(a)}},r.getPayloadLength(0)),this.tracks.set(o.header.trackId,o)}parseTrackFragmentBox(r){let o;return r.readAtoms(this.tokenizer,async(i,e)=>{let a=i.getPayloadLength(e);switch(i.header.name){case"tfhd":{let A=new ID(i.getPayloadLength(e));o=await this.tokenizer.readToken(A);break}case"tfdt":await this.tokenizer.ignore(a);break;case"trun":{let A=new lD(a),t=await this.tokenizer.readToken(A);o&&this.tracks.get(o.trackId)?.fragments.push({header:o,trackRun:t});break}default:gi(`Unexpected box: ${i.header.name}`),await this.tokenizer.ignore(a)}},r.getPayloadLength(0))}parseSoundSampleDescription(r){let o={dataFormat:r.dataFormat,dataReferenceIndex:r.dataReferenceIndex},i=0;if(r.description){let e=XP.get(r.description,i);i+=XP.len,e.version===0||e.version===1?o.description=f7.get(r.description,i):gi(`Warning: sound-sample-description ${e} not implemented`)}return o}async parseChapterTrack(r,o,i){if(!r.sampleSize&&r.chunkOffsetTable.length!==r.sampleSizeTable.length)throw new Error("Expected equal chunk-offset-table & sample-size-table length.");let e=[];for(let a=0;a0;++a){let A=r.timeToSampleTable.slice(0,a).reduce((E,B)=>E+B.duration,0),s=r.chunkOffsetTable[a]-this.tokenizer.position,g=r.sampleSize>0?r.sampleSize:r.sampleSizeTable[a];if(i-=s+g,i<0)throw new Rs("Chapter chunk exceeding token length");await this.tokenizer.ignore(s);let c=await this.tokenizer.readToken(new cD(g));gi(`Chapter ${a+1}: ${c}`);let I={title:c,timeScale:r.media.header?r.media.header.timeScale:0,start:A,sampleOffset:this.findSampleOffset(o,this.tokenizer.position)};gi(`Chapter title=${I.title}, offset=${I.sampleOffset}/${o.header.duration}`),e.push(I)}this.metadata.setFormat("chapters",e),await this.tokenizer.ignore(i)}findSampleOffset(r,o){let i=0;for(;i=o[i].firstChunk&&r{N7={parserType:"mp4",extensions:[".mp4",".m4a",".m4b",".m4pa","m4v","m4r","3gp",".mov",".movie",".qt"],mimeTypes:["audio/mp4","audio/m4a","video/m4v","video/mp4","video/quicktime"],async load(){return(await Promise.resolve().then(()=>(_7(),M7))).MP4Parser}}});var P7,R7,hLe,k7,v7,hD,G7=le(()=>{SA();P7=Je(at(),1);Kt();R7=(0,P7.default)("music-metadata:parser:musepack:sv8"),hLe=new je(2,"latin1"),k7={len:5,get:(n,r)=>({crc:ve.get(n,r),streamVersion:uA.get(n,r+4)})},v7={len:2,get:(n,r)=>({sampleFrequency:[44100,48e3,37800,32e3][qA(n,r,0,3)],maxUsedBands:qA(n,r,3,5),channelCount:qA(n,r+1,0,4)+1,msUsed:oa(n,r+1,4),audioBlockFrames:qA(n,r+1,5,3)})},hD=class{get tokenizer(){return this._tokenizer}set tokenizer(r){this._tokenizer=r}constructor(r){this._tokenizer=r}async readPacketHeader(){let r=await this.tokenizer.readToken(hLe),o=await this.readVariableSizeField();return{key:r,payloadLength:o.value-2-o.len}}async readStreamHeader(r){let o={};R7(`Reading SH at offset=${this.tokenizer.position}`);let i=await this.tokenizer.readToken(k7);r-=k7.len,Object.assign(o,i),R7(`SH.streamVersion = ${i.streamVersion}`);let e=await this.readVariableSizeField();r-=e.len,o.sampleCount=e.value;let a=await this.readVariableSizeField();r-=a.len,o.beginningOfSilence=a.value;let A=await this.tokenizer.readToken(v7);return r-=v7.len,Object.assign(o,A),await this.tokenizer.ignore(r),o}async readVariableSizeField(r=1,o=0){let i=await this.tokenizer.readNumber(uA);return(i&128)===0?{len:r,value:o+i}:(i&=127,i+=o,this.readVariableSizeField(r+1,i<<7))}}});var ks,dD=le(()=>{Ht();ks=class extends pt("Musepack"){}});var F7,uLe,uD,L7=le(()=>{F7=Je(at(),1);ni();CI();Fa();G7();dD();uLe=(0,F7.default)("music-metadata:parser:musepack"),uD=class extends Qt{constructor(){super(...arguments),this.audioLength=0}async parse(){if(await this.tokenizer.readToken(XA)!=="MPCK")throw new ks("Invalid Magic number");return this.metadata.setFormat("container","Musepack, SV8"),this.parsePacket()}async parsePacket(){let r=new hD(this.tokenizer);do{let o=await r.readPacketHeader();switch(uLe(`packet-header key=${o.key}, payloadLength=${o.payloadLength}`),o.key){case"SH":{let i=await r.readStreamHeader(o.payloadLength);this.metadata.setFormat("numberOfSamples",i.sampleCount),this.metadata.setFormat("sampleRate",i.sampleFrequency),this.metadata.setFormat("duration",i.sampleCount/i.sampleFrequency),this.metadata.setFormat("numberOfChannels",i.channelCount);break}case"AP":this.audioLength+=o.payloadLength,await this.tokenizer.ignore(o.payloadLength);break;case"RG":case"EI":case"SO":case"ST":case"CT":await this.tokenizer.ignore(o.payloadLength);break;case"SE":return this.metadata.format.duration&&this.metadata.setFormat("bitrate",this.audioLength*8/this.metadata.format.duration),EI(this.metadata,this.tokenizer,this.options);default:throw new ks(`Unexpected header: ${o.key}`)}}while(!0)}}});var BD,U7=le(()=>{SA();BD=class{constructor(r){this.pos=0,this.dword=null,this.tokenizer=r}async read(r){for(;this.dword===null;)this.dword=await this.tokenizer.readToken(ve);let o=this.dword;return this.pos+=r,this.pos<32?(o>>>=32-this.pos,o&(1<>>32-this.pos),o&(1<0){let e=32-this.pos;this.dword=null,r-=e,this.pos=0}let o=r%32,i=(r-o)/32;return await this.tokenizer.ignore(i*4),this.read(o)}}});var H7,K7=le(()=>{SA();Kt();Mn();H7={len:24,get:(n,r)=>{let o={signature:lr(n.subarray(r,r+3),"latin1"),streamMinorVersion:qA(n,r+3,0,4),streamMajorVersion:qA(n,r+3,4,4),frameCount:ve.get(n,r+4),maxLevel:yA.get(n,r+8),sampleFrequency:[44100,48e3,37800,32e3][qA(n,r+10,0,2)],link:qA(n,r+10,2,2),profile:qA(n,r+10,4,4),maxBand:qA(n,r+11,0,6),intensityStereo:oa(n,r+11,6),midSideStereo:oa(n,r+11,7),titlePeak:yA.get(n,r+12),titleGain:yA.get(n,r+14),albumPeak:yA.get(n,r+16),albumGain:yA.get(n,r+18),lastFrameLength:ve.get(n,r+20)>>>20&2047,trueGapless:oa(n,r+23,0)};return o.lastFrameLength=o.trueGapless?ve.get(n,20)>>>20&2047:0,o}}});var x7,Y7,fD,j7=le(()=>{x7=Je(at(),1);ni();CI();U7();K7();dD();Y7=(0,x7.default)("music-metadata:parser:musepack"),fD=class extends Qt{constructor(){super(...arguments),this.bitreader=null,this.audioLength=0,this.duration=null}async parse(){let r=await this.tokenizer.readToken(H7);if(r.signature!=="MP+")throw new ks("Unexpected magic number");Y7(`stream-version=${r.streamMajorVersion}.${r.streamMinorVersion}`),this.metadata.setFormat("container","Musepack, SV7"),this.metadata.setFormat("sampleRate",r.sampleFrequency);let o=1152*(r.frameCount-1)+r.lastFrameLength;this.metadata.setFormat("numberOfSamples",o),this.duration=o/r.sampleFrequency,this.metadata.setFormat("duration",this.duration),this.bitreader=new BD(this.tokenizer),this.metadata.setFormat("numberOfChannels",r.midSideStereo||r.intensityStereo?2:1);let i=await this.bitreader.read(8);return this.metadata.setFormat("codec",(i/100).toFixed(2)),await this.skipAudioData(r.frameCount),Y7(`End of audio stream, switching to APEv2, offset=${this.tokenizer.position}`),EI(this.metadata,this.tokenizer,this.options)}async skipAudioData(r){for(;r-- >0;){let i=await this.bitreader.read(20);this.audioLength+=20+i,await this.bitreader.ignore(i)}let o=await this.bitreader.read(11);this.audioLength+=o,this.duration!==null&&this.metadata.setFormat("bitrate",this.audioLength/this.duration)}}});var V7={};Qr(V7,{MusepackParser:()=>eG});var q7,J7,eG,z7=le(()=>{q7=Je(at(),1);SA();qd();L7();j7();dD();J7=(0,q7.default)("music-metadata:parser:musepack"),eG=class extends Gn{async postId3v2Parse(){let r=await this.tokenizer.peekToken(new je(3,"latin1")),o;switch(r){case"MP+":{J7("Stream-version 7"),o=new fD(this.metadata,this.tokenizer,this.options);break}case"MPC":{J7("Stream-version 8"),o=new uD(this.metadata,this.tokenizer,this.options);break}default:throw new ks("Invalid signature prefix")}return this.metadata.setAudioOnly(),o.parse()}}});var W7,Z7=le(()=>{W7={parserType:"musepack",extensions:[".mpc"],mimeTypes:["audio/musepack"],async load(){return(await Promise.resolve().then(()=>(z7(),V7))).MusepackParser}}});var nu,QD,AG=le(()=>{SA();Ht();nu=class extends pt("Opus"){},QD=class{constructor(r){if(r<19)throw new nu("ID-header-page 0 should be at least 19 bytes long");this.len=r}get(r,o){return{magicSignature:new je(8,"ascii").get(r,o+0),version:uA.get(r,o+8),channelCount:uA.get(r,o+9),preSkip:yA.get(r,o+10),inputSampleRate:ve.get(r,o+12),outputGain:yA.get(r,o+16),channelMapping:uA.get(r,o+18)}}}});var yD,X7=le(()=>{SA();$d();AG();AG();yD=class extends Fn{constructor(r,o,i){super(r,o),this.idHeader=null,this.lastPos=-1,this.tokenizer=i,this.durationOnLastPage=!0}parseFirstPage(r,o){if(this.metadata.setFormat("codec","Opus"),this.idHeader=new QD(o.length).get(o,0),this.idHeader.magicSignature!=="OpusHead")throw new nu("Illegal ogg/Opus magic-signature");this.metadata.setFormat("sampleRate",this.idHeader.inputSampleRate),this.metadata.setFormat("numberOfChannels",this.idHeader.channelCount),this.metadata.setAudioOnly()}async parseFullPage(r){switch(new je(8,"ascii").get(r,0)){case"OpusTags":await this.parseUserCommentList(r,8),this.lastPos=this.tokenizer.position-r.length;break;default:break}}calculateDuration(r){if(this.lastPageHeader&&(r||this.lastPageHeader.headerType.lastPage)&&this.metadata.format.sampleRate&&this.lastPageHeader.absoluteGranulePosition>=0){let o=this.lastPageHeader.absoluteGranulePosition-this.idHeader.preSkip;if(this.metadata.setFormat("numberOfSamples",o),this.metadata.setFormat("duration",o/48e3),this.lastPos!==-1&&this.tokenizer.fileInfo.size&&this.metadata.format.duration){let i=this.tokenizer.fileInfo.size-this.lastPos;this.metadata.setFormat("bitrate",8*i/this.metadata.format.duration)}}}}});var $7,e$=le(()=>{SA();Kt();$7={len:80,get:(n,r)=>({speex:new je(8,"ascii").get(n,r+0),version:SS(new je(20,"ascii").get(n,r+8)),version_id:$t.get(n,r+28),header_size:$t.get(n,r+32),rate:$t.get(n,r+36),mode:$t.get(n,r+40),mode_bitstream_version:$t.get(n,r+44),nb_channels:$t.get(n,r+48),bitrate:$t.get(n,r+52),frame_size:$t.get(n,r+56),vbr:$t.get(n,r+60),frames_per_packet:$t.get(n,r+64),extra_headers:$t.get(n,r+68),reserved1:$t.get(n,r+72),reserved2:$t.get(n,r+76)})}});var A$,yLe,mD,t$=le(()=>{A$=Je(at(),1);$d();e$();yLe=(0,A$.default)("music-metadata:parser:ogg:speex"),mD=class extends Fn{constructor(r,o,i){super(r,o)}parseFirstPage(r,o){yLe("First Ogg/Speex page");let i=$7.get(o,0);this.metadata.setFormat("codec",`Speex ${i.version}`),this.metadata.setFormat("numberOfChannels",i.nb_channels),this.metadata.setFormat("sampleRate",i.rate),i.bitrate!==-1&&this.metadata.setFormat("bitrate",i.bitrate),this.metadata.setAudioOnly()}}});var r$,a$=le(()=>{SA();r$={len:42,get:(n,r)=>({id:new je(7,"ascii").get(n,r),vmaj:uA.get(n,r+7),vmin:uA.get(n,r+8),vrev:uA.get(n,r+9),vmbw:PA.get(n,r+10),vmbh:PA.get(n,r+17),nombr:Br.get(n,r+37),nqual:uA.get(n,r+40)})}});var o$,i$,SD,n$=le(()=>{o$=Je(at(),1);a$();i$=(0,o$.default)("music-metadata:parser:ogg:theora"),SD=class{constructor(r,o,i){this.durationOnLastPage=!1,this.metadata=r}async parsePage(r,o){r.headerType.firstPage&&await this.parseFirstPage(r,o)}calculateDuration(){i$("duration calculation not implemented")}async parseFirstPage(r,o){i$("First Ogg/Theora page"),this.metadata.setFormat("codec","Theora");let i=r$.get(o,0);this.metadata.setFormat("bitrate",i.nombr),this.metadata.setFormat("hasVideo",!0)}flush(){return Promise.resolve()}}});var s$,DD,g$=le(()=>{SA();Kt();SA();s$={len:27,get:(n,r)=>({capturePattern:new je(4,"latin1").get(n,r),version:uA.get(n,r+4),headerType:{continued:kA(n,r+5,0),firstPage:kA(n,r+5,1),lastPage:kA(n,r+5,2)},absoluteGranulePosition:Number(fr.get(n,r+6)),streamSerialNumber:ve.get(n,r+14),pageSequenceNo:ve.get(n,r+18),pageChecksum:ve.get(n,r+22),page_segments:uA.get(n,r+26)})},DD=class n{static sum(r,o,i){let e=new DataView(r.buffer,0),a=0;for(let A=o;A{c$=Je(at(),1);xP();jP();Fa();WS();tG=(0,c$.default)("music-metadata:parser:ogg:theora"),wD=class{constructor(r,o,i){this.durationOnLastPage=!1,this.metadata=r,this.options=o,this.tokenizer=i,this.flacParser=new tu(this.metadata,this.tokenizer,o)}async parsePage(r,o){r.headerType.firstPage&&await this.parseFirstPage(r,o)}calculateDuration(){tG("duration calculation not implemented")}async parseFirstPage(r,o){if(tG("First Ogg/FLAC page"),(await XA.get(o,9)).toString()!=="fLaC")throw new Error("Invalid FLAC preamble");let e=await eu.get(o,13);await this.parseDataBlock(e,o.subarray(13+eu.len))}async parseDataBlock(r,o){switch(tG(`blockHeader type=${r.type}, length=${r.length}`),r.type){case Ua.STREAMINFO:{let i=Au.get(o,0);return this.flacParser.processsStreamInfo(i)}case Ua.PADDING:break;case Ua.APPLICATION:break;case Ua.SEEKTABLE:break;case Ua.VORBIS_COMMENT:return this.flacParser.parseComment(o);case Ua.PICTURE:if(!this.options.skipCovers){let i=new zg(o.length).get(o,0);return this.flacParser.addPictureTag(i)}break;default:this.metadata.addWarning(`Unknown block type: ${r.type}`)}return this.tokenizer.ignore(r.length).then()}flush(){return Promise.resolve()}}});var p$={};Qr(p$,{OggContentError:()=>lE,OggParser:()=>aG});var l$,lE,Un,rG,aG,E$=le(()=>{SA();go();l$=Je(at(),1);ni();$d();X7();t$();n$();Ht();g$();I$();lE=class extends pt("Ogg"){},Un=(0,l$.default)("music-metadata:parser:ogg"),rG=class{constructor(r,o,i){this.pageNumber=0,this.closed=!1,this.metadata=r,this.streamSerial=o,this.options=i}async parsePage(r,o){this.pageNumber=o.pageSequenceNo,Un("serial=%s page#=%s, Ogg.id=%s",o.streamSerialNumber,o.pageSequenceNo,o.capturePattern);let i=await r.readToken(new DD(o));Un("totalPageSize=%s",i.totalPageSize);let e=await r.readToken(new ut(i.totalPageSize));if(Un("firstPage=%s, lastPage=%s, continued=%s",o.headerType.firstPage,o.headerType.lastPage,o.headerType.continued),o.headerType.firstPage){this.metadata.setFormat("container","Ogg");let a=e.subarray(0,7),A=Array.from(a).filter(t=>t>=32&&t<=126).map(t=>String.fromCharCode(t)).join("");switch(A){case"vorbis":Un(`Set Ogg stream serial ${o.streamSerialNumber}, codec=Vorbis`),this.pageConsumer=new Fn(this.metadata,this.options);break;case"OpusHea":Un("Set page consumer to Ogg/Opus"),this.pageConsumer=new yD(this.metadata,this.options,r);break;case"Speex ":Un("Set page consumer to Ogg/Speex"),this.pageConsumer=new mD(this.metadata,this.options,r);break;case"fishead":case"theora":Un("Set page consumer to Ogg/Theora"),this.pageConsumer=new SD(this.metadata,this.options,r);break;case"FLAC":Un("Set page consumer to Vorbis"),this.pageConsumer=new wD(this.metadata,this.options,r);break;default:throw new lE(`Ogg codec not recognized (id=${A}`)}}if(o.headerType.lastPage&&(this.closed=!0),this.pageConsumer)await this.pageConsumer.parsePage(o,e);else throw new Error("pageConsumer should be initialized")}},aG=class extends Qt{constructor(){super(...arguments),this.streams=new Map}async parse(){this.streams=new Map;let r=!1,o;try{do{if(o=await this.tokenizer.readToken(s$),o.capturePattern!=="OggS")throw new lE("Invalid Ogg capture pattern");let i=this.streams.get(o.streamSerialNumber);if(i||(i=new rG(this.metadata,o.streamSerialNumber,this.options),this.streams.set(o.streamSerialNumber,i)),await i.parsePage(this.tokenizer,o),i.pageNumber>12&&!(this.options.duration&&[...this.streams.values()].find(e=>e.pageConsumer?.durationOnLastPage))){Un("Stop processing Ogg stream");break}}while(![...this.streams.values()].every(i=>i.closed))}catch(i){if(i instanceof NA)Un("Reached end-of-stream"),r=!0;else if(i instanceof lE)this.metadata.addWarning(`Corrupt Ogg content at ${this.tokenizer.position}`);else throw i}for(let i of this.streams.values())i.closed||(this.metadata.addWarning(`End-of-stream reached before reaching last page in Ogg stream serial=${i.streamSerial}`),await i.pageConsumer?.flush()),i.pageConsumer?.calculateDuration(r)}}});var C$,h$=le(()=>{C$={parserType:"ogg",extensions:[".ogg",".ogv",".oga",".ogm",".ogx",".opus",".spx"],mimeTypes:["audio/ogg","audio/opus","audio/speex","video/ogg"],async load(){return(await Promise.resolve().then(()=>(E$(),p$))).OggParser}}});function Hn(n,r){return OD(n,r,1)===1}function OD(n,r,o){return n>>>r&4294967295>>>32-o}var mLe,su,bD,d$=le(()=>{SA();Fa();mLe=[6e3,8e3,9600,11025,12e3,16e3,22050,24e3,32e3,44100,48e3,64e3,88200,96e3,192e3,-1],su={len:32,get:(n,r)=>{let o=ve.get(n,r+24),i={BlockID:XA.get(n,r),blockSize:ve.get(n,r+4),version:yA.get(n,r+8),totalSamples:ve.get(n,r+12),blockIndex:ve.get(n,r+16),blockSamples:ve.get(n,r+20),flags:{bitsPerSample:(1+OD(o,0,2))*8,isMono:Hn(o,2),isHybrid:Hn(o,3),isJointStereo:Hn(o,4),crossChannel:Hn(o,5),hybridNoiseShaping:Hn(o,6),floatingPoint:Hn(o,7),samplingRate:mLe[OD(o,23,4)],isDSD:Hn(o,31)},crc:new ut(4).get(n,r+28)};return i.flags.isDSD&&(i.totalSamples*=8),i}},bD={len:1,get:(n,r)=>({functionId:OD(n[r],0,6),isOptional:Hn(n[r],5),isOddSize:Hn(n[r],6),largeBlock:Hn(n[r],7)})}});var B$={};Qr(B$,{WavPackContentError:()=>pE,WavPackParser:()=>iG});var u$,yI,pE,iG,f$=le(()=>{SA();CI();Fa();ni();d$();u$=Je(at(),1);Gd();Ht();yI=(0,u$.default)("music-metadata:parser:WavPack"),pE=class extends pt("WavPack"){},iG=class extends Qt{constructor(){super(...arguments),this.audioDataSize=0}async parse(){return this.metadata.setAudioOnly(),this.audioDataSize=0,await this.parseWavPackBlocks(),EI(this.metadata,this.tokenizer,this.options)}async parseWavPackBlocks(){do{if(await this.tokenizer.peekToken(XA)!=="wvpk")break;let o=await this.tokenizer.readToken(su);if(o.BlockID!=="wvpk")throw new pE("Invalid WavPack Block-ID");yI(`WavPack header blockIndex=${o.blockIndex}, len=${su.len}`),o.blockIndex===0&&!this.metadata.format.container&&(this.metadata.setFormat("container","WavPack"),this.metadata.setFormat("lossless",!o.flags.isHybrid),this.metadata.setFormat("bitsPerSample",o.flags.bitsPerSample),o.flags.isDSD||(this.metadata.setFormat("sampleRate",o.flags.samplingRate),this.metadata.setFormat("duration",o.totalSamples/o.flags.samplingRate)),this.metadata.setFormat("numberOfChannels",o.flags.isMono?1:2),this.metadata.setFormat("numberOfSamples",o.totalSamples),this.metadata.setFormat("codec",o.flags.isDSD?"DSD":"PCM"));let i=o.blockSize-(su.len-8);await(o.blockIndex===0?this.parseMetadataSubBlock(o,i):this.tokenizer.ignore(i)),o.blockSamples>0&&(this.audioDataSize+=o.blockSize)}while(!this.tokenizer.fileInfo.size||this.tokenizer.fileInfo.size-this.tokenizer.position>=su.len);this.metadata.format.duration&&this.metadata.setFormat("bitrate",this.audioDataSize*8/this.metadata.format.duration)}async parseMetadataSubBlock(r,o){let i=o;for(;i>bD.len;){let e=await this.tokenizer.readToken(bD),a=await this.tokenizer.readNumber(e.largeBlock?Rd:uA),A=new Uint8Array(a*2-(e.isOddSize?1:0));switch(await this.tokenizer.readBuffer(A),yI(`Metadata Sub-Blocks functionId=0x${e.functionId.toString(16)}, id.largeBlock=${e.largeBlock},data-size=${A.length}`),e.functionId){case 0:break;case 14:{yI("ID_DSD_BLOCK");let t=1<{Q$={parserType:"wavpack",extensions:[".wv",".wvp"],mimeTypes:["audio/wavpack"],async load(){return(await Promise.resolve().then(()=>(f$(),B$))).WavPackParser}}});var EE,MD,m$=le(()=>{SA();EE={len:8,get:(n,r)=>({chunkID:new je(4,"latin1").get(n,r),chunkSize:ve.get(n,r+4)})},MD=class{constructor(r){this.tagHeader=r,this.len=r.chunkSize,this.len+=this.len&1}get(r,o){return new je(this.tagHeader.chunkSize,"ascii").get(r,o)}}});var mI,zr,S$,_D,ND,oG=le(()=>{SA();Ht();mI=class extends pt("Wave"){},zr={PCM:1,ADPCM:2,IEEE_FLOAT:3,ALAW:6,MULAW:7,DVI_ADPCM:17,GSM610:49,MPEG_ADTS_AAC:5632,MPEG_LOAS:5634,RAW_AAC1:255,DOLBY_AC3_SPDIF:146,DVM:8192,RAW_SPORT:576,ESST_AC3:577,DRM:9,DTS2:8193,MPEG:80,MPEGLAYER3:85},S$={[zr.PCM]:"PCM",[zr.ADPCM]:"ADPCM",[zr.IEEE_FLOAT]:"IEEE_FLOAT",[zr.ALAW]:"ALAW",[zr.MULAW]:"MULAW",[zr.DVI_ADPCM]:"DVI_ADPCM",[zr.GSM610]:"GSM610",[zr.MPEG_ADTS_AAC]:"MPEG_ADTS_AAC",[zr.MPEG_LOAS]:"MPEG_LOAS",[zr.RAW_AAC1]:"RAW_AAC1",[zr.DOLBY_AC3_SPDIF]:"DOLBY_AC3_SPDIF",[zr.DVM]:"DVM",[zr.RAW_SPORT]:"RAW_SPORT",[zr.ESST_AC3]:"ESST_AC3",[zr.DRM]:"DRM",[zr.DTS2]:"DTS2",[zr.MPEG]:"MPEG",[zr.MPEGLAYER3]:"MPEGLAYER3"},_D=class{constructor(r){if(r.chunkSize<16)throw new mI("Invalid chunk size");this.len=r.chunkSize}get(r,o){return{wFormatTag:yA.get(r,o),nChannels:yA.get(r,o+2),nSamplesPerSec:ve.get(r,o+4),nAvgBytesPerSec:ve.get(r,o+8),nBlockAlign:yA.get(r,o+12),wBitsPerSample:yA.get(r,o+14)}}},ND=class{constructor(r){if(r.chunkSize<4)throw new mI("Invalid fact chunk size.");this.len=r.chunkSize}get(r,o){return{dwSampleLength:ve.get(r,o)}}}});var nG,D$=le(()=>{SA();Kt();nG={len:420,get:(n,r)=>({description:po(new je(256,"ascii").get(n,r)).trim(),originator:po(new je(32,"ascii").get(n,r+256)).trim(),originatorReference:po(new je(32,"ascii").get(n,r+288)).trim(),originationDate:po(new je(10,"ascii").get(n,r+320)).trim(),originationTime:po(new je(8,"ascii").get(n,r+330)).trim(),timeReferenceLow:ve.get(n,r+338),timeReferenceHigh:ve.get(n,r+342),version:yA.get(n,r+346),umid:new ut(64).get(n,r+348),loudnessValue:yA.get(n,r+412),maxTruePeakLevel:yA.get(n,r+414),maxMomentaryLoudness:yA.get(n,r+416),maxShortTermLoudness:yA.get(n,r+418)})}});var O$={};Qr(O$,{WaveParser:()=>sG});var w$,Wg,sG,b$=le(()=>{go();SA();w$=Je(at(),1);m$();oG();Xp();Kt();Fa();ni();D$();oG();Wg=(0,w$.default)("music-metadata:parser:RIFF"),sG=class extends Qt{constructor(){super(...arguments),this.blockAlign=0,this.avgBytesPerSec=0}async parse(){let r=await this.tokenizer.readToken(EE);if(Wg(`pos=${this.tokenizer.position}, parse: chunkID=${r.chunkID}`),r.chunkID==="RIFF")return this.metadata.setAudioOnly(),this.parseRiffChunk(r.chunkSize).catch(o=>{if(!(o instanceof NA))throw o})}async parseRiffChunk(r){let o=await this.tokenizer.readToken(XA);switch(this.metadata.setFormat("container",o),o){case"WAVE":return this.readWaveChunk(r-XA.len);default:throw new mI(`Unsupported RIFF format: RIFF/${o}`)}}async readWaveChunk(r){for(;r>=EE.len;){let o=await this.tokenizer.readToken(EE);switch(r-=EE.len+o.chunkSize,o.chunkSize>r&&this.metadata.addWarning("Data chunk size exceeds file size"),this.header=o,Wg(`pos=${this.tokenizer.position}, readChunk: chunkID=RIFF/WAVE/${o.chunkID}`),o.chunkID){case"LIST":await this.parseListTag(o);break;case"fact":this.metadata.setFormat("lossless",!1),this.fact=await this.tokenizer.readToken(new ND(o));break;case"fmt ":{let i=await this.tokenizer.readToken(new _D(o)),e=S$[i.wFormatTag];e||(Wg(`WAVE/non-PCM format=${i.wFormatTag}`),e=`non-PCM (${i.wFormatTag})`),this.metadata.setFormat("codec",e),this.metadata.setFormat("bitsPerSample",i.wBitsPerSample),this.metadata.setFormat("sampleRate",i.nSamplesPerSec),this.metadata.setFormat("numberOfChannels",i.nChannels),this.blockAlign=i.nBlockAlign,this.avgBytesPerSec=i.nAvgBytesPerSec;break}case"id3 ":case"ID3 ":{let i=await this.tokenizer.readToken(new ut(o.chunkSize)),e=Mi(i);await new ho().parse(this.metadata,e,this.options);break}case"data":{this.metadata.format.lossless!==!1&&this.metadata.setFormat("lossless",!0);let i=o.chunkSize;if(this.tokenizer.fileInfo.size){let a=this.tokenizer.fileInfo.size-this.tokenizer.position;a0?this.metadata.setFormat("bitrate",this.avgBytesPerSec*8):this.metadata.format.duration&&this.metadata.setFormat("bitrate",i*8/this.metadata.format.duration),await this.tokenizer.ignore(o.chunkSize);break}case"bext":{let i=await this.tokenizer.readToken(nG);Object.keys(i).forEach(a=>{this.metadata.addTag("exif",`bext.${a}`,i[a])});let e=o.chunkSize-nG.len;await this.tokenizer.ignore(e);break}case"\0\0\0\0":Wg(`Ignore padding chunk: RIFF/${o.chunkID} of ${o.chunkSize} bytes`),this.metadata.addWarning(`Ignore chunk: RIFF/${o.chunkID}`),await this.tokenizer.ignore(o.chunkSize);break;default:Wg(`Ignore chunk: RIFF/${o.chunkID} of ${o.chunkSize} bytes`),this.metadata.addWarning(`Ignore chunk: RIFF/${o.chunkID}`),await this.tokenizer.ignore(o.chunkSize)}this.header.chunkSize%2===1&&(Wg("Read odd padding byte"),await this.tokenizer.ignore(1))}}async parseListTag(r){let o=await this.tokenizer.readToken(new je(4,"latin1"));switch(Wg("pos=%s, parseListTag: chunkID=RIFF/WAVE/LIST/%s",this.tokenizer.position,o),o){case"INFO":return this.parseRiffInfoTags(r.chunkSize-4);default:return this.metadata.addWarning(`Ignore chunk: RIFF/WAVE/LIST/${o}`),Wg(`Ignoring chunkID=RIFF/WAVE/LIST/${o}`),this.tokenizer.ignore(r.chunkSize-4).then()}}async parseRiffInfoTags(r){for(;r>=8;){let o=await this.tokenizer.readToken(EE),i=new MD(o),e=await this.tokenizer.readToken(i);this.addTag(o.chunkID,po(e)),r-=8+i.len}if(r!==0)throw new mI(`Illegal remaining size: ${r}`)}addTag(r,o){this.metadata.addTag("exif",r,o)}}});var M$,_$=le(()=>{M$={parserType:"riff",extensions:[".wav","wave",".bwf"],mimeTypes:["audio/vnd.wave","audio/wav","audio/wave"],async load(){return(await Promise.resolve().then(()=>(b$(),O$))).WaveParser}}});function wLe(n){let r=N$.default.parse(n),o=Q9(r.type);return{type:o.type,subtype:o.subtype,suffix:o.suffix,parameters:r.parameters}}function OLe(n){let r=n.lastIndexOf(".");return r===-1?"":n.substring(r)}var N$,T$,SI,DI,gG=le(()=>{cP();N$=Je(f9(),1);y9();T$=Je(at(),1);x9();lI();dX();Ht();BX();TX();FX();jX();$X();o7();h7();T7();Z7();h$();y$();_$();TD();SI=(0,T$.default)("music-metadata:parser:factory");DI=class{constructor(){this.parsers=[],[i7,hX,uX,N7,C7,M$,C$,NX,xX,Q$,W7,XX,GX].forEach(r=>{this.registerParser(r)})}registerParser(r){this.parsers.push(r)}async parse(r,o,i){if(r.supportsRandomAccess()?(SI("tokenizer supports random-access, scanning for appending headers"),await cG(r,i)):SI("tokenizer does not support random-access, cannot scan for appending headers"),!o){let t=new Uint8Array(4100);if(r.fileInfo.mimeType&&(o=this.findLoaderForContentType(r.fileInfo.mimeType)),!o&&r.fileInfo.path&&(o=this.findLoaderForExtension(r.fileInfo.path)),!o){SI("Guess parser on content..."),await r.peekBuffer(t,{mayBeLess:!0});let s=await Ud(t,{mpegOffsetTolerance:10});if(!s||!s.mime)throw new Ug("Failed to determine audio format");if(SI(`Guessed file type is mime=${s.mime}, extension=${s.ext}`),o=this.findLoaderForContentType(s.mime),!o)throw new Hg(`Guessed MIME-type not supported: ${s.mime}`)}}SI(`Loading ${o.parserType} parser...`);let e=new GS(i),a=await o.load(),A=new a(e,r,i??{});return SI(`Parser ${o.parserType} loaded`),await A.parse(),e.format.trackInfo&&(e.format.hasAudio===void 0&&e.setFormat("hasAudio",!!e.format.trackInfo.find(t=>t.type===qr.audio)),e.format.hasVideo===void 0&&e.setFormat("hasVideo",!!e.format.trackInfo.find(t=>t.type===qr.video))),e.toCommonMetadata()}findLoaderForExtension(r){if(!r)return;let o=OLe(r).toLocaleLowerCase()||r;return this.parsers.find(i=>i.extensions.indexOf(o)!==-1)}findLoaderForContentType(r){let o;if(!r)return;try{o=wLe(r)}catch{SI(`Invalid HTTP Content-Type header value: ${r}`);return}let i=o.subtype.indexOf("x-")===0?o.subtype.substring(2):o.subtype;return this.parsers.find(e=>e.mimeTypes.find(a=>a.indexOf(`${o.type}/${i}`)!==-1))}getSupportedMimeTypes(){let r=new Set;return this.parsers.forEach(o=>{o.mimeTypes.forEach(i=>{r.add(i),r.add(i.replace("/","/x-"))})}),Array.from(r)}}});async function R$(n){let r=n.fileInfo.size;if(r>=143){let o=new Uint8Array(15),i=n.position;await n.readBuffer(o,{position:r-143}),n.setPosition(i);let e=lr(o,"latin1");if(e.substring(6)===bLe)return Number.parseInt(e.substring(0,6),10)+15}return 0}var bLe,k$=le(()=>{Mn();bLe="LYRICS200"});async function MLe(n,r={}){let o=pS(n);try{return await CE(o,r)}finally{await o.close()}}async function _Le(n,r,o={}){let i=lS(n,{fileInfo:typeof r=="string"?{mimeType:r}:r});try{return await CE(i,o)}finally{await i.close()}}async function NLe(n,r,o={}){let i=Mi(n,{fileInfo:typeof r=="string"?{mimeType:r}:r});return CE(i,o)}function CE(n,r){return new DI().parse(n,void 0,r)}function TLe(n){let r={};for(let{id:o,value:i}of n)(r[o]||(r[o]=[])).push(i);return r}function RLe(n){return n===void 0?0:1+Math.round(n*4)}function kLe(n){return n?n.reduce((r,o)=>o.name&&o.name.toLowerCase()in["front","cover","cover (front)"]?o:r):null}async function cG(n,r={}){let o=n.fileInfo.size;if(await $9(n)){o-=128;let i=await R$(n);o-=i}r.apeHeader=await xg.findApeFooterOffset(n,o)}function vLe(){return new DI().getSupportedMimeTypes()}var TD=le(()=>{go();gG();CI();xd();k$();lI();Ht();Ht()});var G$={};Qr(G$,{CouldNotDetermineFileTypeError:()=>Ug,FieldDecodingError:()=>lo,InternalParserError:()=>II,LyricsContentType:()=>Jp,TimestampFormat:()=>qp,UnsupportedFileTypeError:()=>Hg,getSupportedMimeTypes:()=>vLe,makeParseError:()=>xp,makeUnexpectedFileContentError:()=>pt,orderTags:()=>TLe,parseBlob:()=>MLe,parseBuffer:()=>NLe,parseFile:()=>GLe,parseFromTokenizer:()=>CE,parseStream:()=>PLe,parseWebStream:()=>_Le,ratingToStars:()=>RLe,scanAppendingHeaders:()=>cG,selectCover:()=>kLe});async function PLe(n,r,o={}){let i=await Wv(n,{fileInfo:typeof r=="string"?{mimeType:r}:r});try{return await CE(i,o)}finally{await i.close()}}async function GLe(n,r={}){v$(`parseFile: ${n}`);let o=await kZ(n),i=new DI;try{let e=i.findLoaderForExtension(n);e||v$("Parser could not be determined by file extension");try{return await i.parse(o,e,r)}catch(a){throw(a instanceof Ug||a instanceof Hg)&&(a.message+=`: ${n}`),a}}finally{await o.close()}}var P$,v$,F$=le(()=>{go();P$=Je(at(),1);TD();gG();TD();v$=(0,P$.default)("music-metadata:parser")});var $ee=W((yCA,YG)=>{"use strict";var J2e=Object.prototype.hasOwnProperty,Ha="~";function Qu(){}Object.create&&(Qu.prototype=Object.create(null),new Qu().__proto__||(Ha=!1));function q2e(n,r,o){this.fn=n,this.context=r,this.once=o||!1}function Xee(n,r,o,i,e){if(typeof o!="function")throw new TypeError("The listener must be a function");var a=new q2e(o,i||n,e),A=Ha?Ha+r:r;return n._events[A]?n._events[A].fn?n._events[A]=[n._events[A],a]:n._events[A].push(a):(n._events[A]=a,n._eventsCount++),n}function JD(n,r){--n._eventsCount===0?n._events=new Qu:delete n._events[r]}function ba(){this._events=new Qu,this._eventsCount=0}ba.prototype.eventNames=function(){var r=[],o,i;if(this._eventsCount===0)return r;for(i in o=this._events)J2e.call(o,i)&&r.push(Ha?i.slice(1):i);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(o)):r};ba.prototype.listeners=function(r){var o=Ha?Ha+r:r,i=this._events[o];if(!i)return[];if(i.fn)return[i.fn];for(var e=0,a=i.length,A=new Array(a);e{"use strict";var Du=n=>n&&typeof n.message=="string",rF=n=>{if(!n)return;let r=n.cause;if(typeof r=="function"){let o=n.cause();return Du(o)?o:void 0}else return Du(r)?r:void 0},OAe=(n,r)=>{if(!Du(n))return"";let o=n.stack||"";if(r.has(n))return o+` +`),syncText:o}}var QP,K9=le(()=>{lI();QP=/\[(\d{2}):(\d{2})\.(\d{2,3})]/});function JFe(n){return n.length>2?`${n.slice(0,n.length-1).join(", ")} & ${n[n.length-1]}`:n.join(" & ")}var Y9,pI,jFe,GS,x9=le(()=>{lI();Y9=Je(at(),1);M9();U9();Ns();Kt();cP();K9();pI=(0,Y9.default)("music-metadata:collector"),jFe=["matroska","APEv2","vorbis","ID3v2.4","ID3v2.3","ID3v2.2","exif","asf","iTunes","AIFF","ID3v1"],GS=class{constructor(r){this.format={tagTypes:[],trackInfo:[]},this.native={},this.common={track:{no:null,of:null},disk:{no:null,of:null},movementIndex:{no:null,of:null}},this.quality={warnings:[]},this.commonOrigin={},this.originPriority={},this.tagMapper=new PS,this.opts=r;let o=1;for(let i of jFe)this.originPriority[i]=o++;this.originPriority.artificial=500,this.originPriority.id3v1=600}hasAny(){return Object.keys(this.native).length>0}addStreamInfo(r){pI(`streamInfo: type=${r.type?EP[r.type]:"?"}, codec=${r.codecName}`),this.format.trackInfo.push(r)}setFormat(r,o){pI(`format: ${r} = ${o}`),this.format[r]=o,this.opts?.observer&&this.opts.observer({metadata:this,tag:{type:"format",id:r,value:o}})}setAudioOnly(){this.setFormat("hasAudio",!0),this.setFormat("hasVideo",!1)}async addTag(r,o,i){pI(`tag ${r}.${o} = ${i}`),this.native[r]||(this.format.tagTypes.push(r),this.native[r]=[]),this.native[r].push({id:o,value:i}),await this.toCommon(r,o,i)}addWarning(r){this.quality.warnings.push({message:r})}async postMap(r,o){switch(o.id){case"artist":return this.handleSingularArtistTag(r,o,"artist","artists");case"albumartist":return this.handleSingularArtistTag(r,o,"albumartist","albumartists");case"artists":return this.handlePluralArtistTag(r,o,"artist","artists");case"albumartists":return this.handlePluralArtistTag(r,o,"albumartist","albumartists");case"picture":return this.postFixPicture(o.value).then(i=>{i!==null&&(o.value=i,this.setGenericTag(r,o))});case"totaltracks":this.common.track.of=er.toIntOrNull(o.value);return;case"totaldiscs":this.common.disk.of=er.toIntOrNull(o.value);return;case"movementTotal":this.common.movementIndex.of=er.toIntOrNull(o.value);return;case"track":case"disk":case"movementIndex":{let i=this.common[o.id].of;this.common[o.id]=er.normalizeTrack(o.value),this.common[o.id].of=i??this.common[o.id].of;return}case"bpm":case"year":case"originalyear":o.value=Number.parseInt(o.value,10);break;case"date":{let i=Number.parseInt(o.value.substr(0,4),10);Number.isNaN(i)||(this.common.year=i);break}case"discogs_label_id":case"discogs_release_id":case"discogs_master_release_id":case"discogs_artist_id":case"discogs_votes":o.value=typeof o.value=="string"?Number.parseInt(o.value,10):o.value;break;case"replaygain_track_gain":case"replaygain_track_peak":case"replaygain_album_gain":case"replaygain_album_peak":o.value=w9(o.value);break;case"replaygain_track_minmax":o.value=o.value.split(",").map(i=>Number.parseInt(i,10));break;case"replaygain_undo":{let i=o.value.split(",").map(e=>Number.parseInt(e,10));o.value={leftChannel:i[0],rightChannel:i[1]};break}case"gapless":case"compilation":case"podcast":case"showMovement":o.value=o.value==="1"||o.value===1;break;case"isrc":{let i=this.common[o.id];if(i&&i.indexOf(o.value)!==-1)return;break}case"comment":typeof o.value=="string"&&(o.value={text:o.value}),o.value.descriptor==="iTunPGAP"&&this.setGenericTag(r,{id:"gapless",value:o.value.text==="1"});break;case"lyrics":typeof o.value=="string"&&(o.value=H9(o.value));break;default:}o.value!==null&&this.setGenericTag(r,o)}toCommonMetadata(){return{format:this.format,native:this.native,quality:this.quality,common:this.common}}handleSingularArtistTag(r,o,i,e){if(this.commonOrigin[i]===this.originPriority[r])return this.postMap("artificial",{id:e,value:o.value});this.common[e]||this.setGenericTag("artificial",{id:e,value:o.value}),this.setGenericTag(r,o)}handlePluralArtistTag(r,o,i,e){if((!this.common[i]||this.commonOrigin[i]===this.originPriority.artificial)&&(!this.common[e]||this.common[e].indexOf(o.value)===-1)){let a=(this.common[e]||[]).concat([o.value]),A=JFe(a);this.setGenericTag("artificial",{id:i,value:A})}this.setGenericTag(r,o)}async postFixPicture(r){if(r.data&&r.data.length>0){if(!r.format){let o=await Ud(Uint8Array.from(r.data));if(o)r.format=o.mime;else return null}switch(r.format=r.format.toLocaleLowerCase(),r.format){case"image/jpg":r.format="image/jpeg"}return r}return this.addWarning("Empty picture tag found"),null}async toCommon(r,o,i){let e={id:o,value:i},a=this.tagMapper.mapTag(r,e,this);a&&await this.postMap(r,a)}setGenericTag(r,o){pI(`common.${o.id} = ${o.value}`);let i=this.commonOrigin[o.id]||1e3,e=this.originPriority[r];if(O9(o.id))if(e<=i)this.common[o.id]=o.value,this.commonOrigin[o.id]=e;else return pI(`Ignore native tag (singleton): ${r}.${o.id} = ${o.value}`);else if(e===i)!b9(o.id)||this.common[o.id].indexOf(o.value)===-1?this.common[o.id].push(o.value):pI(`Ignore duplicate value: ${r}.${o.id} = ${o.value}`);else if(e{Qt=class{constructor(r,o,i){this.metadata=r,this.tokenizer=o,this.options=i}}});var qFe,XA,Fa=le(()=>{Mn();Kt();Ht();qFe=/^[\x21-\x7e©][\x20-\x7e\x00()]{3}/,XA={len:4,get:(n,r)=>{let o=lr(n.subarray(r,r+XA.len),"latin1");if(!o.match(qFe))throw new lo(`FourCC contains invalid characters: ${D9(o)} "${o}"`);return o},put:(n,r,o)=>{let i=GZ(o,"latin1");if(i.length!==4)throw new II("Invalid length");return n.set(i,r),r+4}}});function J9(n){return{containsHeader:FS(n,31),containsFooter:FS(n,30),isHeader:FS(n,29),readOnly:FS(n,0),dataType:(n&6)>>1}}function FS(n,r){return(n&1<{SA();Fa();Yd={text_utf8:0,binary:1,external_info:2,reserved:3},yP={len:52,get:(n,r)=>({ID:XA.get(n,r),version:ve.get(n,r+4)/1e3,descriptorBytes:ve.get(n,r+8),headerBytes:ve.get(n,r+12),seekTableBytes:ve.get(n,r+16),headerDataBytes:ve.get(n,r+20),apeFrameDataBytes:ve.get(n,r+24),apeFrameDataBytesHigh:ve.get(n,r+28),terminatingDataBytes:ve.get(n,r+32),fileMD5:new ut(16).get(n,r+36)})},j9={len:24,get:(n,r)=>({compressionLevel:yA.get(n,r),formatFlags:yA.get(n,r+2),blocksPerFrame:ve.get(n,r+4),finalFrameBlocks:ve.get(n,r+8),totalFrames:ve.get(n,r+12),bitsPerSample:yA.get(n,r+16),channel:yA.get(n,r+18),sampleRate:ve.get(n,r+20)})},si={len:32,get:(n,r)=>({ID:new je(8,"ascii").get(n,r),version:ve.get(n,r+8),size:ve.get(n,r+12),fields:ve.get(n,r+16),flags:J9(ve.get(n,r+20))})},LS={len:8,get:(n,r)=>({size:ve.get(n,r),flags:J9(ve.get(n,r+4))})}});var Z9={};Qr(Z9,{APEv2Parser:()=>xg,ApeContentError:()=>Wp,tryParseApeHeader:()=>EI});function EI(n,r,o){return new xg(n,r,o).tryParseApeHeader()}var W9,Yg,V9,z9,Wp,xg,CI=le(()=>{W9=Je(at(),1);go();SA();Kt();ni();q9();Ht();Mn();Yg=(0,W9.default)("music-metadata:parser:APEv2"),V9="APEv2",z9="APETAGEX",Wp=class extends pt("APEv2"){};xg=class n extends Qt{constructor(){super(...arguments),this.ape={}}static calculateDuration(r){let o=r.totalFrames>1?r.blocksPerFrame*(r.totalFrames-1):0;return o+=r.finalFrameBlocks,o/r.sampleRate}static async findApeFooterOffset(r,o){let i=new Uint8Array(si.len),e=r.position;if(o<=si.len){Yg(`Offset is too small to read APE footer: offset=${o}`);return}if(o>si.len){await r.readBuffer(i,{position:o-si.len}),r.setPosition(e);let a=si.get(i,0);if(a.ID==="APETAGEX")return a.flags.isHeader?Yg(`APE Header found at offset=${o-si.len}`):(Yg(`APE Footer found at offset=${o-si.len}`),o-=a.size),{footer:a,offset:o}}}static parseTagFooter(r,o,i){let e=si.get(o,o.length-si.len);if(e.ID!==z9)throw new Wp("Unexpected APEv2 Footer ID preamble value");return Mi(o),new n(r,Mi(o),i).parseTags(e)}async tryParseApeHeader(){if(this.tokenizer.fileInfo.size&&this.tokenizer.fileInfo.size-this.tokenizer.position0?this.parseDescriptorExpansion(o):this.parseHeader());return this.metadata.setAudioOnly(),await this.tokenizer.ignore(i.forwardBytes),this.tryParseApeHeader()}async parseTags(r){let o=new Uint8Array(256),i=r.size-si.len;Yg(`Parse APE tags at offset=${this.tokenizer.position}, size=${i}`);for(let e=0;ethis.metadata.addTag(V9,t,c)));break}case Yd.binary:if(this.options.skipCovers)await this.tokenizer.ignore(a.size);else{let s=new Uint8Array(a.size);await this.tokenizer.readBuffer(s),A=Pn(s);let g=lr(s.subarray(0,A),"utf-8"),c=s.subarray(A+1);await this.metadata.addTag(V9,t,{description:g,data:c})}break;case Yd.external_info:Yg(`Ignore external info ${t}`),await this.tokenizer.ignore(a.size);break;case Yd.reserved:Yg(`Ignore external info ${t}`),this.metadata.addWarning(`APEv2 header declares a reserved datatype for "${t}"`),await this.tokenizer.ignore(a.size);break}}}async parseDescriptorExpansion(r){return await this.tokenizer.ignore(r),this.parseHeader()}async parseHeader(){let r=await this.tokenizer.readToken(j9);if(this.metadata.setFormat("lossless",!0),this.metadata.setFormat("container","Monkey's Audio"),this.metadata.setFormat("bitsPerSample",r.bitsPerSample),this.metadata.setFormat("sampleRate",r.sampleRate),this.metadata.setFormat("numberOfChannels",r.channel),this.metadata.setFormat("duration",n.calculateDuration(r)),!this.ape.descriptor)throw new Wp("Missing APE descriptor");return{forwardBytes:this.ape.descriptor.seekTableBytes+this.ape.descriptor.headerDataBytes+this.ape.descriptor.apeFrameDataBytes+this.ape.descriptor.terminatingDataBytes}}}});async function $9(n){if(n.fileInfo.size>=128){let r=new Uint8Array(3),o=n.position;return await n.readBuffer(r,{position:n.fileInfo.size-128}),n.setPosition(o),lr(r,"latin1")==="TAG"}return!1}var X9,US,Zp,HS,jg,KS,xd=le(()=>{X9=Je(at(),1);SA();Kt();ni();CI();Mn();US=(0,X9.default)("music-metadata:parser:ID3v1"),Zp=["Blues","Classic Rock","Country","Dance","Disco","Funk","Grunge","Hip-Hop","Jazz","Metal","New Age","Oldies","Other","Pop","R&B","Rap","Reggae","Rock","Techno","Industrial","Alternative","Ska","Death Metal","Pranks","Soundtrack","Euro-Techno","Ambient","Trip-Hop","Vocal","Jazz+Funk","Fusion","Trance","Classical","Instrumental","Acid","House","Game","Sound Clip","Gospel","Noise","Alt. Rock","Bass","Soul","Punk","Space","Meditative","Instrumental Pop","Instrumental Rock","Ethnic","Gothic","Darkwave","Techno-Industrial","Electronic","Pop-Folk","Eurodance","Dream","Southern Rock","Comedy","Cult","Gangsta Rap","Top 40","Christian Rap","Pop/Funk","Jungle","Native American","Cabaret","New Wave","Psychedelic","Rave","Showtunes","Trailer","Lo-Fi","Tribal","Acid Punk","Acid Jazz","Polka","Retro","Musical","Rock & Roll","Hard Rock","Folk","Folk/Rock","National Folk","Swing","Fast-Fusion","Bebob","Latin","Revival","Celtic","Bluegrass","Avantgarde","Gothic Rock","Progressive Rock","Psychedelic Rock","Symphonic Rock","Slow Rock","Big Band","Chorus","Easy Listening","Acoustic","Humour","Speech","Chanson","Opera","Chamber Music","Sonata","Symphony","Booty Bass","Primus","Porn Groove","Satire","Slow Jam","Club","Tango","Samba","Folklore","Ballad","Power Ballad","Rhythmic Soul","Freestyle","Duet","Punk Rock","Drum Solo","A Cappella","Euro-House","Dance Hall","Goa","Drum & Bass","Club-House","Hardcore","Terror","Indie","BritPop","Negerpunk","Polsk Punk","Beat","Christian Gangsta Rap","Heavy Metal","Black Metal","Crossover","Contemporary Christian","Christian Rock","Merengue","Salsa","Thrash Metal","Anime","JPop","Synthpop","Abstract","Art Rock","Baroque","Bhangra","Big Beat","Breakbeat","Chillout","Downtempo","Dub","EBM","Eclectic","Electro","Electroclash","Emo","Experimental","Garage","Global","IDM","Illbient","Industro-Goth","Jam Band","Krautrock","Leftfield","Lounge","Math Rock","New Romantic","Nu-Breakz","Post-Punk","Post-Rock","Psytrance","Shoegaze","Space Rock","Trop Rock","World Music","Neoclassical","Audiobook","Audio Theatre","Neue Deutsche Welle","Podcast","Indie Rock","G-Funk","Dubstep","Garage Rock","Psybient"],HS={len:128,get:(n,r)=>{let o=new jg(3).get(n,r);return o==="TAG"?{header:o,title:new jg(30).get(n,r+3),artist:new jg(30).get(n,r+33),album:new jg(30).get(n,r+63),year:new jg(4).get(n,r+93),comment:new jg(28).get(n,r+97),zeroByte:uA.get(n,r+127),track:uA.get(n,r+126),genre:uA.get(n,r+127)}:null}},jg=class{constructor(r){this.len=r,this.stringType=new je(r,"latin1")}get(r,o){let i=this.stringType.get(r,o);return i=SS(i),i=i.trim(),i.length>0?i:void 0}},KS=class n extends Qt{constructor(r,o,i){super(r,o,i),this.apeHeader=i.apeHeader}static getGenre(r){if(rr){US("Already consumed the last 128 bytes");return}let o=await this.tokenizer.readToken(HS,r);if(o){US("ID3v1 header found at: pos=%s",this.tokenizer.fileInfo.size-HS.len);let i=["title","artist","album","comment","track","year"];for(let a of i)o[a]&&o[a]!==""&&await this.addTag(a,o[a]);let e=n.getGenre(o.genre);e&&await this.addTag("genre",e)}else US("ID3v1 header not found at: pos=%s",this.tokenizer.fileInfo.size-HS.len)}async addTag(r,o){await this.metadata.addTag("ID3v1",r,o)}}});var mP,eX=le(()=>{SA();mP={len:16,get:(n,r)=>{let o=Ue.get(n,r+8),i=Ue.get(n,r+12);return{startTime:Ue.get(n,r),endTime:Ue.get(n,r+4),startOffset:o===4294967295?void 0:o,endOffset:i===4294967295?void 0:i}}}});function jd(n){switch(n){case 2:return 6;case 3:case 4:return 10;default:throw AX(n)}}function VFe(n,r){return r===3?{status:{tag_alter_preservation:kA(n,0,7),file_alter_preservation:kA(n,0,6),read_only:kA(n,0,5)},format:{compression:kA(n,1,7),encryption:kA(n,1,6),grouping_identity:kA(n,1,5),unsynchronisation:!1,data_length_indicator:!1}}:{status:{tag_alter_preservation:kA(n,0,6),file_alter_preservation:kA(n,0,5),read_only:kA(n,0,4)},format:{grouping_identity:kA(n,1,6),compression:kA(n,1,3),encryption:kA(n,1,2),unsynchronisation:kA(n,1,1),data_length_indicator:kA(n,1,0)}}}function Jd(n,r,o){switch(r){case 2:return zFe(n,r,o);case 3:case 4:return WFe(n,r,o);default:throw AX(r)}}function zFe(n,r,o){let i={id:lr(n.subarray(0,3),"ascii"),length:Br.get(n,3)};return i.id.match(/^[A-Z0-9]{3}$/)||o.addWarning(`Invalid ID3v2.${r} frame-header-ID: ${i.id}`),i}function WFe(n,r,o){let i={id:lr(n.subarray(0,4),"ascii"),length:(r===4?uP:Ue).get(n,4),flags:VFe(n.subarray(8,10),r)};return i.id.match(/^[A-Z0-9]{4}$/)||o.addWarning(`Invalid ID3v2.${r} frame-header-ID: ${i.id}`),i}function AX(n){throw new Jg(`Unexpected majorVer: ${n}`)}var SP=le(()=>{SA();Kt();Kg();Mn();DP()});function ZFe(n){let r=[],o,i="";for(let e of n)if(typeof o=="string")if(e==="("&&o==="")i+="(",o=void 0;else if(e===")"){i!==""&&(r.push(i),i="");let a=tX(o);a&&r.push(a),o=void 0}else o+=e;else e==="("?o="":i+=e;return i&&(r.length===0&&i.match(/^\d*$/)&&(i=tX(i)),i&&r.push(i)),r}function tX(n){if(n==="RX")return"Remix";if(n==="CR")return"Cover";if(n.match(/^\d*$/))return Zp[Number.parseInt(n,10)]}function XFe(n){throw new Jg(`Unexpected majorVer: ${n}`)}var rX,YS,Co,wP,xS,Jg,DP=le(()=>{rX=Je(at(),1);SA();Kt();Kg();xd();Ht();Kt();eX();SP();YS=(0,rX.default)("music-metadata:id3v2:frame-parser"),Co="latin1",wP={encoding:Co,bom:!1};xS=class n{constructor(r,o){this.major=r,this.warningCollector=o}readData(r,o,i){if(r.length===0){this.warningCollector.addWarning(`id3v2.${this.major} header has empty tag type=${o}`);return}let{encoding:e,bom:a}=Vp.get(r,0),A=r.length,t=0,s=[],g=n.getNullTerminatorLength(e),c;switch(YS(`Parsing tag type=${o}, encoding=${e}, bom=${a}`),o!=="TXXX"&&o[0]==="T"?"T*":o){case"T*":case"GRP1":case"GP1":case"IPLS":case"MVIN":case"MVNM":case"PCS":case"PCST":{let I;try{I=n.trimNullPadding(Vr(r.subarray(1),e))}catch(E){if(E instanceof Error){this.warningCollector.addWarning(`id3v2.${this.major} type=${o} header has invalid string value: ${E.message}`);break}throw E}switch(o){case"TMCL":case"TIPL":case"IPLS":s=n.functionList(this.splitValue(o,I));break;case"TRK":case"TRCK":case"TPOS":case"TIT1":case"TIT2":case"TIT3":s=I;break;case"TCOM":case"TEXT":case"TOLY":case"TOPE":case"TPE1":case"TSRC":s=this.splitValue(o,I);break;case"TCO":case"TCON":s=this.splitValue(o,I).map(E=>ZFe(E)).reduce((E,B)=>E.concat(B),[]);break;case"PCS":case"PCST":s=this.major>=4?this.splitValue(o,I):[I],s=Array.isArray(s)&&s[0]===""?1:0;break;default:s=this.major>=4?this.splitValue(o,I):[I]}break}case"TXXX":{let I=n.readIdentifierAndData(r.subarray(1),e);s={description:I.id,text:this.splitValue(o,Vr(I.data,e).replace(/\x00+$/,""))};break}case"PIC":case"APIC":if(i){let I={};switch(r=r.subarray(1),this.major){case 2:I.format=Vr(r.subarray(0,3),"latin1"),r=r.subarray(3);break;case 3:case 4:c=Pn(r,Co),I.format=Vr(r.subarray(0,c),Co),r=r.subarray(c+1);break;default:throw XFe(this.major)}I.format=n.fixPictureMimeType(I.format),I.type=jp[r[0]],r=r.subarray(1),c=Pn(r,e),I.description=Vr(r.subarray(0,c),e),r=r.subarray(c+g),I.data=r,s=I}break;case"CNT":case"PCNT":s=dP(r);break;case"SYLT":{let I=fP.get(r,0);r=r.subarray(fP.len);let E={descriptor:"",language:I.language,contentType:I.contentType,timeStampFormat:I.timeStampFormat,syncText:[]},B=!1;for(;r.length>0;){let f=n.readNullTerminatedString(r,I.encoding);if(r=r.subarray(f.len),B){let Q=Ue.get(r,0);r=r.subarray(Ue.len),E.syncText.push({text:f.text,timestamp:Q})}else E.descriptor=f.text,B=!0}s=E;break}case"ULT":case"USLT":case"COM":case"COMM":{let I=DS.get(r,t);t+=DS.len;let E=n.readNullTerminatedString(r.subarray(t),I.encoding);t+=E.len;let B=n.readNullTerminatedString(r.subarray(t),I.encoding);s={language:I.language,descriptor:E.text,text:B.text};break}case"UFID":{let I=n.readIdentifierAndData(r,Co);s={owner_identifier:I.id,identifier:I.data};break}case"PRIV":{let I=n.readIdentifierAndData(r,Co);s={owner_identifier:I.id,data:I.data};break}case"POPM":{r=r.subarray(t);let I=n.readNullTerminatedString(r,wP),E=I.text;if(r=r.subarray(I.len),r.length===0){this.warningCollector.addWarning(`id3v2.${this.major} type=${o} POPM frame missing rating byte`),s={email:E,rating:0,counter:void 0};break}let B=uA.get(r,0),f=r.subarray(uA.len);s={email:E,rating:B,counter:f.length>0?dP(f):void 0};break}case"GEOB":{let I=Vp.get(r,0);r=r.subarray(1);let E=n.readNullTerminatedString(r,wP),B=E.text;r=r.subarray(E.len);let f=n.readNullTerminatedString(r,I),Q=f.text;r=r.subarray(f.len);let y=n.readNullTerminatedString(r,I),m=y.text;r=r.subarray(y.len),s={type:B,filename:Q,description:m,data:r};break}case"WCOM":case"WCOP":case"WOAF":case"WOAR":case"WOAS":case"WORS":case"WPAY":case"WPUB":s=n.readNullTerminatedString(r,wP).text;break;case"WXXX":{let I=Vp.get(r,0);r=r.subarray(1);let E=n.readNullTerminatedString(r,I),B=E.text;r=r.subarray(E.len),s={description:B,url:n.trimNullPadding(Vr(r,Co))};break}case"WFD":case"WFED":{let I=Vp.get(r,0);r=r.subarray(1),s=n.readNullTerminatedString(r,I).text;break}case"MCDI":{s=r.subarray(0,A);break}case"CHAP":{YS("Reading CHAP"),c=Pn(r,Co);let I={label:Vr(r.subarray(0,c),Co),info:mP.get(r,c+1),frames:new Map};for(t+=c+1+mP.len;t=a.length)return{text:Vr(r,o.encoding),len:e};let t=r.subarray(0,i+A);return{text:Vr(t,o.encoding),len:i+A+n.getNullTerminatorLength(o.encoding)}}static fixPictureMimeType(r){switch(r=r.toLocaleLowerCase(),r){case"jpg":return"image/jpeg";case"png":return"image/png"}return r}static functionList(r){let o={};for(let i=0;i+11?this.warningCollector.addWarning(`ID3v2.${this.major} ${r} uses non standard null-separator.`):i=o.split(/\//g)):i=o.split(/\x00/g),n.trimArray(i)}static trimArray(r){return r.map(o=>n.trimNullPadding(o).trim())}static trimNullPadding(r){let o=r.length;for(;o>0&&r.charCodeAt(o-1)===0;)o--;return o===r.length?r:r.slice(0,o)}static readIdentifierAndData(r,o){let i=n.readNullTerminatedString(r,{encoding:o,bom:!1});return{id:i.text,data:r.subarray(i.len)}}static getNullTerminatorLength(r){return r.startsWith("utf-16")?2:1}},Jg=class extends pt("id3v2"){}});function $Fe(n){throw new Jg(`Unexpected majorVer: ${n}`)}var ho,Xp=le(()=>{SA();DP();Kg();SP();ho=class n{constructor(){this.tokenizer=void 0,this.id3Header=void 0,this.metadata=void 0,this.headerType=void 0,this.options=void 0}static removeUnsyncBytes(r){let o=0,i=0;for(;o0?this.parseExtendedHeaderData(o,r.size):this.parseId3Data(this.id3Header.size-r.size)}async parseExtendedHeaderData(r,o){return await this.tokenizer.ignore(r),this.parseId3Data(this.id3Header.size-o)}async parseId3Data(r){let o=await this.tokenizer.readToken(new ut(r));for(let i of this.parseMetadata(o))switch(i.id){case"TXXX":i.value&&await this.handleTag(i,i.value.text,()=>i.value.description);break;default:await(Array.isArray(i.value)?Promise.all(i.value.map(e=>this.addTag(i.id,e))):this.addTag(i.id,i.value))}}async handleTag(r,o,i,e=a=>a){await Promise.all(o.map(a=>this.addTag(n.makeDescriptionTagName(r.id,i(a)),e(a))))}async addTag(r,o){await this.metadata.addTag(this.headerType,r,o)}parseMetadata(r){let o=0,i=[];for(;o!==r.length;){let e=jd(this.id3Header.version.major);if(o+e>r.length){this.metadata.addWarning("Illegal ID3v2 tag length");break}let a=r.subarray(o,o+e);o+=e;let A=Jd(a,this.id3Header.version.major,this.metadata),t=r.subarray(o,o+A.length);o+=A.length;let s=n.readFrameData(t,A,this.id3Header.version.major,!this.options.skipCovers,this.metadata);s&&i.push({id:A.id,value:s})}return i}static mapId3v2Chapters(r){if(!r)return;let o=r.filter(g=>g.id==="CHAP");if(!o?.length)return;let e=r.filter(g=>g.id==="CTOC")?.find(g=>g.value.flags?.topLevel),a=new Map;for(let g of o)a.set(g.value.label,g.value);let A=e?.value.childElementIds,t=[],s=A??[...a.keys()];for(let g of s){let c=a.get(g);if(!c)continue;let I=c.frames,E=I.get("TIT2");E&&t.push({id:g,title:E,url:I.get("WXXX"),start:c.info.startTime/1e3,end:c.info.endTime/1e3,image:I.get("APIC")})}return A||t.sort((g,c)=>g.start-c.start),t.length?t:void 0}}});var aX,OP,Gn,qd=le(()=>{go();aX=Je(at(),1);Kg();Xp();xd();ni();OP=(0,aX.default)("music-metadata:parser:ID3"),Gn=class extends Qt{constructor(){super(...arguments),this.id3parser=new ho}static async startsWithID3v2Header(r){return(await r.peekToken(Hd)).fileIdentifier==="ID3"}async parse(){try{await this.parseID3v2()}catch(r){if(r instanceof NA)OP("End-of-stream");else throw r}}finalize(){}async parseID3v2(){await this.tryReadId3v2Headers(),OP("End of ID3v2 header, go to MPEG-parser: pos=%s",this.tokenizer.position),await this.postId3v2Parse(),this.options.skipPostHeaders&&this.metadata.hasAny()?this.finalize():(await new KS(this.metadata,this.tokenizer,this.options).parse(),this.finalize())}async tryReadId3v2Headers(){if((await this.tokenizer.peekToken(Hd)).fileIdentifier==="ID3")return OP("Found ID3v2 header, pos=%s",this.tokenizer.position),await this.id3parser.parse(this.metadata,this.tokenizer,this.options),this.tryReadId3v2Headers()}}});var bP,iX=le(()=>{Kt();bP={len:2,get:(n,r)=>{let o=qA(n,r,0,3),i=qA(n,r,6,1),e=qA(n,r,7,9)/10;if(o>0)return{type:qA(n,r,0,3),origin:qA(n,r,3,3),adjustment:i?-e:e}}}});var oX,nX=le(()=>{SA();Kt();iX();oX={len:27,get:(n,r)=>{let o=Ue.get(n,r+2);return{revision:qA(n,r,0,4),vbr_method:qA(n,r,4,4),lowpass_filter:100*uA.get(n,r+1),track_peak:o===0?null:o/2**23,track_gain:bP.get(n,6),album_gain:bP.get(n,8),music_length:Ue.get(n,r+20),music_crc:uA.get(n,r+24),header_crc:PA.get(n,r+24)}}}});async function sX(n){let r=await n.readToken(eLe),o={numFrames:null,streamSize:null,vbrScale:null};if(r.frames&&(o.numFrames=await n.readToken(Ue)),r.bytes&&(o.streamSize=await n.readToken(Ue)),r.toc&&(o.toc=new Uint8Array(100),await n.readBuffer(o.toc)),r.vbrScale&&(o.vbrScale=await n.readToken(Ue)),await n.peekToken(new je(4,"ascii"))==="LAME"){await n.ignore(4),o.lame={version:await n.readToken(new je(5,"ascii"))};let e=o.lame.version.match(/\d+.\d+/g);if(e!==null){let A=e[0].split(".").map(t=>Number.parseInt(t,10));A[0]>=3&&A[1]>=90&&(o.lame.extended=await n.readToken(oX))}}return o}var MP,jS,eLe,gX=le(()=>{SA();Kt();nX();MP=new je(4,"ascii"),jS=new je(6,"ascii"),eLe={len:4,get:(n,r)=>({frames:oa(n,r,31),bytes:oa(n,r,30),toc:oa(n,r,29),vbrScale:oa(n,r,28)})}});var EX={};Qr(EX,{MpegContentError:()=>hI,MpegParser:()=>_P});function tLe(n){return`V${Math.floor((100-n)/10)}`}var pX,_i,hI,cX,IX,ALe,Ni,lX,_P,CX=le(()=>{SA();go();pX=Je(at(),1);Kt();qd();gX();Ht();_i=(0,pX.default)("music-metadata:parser:mpeg"),hI=class extends pt("MPEG"){},cX=1024,IX={AudioObjectTypes:["AAC Main","AAC LC","AAC SSR","AAC LTP"],SamplingFrequencies:[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350,null,null,null]},ALe=[void 0,["front-center"],["front-left","front-right"],["front-center","front-left","front-right"],["front-center","front-left","front-right","back-center"],["front-center","front-left","front-right","back-left","back-right"],["front-center","front-left","front-right","back-left","back-right","LFE-channel"],["front-center","front-left","front-right","side-left","side-right","back-left","back-right","LFE-channel"]],Ni=class n{constructor(r,o){this.bitrateIndex=null,this.sampRateFreqIndex=null,this.padding=null,this.privateBit=null,this.channelModeIndex=null,this.modeExtension=null,this.isOriginalMedia=null,this.version=null,this.bitrate=null,this.samplingRate=null,this.frameLength=0,this.versionIndex=qA(r,o+1,3,2),this.layer=n.LayerDescription[qA(r,o+1,5,2)],this.versionIndex>1&&this.layer===0?this.parseAdtsHeader(r,o):this.parseMpegHeader(r,o),this.isProtectedByCRC=!oa(r,o+1,7)}calcDuration(r){return this.samplingRate==null?null:r*this.calcSamplesPerFrame()/this.samplingRate}calcSamplesPerFrame(){return n.samplesInFrameTable[this.version===1?0:1][this.layer]}calculateSideInfoLength(){if(this.layer!==3)return 2;if(this.channelModeIndex===3){if(this.version===1)return 17;if(this.version===2||this.version===2.5)return 9}else{if(this.version===1)return 32;if(this.version===2||this.version===2.5)return 17}return null}calcSlotSize(){return[null,4,1,1][this.layer]}parseMpegHeader(r,o){this.container="MPEG",this.bitrateIndex=qA(r,o+2,0,4),this.sampRateFreqIndex=qA(r,o+2,4,2),this.padding=oa(r,o+2,6),this.privateBit=oa(r,o+2,7),this.channelModeIndex=qA(r,o+3,0,2),this.modeExtension=qA(r,o+3,2,2),this.isCopyrighted=oa(r,o+3,4),this.isOriginalMedia=oa(r,o+3,5),this.emphasis=qA(r,o+3,7,2),this.version=n.VersionID[this.versionIndex],this.channelMode=n.ChannelMode[this.channelModeIndex],this.codec=`MPEG ${this.version} Layer ${this.layer}`;let i=this.calcBitrate();if(!i)throw new hI("Cannot determine bit-rate");if(this.bitrate=i*1e3,this.samplingRate=this.calcSamplingRate(),this.samplingRate==null)throw new hI("Cannot determine sampling-rate")}parseAdtsHeader(r,o){_i("layer=0 => ADTS"),this.version=this.versionIndex===2?4:2,this.container=`ADTS/MPEG-${this.version}`;let i=qA(r,o+2,0,2);this.codec="AAC",this.codecProfile=IX.AudioObjectTypes[i],_i(`MPEG-4 audio-codec=${this.codec}`);let e=qA(r,o+2,2,4);this.samplingRate=IX.SamplingFrequencies[e],_i(`sampling-rate=${this.samplingRate}`);let a=qA(r,o+2,7,3);this.mp4ChannelConfig=ALe[a],_i(`channel-config=${this.mp4ChannelConfig?this.mp4ChannelConfig.join("+"):"?"}`),this.frameLength=qA(r,o+3,6,2)<<11}calcBitrate(){if(this.bitrateIndex===0||this.bitrateIndex===15)return null;if(this.version&&this.bitrateIndex){let r=10*Math.floor(this.version)+this.layer;return n.bitrate_index[this.bitrateIndex][r]}return null}calcSamplingRate(){return this.sampRateFreqIndex===3||this.version===null||this.sampRateFreqIndex==null?null:n.sampling_rate_freq_index[this.version][this.sampRateFreqIndex]}};Ni.SyncByte1=255;Ni.SyncByte2=224;Ni.VersionID=[2.5,null,2,1];Ni.LayerDescription=[0,3,2,1];Ni.ChannelMode=["stereo","joint_stereo","dual_channel","mono"];Ni.bitrate_index={1:{11:32,12:32,13:32,21:32,22:8,23:8},2:{11:64,12:48,13:40,21:48,22:16,23:16},3:{11:96,12:56,13:48,21:56,22:24,23:24},4:{11:128,12:64,13:56,21:64,22:32,23:32},5:{11:160,12:80,13:64,21:80,22:40,23:40},6:{11:192,12:96,13:80,21:96,22:48,23:48},7:{11:224,12:112,13:96,21:112,22:56,23:56},8:{11:256,12:128,13:112,21:128,22:64,23:64},9:{11:288,12:160,13:128,21:144,22:80,23:80},10:{11:320,12:192,13:160,21:160,22:96,23:96},11:{11:352,12:224,13:192,21:176,22:112,23:112},12:{11:384,12:256,13:224,21:192,22:128,23:128},13:{11:416,12:320,13:256,21:224,22:144,23:144},14:{11:448,12:384,13:320,21:256,22:160,23:160}};Ni.sampling_rate_freq_index={1:{0:44100,1:48e3,2:32e3},2:{0:22050,1:24e3,2:16e3},2.5:{0:11025,1:12e3,2:8e3}};Ni.samplesInFrameTable=[[0,384,1152,1152],[0,384,1152,576]];lX={len:4,get:(n,r)=>new Ni(n,r)};_P=class extends Gn{constructor(){super(...arguments),this.frameCount=0,this.syncFrameCount=-1,this.totalDataLength=0,this.bitrates=[],this.offset=0,this.frame_size=0,this.calculateEofDuration=!1,this.samplesPerFrame=null,this.buf_frame_header=new Uint8Array(4),this.mpegOffset=null,this.syncPeek={buf:new Uint8Array(cX),len:0}}async postId3v2Parse(){this.metadata.setFormat("lossless",!1),this.metadata.setAudioOnly();try{let r=!1;for(;!r;)await this.sync(),r=await this.parseCommonMpegHeader()}catch(r){if(r instanceof NA){if(_i("End-of-stream"),this.calculateEofDuration&&this.samplesPerFrame!==null){let o=this.frameCount*this.samplesPerFrame;if(this.metadata.setFormat("numberOfSamples",o),this.metadata.format.sampleRate){let i=o/this.metadata.format.sampleRate;_i(`Calculate duration at EOF: ${i} sec.`,i),this.metadata.setFormat("duration",i)}}}else throw r}}finalize(){let r=this.metadata.format,o=!!this.metadata.native.ID3v1;if(this.mpegOffset!==null){if(r.duration&&this.tokenizer.fileInfo.size){let i=this.tokenizer.fileInfo.size-this.mpegOffset-(o?128:0);r.codecProfile&&r.codecProfile[0]==="V"&&this.metadata.setFormat("bitrate",i*8/r.duration)}if(this.tokenizer.fileInfo.size&&r.codecProfile==="CBR"){let i=this.tokenizer.fileInfo.size-this.mpegOffset-(o?128:0);if(this.frame_size!==null&&this.samplesPerFrame!==null){let e=Math.round(i/this.frame_size)*this.samplesPerFrame;if(this.metadata.setFormat("numberOfSamples",e),r.sampleRate&&!r.duration){let a=e/r.sampleRate;_i("Calculate CBR duration based on file size: %s",a),this.metadata.setFormat("duration",a)}}}}}async sync(){let r=!1;for(;;){let o=0;if(this.syncPeek.len=await this.tokenizer.peekBuffer(this.syncPeek.buf,{length:cX,mayBeLess:!0}),this.syncPeek.len<=163)throw new NA;for(;;){if(r&&(this.syncPeek.buf[o]&224)===224){this.buf_frame_header[0]=Ni.SyncByte1,this.buf_frame_header[1]=this.syncPeek.buf[o],await this.tokenizer.ignore(o),_i(`Sync at offset=${this.tokenizer.position-1}, frameCount=${this.frameCount}`),this.syncFrameCount===this.frameCount&&(_i(`Re-synced MPEG stream, frameCount=${this.frameCount}`),this.frameCount=0,this.frame_size=0),this.syncFrameCount=this.frameCount;return}if(r=!1,o=this.syncPeek.buf.indexOf(Ni.SyncByte1,o),o===-1){if(this.syncPeek.len=2&&r.layer===0?this.parseAdts(r):this.parseAudioFrameHeader(r)}async parseAudioFrameHeader(r){this.metadata.setFormat("numberOfChannels",r.channelMode==="mono"?1:2),this.metadata.setFormat("bitrate",r.bitrate),this.frameCount<20*1e4&&_i("offset=%s MP%s bitrate=%s sample-rate=%s",this.tokenizer.position-4,r.layer,r.bitrate,r.samplingRate);let o=r.calcSlotSize();if(o===null)throw new hI("invalid slot_size");let i=r.calcSamplesPerFrame();_i(`samples_per_frame=${i}`);let e=i/8;if(r.bitrate!==null&&r.samplingRate!=null){let a=e*r.bitrate/r.samplingRate+(r.padding?o:0);this.frame_size=Math.floor(a)}if(this.audioFrameHeader=r,r.bitrate!==null&&this.bitrates.push(r.bitrate),this.frameCount===1)return this.offset=lX.len,await this.skipSideInformation(),!1;if(this.frameCount===4){if(this.areAllSame(this.bitrates)){if(this.samplesPerFrame=i,this.metadata.setFormat("codecProfile","CBR"),this.tokenizer.fileInfo.size)return!0}else if(this.metadata.format.duration)return!0;if(!this.options.duration)return!0}return this.options.duration&&this.frameCount===4&&(this.samplesPerFrame=i,this.calculateEofDuration=!0),this.offset=4,r.isProtectedByCRC?(await this.parseCrc(),!1):(await this.skipSideInformation(),!1)}async parseAdts(r){let o=new Uint8Array(3);if(await this.tokenizer.readBuffer(o),r.frameLength+=qA(o,0,0,11),this.totalDataLength+=r.frameLength,this.samplesPerFrame=1024,r.samplingRate!==null){let i=r.samplingRate/this.samplesPerFrame,a=8*(this.frameCount===0?0:this.totalDataLength/this.frameCount)*i+.5;this.metadata.setFormat("bitrate",a),_i(`frame-count=${this.frameCount}, size=${r.frameLength} bytes, bit-rate=${a}`)}if(await this.tokenizer.ignore(r.frameLength>7?r.frameLength-7:1),this.frameCount===3)if(this.metadata.setFormat("codecProfile",r.codecProfile),r.mp4ChannelConfig&&this.metadata.setFormat("numberOfChannels",r.mp4ChannelConfig.length),this.options.duration)this.calculateEofDuration=!0;else return!0;return!1}async parseCrc(){return await this.tokenizer.ignore(co.len),this.offset+=co.len,this.skipSideInformation()}async skipSideInformation(){if(this.audioFrameHeader){let r=this.audioFrameHeader.calculateSideInfoLength();if(r!==null){await this.tokenizer.readToken(new ut(r)),this.offset+=r,await this.readXtraInfoHeader();return}}}async readXtraInfoHeader(){let r=await this.tokenizer.readToken(MP);switch(this.offset+=MP.len,r){case"Info":return this.metadata.setFormat("codecProfile","CBR"),this.readXingInfoHeader();case"Xing":{let i=await this.readXingInfoHeader();if(i.vbrScale!==null){let e=tLe(i.vbrScale);this.metadata.setFormat("codecProfile",e)}return null}case"Xtra":break;case"LAME":{let i=await this.tokenizer.readToken(jS);if(this.frame_size!==null&&this.frame_size>=this.offset+jS.len)return this.offset+=jS.len,this.metadata.setFormat("tool",`LAME ${i}`),await this.skipFrameData(this.frame_size-this.offset),null;this.metadata.addWarning("Corrupt LAME header");break}}let o=this.frame_size-this.offset;return o<0?this.metadata.addWarning(`Frame ${this.frameCount}corrupt: negative frameDataLeft`):await this.skipFrameData(o),null}async readXingInfoHeader(){let r=this.tokenizer.position,o=await sX(this.tokenizer);if(this.offset+=this.tokenizer.position-r,o.lame&&(this.metadata.setFormat("tool",`LAME ${po(o.lame.version)}`),o.lame.extended&&(this.metadata.setFormat("trackPeakLevel",o.lame.extended.track_peak),o.lame.extended.track_gain&&this.metadata.setFormat("trackGain",o.lame.extended.track_gain.adjustment),o.lame.extended.album_gain&&this.metadata.setFormat("albumGain",o.lame.extended.album_gain.adjustment),this.metadata.setFormat("duration",o.lame.extended.music_length/1e3))),o.streamSize&&this.audioFrameHeader&&o.numFrames!==null){let e=this.audioFrameHeader.calcDuration(o.numFrames);return this.metadata.setFormat("duration",e),_i("Get duration from Xing header: %s",this.metadata.format.duration),o}let i=this.frame_size-this.offset;return await this.skipFrameData(i),o}async skipFrameData(r){if(r<0)throw new hI("frame-data-left cannot be negative");await this.tokenizer.ignore(r)}areAllSame(r){let o=r[0];return r.every(i=>i===o)}}});var hX,dX=le(()=>{hX={parserType:"mpeg",extensions:[".mp2",".mp3",".m2a",".aac","aacp"],mimeTypes:["audio/mpeg","audio/mp3","audio/aacs","audio/aacp"],async load(){return(await Promise.resolve().then(()=>(CX(),EX))).MpegParser}}});var uX,BX=le(()=>{uX={parserType:"apev2",extensions:[".ape"],mimeTypes:["audio/ape","audio/monkeys-audio"],async load(){return(await Promise.resolve().then(()=>(CI(),Z9))).APEv2Parser}}});function NP(n){let r=n.trim();if(r.length!==36||r[8]!=="-"||r[13]!=="-"||r[18]!=="-"||r[23]!=="-")throw new Error(`Invalid GUID format: ${n}`);let o,i=new Uint8Array(16);o=parseInt(r.slice(0,8),16),i[0]=o&255,i[1]=o>>>8&255,i[2]=o>>>16&255,i[3]=o>>>24&255,o=parseInt(r.slice(9,13),16),i[4]=o&255,i[5]=o>>>8&255,o=parseInt(r.slice(14,18),16),i[6]=o&255,i[7]=o>>>8&255,o=parseInt(r.slice(19,23),16),i[8]=o>>>8&255,i[9]=o&255,o=parseInt(r.slice(24,32),16),i[10]=o>>>24&255,i[11]=o>>>16&255,i[12]=o>>>8&255,i[13]=o&255,o=parseInt(r.slice(32,36),16),i[14]=o>>>8&255,i[15]=o&255;for(let e=0;e<16;e++)if(!Number.isFinite(i[e]))throw new Error(`Invalid GUID format: ${n}`);if(!/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(r))throw new Error(`Invalid GUID format: ${n}`);return i}var JS,fX=le(()=>{JS=class n{constructor(r){if(r.length!==16)throw new Error("GUID must be exactly 16 bytes");this.bytes=r}static fromString(r){return new n(NP(r))}toString(){let r=this.bytes,o=s=>s.toString(16).padStart(2,"0"),i=o(r[3])+o(r[2])+o(r[1])+o(r[0]),e=o(r[5])+o(r[4]),a=o(r[7])+o(r[6]),A=o(r[8])+o(r[9]),t=o(r[10])+o(r[11])+o(r[12])+o(r[13])+o(r[14])+o(r[15]);return`${i}-${e}-${a}-${A}-${t}`.toUpperCase()}equals(r,o=0){if(o<0||r.length-o<16)return!1;let i=this.bytes;for(let e=0;e<16;e++)if(r[o+e]!==i[e])return!1;return!0}}});var He,Yt,TP=le(()=>{fX();He=class n{static fromBin(r,o=0){return new n(n.decode(r,o))}static decode(r,o=0){return new JS(r.subarray(o,o+16)).toString()}static decodeMediaType(r){switch(r.str){case n.AudioMedia.str:return"audio";case n.VideoMedia.str:return"video";case n.CommandMedia.str:return"command";case n.Degradable_JPEG_Media.str:return"degradable-jpeg";case n.FileTransferMedia.str:return"file-transfer";case n.BinaryMedia.str:return"binary"}}static encode(r){return NP(r)}constructor(r){this.str=r}equals(r){return this.str===r.str}toBin(){return n.encode(this.str)}};He.HeaderObject=new He("75B22630-668E-11CF-A6D9-00AA0062CE6C");He.DataObject=new He("75B22636-668E-11CF-A6D9-00AA0062CE6C");He.SimpleIndexObject=new He("33000890-E5B1-11CF-89F4-00A0C90349CB");He.IndexObject=new He("D6E229D3-35DA-11D1-9034-00A0C90349BE");He.MediaObjectIndexObject=new He("FEB103F8-12AD-4C64-840F-2A1D2F7AD48C");He.TimecodeIndexObject=new He("3CB73FD0-0C4A-4803-953D-EDF7B6228F0C");He.FilePropertiesObject=new He("8CABDCA1-A947-11CF-8EE4-00C00C205365");He.StreamPropertiesObject=new He("B7DC0791-A9B7-11CF-8EE6-00C00C205365");He.HeaderExtensionObject=new He("5FBF03B5-A92E-11CF-8EE3-00C00C205365");He.CodecListObject=new He("86D15240-311D-11D0-A3A4-00A0C90348F6");He.ScriptCommandObject=new He("1EFB1A30-0B62-11D0-A39B-00A0C90348F6");He.MarkerObject=new He("F487CD01-A951-11CF-8EE6-00C00C205365");He.BitrateMutualExclusionObject=new He("D6E229DC-35DA-11D1-9034-00A0C90349BE");He.ErrorCorrectionObject=new He("75B22635-668E-11CF-A6D9-00AA0062CE6C");He.ContentDescriptionObject=new He("75B22633-668E-11CF-A6D9-00AA0062CE6C");He.ExtendedContentDescriptionObject=new He("D2D0A440-E307-11D2-97F0-00A0C95EA850");He.ContentBrandingObject=new He("2211B3FA-BD23-11D2-B4B7-00A0C955FC6E");He.StreamBitratePropertiesObject=new He("7BF875CE-468D-11D1-8D82-006097C9A2B2");He.ContentEncryptionObject=new He("2211B3FB-BD23-11D2-B4B7-00A0C955FC6E");He.ExtendedContentEncryptionObject=new He("298AE614-2622-4C17-B935-DAE07EE9289C");He.DigitalSignatureObject=new He("2211B3FC-BD23-11D2-B4B7-00A0C955FC6E");He.PaddingObject=new He("1806D474-CADF-4509-A4BA-9AABCB96AAE8");He.ExtendedStreamPropertiesObject=new He("14E6A5CB-C672-4332-8399-A96952065B5A");He.AdvancedMutualExclusionObject=new He("A08649CF-4775-4670-8A16-6E35357566CD");He.GroupMutualExclusionObject=new He("D1465A40-5A79-4338-B71B-E36B8FD6C249");He.StreamPrioritizationObject=new He("D4FED15B-88D3-454F-81F0-ED5C45999E24");He.BandwidthSharingObject=new He("A69609E6-517B-11D2-B6AF-00C04FD908E9");He.LanguageListObject=new He("7C4346A9-EFE0-4BFC-B229-393EDE415C85");He.MetadataObject=new He("C5F8CBEA-5BAF-4877-8467-AA8C44FA4CCA");He.MetadataLibraryObject=new He("44231C94-9498-49D1-A141-1D134E457054");He.IndexParametersObject=new He("D6E229DF-35DA-11D1-9034-00A0C90349BE");He.MediaObjectIndexParametersObject=new He("6B203BAD-3F11-48E4-ACA8-D7613DE2CFA7");He.TimecodeIndexParametersObject=new He("F55E496D-9797-4B5D-8C8B-604DFE9BFB24");He.CompatibilityObject=new He("26F18B5D-4584-47EC-9F5F-0E651F0452C9");He.AdvancedContentEncryptionObject=new He("43058533-6981-49E6-9B74-AD12CB86D58C");He.AudioMedia=new He("F8699E40-5B4D-11CF-A8FD-00805F5C442B");He.VideoMedia=new He("BC19EFC0-5B4D-11CF-A8FD-00805F5C442B");He.CommandMedia=new He("59DACFC0-59E6-11D0-A3AC-00A0C90348F6");He.JFIF_Media=new He("B61BE100-5B4E-11CF-A8FD-00805F5C442B");He.Degradable_JPEG_Media=new He("35907DE0-E415-11CF-A917-00805F5C442B");He.FileTransferMedia=new He("91BD222C-F21C-497A-8B6D-5AA86BFC0185");He.BinaryMedia=new He("3AFB65E2-47EF-40F2-AC2C-70A90D71D343");He.ASF_Index_Placeholder_Object=new He("D9AADE20-7C17-4F9C-BC28-8555DD98E2A2");Yt=He});function yX(n){return rLe[n]}function Vd(n){return po(Vr(n,"utf-16le"))}function QX(n){return new Uint8Array(n)}function aLe(n,r=0){return mX(n,r)===1}function iLe(n,r=0){return ve.get(n,r)}function oLe(n,r=0){return fr.get(n,r)}function mX(n,r=0){return yA.get(n,r)}var rLe,SX=le(()=>{SA();Kt();rLe=[Vd,QX,aLe,iLe,oLe,mX,QX]});async function DX(n){let r=await n.readNumber(yA);return(await n.readToken(new je(r*2,"utf-16le"))).replace("\0","")}async function OX(n){let r=await n.readToken(nLe),o=[];for(let i=0;i{SA();Kt();TP();SX();Kg();Ht();$p=class extends pt("ASF"){},wX={len:30,get:(n,r)=>({objectId:Yt.fromBin(n,r),objectSize:Number(fr.get(n,r+16)),numberOfHeaderObjects:ve.get(n,r+24)})},qg={len:24,get:(n,r)=>({objectId:Yt.fromBin(n,r),objectSize:Number(fr.get(n,r+16))})},Ts=class{constructor(r){this.len=Number(r.objectSize)-qg.len}postProcessTag(r,o,i,e){if(o==="WM/Picture")r.push({id:o,value:RP.fromBuffer(e)});else{let a=yX(i);if(!a)throw new $p(`unexpected value headerType: ${i}`);r.push({id:o,value:a(e)})}}},zd=class extends Ts{get(r,o){return null}},eE=class extends Ts{get(r,o){return{fileId:Yt.fromBin(r,o),fileSize:fr.get(r,o+16),creationDate:fr.get(r,o+24),dataPacketsCount:fr.get(r,o+32),playDuration:fr.get(r,o+40),sendDuration:fr.get(r,o+48),preroll:fr.get(r,o+56),flags:{broadcast:kA(r,o+64,24),seekable:kA(r,o+64,25)},minimumDataPacketSize:ve.get(r,o+68),maximumDataPacketSize:ve.get(r,o+72),maximumBitrate:ve.get(r,o+76)}}};eE.guid=Yt.FilePropertiesObject;AE=class extends Ts{get(r,o){return{streamType:Yt.decodeMediaType(Yt.fromBin(r,o)),errorCorrectionType:Yt.fromBin(r,o+8)}}};AE.guid=Yt.StreamPropertiesObject;tE=class{constructor(){this.len=22}get(r,o){let i=new DataView(r.buffer,o);return{reserved1:Yt.fromBin(r,o),reserved2:i.getUint16(16,!0),extensionDataSize:i.getUint16(18,!0)}}};tE.guid=Yt.HeaderExtensionObject;nLe={len:20,get:(n,r)=>({entryCount:new DataView(n.buffer,r).getUint16(16,!0)})};dI=class n extends Ts{get(r,o){let i=[],e=new DataView(r.buffer,o),a=10;for(let A=0;A0){let s=n.contentDescTags[A],g=a+t;i.push({id:s,value:Vd(r.subarray(o+a,o+g))}),a=g}}return i}};dI.guid=Yt.ContentDescriptionObject;dI.contentDescTags=["Title","Author","Copyright","Description","Rating"];rE=class extends Ts{get(r,o){let i=[],e=new DataView(r.buffer,o),a=e.getUint16(0,!0),A=2;for(let t=0;tPP});var bX,vP,ILe,PP,_X=le(()=>{bX=Je(at(),1);lI();TP();kP();ni();kP();vP=(0,bX.default)("music-metadata:parser:ASF"),ILe="asf",PP=class extends Qt{async parse(){let r=await this.tokenizer.readToken(wX);if(!r.objectId.equals(Yt.HeaderObject))throw new $p(`expected asf header; but was not found; got: ${r.objectId.str}`);await this.parseObjectHeader(r.numberOfHeaderObjects)}async parseObjectHeader(r){let o;do{let i=await this.tokenizer.readToken(qg);switch(vP("header GUID=%s",i.objectId.str),i.objectId.str){case eE.guid.str:{let e=await this.tokenizer.readToken(new eE(i));this.metadata.setFormat("duration",Number(e.playDuration/BigInt(1e3))/1e4-Number(e.preroll)/1e3),this.metadata.setFormat("bitrate",e.maximumBitrate);break}case AE.guid.str:{let e=await this.tokenizer.readToken(new AE(i));this.metadata.setFormat("container",`ASF/${e.streamType}`);break}case tE.guid.str:{let e=await this.tokenizer.readToken(new tE);await this.parseExtensionObject(e.extensionDataSize);break}case dI.guid.str:o=await this.tokenizer.readToken(new dI(i)),await this.addTags(o);break;case rE.guid.str:o=await this.tokenizer.readToken(new rE(i)),await this.addTags(o);break;case Yt.CodecListObject.str:{let e=await OX(this.tokenizer);e.forEach(A=>{this.metadata.addStreamInfo({type:A.type.videoCodec?qr.video:qr.audio,codecName:A.codecName})});let a=e.filter(A=>A.type.audioCodec).map(A=>A.codecName).join("/");this.metadata.setFormat("codec",a);break}case Yt.StreamBitratePropertiesObject.str:await this.tokenizer.ignore(i.objectSize-qg.len);break;case Yt.PaddingObject.str:vP("Padding: %s bytes",i.objectSize-qg.len),await this.tokenizer.ignore(i.objectSize-qg.len);break;default:this.metadata.addWarning(`Ignore ASF-Object-GUID: ${i.objectId.str}`),vP("Ignore ASF-Object-GUID: %s",i.objectId.str),await this.tokenizer.readToken(new zd(i))}}while(--r)}async addTags(r){await Promise.all(r.map(({id:o,value:i})=>this.metadata.addTag(ILe,o,i)))}async parseExtensionObject(r){do{let o=await this.tokenizer.readToken(qg),i=o.objectSize-qg.len;if(i<0)throw new $p(`Invalid ASF header object size: ${o.objectSize}`);switch(o.objectId.str){case aE.guid.str:await this.tokenizer.readToken(new aE(o));break;case uI.guid.str:{let e=await this.tokenizer.readToken(new uI(o));await this.addTags(e);break}case iE.guid.str:{let e=await this.tokenizer.readToken(new iE(o));await this.addTags(e);break}case Yt.PaddingObject.str:await this.tokenizer.ignore(i);break;case Yt.CompatibilityObject.str:await this.tokenizer.ignore(i);break;case Yt.ASF_Index_Placeholder_Object.str:await this.tokenizer.ignore(i);break;default:this.metadata.addWarning(`Ignore ASF-Object-GUID: ${o.objectId.str}`),await this.tokenizer.readToken(new zd(o));break}r-=o.objectSize}while(r>0)}}});var NX,TX=le(()=>{NX={parserType:"asf",extensions:[".asf",".wma",".wmv"],mimeTypes:["audio/ms-wma","video/ms-wmv","audio/ms-asf","video/ms-asf","application/vnd.ms-asf"],async load(){return(await Promise.resolve().then(()=>(_X(),MX))).AsfParser}}});var BI,RX=le(()=>{SA();Fa();BI={len:12,get:(n,r)=>({chunkID:XA.get(n,r),chunkSize:tP.get(n,r+4)})}});var vX={};Qr(vX,{DsdiffContentParseError:()=>oE,DsdiffParser:()=>GP});var kX,La,oE,GP,PX=le(()=>{SA();kX=Je(at(),1);go();Fa();ni();Xp();RX();Ht();La=(0,kX.default)("music-metadata:parser:aiff"),oE=class extends pt("DSDIFF"){},GP=class extends Qt{async parse(){let r=await this.tokenizer.readToken(BI);if(r.chunkID!=="FRM8")throw new oE("Unexpected chunk-ID");this.metadata.setAudioOnly();let o=(await this.tokenizer.readToken(XA)).trim();switch(o){case"DSD":return this.metadata.setFormat("container",`DSDIFF/${o}`),this.metadata.setFormat("lossless",!0),this.readFmt8Chunks(r.chunkSize-BigInt(XA.len));default:throw new oE(`Unsupported DSDIFF type: ${o}`)}}async readFmt8Chunks(r){for(;r>=BI.len;){let o=await this.tokenizer.readToken(BI);La(`Chunk id=${o.chunkID}`),await this.readData(o),r-=BigInt(BI.len)+o.chunkSize}}async readData(r){La(`Reading data of chunk[ID=${r.chunkID}, size=${r.chunkSize}]`);let o=this.tokenizer.position;switch(r.chunkID.trim()){case"FVER":{let e=await this.tokenizer.readToken(ve);La(`DSDIFF version=${e}`);break}case"PROP":{if(await this.tokenizer.readToken(XA)!=="SND ")throw new oE("Unexpected PROP-chunk ID");await this.handleSoundPropertyChunks(r.chunkSize-BigInt(XA.len));break}case"ID3":{let e=await this.tokenizer.readToken(new ut(Number(r.chunkSize))),a=Mi(e);await new ho().parse(this.metadata,a,this.options);break}case"DSD":this.metadata.format.numberOfChannels&&this.metadata.setFormat("numberOfSamples",Number(r.chunkSize*BigInt(8)/BigInt(this.metadata.format.numberOfChannels))),this.metadata.format.numberOfSamples&&this.metadata.format.sampleRate&&this.metadata.setFormat("duration",this.metadata.format.numberOfSamples/this.metadata.format.sampleRate);break;default:La(`Ignore chunk[ID=${r.chunkID}, size=${r.chunkSize}]`);break}let i=r.chunkSize-BigInt(this.tokenizer.position-o);i>0&&(La(`After Parsing chunk, remaining ${i} bytes`),await this.tokenizer.ignore(Number(i)))}async handleSoundPropertyChunks(r){for(La(`Parsing sound-property-chunks, remainingSize=${r}`);r>0;){let o=await this.tokenizer.readToken(BI);La(`Sound-property-chunk[ID=${o.chunkID}, size=${o.chunkSize}]`);let i=this.tokenizer.position;switch(o.chunkID.trim()){case"FS":{let a=await this.tokenizer.readToken(Ue);this.metadata.setFormat("sampleRate",a);break}case"CHNL":{let a=await this.tokenizer.readToken(PA);this.metadata.setFormat("numberOfChannels",a),await this.handleChannelChunks(o.chunkSize-BigInt(PA.len));break}case"CMPR":{let a=(await this.tokenizer.readToken(XA)).trim(),A=await this.tokenizer.readToken(uA),t=await this.tokenizer.readToken(new je(A,"ascii"));a==="DSD"&&(this.metadata.setFormat("lossless",!0),this.metadata.setFormat("bitsPerSample",1)),this.metadata.setFormat("codec",`${a} (${t})`);break}case"ABSS":{let a=await this.tokenizer.readToken(PA),A=await this.tokenizer.readToken(uA),t=await this.tokenizer.readToken(uA),s=await this.tokenizer.readToken(Ue);La(`ABSS ${a}:${A}:${t}.${s}`);break}case"LSCO":{let a=await this.tokenizer.readToken(PA);La(`LSCO lsConfig=${a}`);break}default:La(`Unknown sound-property-chunk[ID=${o.chunkID}, size=${o.chunkSize}]`),await this.tokenizer.ignore(Number(o.chunkSize))}let e=o.chunkSize-BigInt(this.tokenizer.position-i);e>0&&(La(`After Parsing sound-property-chunk ${o.chunkSize}, remaining ${e} bytes`),await this.tokenizer.ignore(Number(e))),r-=BigInt(BI.len)+o.chunkSize,La(`Parsing sound-property-chunks, remainingSize=${r}`)}if(this.metadata.format.lossless&&this.metadata.format.sampleRate&&this.metadata.format.numberOfChannels&&this.metadata.format.bitsPerSample){let o=this.metadata.format.sampleRate*this.metadata.format.numberOfChannels*this.metadata.format.bitsPerSample;this.metadata.setFormat("bitrate",o)}}async handleChannelChunks(r){La(`Parsing channel-chunks, remainingSize=${r}`);let o=[];for(;r>=XA.len;){let i=await this.tokenizer.readToken(XA);La(`Channel[ID=${i}]`),o.push(i),r-=BigInt(XA.len)}return La(`Channels: ${o.join(", ")}`),o}}});var GX,FX=le(()=>{GX={parserType:"dsdiff",extensions:[".dff"],mimeTypes:["audio/dsf","audio/dsd"],async load(){return(await Promise.resolve().then(()=>(PX(),vX))).DsdiffParser}}});var LX,Vg,qS,FP=le(()=>{SA();Fa();Ht();LX={NONE:"not compressed PCM Apple Computer",sowt:"PCM (byte swapped)",fl32:"32-bit floating point IEEE 32-bit float",fl64:"64-bit floating point IEEE 64-bit float Apple Computer",alaw:"ALaw 2:1 8-bit ITU-T G.711 A-law",ulaw:"\xB5Law 2:1 8-bit ITU-T G.711 \xB5-law Apple Computer",ULAW:"CCITT G.711 u-law 8-bit ITU-T G.711 \xB5-law",ALAW:"CCITT G.711 A-law 8-bit ITU-T G.711 A-law",FL32:"Float 32 IEEE 32-bit float "},Vg=class extends pt("AIFF"){},qS=class{constructor(r,o){this.isAifc=o;let i=o?22:18;if(r.chunkSize>Math.abs(i):e<22){let A=uA.get(r,o+22);if(A>0){let t=(A+1)%2;if(23+A+t===this.len)a.compressionName=new je(A,"latin1").get(r,o+23);else throw new Vg("Illegal pstring length")}else a.compressionName=void 0}}else a.compressionName="PCM";return a}}});var VS,UX=le(()=>{SA();Fa();VS={len:8,get:(n,r)=>({chunkID:XA.get(n,r),chunkSize:Number(BigInt(Ue.get(n,r+4)))})}});var KX={};Qr(KX,{AIFFParser:()=>UP});var HX,LP,UP,YX=le(()=>{SA();HX=Je(at(),1);go();Xp();Fa();ni();FP();FP();UX();LP=(0,HX.default)("music-metadata:parser:aiff"),UP=class extends Qt{constructor(){super(...arguments),this.isCompressed=null}async parse(){if((await this.tokenizer.readToken(VS)).chunkID!=="FORM")throw new Vg("Invalid Chunk-ID, expected 'FORM'");let o=await this.tokenizer.readToken(XA);switch(o){case"AIFF":this.metadata.setFormat("container",o),this.isCompressed=!1;break;case"AIFC":this.metadata.setFormat("container","AIFF-C"),this.isCompressed=!0;break;default:throw new Vg(`Unsupported AIFF type: ${o}`)}this.metadata.setFormat("lossless",!this.isCompressed),this.metadata.setAudioOnly();try{for(;!this.tokenizer.fileInfo.size||this.tokenizer.fileInfo.size-this.tokenizer.position>=VS.len;){LP(`Reading AIFF chunk at offset=${this.tokenizer.position}`);let i=await this.tokenizer.readToken(VS),e=2*Math.round(i.chunkSize/2),a=await this.readData(i);await this.tokenizer.ignore(e-a)}}catch(i){if(i instanceof NA)LP("End-of-stream");else throw i}}async readData(r){switch(r.chunkID){case"COMM":{if(this.isCompressed===null)throw new Vg("Failed to parse AIFF.COMM chunk when compression type is unknown");let o=await this.tokenizer.readToken(new qS(r,this.isCompressed));return this.metadata.setFormat("bitsPerSample",o.sampleSize),this.metadata.setFormat("sampleRate",o.sampleRate),this.metadata.setFormat("numberOfChannels",o.numChannels),this.metadata.setFormat("numberOfSamples",o.numSampleFrames),this.metadata.setFormat("duration",o.numSampleFrames/o.sampleRate),(o.compressionName||o.compressionType)&&this.metadata.setFormat("codec",o.compressionName??LX[o.compressionType]),r.chunkSize}case"ID3 ":{let o=await this.tokenizer.readToken(new ut(r.chunkSize)),i=Mi(o);return await new ho().parse(this.metadata,i,this.options),r.chunkSize}case"SSND":return this.metadata.format.duration&&this.metadata.setFormat("bitrate",8*r.chunkSize/this.metadata.format.duration),0;case"NAME":case"AUTH":case"(c) ":case"ANNO":return this.readTextChunk(r);default:return LP(`Ignore chunk id=${r.chunkID}, size=${r.chunkSize}`),0}}async readTextChunk(r){let i=(await this.tokenizer.readToken(new je(r.chunkSize,"ascii"))).split("\0").map(e=>e.trim()).filter(e=>e?.length);return await Promise.all(i.map(e=>this.metadata.addTag("AIFF",r.chunkID,e))),r.chunkSize}}});var xX,jX=le(()=>{xX={parserType:"aiff",extensions:[".aif","aiff","aifc"],mimeTypes:["audio/aiff","audio/aif","audio/aifc","application/aiff"],async load(){return(await Promise.resolve().then(()=>(YX(),KX))).AIFFParser}}});var Wd,JX,qX,VX=le(()=>{SA();Fa();Wd={len:12,get:(n,r)=>({id:XA.get(n,r),size:fr.get(n,r+4)})},JX={len:16,get:(n,r)=>({fileSize:kd.get(n,r),metadataPointer:kd.get(n,r+8)})},qX={len:40,get:(n,r)=>({formatVersion:$t.get(n,r),formatID:$t.get(n,r+4),channelType:$t.get(n,r+8),channelNum:$t.get(n,r+12),samplingFrequency:$t.get(n,r+16),bitsPerSample:$t.get(n,r+20),sampleCount:kd.get(n,r+24),blockSizePerChannel:$t.get(n,r+32)})}});var WX={};Qr(WX,{DsdContentParseError:()=>zS,DsfParser:()=>KP});var zX,HP,zS,KP,ZX=le(()=>{zX=Je(at(),1);qd();VX();Xp();Ht();HP=(0,zX.default)("music-metadata:parser:DSF"),zS=class extends pt("DSD"){},KP=class extends Gn{async postId3v2Parse(){let r=this.tokenizer.position,o=await this.tokenizer.readToken(Wd);if(o.id!=="DSD ")throw new zS("Invalid chunk signature");this.metadata.setFormat("container","DSF"),this.metadata.setFormat("lossless",!0),this.metadata.setAudioOnly();let i=await this.tokenizer.readToken(JX);if(i.metadataPointer===BigInt(0))HP("No ID3v2 tag present");else return HP(`expect ID3v2 at offset=${i.metadataPointer}`),await this.parseChunks(i.fileSize-o.size),await this.tokenizer.ignore(Number(i.metadataPointer)-this.tokenizer.position-r),new ho().parse(this.metadata,this.tokenizer,this.options)}async parseChunks(r){for(;r>=Wd.len;){let o=await this.tokenizer.readToken(Wd);switch(HP(`Parsing chunk name=${o.id} size=${o.size}`),o.id){case"fmt ":{let i=await this.tokenizer.readToken(qX);this.metadata.setFormat("numberOfChannels",i.channelNum),this.metadata.setFormat("sampleRate",i.samplingFrequency),this.metadata.setFormat("bitsPerSample",i.bitsPerSample),this.metadata.setFormat("numberOfSamples",i.sampleCount),this.metadata.setFormat("duration",Number(i.sampleCount)/i.samplingFrequency);let e=i.bitsPerSample*i.samplingFrequency*i.channelNum;this.metadata.setFormat("bitrate",e);return}default:this.tokenizer.ignore(Number(o.size)-Wd.len);break}r-=o.size}}}});var XX,$X=le(()=>{XX={parserType:"dsf",extensions:[".dsf"],mimeTypes:["audio/dsf"],async load(){return(await Promise.resolve().then(()=>(ZX(),WX))).DsfParser}}});var zg,Zd,e7,WS=le(()=>{SA();Kg();zg=class n{static fromBase64(r){return n.fromBuffer(Uint8Array.from(atob(r),o=>o.charCodeAt(0)))}static fromBuffer(r){return new n(r.length).get(r,0)}constructor(r){this.len=r}get(r,o){let i=jp[Ue.get(r,o)];o+=4;let e=Ue.get(r,o);o+=4;let a=new je(e,"utf-8").get(r,o);o+=e;let A=Ue.get(r,o);o+=4;let t=new je(A,"utf-8").get(r,o);o+=A;let s=Ue.get(r,o);o+=4;let g=Ue.get(r,o);o+=4;let c=Ue.get(r,o);o+=4;let I=Ue.get(r,o);o+=4;let E=Ue.get(r,o);o+=4;let B=r.slice(o,o+E);return{type:i,format:a,description:t,width:s,height:g,colour_depth:c,indexed_color:I,data:B}}},Zd={len:7,get:(n,r)=>({packetType:uA.get(n,r),vorbis:new je(6,"ascii").get(n,r+1)})},e7={len:23,get:(n,r)=>({version:ve.get(n,r+0),channelMode:uA.get(n,r+4),sampleRate:ve.get(n,r+5),bitrateMax:ve.get(n,r+9),bitrateNominal:ve.get(n,r+13),bitrateMin:ve.get(n,r+17)})}});var nE,YP=le(()=>{SA();Mn();nE=class{constructor(r,o){this.data=r,this.offset=o}readInt32(){let r=ve.get(this.data,this.offset);return this.offset+=4,r}readStringUtf8(){let r=this.readInt32(),o=lr(this.data.subarray(this.offset,this.offset+r),"utf-8");return this.offset+=r,o}parseUserComment(){let r=this.offset,o=this.readStringUtf8(),i=o.indexOf("=");return{key:o.substring(0,i).toUpperCase(),value:o.substring(i+1),len:this.offset-r}}}});var A7,sE,Xd,Fn,$d=le(()=>{SA();A7=Je(at(),1);YP();WS();Ht();sE=(0,A7.default)("music-metadata:parser:ogg:vorbis1"),Xd=class extends pt("Vorbis"){},Fn=class n{constructor(r,o){this.pageSegments=[],this.durationOnLastPage=!0,this.metadata=r,this.options=o}async parsePage(r,o){if(this.lastPageHeader=r,r.headerType.firstPage)this.parseFirstPage(r,o);else{if(r.headerType.continued){if(this.pageSegments.length===0)throw new Xd("Cannot continue on previous page");this.pageSegments.push(o)}if(r.headerType.lastPage||!r.headerType.continued){if(this.pageSegments.length>0){let i=n.mergeUint8Arrays(this.pageSegments);await this.parseFullPage(i)}this.pageSegments=r.headerType.lastPage?[]:[o]}}}static mergeUint8Arrays(r){let o=r.reduce((e,a)=>e+a.length,0),i=new Uint8Array(o);return r.forEach((e,a,A)=>{let t=A.slice(0,a).reduce((s,g)=>s+g.length,0);i.set(e,t)}),i}async flush(){await this.parseFullPage(n.mergeUint8Arrays(this.pageSegments))}async parseUserComment(r,o){let e=new nE(r,o).parseUserComment();return await this.addTag(e.key,e.value),e.len}async addTag(r,o){if(r==="METADATA_BLOCK_PICTURE"&&typeof o=="string"){if(this.options.skipCovers){sE("Ignore picture");return}o=zg.fromBase64(o),sE(`Push picture: id=${r}, format=${o.format}`)}else sE(`Push tag: id=${r}, value=${o}`);await this.metadata.addTag("vorbis",r,o)}calculateDuration(r){this.lastPageHeader&&(r||this.lastPageHeader.headerType.lastPage)&&this.metadata.format.sampleRate&&this.lastPageHeader.absoluteGranulePosition>=0&&(this.metadata.setFormat("numberOfSamples",this.lastPageHeader.absoluteGranulePosition),this.metadata.setFormat("duration",this.lastPageHeader.absoluteGranulePosition/this.metadata.format.sampleRate))}parseFirstPage(r,o){this.metadata.setFormat("codec","Vorbis I"),this.metadata.setFormat("hasAudio",!0),sE("Parse first page");let i=Zd.get(o,0);if(i.vorbis!=="vorbis")throw new Xd("Metadata does not look like Vorbis");if(i.packetType===1){let e=e7.get(o,Zd.len);this.metadata.setFormat("sampleRate",e.sampleRate),this.metadata.setFormat("bitrate",e.bitrateNominal),this.metadata.setFormat("numberOfChannels",e.channelMode),sE("sample-rate=%s[hz], bitrate=%s[b/s], channel-mode=%s",e.sampleRate,e.bitrateNominal,e.channelMode)}else throw new Xd("First Ogg page should be type 1: the identification header")}async parseFullPage(r){let o=Zd.get(r,0);switch(sE("Parse full page: type=%s, byteLength=%s",o.packetType,r.byteLength),o.packetType){case 3:return this.parseUserCommentList(r,Zd.len);case 1:case 5:break}}async parseUserCommentList(r,o){let i=ve.get(r,o);o+=4,o+=i;let e=ve.get(r,o);for(o+=4;e-- >0;)o+=await this.parseUserComment(r,o)}}});var Ua,eu,Au,xP=le(()=>{Kt();SA();Ua={STREAMINFO:0,PADDING:1,APPLICATION:2,SEEKTABLE:3,VORBIS_COMMENT:4,CUESHEET:5,PICTURE:6},eu={len:4,get:(n,r)=>({lastBlock:kA(n,r,7),type:qA(n,r,1,7),length:Br.get(n,r+1)})},Au={len:34,get:(n,r)=>({minimumBlockSize:PA.get(n,r),maximumBlockSize:PA.get(n,r+2)/1e3,minimumFrameSize:Br.get(n,r+4),maximumFrameSize:Br.get(n,r+7),sampleRate:Br.get(n,r+10)>>4,channels:qA(n,r+12,4,3)+1,bitsPerSample:qA(n,r+12,7,5)+1,totalSamples:qA(n,r+13,4,36),fileMD5:new ut(16).get(n,r+18)})}});var a7={};Qr(a7,{FlacParser:()=>tu});var r7,ELe,ZS,tu,jP=le(()=>{r7=Je(at(),1);SA();WS();qd();Fa();$d();YP();Ht();xP();ELe=(0,r7.default)("music-metadata:parser:FLAC"),ZS=class extends pt("FLAC"){},tu=class extends Gn{constructor(){super(...arguments),this.vorbisParser=new Fn(this.metadata,this.options)}async postId3v2Parse(){if((await this.tokenizer.readToken(XA)).toString()!=="fLaC")throw new ZS("Invalid FLAC preamble");let o;do o=await this.tokenizer.readToken(eu),await this.parseDataBlock(o);while(!o.lastBlock);if(this.tokenizer.fileInfo.size&&this.metadata.format.duration){let i=this.tokenizer.fileInfo.size-this.tokenizer.position;this.metadata.setFormat("bitrate",8*i/this.metadata.format.duration)}}async parseDataBlock(r){switch(ELe(`blockHeader type=${r.type}, length=${r.length}`),r.type){case Ua.STREAMINFO:return this.readBlockStreamInfo(r.length);case Ua.PADDING:break;case Ua.APPLICATION:break;case Ua.SEEKTABLE:break;case Ua.VORBIS_COMMENT:return this.readComment(r.length);case Ua.CUESHEET:break;case Ua.PICTURE:await this.parsePicture(r.length);return;default:this.metadata.addWarning(`Unknown block type: ${r.type}`)}return this.tokenizer.ignore(r.length).then()}async readBlockStreamInfo(r){if(r!==Au.len)throw new ZS("Unexpected block-stream-info length");let o=await this.tokenizer.readToken(Au);this.metadata.setFormat("container","FLAC"),this.processsStreamInfo(o)}processsStreamInfo(r){this.metadata.setFormat("codec","FLAC"),this.metadata.setFormat("hasAudio",!0),this.metadata.setFormat("lossless",!0),this.metadata.setFormat("numberOfChannels",r.channels),this.metadata.setFormat("bitsPerSample",r.bitsPerSample),this.metadata.setFormat("sampleRate",r.sampleRate),r.totalSamples>0&&this.metadata.setFormat("duration",r.totalSamples/r.sampleRate)}async readComment(r){let o=await this.tokenizer.readToken(new ut(r));return this.parseComment(o)}async parseComment(r){let o=new nE(r,0),i=o.readStringUtf8();i.length>0&&this.metadata.setFormat("tool",i);let e=o.readInt32(),a=new Array(e);for(let A=0;A(A.key==="ENCODER"&&this.metadata.setFormat("tool",A.value),this.addTag(A.key,A.value))))}async parsePicture(r){return this.options.skipCovers?this.tokenizer.ignore(r):this.addPictureTag(await this.tokenizer.readToken(new zg(r)))}addPictureTag(r){return this.addTag("METADATA_BLOCK_PICTURE",r)}addTag(r,o){return this.vorbisParser.addTag(r,o)}}});var i7,o7=le(()=>{i7={parserType:"flac",extensions:[".flac"],mimeTypes:["audio/flac"],async load(){return(await Promise.resolve().then(()=>(jP(),a7))).FlacParser}}});var Oe,JP=le(()=>{Oe={string:0,uint:1,uid:2,bool:3,binary:4,float:5}});var n7,s7=le(()=>{JP();n7={name:"dtd",container:{440786851:{name:"ebml",container:{17030:{name:"ebmlVersion",value:Oe.uint},17143:{name:"ebmlReadVersion",value:Oe.uint},17138:{name:"ebmlMaxIDWidth",value:Oe.uint},17139:{name:"ebmlMaxSizeWidth",value:Oe.uint},17026:{name:"docType",value:Oe.string},17031:{name:"docTypeVersion",value:Oe.uint},17029:{name:"docTypeReadVersion",value:Oe.uint}}},408125543:{name:"segment",container:{290298740:{name:"seekHead",container:{19899:{name:"seek",multiple:!0,container:{21419:{name:"id",value:Oe.binary},21420:{name:"position",value:Oe.uint}}}}},357149030:{name:"info",container:{29604:{name:"uid",value:Oe.uid},29572:{name:"filename",value:Oe.string},3979555:{name:"prevUID",value:Oe.uid},3965867:{name:"prevFilename",value:Oe.string},4110627:{name:"nextUID",value:Oe.uid},4096955:{name:"nextFilename",value:Oe.string},2807729:{name:"timecodeScale",value:Oe.uint},17545:{name:"duration",value:Oe.float},17505:{name:"dateUTC",value:Oe.uint},31657:{name:"title",value:Oe.string},19840:{name:"muxingApp",value:Oe.string},22337:{name:"writingApp",value:Oe.string}}},524531317:{name:"cluster",multiple:!0,container:{231:{name:"timecode",value:Oe.uid},22743:{name:"silentTracks ",multiple:!0},167:{name:"position",value:Oe.uid},171:{name:"prevSize",value:Oe.uid},160:{name:"blockGroup"},163:{name:"simpleBlock"}}},374648427:{name:"tracks",container:{174:{name:"entries",multiple:!0,container:{215:{name:"trackNumber",value:Oe.uint},29637:{name:"uid",value:Oe.uid},131:{name:"trackType",value:Oe.uint},185:{name:"flagEnabled",value:Oe.bool},136:{name:"flagDefault",value:Oe.bool},21930:{name:"flagForced",value:Oe.bool},156:{name:"flagLacing",value:Oe.bool},28135:{name:"minCache",value:Oe.uint},28136:{name:"maxCache",value:Oe.uint},2352003:{name:"defaultDuration",value:Oe.uint},2306383:{name:"timecodeScale",value:Oe.float},21358:{name:"name",value:Oe.string},2274716:{name:"language",value:Oe.string},134:{name:"codecID",value:Oe.string},25506:{name:"codecPrivate",value:Oe.binary},2459272:{name:"codecName",value:Oe.string},3839639:{name:"codecSettings",value:Oe.string},3883072:{name:"codecInfoUrl",value:Oe.string},2536e3:{name:"codecDownloadUrl",value:Oe.string},170:{name:"codecDecodeAll",value:Oe.bool},28587:{name:"trackOverlay",value:Oe.uint},224:{name:"video",container:{154:{name:"flagInterlaced",value:Oe.bool},21432:{name:"stereoMode",value:Oe.uint},176:{name:"pixelWidth",value:Oe.uint},186:{name:"pixelHeight",value:Oe.uint},21680:{name:"displayWidth",value:Oe.uint},21690:{name:"displayHeight",value:Oe.uint},21683:{name:"aspectRatioType",value:Oe.uint},3061028:{name:"colourSpace",value:Oe.uint},3126563:{name:"gammaValue",value:Oe.float}}},225:{name:"audio",container:{181:{name:"samplingFrequency",value:Oe.float},30901:{name:"outputSamplingFrequency",value:Oe.float},159:{name:"channels",value:Oe.uint},148:{name:"channels",value:Oe.uint},32123:{name:"channelPositions",value:Oe.binary},25188:{name:"bitDepth",value:Oe.uint}}},28032:{name:"contentEncodings",container:{25152:{name:"contentEncoding",container:{20529:{name:"order",value:Oe.uint},20530:{name:"scope",value:Oe.bool},20531:{name:"type",value:Oe.uint},20532:{name:"contentEncoding",container:{16980:{name:"contentCompAlgo",value:Oe.uint},16981:{name:"contentCompSettings",value:Oe.binary}}},20533:{name:"contentEncoding",container:{18401:{name:"contentEncAlgo",value:Oe.uint},18402:{name:"contentEncKeyID",value:Oe.binary},18403:{name:"contentSignature ",value:Oe.binary},18404:{name:"ContentSigKeyID ",value:Oe.binary},18405:{name:"contentSigAlgo ",value:Oe.uint},18406:{name:"contentSigHashAlgo ",value:Oe.uint}}},25188:{name:"bitDepth",value:Oe.uint}}}}}}}}},475249515:{name:"cues",container:{187:{name:"cuePoint",container:{179:{name:"cueTime",value:Oe.uid},183:{name:"positions",container:{247:{name:"track",value:Oe.uint},241:{name:"clusterPosition",value:Oe.uint},21368:{name:"blockNumber",value:Oe.uint},234:{name:"codecState",value:Oe.uint},219:{name:"reference",container:{150:{name:"time",value:Oe.uint},151:{name:"cluster",value:Oe.uint},21343:{name:"number",value:Oe.uint},235:{name:"codecState",value:Oe.uint}}},240:{name:"relativePosition",value:Oe.uint}}}}}}},423732329:{name:"attachments",container:{24999:{name:"attachedFiles",multiple:!0,container:{18046:{name:"description",value:Oe.string},18030:{name:"name",value:Oe.string},18016:{name:"mimeType",value:Oe.string},18012:{name:"data",value:Oe.binary},18094:{name:"uid",value:Oe.uid}}}}},272869232:{name:"chapters",container:{17849:{name:"editionEntry",container:{182:{name:"chapterAtom",container:{29636:{name:"uid",value:Oe.uid},145:{name:"timeStart",value:Oe.uint},146:{name:"timeEnd",value:Oe.uid},152:{name:"hidden",value:Oe.bool},17816:{name:"enabled",value:Oe.uid},143:{name:"track",container:{137:{name:"trackNumber",value:Oe.uid},128:{name:"display",container:{133:{name:"string",value:Oe.string},17276:{name:"language ",value:Oe.string},17278:{name:"country ",value:Oe.string}}}}}}}}}}},307544935:{name:"tags",container:{29555:{name:"tag",multiple:!0,container:{25536:{name:"target",container:{25541:{name:"tagTrackUID",value:Oe.uid},25540:{name:"tagChapterUID",value:Oe.uint},25542:{name:"tagAttachmentUID",value:Oe.uid},25546:{name:"targetType",value:Oe.string},26826:{name:"targetTypeValue",value:Oe.uint},25545:{name:"tagEditionUID",value:Oe.uid}}},26568:{name:"simpleTags",multiple:!0,container:{17827:{name:"name",value:Oe.string},17543:{name:"string",value:Oe.string},17541:{name:"binary",value:Oe.binary},17530:{name:"language",value:Oe.string},17531:{name:"languageIETF",value:Oe.string},17540:{name:"default",value:Oe.bool}}}}}}}}}}}});function qP(n,r){return Number(CLe(n,r))}function CLe(n,r){let o=new Uint8Array(8),i=n.subarray(0,r);try{return o.set(i,8-r),Tn.get(o,0)}catch{return BigInt(-1)}}function c7(n){return n.container&&Object.keys(n.container).map(r=>{let o=n.container[r];return o.id=Number.parseInt(r,10),o}).forEach(r=>{r.parent=n,c7(r)}),n}function fI(n){let r="";return n.parent&&n.parent.name!=="dtd"&&(r+=`${fI(n.parent)}/`),r+n.name}var g7,gE,XS,Ln,$S,I7=le(()=>{SA();g7=Je(at(),1);go();JP();SA();Ht();gE=(0,g7.default)("music-metadata:parser:ebml"),XS=class extends pt("EBML"){},Ln={ReadNext:0,IgnoreElement:2,SkipSiblings:3,TerminateParsing:4,SkipElement:5},$S=class{constructor(r){this.parserMap=new Map,this.ebmlMaxIDLength=4,this.ebmlMaxSizeLength=8,this.tokenizer=r,this.parserMap.set(Oe.uint,o=>this.readUint(o)),this.parserMap.set(Oe.string,o=>this.readString(o)),this.parserMap.set(Oe.binary,o=>this.readBuffer(o)),this.parserMap.set(Oe.uid,async o=>this.readBuffer(o)),this.parserMap.set(Oe.bool,o=>this.readFlag(o)),this.parserMap.set(Oe.float,o=>this.readFloat(o))}async iterate(r,o,i){return this.parseContainer(c7(r),o,i)}async parseContainer(r,o,i){let e={};for(;this.tokenizer.position=0?this.tokenizer.position+a.len:-1,i);t.multiple?(e[t.name]||(e[t.name]=[]),e[t.name].push(g)):e[t.name]=g,await i.elementValue(t,g,A)}else{let g=this.parserMap.get(t.value);if(typeof g=="function"){let c=await g(a);e[t.name]=c,await i.elementValue(t,c,A)}}break;case Ln.SkipElement:gE(`Go to next element: name=${fI(t)}, element.id=0x${a.id}, container=${!!t.container} at position=${A}`);break;case Ln.IgnoreElement:gE(`Ignore element: name=${fI(t)}, element.id=0x${a.id}, container=${!!t.container} at position=${A}`),await this.tokenizer.ignore(a.len);break;case Ln.SkipSiblings:gE(`Ignore remaining container, at: name=${fI(t)}, element.id=0x${a.id}, container=${!!t.container} at position=${A}`),await this.tokenizer.ignore(o-this.tokenizer.position);break;case Ln.TerminateParsing:return gE(`Terminate parsing at element: name=${fI(t)}, element.id=0x${a.id}, container=${!!t.container} at position=${A}`),e}else switch(a.id){case 236:await this.tokenizer.ignore(a.len);break;default:gE(`parseEbml: parent=${fI(r)}, unknown child: id=${a.id.toString(16)} at position=${A}`),await this.tokenizer.ignore(a.len)}}return e}async readVintData(r){let o=await this.tokenizer.peekNumber(uA),i=128,e=1;for(;(o&i)===0;){if(e>r)throw new XS("VINT value exceeding maximum size");++e,i>>=1}let a=new Uint8Array(e);return await this.tokenizer.readBuffer(a),a}async readElement(){let r=await this.readVintData(this.ebmlMaxIDLength),o=await this.readVintData(this.ebmlMaxSizeLength);return o[0]^=128>>o.length-1,{id:qP(r,r.length),len:qP(o,o.length)}}async readFloat(r){switch(r.len){case 0:return 0;case 4:return this.tokenizer.readNumber(rP);case 8:return this.tokenizer.readNumber(uS);case 10:return this.tokenizer.readNumber(uS);default:throw new XS(`Invalid IEEE-754 float length: ${r.len}`)}}async readFlag(r){return await this.readUint(r)===1}async readUint(r){let o=await this.readBuffer(r);return qP(o,r.len)}async readString(r){return(await this.tokenizer.readToken(new je(r.len,"utf-8"))).replace(/\x00.*$/g,"")}async readBuffer(r){let o=new Uint8Array(r.len);return await this.tokenizer.readBuffer(o),o}}});var p7={};Qr(p7,{MatroskaParser:()=>VP});var l7,eD,VP,E7=le(()=>{l7=Je(at(),1);ni();s7();CP();I7();eD=(0,l7.default)("music-metadata:parser:matroska"),VP=class extends Qt{constructor(){super(...arguments),this.seekHeadOffset=0,this.flagUseIndexToSkipClusters=this.options.mkvUseIndex??!1}async parse(){let r=this.tokenizer.fileInfo.size??Number.MAX_SAFE_INTEGER,o=new $S(this.tokenizer);eD("Initializing DTD end MatroskaIterator"),await o.iterate(n7,r,{startNext:i=>{switch(i.id){case 475249515:return eD(`Skip element: name=${i.name}, id=0x${i.id.toString(16)}`),Ln.IgnoreElement;case 524531317:if(this.flagUseIndexToSkipClusters&&this.seekHead){let e=this.seekHead.seek.find(a=>a.position+this.seekHeadOffset>this.tokenizer.position);if(e){let a=e.position+this.seekHeadOffset-this.tokenizer.position;return eD(`Use index to go to next position, ignoring ${a} bytes`),this.tokenizer.ignore(a),Ln.SkipElement}}return Ln.IgnoreElement;default:return Ln.ReadNext}},elementValue:async(i,e,a)=>{switch(eD(`Received: name=${i.name}, value=${e}`),i.id){case 17026:this.metadata.setFormat("container",`EBML/${e}`);break;case 290298740:this.seekHead=e,this.seekHeadOffset=a;break;case 357149030:{let A=e,t=A.timecodeScale?A.timecodeScale:1e6;if(typeof A.duration=="number"){let s=A.duration*t/1e9;await this.addTag("segment:title",A.title),this.metadata.setFormat("duration",Number(s))}}break;case 374648427:{let A=e;if(A?.entries){A.entries.forEach(s=>{let g={codecName:s.codecID.replace("A_","").replace("V_",""),codecSettings:s.codecSettings,flagDefault:s.flagDefault,flagLacing:s.flagLacing,flagEnabled:s.flagEnabled,language:s.language,name:s.name,type:s.trackType,audio:s.audio,video:s.video};this.metadata.addStreamInfo(g)});let t=A.entries.filter(s=>s.trackType===qr.audio).reduce((s,g)=>!s||g.flagDefault&&!s.flagDefault||g.trackNumber{let s=t.target,g=s?.targetTypeValue?m9[s.targetTypeValue]:s?.targetType?s.targetType:"track";await Promise.all(t.simpleTags.map(async c=>{let I=c.string?c.string:c.binary;await this.addTag(`${g}:${c.name}`,I)}))}))}break;case 423732329:{let A=e;await Promise.all(A.attachedFiles.filter(t=>t.mimeType.startsWith("image/")).map(t=>this.addTag("picture",{data:t.data,format:t.mimeType,description:t.description,name:t.name})))}break}}})}async addTag(r,o){await this.metadata.addTag("matroska",r,o)}}});var C7,h7=le(()=>{C7={parserType:"matroska",extensions:[".mka",".mkv",".mk3d",".mks","webm"],mimeTypes:["audio/matroska","video/matroska","audio/webm","video/webm"],async load(){return(await Promise.resolve().then(()=>(E7(),p7))).MatroskaParser}}});function Q7(n,r,o,i,e){if(WP(`remainingLen=${i}, numberOfEntries=${e} * token-len=${r.len}`),i===0)return[];if(i!==e*r.len)throw new Rs("mismatch number-of-entries with remaining atom-length");let a=[];for(let A=0;A{SA();u7=Je(at(),1);Fa();Ht();Kt();Ht();WP=(0,u7.default)("music-metadata:parser:MP4:atom"),Rs=class extends pt("MP4"){},QI={len:8,get:(n,r)=>{let o=Ue.get(n,r);if(o<0)throw new Rs("Invalid atom header length");return{length:BigInt(o),name:new je(4,"latin1").get(n,r+4)}},put:(n,r,o)=>(Ue.put(n,r,Number(o.length)),XA.put(n,r+4,o.name))},B7=Tn,ZP={len:4,get:(n,r)=>({type:new je(4,"ascii").get(n,r)})},AD=class{constructor(r,o,i){if(ro&&WP(`Warning: atom ${i} expected to be ${o}, but was actually ${r} bytes long.`),this.len=r}},cE={len:4,get:(n,r)=>{let o=Ue.get(n,r)-2082844800;return new Date(o*1e3)}},IE={len:8,get:(n,r)=>{let o=Number(Tn.get(n,r))-2082844800;return new Date(o*1e3)}},tD=class extends AD{constructor(r){super(r,24,"mdhd")}get(r,o){let i=uA.get(r,o+0),e=Br.get(r,o+1);switch(i){case 0:return{version:i,flags:e,creationTime:cE.get(r,o+4),modificationTime:cE.get(r,o+8),timeScale:Ue.get(r,o+12),duration:Ue.get(r,o+16),language:PA.get(r,o+20),quality:PA.get(r,o+22)};case 1:return{version:i,flags:e,creationTime:IE.get(r,o+4),modificationTime:IE.get(r,o+12),timeScale:Ue.get(r,o+20),duration:Number(Tn.get(r,o+24)),language:PA.get(r,o+32),quality:PA.get(r,o+34)};default:throw new lo("Invalid mdhd version header")}}},rD=class extends AD{constructor(r){super(r,100,"mvhd")}get(r,o){let i=uA.get(r,o),e=Br.get(r,o+1);return i===1?{version:i,flags:e,creationTime:IE.get(r,o+4),modificationTime:IE.get(r,o+12),timeScale:Ue.get(r,o+20),duration:Number(Tn.get(r,o+24)),preferredRate:Ue.get(r,o+32),preferredVolume:PA.get(r,o+36),previewTime:Ue.get(r,o+84),previewDuration:Ue.get(r,o+88),posterTime:Ue.get(r,o+92),selectionTime:Ue.get(r,o+96),selectionDuration:Ue.get(r,o+100),currentTime:Ue.get(r,o+104),nextTrackID:Ue.get(r,o+108)}:{version:i,flags:e,creationTime:cE.get(r,o+4),modificationTime:cE.get(r,o+8),timeScale:Ue.get(r,o+12),duration:Ue.get(r,o+16),preferredRate:Ue.get(r,o+20),preferredVolume:PA.get(r,o+24),previewTime:Ue.get(r,o+72),previewDuration:Ue.get(r,o+76),posterTime:Ue.get(r,o+80),selectionTime:Ue.get(r,o+84),selectionDuration:Ue.get(r,o+88),currentTime:Ue.get(r,o+92),nextTrackID:Ue.get(r,o+96)}}},aD=class{constructor(r){this.len=r}get(r,o){return{type:{set:uA.get(r,o+0),type:Br.get(r,o+1)},locale:Br.get(r,o+4),value:new ut(this.len-8).get(r,o+8)}}},iD=class{constructor(r){this.len=r}get(r,o){return{version:uA.get(r,o),flags:Br.get(r,o+1),name:new je(this.len-4,"utf-8").get(r,o+4)}}},oD=class{constructor(r){this.len=r}get(r,o){let i=uA.get(r,o),e=Br.get(r,o+1);switch(i){case 0:return{version:i,flags:e,creationTime:cE.get(r,o+4),modificationTime:cE.get(r,o+8),trackId:Ue.get(r,o+12),duration:Ue.get(r,o+20),layer:PA.get(r,o+32),alternateGroup:PA.get(r,o+34),volume:PA.get(r,o+36)};case 1:return{version:i,flags:e,creationTime:IE.get(r,o+4),modificationTime:IE.get(r,o+12),trackId:Ue.get(r,o+20),duration:Number(Tn.get(r,o+28)),layer:PA.get(r,o+44),alternateGroup:PA.get(r,o+46),volume:PA.get(r,o+48)};default:throw new lo("Invalid tkhd version header")}}},d7={len:8,get:(n,r)=>({version:uA.get(n,r),flags:Br.get(n,r+1),numberOfEntries:Ue.get(n,r+4)})},zP=class{constructor(r){this.len=r}get(r,o){let i=this.len-12;return{dataFormat:XA.get(r,o),dataReferenceIndex:PA.get(r,o+10),description:i>0?new ut(i).get(r,o+12):void 0}}},ru=class{constructor(r){this.len=r}get(r,o){let i=d7.get(r,o);o+=d7.len;let e=[];for(let a=0;a=this.len){WP("TrackRunBox size mismatch");break}let t={};e.flags.sampleDurationPresent&&(t.sampleDuration=Ue.get(r,a),a+=4),e.flags.sampleSizePresent&&(t.sampleSize=Ue.get(r,a),a+=4),e.flags.sampleFlagsPresent&&(t.sampleFlags=Ue.get(r,a),a+=4),e.flags.sampleCompositionTimeOffsetsPresent&&(t.sampleCompositionTimeOffset=Ue.get(r,a),a+=4),e.samples.push(t)}return e}},pD=class{constructor(r){this.len=r}get(r,o){let i=o+1,e=new je(4,"utf-8");return{version:Nn.get(r,o),flags:Br.get(r,o+1),componentType:e.get(r,o+4),handlerType:e.get(r,o+8),componentName:new je(this.len-28,"utf-8").get(r,o+28)}}},ED=class{constructor(r){this.len=r}get(r,o){let i=0,e=[];for(;i{S7=Je(at(),1);ou();ou();m7=(0,S7.default)("music-metadata:parser:MP4:Atom"),CD=class n{static async readAtom(r,o,i,e){let a=r.position;m7(`Reading next token on offset=${a}...`);let A=await r.readToken(QI),t=A.length===1n;t&&(A.length=await r.readToken(B7));let s=new n(A,t,i),g=s.getPayloadLength(e);return m7(`parse atom name=${s.atomPath}, extended=${s.extended}, offset=${a}, len=${s.header.length}`),await s.readData(r,o,g),s}constructor(r,o,i){this.header=r,this.extended=o,this.parent=i,this.children=[],this.atomPath=(this.parent?`${this.parent.atomPath}.`:"")+this.header.name}getHeaderLength(){return this.extended?16:8}getPayloadLength(r){return(this.header.length===0n?r:Number(this.header.length))-this.getHeaderLength()}async readAtoms(r,o,i){for(;i>0;){let e=await n.readAtom(r,o,this,i);this.children.push(e),i-=e.header.length===0n?i:Number(e.header.length)}}async readData(r,o,i){switch(this.header.name){case"moov":case"udta":case"mdia":case"minf":case"stbl":case"":case"ilst":case"tref":case"moof":return this.readAtoms(r,o,this.getPayloadLength(i));case"meta":{let a=(await r.peekToken(QI)).name==="hdlr"?0:4;return await r.ignore(a),this.readAtoms(r,o,this.getPayloadLength(i)-a)}default:return o(this,i)}}}});var M7={};Qr(M7,{MP4Parser:()=>$P});function O7(n,r,o){return o.indexOf(n)===r}var b7,gi,uLe,w7,$P,_7=le(()=>{b7=Je(at(),1);SA();ni();xd();D7();ou();ou();lI();Gd();Mn();gi=(0,b7.default)("music-metadata:parser:MP4"),uLe="iTunes",w7={raw:{lossy:!1,format:"raw"},MAC3:{lossy:!0,format:"MACE 3:1"},MAC6:{lossy:!0,format:"MACE 6:1"},ima4:{lossy:!0,format:"IMA 4:1"},ulaw:{lossy:!0,format:"uLaw 2:1"},alaw:{lossy:!0,format:"uLaw 2:1"},Qclp:{lossy:!0,format:"QUALCOMM PureVoice"},".mp3":{lossy:!0,format:"MPEG-1 layer 3"},alac:{lossy:!1,format:"ALAC"},"ac-3":{lossy:!0,format:"AC-3"},mp4a:{lossy:!0,format:"MPEG-4/AAC"},mp4s:{lossy:!0,format:"MP4S"},c608:{lossy:!0,format:"CEA-608"},c708:{lossy:!0,format:"CEA-708"}};$P=class n extends Qt{constructor(){super(...arguments),this.tracks=new Map,this.hasVideoTrack=!1,this.hasAudioTrack=!0,this.atomParsers={mvhd:async r=>{let o=await this.tokenizer.readToken(new rD(r));this.metadata.setFormat("creationTime",o.creationTime),this.metadata.setFormat("modificationTime",o.modificationTime)},chap:async r=>{let o=this.getTrackDescription(),i=[];for(;r>=Ue.len;)i.push(await this.tokenizer.readNumber(Ue)),r-=Ue.len;o.chapterList=i},mdat:async r=>{if(this.options.includeChapters){let o=[...this.tracks.values()].filter(i=>i.chapterList);if(o.length===1){let i=o[0].chapterList,e=[...this.tracks.values()].filter(a=>i.indexOf(a.header.trackId)!==-1);if(e.length===1)return this.parseChapterTrack(e[0],o[0],r)}}await this.tokenizer.ignore(r)},ftyp:async r=>{let o=[];for(;r>0;){let e=await this.tokenizer.readToken(ZP);r-=ZP.len;let a=e.type.replace(/\W/g,"");a.length>0&&o.push(a)}gi(`ftyp: ${o.join("/")}`);let i=o.filter(O7).join("/");this.metadata.setFormat("container",i)},stsd:async r=>{let o=await this.tokenizer.readToken(new ru(r)),i=this.getTrackDescription();i.soundSampleDescription=o.table.map(e=>this.parseSoundSampleDescription(e))},stsz:async r=>{let o=await this.tokenizer.readToken(new iu(r)),i=this.getTrackDescription();i.sampleSize=o.sampleSize,i.sampleSizeTable=o.entries},date:async r=>{let o=await this.tokenizer.readToken(new je(r,"utf-8"));await this.addTag("date",o)}}}static read_BE_Integer(r,o){let i=(o?"INT":"UINT")+r.length*8+(r.length>1?"_BE":""),e=JA[i];if(!e)throw new Rs(`Token for integer type not found: "${i}"`);return Number(e.get(r,0))}async parse(){this.hasVideoTrack=!1,this.hasAudioTrack=!0,this.tracks.clear();let r=this.tokenizer.fileInfo.size||0;for(;!this.tokenizer.fileInfo.size||r>0;){try{if((await this.tokenizer.peekToken(QI)).name==="\0\0\0\0"){let A=`Error at offset=${this.tokenizer.position}: box.id=0`;gi(A),this.addWarning(A);break}}catch(a){if(a instanceof Error){let A=`Error at offset=${this.tokenizer.position}: ${a.message}`;gi(A),this.addWarning(A)}else throw a;break}let e=await CD.readAtom(this.tokenizer,(a,A)=>this.handleAtom(a,A),null,r);r-=e.header.length===BigInt(0)?r:Number(e.header.length)}let o=[];this.tracks.forEach(e=>{let a=[];e.soundSampleDescription.forEach(A=>{let t={},s=w7[A.dataFormat];if(s?(a.push(s.format),t.codecName=s.format):t.codecName=`<${A.dataFormat}>`,A.description){let{description:g}=A;g.sampleRate>0&&(t.type=qr.audio,t.audio={samplingFrequency:g.sampleRate,bitDepth:g.sampleSize,channels:g.numAudioChannels})}this.metadata.addStreamInfo(t)}),a.length>=1&&o.push(a.join("/"))}),o.length>0&&this.metadata.setFormat("codec",o.filter(O7).join("+"));let i=[...this.tracks.values()].filter(e=>e.soundSampleDescription.length>=1&&e.soundSampleDescription[0].description&&e.soundSampleDescription[0].description.numAudioChannels>0);for(let e of i){if(e.media.header&&e.media.header.timeScale>0)if(e.sampleRate=e.media.header.timeScale,e.media.header.duration>0&&(gi("Using duration defined on audio track"),e.samples=e.media.header.duration,e.duration=e.samples/e.sampleRate),e.fragments.length>0){gi("Calculate duration defined in track fragments");let t=0;e.sizeInBytes=0;for(let s of e.fragments)for(let g of s.trackRun.samples){let c=g.sampleDuration??s.header.defaultSampleDuration??0,I=g.sampleSize??s.header.defaultSampleSize??0;if(c===0)throw new Error("Missing sampleDuration and no defaultSampleDuration in track fragment header");if(I===0)throw new Error("Missing sampleSize and no defaultSampleSize in track fragment header");t+=c,e.sizeInBytes+=I}e.samples||(e.samples=t),e.duration||(e.duration=t/e.sampleRate)}else e.sampleSizeTable.length>0&&(e.sizeInBytes=e.sampleSizeTable.reduce((t,s)=>t+s,0));let a=e.soundSampleDescription[0];if(a.description&&e.media.header&&(this.metadata.setFormat("sampleRate",a.description.sampleRate),this.metadata.setFormat("bitsPerSample",a.description.sampleSize),this.metadata.setFormat("numberOfChannels",a.description.numAudioChannels),e.media.header.timeScale===0&&e.timeToSampleTable.length>0)){let t=e.timeToSampleTable.map(s=>s.count*s.duration).reduce((s,g)=>s+g);e.duration=t/a.description.sampleRate}let A=w7[a.dataFormat];A&&this.metadata.setFormat("lossless",!A.lossy)}if(i.length>=1){let e=i[0];e.duration&&(this.metadata.setFormat("duration",e.duration),e.sizeInBytes&&this.metadata.setFormat("bitrate",8*e.sizeInBytes/e.duration))}this.metadata.setFormat("hasAudio",this.hasAudioTrack),this.metadata.setFormat("hasVideo",this.hasVideoTrack)}async handleAtom(r,o){if(r.parent)switch(r.parent.header.name){case"ilst":case"":return this.parseMetadataItemData(r);case"moov":switch(r.header.name){case"trak":return this.parseTrackBox(r);case"udta":return this.parseTrackBox(r)}break;case"moof":switch(r.header.name){case"traf":return this.parseTrackFragmentBox(r)}}if(this.atomParsers[r.header.name])return this.atomParsers[r.header.name](o);gi(`No parser for atom path=${r.atomPath}, payload-len=${o}, ignoring atom`),await this.tokenizer.ignore(o)}getTrackDescription(){let r=[...this.tracks.values()];return r[r.length-1]}async addTag(r,o){await this.metadata.addTag(uLe,r,o)}addWarning(r){gi(`Warning: ${r}`),this.metadata.addWarning(r)}parseMetadataItemData(r){let o=r.header.name;return r.readAtoms(this.tokenizer,async(i,e)=>{let a=i.getPayloadLength(e);switch(i.header.name){case"data":return this.parseValueAtom(o,i);case"name":case"mean":case"rate":{let A=await this.tokenizer.readToken(new iD(a));o+=`:${A.name}`;break}default:{let A=await this.tokenizer.readToken(new ut(a));this.addWarning(`Unsupported meta-item: ${o}[${i.header.name}] => value=${fS(A)} ascii=${lr(A,"ascii")}`)}}},r.getPayloadLength(0))}async parseValueAtom(r,o){let i=await this.tokenizer.readToken(new aD(Number(o.header.length)-QI.len));if(i.type.set!==0)throw new Rs(`Unsupported type-set != 0: ${i.type.set}`);switch(i.type.type){case 0:switch(r){case"trkn":case"disk":{let e=uA.get(i.value,3),a=uA.get(i.value,5);await this.addTag(r,`${e}/${a}`);break}case"gnre":{let e=uA.get(i.value,1),a=Zp[e-1];await this.addTag(r,a);break}case"rate":{let e=lr(i.value,"ascii");await this.addTag(r,e);break}default:gi(`unknown proprietary value type for: ${o.atomPath}`)}break;case 1:case 18:await this.addTag(r,lr(i.value));break;case 13:if(this.options.skipCovers)break;await this.addTag(r,{format:"image/jpeg",data:Uint8Array.from(i.value)});break;case 14:if(this.options.skipCovers)break;await this.addTag(r,{format:"image/png",data:Uint8Array.from(i.value)});break;case 21:await this.addTag(r,n.read_BE_Integer(i.value,!0));break;case 22:await this.addTag(r,n.read_BE_Integer(i.value,!1));break;case 65:await this.addTag(r,uA.get(i.value,0));break;case 66:await this.addTag(r,PA.get(i.value,0));break;case 67:await this.addTag(r,Ue.get(i.value,0));break;default:this.addWarning(`atom key=${r}, has unknown well-known-type (data-type): ${i.type.type}`)}}async parseTrackBox(r){let o={media:{},fragments:[]};await r.readAtoms(this.tokenizer,async(i,e)=>{let a=i.getPayloadLength(e);switch(i.header.name){case"chap":{let A=await this.tokenizer.readToken(new ED(e));o.chapterList=A;break}case"tkhd":o.header=await this.tokenizer.readToken(new oD(a));break;case"hdlr":o.handler=await this.tokenizer.readToken(new pD(a)),o.isAudio=()=>o.handler.handlerType==="audi"||o.handler.handlerType==="soun",o.isVideo=()=>o.handler.handlerType==="vide",o.isAudio()?this.hasAudioTrack=!0:o.isVideo()&&(this.hasVideoTrack=!0);break;case"mdhd":{let A=await this.tokenizer.readToken(new tD(a));o.media.header=A;break}case"stco":{let A=await this.tokenizer.readToken(new gD(a));o.chunkOffsetTable=A.entries;break}case"stsc":{let A=await this.tokenizer.readToken(new sD(a));o.sampleToChunkTable=A.entries;break}case"stsd":{let A=await this.tokenizer.readToken(new ru(a));o.soundSampleDescription=A.table.map(t=>this.parseSoundSampleDescription(t));break}case"stts":{let A=await this.tokenizer.readToken(new nD(a));o.timeToSampleTable=A.entries;break}case"stsz":{let A=await this.tokenizer.readToken(new iu(a));o.sampleSize=A.sampleSize,o.sampleSizeTable=A.entries;break}case"dinf":case"vmhd":case"smhd":gi(`Ignoring: ${i.header.name}`),await this.tokenizer.ignore(a);break;default:gi(`Unexpected track box: ${i.header.name}`),await this.tokenizer.ignore(a)}},r.getPayloadLength(0)),this.tracks.set(o.header.trackId,o)}parseTrackFragmentBox(r){let o;return r.readAtoms(this.tokenizer,async(i,e)=>{let a=i.getPayloadLength(e);switch(i.header.name){case"tfhd":{let A=new ID(i.getPayloadLength(e));o=await this.tokenizer.readToken(A);break}case"tfdt":await this.tokenizer.ignore(a);break;case"trun":{let A=new lD(a),t=await this.tokenizer.readToken(A);o&&this.tracks.get(o.trackId)?.fragments.push({header:o,trackRun:t});break}default:gi(`Unexpected box: ${i.header.name}`),await this.tokenizer.ignore(a)}},r.getPayloadLength(0))}parseSoundSampleDescription(r){let o={dataFormat:r.dataFormat,dataReferenceIndex:r.dataReferenceIndex},i=0;if(r.description){let e=XP.get(r.description,i);i+=XP.len,e.version===0||e.version===1?o.description=f7.get(r.description,i):gi(`Warning: sound-sample-description ${e} not implemented`)}return o}async parseChapterTrack(r,o,i){if(!r.sampleSize&&r.chunkOffsetTable.length!==r.sampleSizeTable.length)throw new Error("Expected equal chunk-offset-table & sample-size-table length.");let e=[];for(let a=0;a0;++a){let A=r.timeToSampleTable.slice(0,a).reduce((E,B)=>E+B.duration,0),s=r.chunkOffsetTable[a]-this.tokenizer.position,g=r.sampleSize>0?r.sampleSize:r.sampleSizeTable[a];if(i-=s+g,i<0)throw new Rs("Chapter chunk exceeding token length");await this.tokenizer.ignore(s);let c=await this.tokenizer.readToken(new cD(g));gi(`Chapter ${a+1}: ${c}`);let I={title:c,timeScale:r.media.header?r.media.header.timeScale:0,start:A,sampleOffset:this.findSampleOffset(o,this.tokenizer.position)};gi(`Chapter title=${I.title}, offset=${I.sampleOffset}/${o.header.duration}`),e.push(I)}this.metadata.setFormat("chapters",e),await this.tokenizer.ignore(i)}findSampleOffset(r,o){let i=0;for(;i=o[i].firstChunk&&r{N7={parserType:"mp4",extensions:[".mp4",".m4a",".m4b",".m4pa","m4v","m4r","3gp",".mov",".movie",".qt"],mimeTypes:["audio/mp4","audio/m4a","video/m4v","video/mp4","video/quicktime"],async load(){return(await Promise.resolve().then(()=>(_7(),M7))).MP4Parser}}});var P7,R7,BLe,k7,v7,hD,G7=le(()=>{SA();P7=Je(at(),1);Kt();R7=(0,P7.default)("music-metadata:parser:musepack:sv8"),BLe=new je(2,"latin1"),k7={len:5,get:(n,r)=>({crc:ve.get(n,r),streamVersion:uA.get(n,r+4)})},v7={len:2,get:(n,r)=>({sampleFrequency:[44100,48e3,37800,32e3][qA(n,r,0,3)],maxUsedBands:qA(n,r,3,5),channelCount:qA(n,r+1,0,4)+1,msUsed:oa(n,r+1,4),audioBlockFrames:qA(n,r+1,5,3)})},hD=class{get tokenizer(){return this._tokenizer}set tokenizer(r){this._tokenizer=r}constructor(r){this._tokenizer=r}async readPacketHeader(){let r=await this.tokenizer.readToken(BLe),o=await this.readVariableSizeField();return{key:r,payloadLength:o.value-2-o.len}}async readStreamHeader(r){let o={};R7(`Reading SH at offset=${this.tokenizer.position}`);let i=await this.tokenizer.readToken(k7);r-=k7.len,Object.assign(o,i),R7(`SH.streamVersion = ${i.streamVersion}`);let e=await this.readVariableSizeField();r-=e.len,o.sampleCount=e.value;let a=await this.readVariableSizeField();r-=a.len,o.beginningOfSilence=a.value;let A=await this.tokenizer.readToken(v7);return r-=v7.len,Object.assign(o,A),await this.tokenizer.ignore(r),o}async readVariableSizeField(r=1,o=0){let i=await this.tokenizer.readNumber(uA);return(i&128)===0?{len:r,value:o+i}:(i&=127,i+=o,this.readVariableSizeField(r+1,i<<7))}}});var ks,dD=le(()=>{Ht();ks=class extends pt("Musepack"){}});var F7,QLe,uD,L7=le(()=>{F7=Je(at(),1);ni();CI();Fa();G7();dD();QLe=(0,F7.default)("music-metadata:parser:musepack"),uD=class extends Qt{constructor(){super(...arguments),this.audioLength=0}async parse(){if(await this.tokenizer.readToken(XA)!=="MPCK")throw new ks("Invalid Magic number");return this.metadata.setFormat("container","Musepack, SV8"),this.parsePacket()}async parsePacket(){let r=new hD(this.tokenizer);do{let o=await r.readPacketHeader();switch(QLe(`packet-header key=${o.key}, payloadLength=${o.payloadLength}`),o.key){case"SH":{let i=await r.readStreamHeader(o.payloadLength);this.metadata.setFormat("numberOfSamples",i.sampleCount),this.metadata.setFormat("sampleRate",i.sampleFrequency),this.metadata.setFormat("duration",i.sampleCount/i.sampleFrequency),this.metadata.setFormat("numberOfChannels",i.channelCount);break}case"AP":this.audioLength+=o.payloadLength,await this.tokenizer.ignore(o.payloadLength);break;case"RG":case"EI":case"SO":case"ST":case"CT":await this.tokenizer.ignore(o.payloadLength);break;case"SE":return this.metadata.format.duration&&this.metadata.setFormat("bitrate",this.audioLength*8/this.metadata.format.duration),EI(this.metadata,this.tokenizer,this.options);default:throw new ks(`Unexpected header: ${o.key}`)}}while(!0)}}});var BD,U7=le(()=>{SA();BD=class{constructor(r){this.pos=0,this.dword=null,this.tokenizer=r}async read(r){for(;this.dword===null;)this.dword=await this.tokenizer.readToken(ve);let o=this.dword;return this.pos+=r,this.pos<32?(o>>>=32-this.pos,o&(1<>>32-this.pos),o&(1<0){let e=32-this.pos;this.dword=null,r-=e,this.pos=0}let o=r%32,i=(r-o)/32;return await this.tokenizer.ignore(i*4),this.read(o)}}});var H7,K7=le(()=>{SA();Kt();Mn();H7={len:24,get:(n,r)=>{let o={signature:lr(n.subarray(r,r+3),"latin1"),streamMinorVersion:qA(n,r+3,0,4),streamMajorVersion:qA(n,r+3,4,4),frameCount:ve.get(n,r+4),maxLevel:yA.get(n,r+8),sampleFrequency:[44100,48e3,37800,32e3][qA(n,r+10,0,2)],link:qA(n,r+10,2,2),profile:qA(n,r+10,4,4),maxBand:qA(n,r+11,0,6),intensityStereo:oa(n,r+11,6),midSideStereo:oa(n,r+11,7),titlePeak:yA.get(n,r+12),titleGain:yA.get(n,r+14),albumPeak:yA.get(n,r+16),albumGain:yA.get(n,r+18),lastFrameLength:ve.get(n,r+20)>>>20&2047,trueGapless:oa(n,r+23,0)};return o.lastFrameLength=o.trueGapless?ve.get(n,20)>>>20&2047:0,o}}});var x7,Y7,fD,j7=le(()=>{x7=Je(at(),1);ni();CI();U7();K7();dD();Y7=(0,x7.default)("music-metadata:parser:musepack"),fD=class extends Qt{constructor(){super(...arguments),this.bitreader=null,this.audioLength=0,this.duration=null}async parse(){let r=await this.tokenizer.readToken(H7);if(r.signature!=="MP+")throw new ks("Unexpected magic number");Y7(`stream-version=${r.streamMajorVersion}.${r.streamMinorVersion}`),this.metadata.setFormat("container","Musepack, SV7"),this.metadata.setFormat("sampleRate",r.sampleFrequency);let o=1152*(r.frameCount-1)+r.lastFrameLength;this.metadata.setFormat("numberOfSamples",o),this.duration=o/r.sampleFrequency,this.metadata.setFormat("duration",this.duration),this.bitreader=new BD(this.tokenizer),this.metadata.setFormat("numberOfChannels",r.midSideStereo||r.intensityStereo?2:1);let i=await this.bitreader.read(8);return this.metadata.setFormat("codec",(i/100).toFixed(2)),await this.skipAudioData(r.frameCount),Y7(`End of audio stream, switching to APEv2, offset=${this.tokenizer.position}`),EI(this.metadata,this.tokenizer,this.options)}async skipAudioData(r){for(;r-- >0;){let i=await this.bitreader.read(20);this.audioLength+=20+i,await this.bitreader.ignore(i)}let o=await this.bitreader.read(11);this.audioLength+=o,this.duration!==null&&this.metadata.setFormat("bitrate",this.audioLength/this.duration)}}});var V7={};Qr(V7,{MusepackParser:()=>eG});var q7,J7,eG,z7=le(()=>{q7=Je(at(),1);SA();qd();L7();j7();dD();J7=(0,q7.default)("music-metadata:parser:musepack"),eG=class extends Gn{async postId3v2Parse(){let r=await this.tokenizer.peekToken(new je(3,"latin1")),o;switch(r){case"MP+":{J7("Stream-version 7"),o=new fD(this.metadata,this.tokenizer,this.options);break}case"MPC":{J7("Stream-version 8"),o=new uD(this.metadata,this.tokenizer,this.options);break}default:throw new ks("Invalid signature prefix")}return this.metadata.setAudioOnly(),o.parse()}}});var W7,Z7=le(()=>{W7={parserType:"musepack",extensions:[".mpc"],mimeTypes:["audio/musepack"],async load(){return(await Promise.resolve().then(()=>(z7(),V7))).MusepackParser}}});var nu,QD,AG=le(()=>{SA();Ht();nu=class extends pt("Opus"){},QD=class{constructor(r){if(r<19)throw new nu("ID-header-page 0 should be at least 19 bytes long");this.len=r}get(r,o){return{magicSignature:new je(8,"ascii").get(r,o+0),version:uA.get(r,o+8),channelCount:uA.get(r,o+9),preSkip:yA.get(r,o+10),inputSampleRate:ve.get(r,o+12),outputGain:yA.get(r,o+16),channelMapping:uA.get(r,o+18)}}}});var yD,X7=le(()=>{SA();$d();AG();AG();yD=class extends Fn{constructor(r,o,i){super(r,o),this.idHeader=null,this.lastPos=-1,this.tokenizer=i,this.durationOnLastPage=!0}parseFirstPage(r,o){if(this.metadata.setFormat("codec","Opus"),this.idHeader=new QD(o.length).get(o,0),this.idHeader.magicSignature!=="OpusHead")throw new nu("Illegal ogg/Opus magic-signature");this.metadata.setFormat("sampleRate",this.idHeader.inputSampleRate),this.metadata.setFormat("numberOfChannels",this.idHeader.channelCount),this.metadata.setAudioOnly()}async parseFullPage(r){switch(new je(8,"ascii").get(r,0)){case"OpusTags":await this.parseUserCommentList(r,8),this.lastPos=this.tokenizer.position-r.length;break;default:break}}calculateDuration(r){if(this.lastPageHeader&&(r||this.lastPageHeader.headerType.lastPage)&&this.metadata.format.sampleRate&&this.lastPageHeader.absoluteGranulePosition>=0){let o=this.lastPageHeader.absoluteGranulePosition-this.idHeader.preSkip;if(this.metadata.setFormat("numberOfSamples",o),this.metadata.setFormat("duration",o/48e3),this.lastPos!==-1&&this.tokenizer.fileInfo.size&&this.metadata.format.duration){let i=this.tokenizer.fileInfo.size-this.lastPos;this.metadata.setFormat("bitrate",8*i/this.metadata.format.duration)}}}}});var $7,e$=le(()=>{SA();Kt();$7={len:80,get:(n,r)=>({speex:new je(8,"ascii").get(n,r+0),version:SS(new je(20,"ascii").get(n,r+8)),version_id:$t.get(n,r+28),header_size:$t.get(n,r+32),rate:$t.get(n,r+36),mode:$t.get(n,r+40),mode_bitstream_version:$t.get(n,r+44),nb_channels:$t.get(n,r+48),bitrate:$t.get(n,r+52),frame_size:$t.get(n,r+56),vbr:$t.get(n,r+60),frames_per_packet:$t.get(n,r+64),extra_headers:$t.get(n,r+68),reserved1:$t.get(n,r+72),reserved2:$t.get(n,r+76)})}});var A$,DLe,mD,t$=le(()=>{A$=Je(at(),1);$d();e$();DLe=(0,A$.default)("music-metadata:parser:ogg:speex"),mD=class extends Fn{constructor(r,o,i){super(r,o)}parseFirstPage(r,o){DLe("First Ogg/Speex page");let i=$7.get(o,0);this.metadata.setFormat("codec",`Speex ${i.version}`),this.metadata.setFormat("numberOfChannels",i.nb_channels),this.metadata.setFormat("sampleRate",i.rate),i.bitrate!==-1&&this.metadata.setFormat("bitrate",i.bitrate),this.metadata.setAudioOnly()}}});var r$,a$=le(()=>{SA();r$={len:42,get:(n,r)=>({id:new je(7,"ascii").get(n,r),vmaj:uA.get(n,r+7),vmin:uA.get(n,r+8),vrev:uA.get(n,r+9),vmbw:PA.get(n,r+10),vmbh:PA.get(n,r+17),nombr:Br.get(n,r+37),nqual:uA.get(n,r+40)})}});var o$,i$,SD,n$=le(()=>{o$=Je(at(),1);a$();i$=(0,o$.default)("music-metadata:parser:ogg:theora"),SD=class{constructor(r,o,i){this.durationOnLastPage=!1,this.metadata=r}async parsePage(r,o){r.headerType.firstPage&&await this.parseFirstPage(r,o)}calculateDuration(){i$("duration calculation not implemented")}async parseFirstPage(r,o){i$("First Ogg/Theora page"),this.metadata.setFormat("codec","Theora");let i=r$.get(o,0);this.metadata.setFormat("bitrate",i.nombr),this.metadata.setFormat("hasVideo",!0)}flush(){return Promise.resolve()}}});var s$,DD,g$=le(()=>{SA();Kt();SA();s$={len:27,get:(n,r)=>({capturePattern:new je(4,"latin1").get(n,r),version:uA.get(n,r+4),headerType:{continued:kA(n,r+5,0),firstPage:kA(n,r+5,1),lastPage:kA(n,r+5,2)},absoluteGranulePosition:Number(fr.get(n,r+6)),streamSerialNumber:ve.get(n,r+14),pageSequenceNo:ve.get(n,r+18),pageChecksum:ve.get(n,r+22),page_segments:uA.get(n,r+26)})},DD=class n{static sum(r,o,i){let e=new DataView(r.buffer,0),a=0;for(let A=o;A{c$=Je(at(),1);xP();jP();Fa();WS();tG=(0,c$.default)("music-metadata:parser:ogg:theora"),wD=class{constructor(r,o,i){this.durationOnLastPage=!1,this.metadata=r,this.options=o,this.tokenizer=i,this.flacParser=new tu(this.metadata,this.tokenizer,o)}async parsePage(r,o){r.headerType.firstPage&&await this.parseFirstPage(r,o)}calculateDuration(){tG("duration calculation not implemented")}async parseFirstPage(r,o){if(tG("First Ogg/FLAC page"),(await XA.get(o,9)).toString()!=="fLaC")throw new Error("Invalid FLAC preamble");let e=await eu.get(o,13);await this.parseDataBlock(e,o.subarray(13+eu.len))}async parseDataBlock(r,o){switch(tG(`blockHeader type=${r.type}, length=${r.length}`),r.type){case Ua.STREAMINFO:{let i=Au.get(o,0);return this.flacParser.processsStreamInfo(i)}case Ua.PADDING:break;case Ua.APPLICATION:break;case Ua.SEEKTABLE:break;case Ua.VORBIS_COMMENT:return this.flacParser.parseComment(o);case Ua.PICTURE:if(!this.options.skipCovers){let i=new zg(o.length).get(o,0);return this.flacParser.addPictureTag(i)}break;default:this.metadata.addWarning(`Unknown block type: ${r.type}`)}return this.tokenizer.ignore(r.length).then()}flush(){return Promise.resolve()}}});var p$={};Qr(p$,{OggContentError:()=>lE,OggParser:()=>aG});var l$,lE,Un,rG,aG,E$=le(()=>{SA();go();l$=Je(at(),1);ni();$d();X7();t$();n$();Ht();g$();I$();lE=class extends pt("Ogg"){},Un=(0,l$.default)("music-metadata:parser:ogg"),rG=class{constructor(r,o,i){this.pageNumber=0,this.closed=!1,this.metadata=r,this.streamSerial=o,this.options=i}async parsePage(r,o){this.pageNumber=o.pageSequenceNo,Un("serial=%s page#=%s, Ogg.id=%s",o.streamSerialNumber,o.pageSequenceNo,o.capturePattern);let i=await r.readToken(new DD(o));Un("totalPageSize=%s",i.totalPageSize);let e=await r.readToken(new ut(i.totalPageSize));if(Un("firstPage=%s, lastPage=%s, continued=%s",o.headerType.firstPage,o.headerType.lastPage,o.headerType.continued),o.headerType.firstPage){this.metadata.setFormat("container","Ogg");let a=e.subarray(0,7),A=Array.from(a).filter(t=>t>=32&&t<=126).map(t=>String.fromCharCode(t)).join("");switch(A){case"vorbis":Un(`Set Ogg stream serial ${o.streamSerialNumber}, codec=Vorbis`),this.pageConsumer=new Fn(this.metadata,this.options);break;case"OpusHea":Un("Set page consumer to Ogg/Opus"),this.pageConsumer=new yD(this.metadata,this.options,r);break;case"Speex ":Un("Set page consumer to Ogg/Speex"),this.pageConsumer=new mD(this.metadata,this.options,r);break;case"fishead":case"theora":Un("Set page consumer to Ogg/Theora"),this.pageConsumer=new SD(this.metadata,this.options,r);break;case"FLAC":Un("Set page consumer to Vorbis"),this.pageConsumer=new wD(this.metadata,this.options,r);break;default:throw new lE(`Ogg codec not recognized (id=${A}`)}}if(o.headerType.lastPage&&(this.closed=!0),this.pageConsumer)await this.pageConsumer.parsePage(o,e);else throw new Error("pageConsumer should be initialized")}},aG=class extends Qt{constructor(){super(...arguments),this.streams=new Map}async parse(){this.streams=new Map;let r=!1,o;try{do{if(o=await this.tokenizer.readToken(s$),o.capturePattern!=="OggS")throw new lE("Invalid Ogg capture pattern");let i=this.streams.get(o.streamSerialNumber);if(i||(i=new rG(this.metadata,o.streamSerialNumber,this.options),this.streams.set(o.streamSerialNumber,i)),await i.parsePage(this.tokenizer,o),i.pageNumber>12&&!(this.options.duration&&[...this.streams.values()].find(e=>e.pageConsumer?.durationOnLastPage))){Un("Stop processing Ogg stream");break}}while(![...this.streams.values()].every(i=>i.closed))}catch(i){if(i instanceof NA)Un("Reached end-of-stream"),r=!0;else if(i instanceof lE)this.metadata.addWarning(`Corrupt Ogg content at ${this.tokenizer.position}`);else throw i}for(let i of this.streams.values())i.closed||(this.metadata.addWarning(`End-of-stream reached before reaching last page in Ogg stream serial=${i.streamSerial}`),await i.pageConsumer?.flush()),i.pageConsumer?.calculateDuration(r)}}});var C$,h$=le(()=>{C$={parserType:"ogg",extensions:[".ogg",".ogv",".oga",".ogm",".ogx",".opus",".spx"],mimeTypes:["audio/ogg","audio/opus","audio/speex","video/ogg"],async load(){return(await Promise.resolve().then(()=>(E$(),p$))).OggParser}}});function Hn(n,r){return OD(n,r,1)===1}function OD(n,r,o){return n>>>r&4294967295>>>32-o}var wLe,su,bD,d$=le(()=>{SA();Fa();wLe=[6e3,8e3,9600,11025,12e3,16e3,22050,24e3,32e3,44100,48e3,64e3,88200,96e3,192e3,-1],su={len:32,get:(n,r)=>{let o=ve.get(n,r+24),i={BlockID:XA.get(n,r),blockSize:ve.get(n,r+4),version:yA.get(n,r+8),totalSamples:ve.get(n,r+12),blockIndex:ve.get(n,r+16),blockSamples:ve.get(n,r+20),flags:{bitsPerSample:(1+OD(o,0,2))*8,isMono:Hn(o,2),isHybrid:Hn(o,3),isJointStereo:Hn(o,4),crossChannel:Hn(o,5),hybridNoiseShaping:Hn(o,6),floatingPoint:Hn(o,7),samplingRate:wLe[OD(o,23,4)],isDSD:Hn(o,31)},crc:new ut(4).get(n,r+28)};return i.flags.isDSD&&(i.totalSamples*=8),i}},bD={len:1,get:(n,r)=>({functionId:OD(n[r],0,6),isOptional:Hn(n[r],5),isOddSize:Hn(n[r],6),largeBlock:Hn(n[r],7)})}});var B$={};Qr(B$,{WavPackContentError:()=>pE,WavPackParser:()=>iG});var u$,yI,pE,iG,f$=le(()=>{SA();CI();Fa();ni();d$();u$=Je(at(),1);Gd();Ht();yI=(0,u$.default)("music-metadata:parser:WavPack"),pE=class extends pt("WavPack"){},iG=class extends Qt{constructor(){super(...arguments),this.audioDataSize=0}async parse(){return this.metadata.setAudioOnly(),this.audioDataSize=0,await this.parseWavPackBlocks(),EI(this.metadata,this.tokenizer,this.options)}async parseWavPackBlocks(){do{if(await this.tokenizer.peekToken(XA)!=="wvpk")break;let o=await this.tokenizer.readToken(su);if(o.BlockID!=="wvpk")throw new pE("Invalid WavPack Block-ID");yI(`WavPack header blockIndex=${o.blockIndex}, len=${su.len}`),o.blockIndex===0&&!this.metadata.format.container&&(this.metadata.setFormat("container","WavPack"),this.metadata.setFormat("lossless",!o.flags.isHybrid),this.metadata.setFormat("bitsPerSample",o.flags.bitsPerSample),o.flags.isDSD||(this.metadata.setFormat("sampleRate",o.flags.samplingRate),this.metadata.setFormat("duration",o.totalSamples/o.flags.samplingRate)),this.metadata.setFormat("numberOfChannels",o.flags.isMono?1:2),this.metadata.setFormat("numberOfSamples",o.totalSamples),this.metadata.setFormat("codec",o.flags.isDSD?"DSD":"PCM"));let i=o.blockSize-(su.len-8);await(o.blockIndex===0?this.parseMetadataSubBlock(o,i):this.tokenizer.ignore(i)),o.blockSamples>0&&(this.audioDataSize+=o.blockSize)}while(!this.tokenizer.fileInfo.size||this.tokenizer.fileInfo.size-this.tokenizer.position>=su.len);this.metadata.format.duration&&this.metadata.setFormat("bitrate",this.audioDataSize*8/this.metadata.format.duration)}async parseMetadataSubBlock(r,o){let i=o;for(;i>bD.len;){let e=await this.tokenizer.readToken(bD),a=await this.tokenizer.readNumber(e.largeBlock?Rd:uA),A=new Uint8Array(a*2-(e.isOddSize?1:0));switch(await this.tokenizer.readBuffer(A),yI(`Metadata Sub-Blocks functionId=0x${e.functionId.toString(16)}, id.largeBlock=${e.largeBlock},data-size=${A.length}`),e.functionId){case 0:break;case 14:{yI("ID_DSD_BLOCK");let t=1<{Q$={parserType:"wavpack",extensions:[".wv",".wvp"],mimeTypes:["audio/wavpack"],async load(){return(await Promise.resolve().then(()=>(f$(),B$))).WavPackParser}}});var EE,MD,m$=le(()=>{SA();EE={len:8,get:(n,r)=>({chunkID:new je(4,"latin1").get(n,r),chunkSize:ve.get(n,r+4)})},MD=class{constructor(r){this.tagHeader=r,this.len=r.chunkSize,this.len+=this.len&1}get(r,o){return new je(this.tagHeader.chunkSize,"ascii").get(r,o)}}});var mI,zr,S$,_D,ND,oG=le(()=>{SA();Ht();mI=class extends pt("Wave"){},zr={PCM:1,ADPCM:2,IEEE_FLOAT:3,ALAW:6,MULAW:7,DVI_ADPCM:17,GSM610:49,MPEG_ADTS_AAC:5632,MPEG_LOAS:5634,RAW_AAC1:255,DOLBY_AC3_SPDIF:146,DVM:8192,RAW_SPORT:576,ESST_AC3:577,DRM:9,DTS2:8193,MPEG:80,MPEGLAYER3:85},S$={[zr.PCM]:"PCM",[zr.ADPCM]:"ADPCM",[zr.IEEE_FLOAT]:"IEEE_FLOAT",[zr.ALAW]:"ALAW",[zr.MULAW]:"MULAW",[zr.DVI_ADPCM]:"DVI_ADPCM",[zr.GSM610]:"GSM610",[zr.MPEG_ADTS_AAC]:"MPEG_ADTS_AAC",[zr.MPEG_LOAS]:"MPEG_LOAS",[zr.RAW_AAC1]:"RAW_AAC1",[zr.DOLBY_AC3_SPDIF]:"DOLBY_AC3_SPDIF",[zr.DVM]:"DVM",[zr.RAW_SPORT]:"RAW_SPORT",[zr.ESST_AC3]:"ESST_AC3",[zr.DRM]:"DRM",[zr.DTS2]:"DTS2",[zr.MPEG]:"MPEG",[zr.MPEGLAYER3]:"MPEGLAYER3"},_D=class{constructor(r){if(r.chunkSize<16)throw new mI("Invalid chunk size");this.len=r.chunkSize}get(r,o){return{wFormatTag:yA.get(r,o),nChannels:yA.get(r,o+2),nSamplesPerSec:ve.get(r,o+4),nAvgBytesPerSec:ve.get(r,o+8),nBlockAlign:yA.get(r,o+12),wBitsPerSample:yA.get(r,o+14)}}},ND=class{constructor(r){if(r.chunkSize<4)throw new mI("Invalid fact chunk size.");this.len=r.chunkSize}get(r,o){return{dwSampleLength:ve.get(r,o)}}}});var nG,D$=le(()=>{SA();Kt();nG={len:420,get:(n,r)=>({description:po(new je(256,"ascii").get(n,r)).trim(),originator:po(new je(32,"ascii").get(n,r+256)).trim(),originatorReference:po(new je(32,"ascii").get(n,r+288)).trim(),originationDate:po(new je(10,"ascii").get(n,r+320)).trim(),originationTime:po(new je(8,"ascii").get(n,r+330)).trim(),timeReferenceLow:ve.get(n,r+338),timeReferenceHigh:ve.get(n,r+342),version:yA.get(n,r+346),umid:new ut(64).get(n,r+348),loudnessValue:yA.get(n,r+412),maxTruePeakLevel:yA.get(n,r+414),maxMomentaryLoudness:yA.get(n,r+416),maxShortTermLoudness:yA.get(n,r+418)})}});var O$={};Qr(O$,{WaveParser:()=>sG});var w$,Wg,sG,b$=le(()=>{go();SA();w$=Je(at(),1);m$();oG();Xp();Kt();Fa();ni();D$();oG();Wg=(0,w$.default)("music-metadata:parser:RIFF"),sG=class extends Qt{constructor(){super(...arguments),this.blockAlign=0,this.avgBytesPerSec=0}async parse(){let r=await this.tokenizer.readToken(EE);if(Wg(`pos=${this.tokenizer.position}, parse: chunkID=${r.chunkID}`),r.chunkID==="RIFF")return this.metadata.setAudioOnly(),this.parseRiffChunk(r.chunkSize).catch(o=>{if(!(o instanceof NA))throw o})}async parseRiffChunk(r){let o=await this.tokenizer.readToken(XA);switch(this.metadata.setFormat("container",o),o){case"WAVE":return this.readWaveChunk(r-XA.len);default:throw new mI(`Unsupported RIFF format: RIFF/${o}`)}}async readWaveChunk(r){for(;r>=EE.len;){let o=await this.tokenizer.readToken(EE);switch(r-=EE.len+o.chunkSize,o.chunkSize>r&&this.metadata.addWarning("Data chunk size exceeds file size"),this.header=o,Wg(`pos=${this.tokenizer.position}, readChunk: chunkID=RIFF/WAVE/${o.chunkID}`),o.chunkID){case"LIST":await this.parseListTag(o);break;case"fact":this.metadata.setFormat("lossless",!1),this.fact=await this.tokenizer.readToken(new ND(o));break;case"fmt ":{let i=await this.tokenizer.readToken(new _D(o)),e=S$[i.wFormatTag];e||(Wg(`WAVE/non-PCM format=${i.wFormatTag}`),e=`non-PCM (${i.wFormatTag})`),this.metadata.setFormat("codec",e),this.metadata.setFormat("bitsPerSample",i.wBitsPerSample),this.metadata.setFormat("sampleRate",i.nSamplesPerSec),this.metadata.setFormat("numberOfChannels",i.nChannels),this.blockAlign=i.nBlockAlign,this.avgBytesPerSec=i.nAvgBytesPerSec;break}case"id3 ":case"ID3 ":{let i=await this.tokenizer.readToken(new ut(o.chunkSize)),e=Mi(i);await new ho().parse(this.metadata,e,this.options);break}case"data":{this.metadata.format.lossless!==!1&&this.metadata.setFormat("lossless",!0);let i=o.chunkSize;if(this.tokenizer.fileInfo.size){let a=this.tokenizer.fileInfo.size-this.tokenizer.position;a0?this.metadata.setFormat("bitrate",this.avgBytesPerSec*8):this.metadata.format.duration&&this.metadata.setFormat("bitrate",i*8/this.metadata.format.duration),await this.tokenizer.ignore(o.chunkSize);break}case"bext":{let i=await this.tokenizer.readToken(nG);Object.keys(i).forEach(a=>{this.metadata.addTag("exif",`bext.${a}`,i[a])});let e=o.chunkSize-nG.len;await this.tokenizer.ignore(e);break}case"\0\0\0\0":Wg(`Ignore padding chunk: RIFF/${o.chunkID} of ${o.chunkSize} bytes`),this.metadata.addWarning(`Ignore chunk: RIFF/${o.chunkID}`),await this.tokenizer.ignore(o.chunkSize);break;default:Wg(`Ignore chunk: RIFF/${o.chunkID} of ${o.chunkSize} bytes`),this.metadata.addWarning(`Ignore chunk: RIFF/${o.chunkID}`),await this.tokenizer.ignore(o.chunkSize)}this.header.chunkSize%2===1&&(Wg("Read odd padding byte"),await this.tokenizer.ignore(1))}}async parseListTag(r){let o=await this.tokenizer.readToken(new je(4,"latin1"));switch(Wg("pos=%s, parseListTag: chunkID=RIFF/WAVE/LIST/%s",this.tokenizer.position,o),o){case"INFO":return this.parseRiffInfoTags(r.chunkSize-4);default:return this.metadata.addWarning(`Ignore chunk: RIFF/WAVE/LIST/${o}`),Wg(`Ignoring chunkID=RIFF/WAVE/LIST/${o}`),this.tokenizer.ignore(r.chunkSize-4).then()}}async parseRiffInfoTags(r){for(;r>=8;){let o=await this.tokenizer.readToken(EE),i=new MD(o),e=await this.tokenizer.readToken(i);this.addTag(o.chunkID,po(e)),r-=8+i.len}if(r!==0)throw new mI(`Illegal remaining size: ${r}`)}addTag(r,o){this.metadata.addTag("exif",r,o)}}});var M$,_$=le(()=>{M$={parserType:"riff",extensions:[".wav","wave",".bwf"],mimeTypes:["audio/vnd.wave","audio/wav","audio/wave"],async load(){return(await Promise.resolve().then(()=>(b$(),O$))).WaveParser}}});function MLe(n){let r=N$.default.parse(n),o=Q9(r.type);return{type:o.type,subtype:o.subtype,suffix:o.suffix,parameters:r.parameters}}function _Le(n){let r=n.lastIndexOf(".");return r===-1?"":n.substring(r)}var N$,T$,SI,DI,gG=le(()=>{cP();N$=Je(f9(),1);y9();T$=Je(at(),1);x9();lI();dX();Ht();BX();TX();FX();jX();$X();o7();h7();T7();Z7();h$();y$();_$();TD();SI=(0,T$.default)("music-metadata:parser:factory");DI=class{constructor(){this.parsers=[],[i7,hX,uX,N7,C7,M$,C$,NX,xX,Q$,W7,XX,GX].forEach(r=>{this.registerParser(r)})}registerParser(r){this.parsers.push(r)}async parse(r,o,i){if(r.supportsRandomAccess()?(SI("tokenizer supports random-access, scanning for appending headers"),await cG(r,i)):SI("tokenizer does not support random-access, cannot scan for appending headers"),!o){let t=new Uint8Array(4100);if(r.fileInfo.mimeType&&(o=this.findLoaderForContentType(r.fileInfo.mimeType)),!o&&r.fileInfo.path&&(o=this.findLoaderForExtension(r.fileInfo.path)),!o){SI("Guess parser on content..."),await r.peekBuffer(t,{mayBeLess:!0});let s=await Ud(t,{mpegOffsetTolerance:10});if(!s||!s.mime)throw new Ug("Failed to determine audio format");if(SI(`Guessed file type is mime=${s.mime}, extension=${s.ext}`),o=this.findLoaderForContentType(s.mime),!o)throw new Hg(`Guessed MIME-type not supported: ${s.mime}`)}}SI(`Loading ${o.parserType} parser...`);let e=new GS(i),a=await o.load(),A=new a(e,r,i??{});return SI(`Parser ${o.parserType} loaded`),await A.parse(),e.format.trackInfo&&(e.format.hasAudio===void 0&&e.setFormat("hasAudio",!!e.format.trackInfo.find(t=>t.type===qr.audio)),e.format.hasVideo===void 0&&e.setFormat("hasVideo",!!e.format.trackInfo.find(t=>t.type===qr.video))),e.toCommonMetadata()}findLoaderForExtension(r){if(!r)return;let o=_Le(r).toLocaleLowerCase()||r;return this.parsers.find(i=>i.extensions.indexOf(o)!==-1)}findLoaderForContentType(r){let o;if(!r)return;try{o=MLe(r)}catch{SI(`Invalid HTTP Content-Type header value: ${r}`);return}let i=o.subtype.indexOf("x-")===0?o.subtype.substring(2):o.subtype;return this.parsers.find(e=>e.mimeTypes.find(a=>a.indexOf(`${o.type}/${i}`)!==-1))}getSupportedMimeTypes(){let r=new Set;return this.parsers.forEach(o=>{o.mimeTypes.forEach(i=>{r.add(i),r.add(i.replace("/","/x-"))})}),Array.from(r)}}});async function R$(n){let r=n.fileInfo.size;if(r>=143){let o=new Uint8Array(15),i=n.position;await n.readBuffer(o,{position:r-143}),n.setPosition(i);let e=lr(o,"latin1");if(e.substring(6)===NLe)return Number.parseInt(e.substring(0,6),10)+15}return 0}var NLe,k$=le(()=>{Mn();NLe="LYRICS200"});async function TLe(n,r={}){let o=pS(n);try{return await CE(o,r)}finally{await o.close()}}async function RLe(n,r,o={}){let i=lS(n,{fileInfo:typeof r=="string"?{mimeType:r}:r});try{return await CE(i,o)}finally{await i.close()}}async function kLe(n,r,o={}){let i=Mi(n,{fileInfo:typeof r=="string"?{mimeType:r}:r});return CE(i,o)}function CE(n,r){return new DI().parse(n,void 0,r)}function vLe(n){let r={};for(let{id:o,value:i}of n)(r[o]||(r[o]=[])).push(i);return r}function PLe(n){return n===void 0?0:1+Math.round(n*4)}function GLe(n){return n?n.reduce((r,o)=>o.name&&o.name.toLowerCase()in["front","cover","cover (front)"]?o:r):null}async function cG(n,r={}){let o=n.fileInfo.size;if(await $9(n)){o-=128;let i=await R$(n);o-=i}r.apeHeader=await xg.findApeFooterOffset(n,o)}function FLe(){return new DI().getSupportedMimeTypes()}var TD=le(()=>{go();gG();CI();xd();k$();lI();Ht();Ht()});var G$={};Qr(G$,{CouldNotDetermineFileTypeError:()=>Ug,FieldDecodingError:()=>lo,InternalParserError:()=>II,LyricsContentType:()=>Jp,TimestampFormat:()=>qp,UnsupportedFileTypeError:()=>Hg,getSupportedMimeTypes:()=>FLe,makeParseError:()=>xp,makeUnexpectedFileContentError:()=>pt,orderTags:()=>vLe,parseBlob:()=>TLe,parseBuffer:()=>kLe,parseFile:()=>ULe,parseFromTokenizer:()=>CE,parseStream:()=>LLe,parseWebStream:()=>RLe,ratingToStars:()=>PLe,scanAppendingHeaders:()=>cG,selectCover:()=>GLe});async function LLe(n,r,o={}){let i=await Wv(n,{fileInfo:typeof r=="string"?{mimeType:r}:r});try{return await CE(i,o)}finally{await i.close()}}async function ULe(n,r={}){v$(`parseFile: ${n}`);let o=await kZ(n),i=new DI;try{let e=i.findLoaderForExtension(n);e||v$("Parser could not be determined by file extension");try{return await i.parse(o,e,r)}catch(a){throw(a instanceof Ug||a instanceof Hg)&&(a.message+=`: ${n}`),a}}finally{await o.close()}}var P$,v$,F$=le(()=>{go();P$=Je(at(),1);TD();gG();TD();v$=(0,P$.default)("music-metadata:parser")});var $ee=W((DCA,YG)=>{"use strict";var z2e=Object.prototype.hasOwnProperty,Ha="~";function Qu(){}Object.create&&(Qu.prototype=Object.create(null),new Qu().__proto__||(Ha=!1));function W2e(n,r,o){this.fn=n,this.context=r,this.once=o||!1}function Xee(n,r,o,i,e){if(typeof o!="function")throw new TypeError("The listener must be a function");var a=new W2e(o,i||n,e),A=Ha?Ha+r:r;return n._events[A]?n._events[A].fn?n._events[A]=[n._events[A],a]:n._events[A].push(a):(n._events[A]=a,n._eventsCount++),n}function JD(n,r){--n._eventsCount===0?n._events=new Qu:delete n._events[r]}function ba(){this._events=new Qu,this._eventsCount=0}ba.prototype.eventNames=function(){var r=[],o,i;if(this._eventsCount===0)return r;for(i in o=this._events)z2e.call(o,i)&&r.push(Ha?i.slice(1):i);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(o)):r};ba.prototype.listeners=function(r){var o=Ha?Ha+r:r,i=this._events[o];if(!i)return[];if(i.fn)return[i.fn];for(var e=0,a=i.length,A=new Array(a);e{"use strict";var Du=n=>n&&typeof n.message=="string",rF=n=>{if(!n)return;let r=n.cause;if(typeof r=="function"){let o=n.cause();return Du(o)?o:void 0}else return Du(r)?r:void 0},OAe=(n,r)=>{if(!Du(n))return"";let o=n.stack||"";if(r.has(n))return o+` causes have become circular...`;let i=rF(n);return i?(r.add(n),o+` -caused by: `+OAe(i,r)):o},MUe=n=>OAe(n,new Set),bAe=(n,r,o)=>{if(!Du(n))return"";let i=o?"":n.message||"";if(r.has(n))return i+": ...";let e=rF(n);if(e){r.add(n);let a=typeof n.cause=="function";return i+(a?"":": ")+bAe(e,r,a)}else return i},_Ue=n=>bAe(n,new Set);MAe.exports={isErrorLike:Du,getErrorCause:rF,stackWithCauses:MUe,messageWithCauses:_Ue}});var iF=W((ZdA,NAe)=>{"use strict";var NUe=Symbol("circular-ref-tag"),aw=Symbol("pino-raw-err-ref"),_Ae=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},aggregateErrors:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[aw]},set:function(n){this[aw]=n}}});Object.defineProperty(_Ae,aw,{writable:!0,value:{}});NAe.exports={pinoErrProto:_Ae,pinoErrorSymbols:{seen:NUe,rawSymbol:aw}}});var kAe=W((XdA,RAe)=>{"use strict";RAe.exports=nF;var{messageWithCauses:TUe,stackWithCauses:RUe,isErrorLike:TAe}=aF(),{pinoErrProto:kUe,pinoErrorSymbols:vUe}=iF(),{seen:oF}=vUe,{toString:PUe}=Object.prototype;function nF(n){if(!TAe(n))return n;n[oF]=void 0;let r=Object.create(kUe);r.type=PUe.call(n.constructor)==="[object Function]"?n.constructor.name:n.name,r.message=TUe(n),r.stack=RUe(n),Array.isArray(n.errors)&&(r.aggregateErrors=n.errors.map(o=>nF(o)));for(let o in n)if(r[o]===void 0){let i=n[o];TAe(i)?o!=="cause"&&!Object.prototype.hasOwnProperty.call(i,oF)&&(r[o]=nF(i)):r[o]=i}return delete n[oF],r.raw=n,r}});var PAe=W(($dA,vAe)=>{"use strict";vAe.exports=ow;var{isErrorLike:sF}=aF(),{pinoErrProto:GUe,pinoErrorSymbols:FUe}=iF(),{seen:iw}=FUe,{toString:LUe}=Object.prototype;function ow(n){if(!sF(n))return n;n[iw]=void 0;let r=Object.create(GUe);r.type=LUe.call(n.constructor)==="[object Function]"?n.constructor.name:n.name,r.message=n.message,r.stack=n.stack,Array.isArray(n.errors)&&(r.aggregateErrors=n.errors.map(o=>ow(o))),sF(n.cause)&&!Object.prototype.hasOwnProperty.call(n.cause,iw)&&(r.cause=ow(n.cause));for(let o in n)if(r[o]===void 0){let i=n[o];sF(i)?Object.prototype.hasOwnProperty.call(i,iw)||(r[o]=ow(i)):r[o]=i}return delete n[iw],r.raw=n,r}});var UAe=W((euA,LAe)=>{"use strict";LAe.exports={mapHttpRequest:UUe,reqSerializer:FAe};var gF=Symbol("pino-raw-req-ref"),GAe=Object.create({},{id:{enumerable:!0,writable:!0,value:""},method:{enumerable:!0,writable:!0,value:""},url:{enumerable:!0,writable:!0,value:""},query:{enumerable:!0,writable:!0,value:""},params:{enumerable:!0,writable:!0,value:""},headers:{enumerable:!0,writable:!0,value:{}},remoteAddress:{enumerable:!0,writable:!0,value:""},remotePort:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[gF]},set:function(n){this[gF]=n}}});Object.defineProperty(GAe,gF,{writable:!0,value:{}});function FAe(n){let r=n.info||n.socket,o=Object.create(GAe);if(o.id=typeof n.id=="function"?n.id():n.id||(n.info?n.info.id:void 0),o.method=n.method,n.originalUrl)o.url=n.originalUrl;else{let i=n.path;o.url=typeof i=="string"?i:n.url?n.url.path||n.url:void 0}return n.query&&(o.query=n.query),n.params&&(o.params=n.params),o.headers=n.headers,o.remoteAddress=r&&r.remoteAddress,o.remotePort=r&&r.remotePort,o.raw=n.raw||n,o}function UUe(n){return{req:FAe(n)}}});var xAe=W((AuA,YAe)=>{"use strict";YAe.exports={mapHttpResponse:HUe,resSerializer:KAe};var cF=Symbol("pino-raw-res-ref"),HAe=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[cF]},set:function(n){this[cF]=n}}});Object.defineProperty(HAe,cF,{writable:!0,value:{}});function KAe(n){let r=Object.create(HAe);return r.statusCode=n.headersSent?n.statusCode:null,r.headers=n.getHeaders?n.getHeaders():n._headers,r.raw=n,r}function HUe(n){return{res:KAe(n)}}});var lF=W((tuA,jAe)=>{"use strict";var IF=kAe(),KUe=PAe(),nw=UAe(),sw=xAe();jAe.exports={err:IF,errWithCause:KUe,mapHttpRequest:nw.mapHttpRequest,mapHttpResponse:sw.mapHttpResponse,req:nw.reqSerializer,res:sw.resSerializer,wrapErrorSerializer:function(r){return r===IF?r:function(i){return r(IF(i))}},wrapRequestSerializer:function(r){return r===nw.reqSerializer?r:function(i){return r(nw.reqSerializer(i))}},wrapResponseSerializer:function(r){return r===sw.resSerializer?r:function(i){return r(sw.resSerializer(i))}}}});var pF=W((ruA,JAe)=>{"use strict";function YUe(n,r){return r}JAe.exports=function(){let r=Error.prepareStackTrace;Error.prepareStackTrace=YUe;let o=new Error().stack;if(Error.prepareStackTrace=r,!Array.isArray(o))return;let i=o.slice(2),e=[];for(let a of i)a&&e.push(a.getFileName());return e}});var XAe=W((auA,ZAe)=>{"use strict";function EF(n){if(n===null||typeof n!="object")return n;if(n instanceof Date)return new Date(n.getTime());if(n instanceof Array){let r=[];for(let o=0;o{let Q=[...s.slice(0,I),...f];return o(B,Q)}:o,e,a);else if(a)zAe(c,t);else{let E=typeof o=="function"?o(jUe(c,t),[...s.slice(0,I),...t]):o;VAe(c,t,E)}}if(A.length===0)g(n,0);else{let c=n;for(let I=0;I0)o?a===i&&(o=!1,i=""):(o=!0,i=a);else if(a==="["&&!o)r++;else if(a==="]"&&!o&&(r--,r<0))throw new Error(`Invalid redaction path (${n})`)}if(r!==0)throw new Error(`Invalid redaction path (${n})`)}function ZUe(n){if(!Array.isArray(n))throw new TypeError("paths must be an array");for(let r of n)WUe(r)}function XUe(n={}){let{paths:r=[],censor:o="[REDACTED]",serialize:i=JSON.stringify,strict:e=!0,remove:a=!1}=n;ZUe(r);let A=VUe(r);return function(s){if(e&&(s===null||typeof s!="object")&&(s==null||typeof s!="object"))return i?i(s):s;let g=zUe(s,A),c=s,I=o;return typeof o=="function"&&(I=o),JUe(g,r,I,a),i===!1?(g.restore=function(){return EF(c)},g):typeof i=="function"?i(g):JSON.stringify(g)}}ZAe.exports=XUe});var bE=W((iuA,$Ae)=>{"use strict";var $Ue=Symbol("pino.setLevel"),eHe=Symbol("pino.getLevel"),AHe=Symbol("pino.levelVal"),tHe=Symbol("pino.levelComp"),rHe=Symbol("pino.useLevelLabels"),aHe=Symbol("pino.useOnlyCustomLevels"),iHe=Symbol("pino.mixin"),oHe=Symbol("pino.lsCache"),nHe=Symbol("pino.chindings"),sHe=Symbol("pino.asJson"),gHe=Symbol("pino.write"),cHe=Symbol("pino.redactFmt"),IHe=Symbol("pino.time"),lHe=Symbol("pino.timeSliceIndex"),pHe=Symbol("pino.stream"),EHe=Symbol("pino.stringify"),CHe=Symbol("pino.stringifySafe"),hHe=Symbol("pino.stringifiers"),dHe=Symbol("pino.end"),uHe=Symbol("pino.formatOpts"),BHe=Symbol("pino.messageKey"),fHe=Symbol("pino.errorKey"),QHe=Symbol("pino.nestedKey"),yHe=Symbol("pino.nestedKeyStr"),mHe=Symbol("pino.mixinMergeStrategy"),SHe=Symbol("pino.msgPrefix"),DHe=Symbol("pino.wildcardFirst"),wHe=Symbol.for("pino.serializers"),OHe=Symbol.for("pino.formatters"),bHe=Symbol.for("pino.hooks"),MHe=Symbol.for("pino.metadata");$Ae.exports={setLevelSym:$Ue,getLevelSym:eHe,levelValSym:AHe,levelCompSym:tHe,useLevelLabelsSym:rHe,mixinSym:iHe,lsCacheSym:oHe,chindingsSym:nHe,asJsonSym:sHe,writeSym:gHe,serializersSym:wHe,redactFmtSym:cHe,timeSym:IHe,timeSliceIndexSym:lHe,streamSym:pHe,stringifySym:EHe,stringifySafeSym:CHe,stringifiersSym:hHe,endSym:dHe,formatOptsSym:uHe,messageKeySym:BHe,errorKeySym:fHe,nestedKeySym:QHe,wildcardFirstSym:DHe,needsMetadataGsym:MHe,useOnlyCustomLevelsSym:aHe,formattersSym:OHe,hooksSym:bHe,nestedKeyStrSym:yHe,mixinMergeStrategySym:mHe,msgPrefixSym:SHe}});var hF=W((ouA,rte)=>{"use strict";var ete=XAe(),{redactFmtSym:_He,wildcardFirstSym:cw}=bE(),CF=/[^.[\]]+|\[([^[\]]*?)\]/g,Ate="[Redacted]",tte=!1;function NHe(n,r){let{paths:o,censor:i,remove:e}=THe(n),a=o.reduce((s,g)=>{CF.lastIndex=0;let c=CF.exec(g),I=CF.exec(g),E=c[1]!==void 0?c[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):c[0];if(E==="*"&&(E=cw),I===null)return s[E]=null,s;if(s[E]===null)return s;let{index:B}=I,f=`${g.substr(B,g.length-1)}`;return s[E]=s[E]||[],E!==cw&&s[E].length===0&&s[E].push(...s[cw]||[]),E===cw&&Object.keys(s).forEach(function(Q){s[Q]&&s[Q].push(f)}),s[E].push(f),s},{}),A={[_He]:ete({paths:o,censor:i,serialize:r,strict:tte,remove:e})},t=(...s)=>r(typeof i=="function"?i(...s):i);return[...Object.keys(a),...Object.getOwnPropertySymbols(a)].reduce((s,g)=>{if(a[g]===null)s[g]=c=>t(c,[g]);else{let c=typeof i=="function"?(I,E)=>i(I,[g,...E]):i;s[g]=ete({paths:a[g],censor:c,serialize:r,strict:tte,remove:e})}return s},A)}function THe(n){if(Array.isArray(n))return n={paths:n,censor:Ate},n;let{paths:r,censor:o=Ate,remove:i}=n;if(Array.isArray(r)===!1)throw Error("pino \u2013 redact must contain an array of strings");return i===!0&&(o=void 0),{paths:r,censor:o,remove:i}}rte.exports=NHe});var ote=W((nuA,ite)=>{"use strict";var RHe=()=>"",kHe=()=>`,"time":${Date.now()}`,vHe=()=>`,"time":${Math.round(Date.now()/1e3)}`,PHe=()=>`,"time":"${new Date(Date.now()).toISOString()}"`,GHe=1000000n,ate=1000000000n,FHe=BigInt(Date.now())*GHe,LHe=process.hrtime.bigint(),UHe=()=>{let n=process.hrtime.bigint()-LHe,r=FHe+n,o=r/ate,i=r%ate,e=Number(o*1000n+i/1000000n),a=new Date(e),A=a.getUTCFullYear(),t=(a.getUTCMonth()+1).toString().padStart(2,"0"),s=a.getUTCDate().toString().padStart(2,"0"),g=a.getUTCHours().toString().padStart(2,"0"),c=a.getUTCMinutes().toString().padStart(2,"0"),I=a.getUTCSeconds().toString().padStart(2,"0");return`,"time":"${A}-${t}-${s}T${g}:${c}:${I}.${i.toString().padStart(9,"0")}Z"`};ite.exports={nullTime:RHe,epochTime:kHe,unixTime:vHe,isoTime:PHe,isoTimeNano:UHe}});var ste=W((suA,nte)=>{"use strict";function HHe(n){try{return JSON.stringify(n)}catch{return'"[Circular]"'}}nte.exports=KHe;function KHe(n,r,o){var i=o&&o.stringify||HHe,e=1;if(typeof n=="object"&&n!==null){var a=r.length+e;if(a===1)return n;var A=new Array(a);A[0]=i(n);for(var t=1;t-1?I:0,n.charCodeAt(B+1)){case 100:case 102:if(c>=s||r[c]==null)break;I=s||r[c]==null)break;I=s||r[c]===void 0)break;I",I=B+2,B++;break}g+=i(r[c]),I=B+2,B++;break;case 115:if(c>=s)break;I{"use strict";if(typeof SharedArrayBuffer<"u"&&typeof Atomics<"u"){let r=function(o){if((o>0&&o<1/0)===!1)throw typeof o!="number"&&typeof o!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");Atomics.wait(n,0,0,Number(o))},n=new Int32Array(new SharedArrayBuffer(4));dF.exports=r}else{let n=function(r){if((r>0&&r<1/0)===!1)throw typeof r!="number"&&typeof r!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");let i=Date.now()+Number(r);for(;i>Date.now(););};dF.exports=n}});var hte=W((cuA,Cte)=>{"use strict";var vt=We("fs"),YHe=We("events"),xHe=We("util").inherits,gte=We("path"),fF=uF(),jHe=We("assert"),Iw=100,lw=Buffer.allocUnsafe(0),JHe=16*1024,cte="buffer",Ite="utf8",[qHe,VHe]=(process.versions.node||"0.0").split(".").map(Number),zHe=qHe>=22&&VHe>=7;function lte(n,r){r._opening=!0,r._writing=!0,r._asyncDrainScheduled=!1;function o(a,A){if(a){r._reopening=!1,r._writing=!1,r._opening=!1,r.sync?process.nextTick(()=>{r.listenerCount("error")>0&&r.emit("error",a)}):r.emit("error",a);return}let t=r._reopening;r.fd=A,r.file=n,r._reopening=!1,r._opening=!1,r._writing=!1,r.sync?process.nextTick(()=>r.emit("ready")):r.emit("ready"),!r.destroyed&&(!r._writing&&r._len>r.minLength||r._flushPending?r._actualWrite():t&&process.nextTick(()=>r.emit("drain")))}let i=r.append?"a":"w",e=r.mode;if(r.sync)try{r.mkdir&&vt.mkdirSync(gte.dirname(n),{recursive:!0});let a=vt.openSync(n,i,e);o(null,a)}catch(a){throw o(a),a}else r.mkdir?vt.mkdir(gte.dirname(n),{recursive:!0},a=>{if(a)return o(a);vt.open(n,i,e,o)}):vt.open(n,i,e,o)}function Zo(n){if(!(this instanceof Zo))return new Zo(n);let{fd:r,dest:o,minLength:i,maxLength:e,maxWrite:a,periodicFlush:A,sync:t,append:s=!0,mkdir:g,retryEAGAIN:c,fsync:I,contentMode:E,mode:B}=n||{};r=r||o,this._len=0,this.fd=-1,this._bufs=[],this._lens=[],this._writing=!1,this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._flushPending=!1,this._hwm=Math.max(i||0,16387),this.file=null,this.destroyed=!1,this.minLength=i||0,this.maxLength=e||0,this.maxWrite=a||JHe,this._periodicFlush=A||0,this._periodicFlushTimer=void 0,this.sync=t||!1,this.writable=!0,this._fsync=I||!1,this.append=s||!1,this.mode=B,this.retryEAGAIN=c||(()=>!0),this.mkdir=g||!1;let f,Q;if(E===cte)this._writingBuf=lw,this.write=XHe,this.flush=eKe,this.flushSync=tKe,this._actualWrite=aKe,f=()=>vt.writeSync(this.fd,this._writingBuf),Q=()=>vt.write(this.fd,this._writingBuf,this.release);else if(E===void 0||E===Ite)this._writingBuf="",this.write=ZHe,this.flush=$He,this.flushSync=AKe,this._actualWrite=rKe,f=()=>Buffer.isBuffer(this._writingBuf)?vt.writeSync(this.fd,this._writingBuf):vt.writeSync(this.fd,this._writingBuf,"utf8"),Q=()=>Buffer.isBuffer(this._writingBuf)?vt.write(this.fd,this._writingBuf,this.release):vt.write(this.fd,this._writingBuf,"utf8",this.release);else throw new Error(`SonicBoom supports "${Ite}" and "${cte}", but passed ${E}`);if(typeof r=="number")this.fd=r,process.nextTick(()=>this.emit("ready"));else if(typeof r=="string")lte(r,this);else throw new Error("SonicBoom supports only file descriptors and files");if(this.minLength>=this.maxWrite)throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`);this.release=(y,m)=>{if(y){if((y.code==="EAGAIN"||y.code==="EBUSY")&&this.retryEAGAIN(y,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{fF(Iw),this.release(void 0,0)}catch(P){this.release(P)}else setTimeout(Q,Iw);else this._writing=!1,this.emit("error",y);return}this.emit("write",m);let T=BF(this._writingBuf,this._len,m);if(this._len=T.len,this._writingBuf=T.writingBuf,this._writingBuf.length){if(!this.sync){Q();return}try{do{let P=f(),Y=BF(this._writingBuf,this._len,P);this._len=Y.len,this._writingBuf=Y.writingBuf}while(this._writingBuf.length)}catch(P){this.release(P);return}}this._fsync&&vt.fsyncSync(this.fd);let _=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):_>this.minLength?this._actualWrite():this._ending?_>0?this._actualWrite():(this._writing=!1,pw(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(WHe,this)):this.emit("drain"))},this.on("newListener",function(y){y==="drain"&&(this._asyncDrainScheduled=!1)}),this._periodicFlush!==0&&(this._periodicFlushTimer=setInterval(()=>this.flush(null),this._periodicFlush),this._periodicFlushTimer.unref())}function BF(n,r,o){return typeof n=="string"&&(n=Buffer.from(n)),r=Math.max(r-o,0),n=n.subarray(o),{writingBuf:n,len:r}}function WHe(n){n.listenerCount("drain")>0&&(n._asyncDrainScheduled=!1,n.emit("drain"))}xHe(Zo,YHe);function pte(n,r){return n.length===0?lw:n.length===1?n[0]:Buffer.concat(n,r)}function ZHe(n){if(this.destroyed)throw new Error("SonicBoom destroyed");n=""+n;let r=Buffer.byteLength(n),o=this._len+r,i=this._bufs;return this.maxLength&&o>this.maxLength?(this.emit("drop",n),this._lenthis.maxWrite?i.push(n):i[i.length-1]+=n,this._len=o,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._lenthis.maxLength?(this.emit("drop",n),this._lenthis.maxWrite?(o.push([n]),i.push(n.length)):(o[o.length-1].push(n),i[i.length-1]+=n.length),this._len=r,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len{if(this._fsync)this._flushPending=!1,n();else try{vt.fsync(this.fd,i=>{this._flushPending=!1,n(i)})}catch(i){n(i)}this.off("error",o)},o=i=>{this._flushPending=!1,n(i),this.off("drain",r)};this.once("drain",r),this.once("error",o)}function $He(n){if(n!=null&&typeof n!="function")throw new Error("flush cb must be a function");if(this.destroyed){let r=new Error("SonicBoom destroyed");if(n){n(r);return}throw r}if(this.minLength<=0){n?.();return}n&&Ete.call(this,n),!this._writing&&(this._bufs.length===0&&this._bufs.push(""),this._actualWrite())}function eKe(n){if(n!=null&&typeof n!="function")throw new Error("flush cb must be a function");if(this.destroyed){let r=new Error("SonicBoom destroyed");if(n){n(r);return}throw r}if(this.minLength<=0){n?.();return}n&&Ete.call(this,n),!this._writing&&(this._bufs.length===0&&(this._bufs.push([]),this._lens.push(0)),this._actualWrite())}Zo.prototype.reopen=function(n){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.reopen(n)});return}if(this._ending)return;if(!this.file)throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(n&&(this.file=n),this._reopening=!0,this._writing)return;let r=this.fd;this.once("ready",()=>{r!==this.fd&&vt.close(r,o=>{if(o)return this.emit("error",o)})}),lte(this.file,this)};Zo.prototype.end=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.end()});return}this._ending||(this._ending=!0,!this._writing&&(this._len>0&&this.fd>=0?this._actualWrite():pw(this)))};function AKe(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");let n="";for(;this._bufs.length||n.length;){n.length<=0&&(n=this._bufs[0]);try{let r=Buffer.isBuffer(n)?vt.writeSync(this.fd,n):vt.writeSync(this.fd,n,"utf8"),o=BF(n,this._len,r);n=o.writingBuf,this._len=o.len,n.length<=0&&this._bufs.shift()}catch(r){if((r.code==="EAGAIN"||r.code==="EBUSY")&&!this.retryEAGAIN(r,n.length,this._len-n.length))throw r;fF(Iw)}}try{vt.fsyncSync(this.fd)}catch{}}function tKe(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift([this._writingBuf]),this._writingBuf=lw);let n=lw;for(;this._bufs.length||n.length;){n.length<=0&&(n=pte(this._bufs[0],this._lens[0]));try{let r=vt.writeSync(this.fd,n);n=n.subarray(r),this._len=Math.max(this._len-r,0),n.length<=0&&(this._bufs.shift(),this._lens.shift())}catch(r){if((r.code==="EAGAIN"||r.code==="EBUSY")&&!this.retryEAGAIN(r,n.length,this._len-n.length))throw r;fF(Iw)}}}Zo.prototype.destroy=function(){this.destroyed||pw(this)};function rKe(){let n=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:this._bufs.shift()||"",this.sync)try{let r=Buffer.isBuffer(this._writingBuf)?vt.writeSync(this.fd,this._writingBuf):vt.writeSync(this.fd,this._writingBuf,"utf8");n(null,r)}catch(r){n(r)}else vt.write(this.fd,this._writingBuf,n)}function aKe(){let n=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:pte(this._bufs.shift(),this._lens.shift()),this.sync)try{let r=vt.writeSync(this.fd,this._writingBuf);n(null,r)}catch(r){n(r)}else zHe&&(this._writingBuf=Buffer.from(this._writingBuf)),vt.write(this.fd,this._writingBuf,n)}function pw(n){if(n.fd===-1){n.once("ready",pw.bind(null,n));return}n._periodicFlushTimer!==void 0&&clearInterval(n._periodicFlushTimer),n.destroyed=!0,n._bufs=[],n._lens=[],jHe(typeof n.fd=="number",`sonic.fd must be a number, got ${typeof n.fd}`);try{vt.fsync(n.fd,r)}catch{}function r(){n.fd!==1&&n.fd!==2?vt.close(n.fd,o):o()}function o(i){if(i){n.emit("error",i);return}n._ending&&!n._writing&&n.emit("finish"),n.emit("close")}}Zo.SonicBoom=Zo;Zo.default=Zo;Cte.exports=Zo});var QF=W((IuA,Qte)=>{"use strict";var Xo={exit:[],beforeExit:[]},dte={exit:nKe,beforeExit:sKe},ME;function iKe(){ME===void 0&&(ME=new FinalizationRegistry(gKe))}function oKe(n){Xo[n].length>0||process.on(n,dte[n])}function ute(n){Xo[n].length>0||(process.removeListener(n,dte[n]),Xo.exit.length===0&&Xo.beforeExit.length===0&&(ME=void 0))}function nKe(){Bte("exit")}function sKe(){Bte("beforeExit")}function Bte(n){for(let r of Xo[n]){let o=r.deref(),i=r.fn;o!==void 0&&i(o,n)}Xo[n]=[]}function gKe(n){for(let r of["exit","beforeExit"]){let o=Xo[r].indexOf(n);Xo[r].splice(o,o+1),ute(r)}}function fte(n,r,o){if(r===void 0)throw new Error("the object can't be undefined");oKe(n);let i=new WeakRef(r);i.fn=o,iKe(),ME.register(r,i),Xo[n].push(i)}function cKe(n,r){fte("exit",n,r)}function IKe(n,r){fte("beforeExit",n,r)}function lKe(n){if(ME!==void 0){ME.unregister(n);for(let r of["exit","beforeExit"])Xo[r]=Xo[r].filter(o=>{let i=o.deref();return i&&i!==n}),ute(r)}}Qte.exports={register:cKe,registerBeforeExit:IKe,unregister:lKe}});var yte=W((luA,pKe)=>{pKe.exports={name:"thread-stream",version:"3.2.0",description:"A streaming way to send data to a Node.js Worker Thread",main:"index.js",types:"index.d.ts",dependencies:{"real-require":"^0.2.0"},devDependencies:{"@types/node":"^20.1.0","@types/tap":"^15.0.0","@yao-pkg/pkg":"^5.11.5",desm:"^1.3.0",fastbench:"^1.0.1",husky:"^9.0.6","pino-elasticsearch":"^8.0.0","sonic-boom":"^4.0.1",standard:"^17.0.0",tap:"^16.2.0","ts-node":"^10.8.0",typescript:"^5.3.2","why-is-node-running":"^2.2.2"},scripts:{build:"tsc --noEmit",test:'standard && npm run build && npm run transpile && tap "test/**/*.test.*js" && tap --ts test/*.test.*ts',"test:ci":"standard && npm run transpile && npm run test:ci:js && npm run test:ci:ts","test:ci:js":'tap --no-check-coverage --timeout=120 --coverage-report=lcovonly "test/**/*.test.*js"',"test:ci:ts":'tap --ts --no-check-coverage --coverage-report=lcovonly "test/**/*.test.*ts"',"test:yarn":'npm run transpile && tap "test/**/*.test.js" --no-check-coverage',transpile:"sh ./test/ts/transpile.sh",prepare:"husky install"},standard:{ignore:["test/ts/**/*","test/syntax-error.mjs"]},repository:{type:"git",url:"git+https://github.com/mcollina/thread-stream.git"},keywords:["worker","thread","threads","stream"],author:"Matteo Collina ",license:"MIT",bugs:{url:"https://github.com/mcollina/thread-stream/issues"},homepage:"https://github.com/mcollina/thread-stream#readme"}});var Ste=W((puA,mte)=>{"use strict";function EKe(n,r,o,i,e){let a=Date.now()+i,A=Atomics.load(n,r);if(A===o){e(null,"ok");return}let t=A,s=g=>{Date.now()>a?e(null,"timed-out"):setTimeout(()=>{t=A,A=Atomics.load(n,r),A===t?s(g>=1e3?1e3:g*2):A===o?e(null,"ok"):e(null,"not-equal")},g)};s(1)}function CKe(n,r,o,i,e){let a=Date.now()+i,A=Atomics.load(n,r);if(A!==o){e(null,"ok");return}let t=s=>{Date.now()>a?e(null,"timed-out"):setTimeout(()=>{A=Atomics.load(n,r),A!==o?e(null,"ok"):t(s>=1e3?1e3:s*2)},s)};t(1)}mte.exports={wait:EKe,waitDiff:CKe}});var wte=W((EuA,Dte)=>{"use strict";Dte.exports={WRITE_INDEX:4,READ_INDEX:8,SEQ_INDEX:2}});var Nte=W((CuA,_te)=>{"use strict";var{version:hKe}=yte(),{EventEmitter:dKe}=We("events"),{Worker:uKe}=We("worker_threads"),{join:BKe}=We("path"),{pathToFileURL:fKe}=We("url"),{wait:QKe}=Ste(),{WRITE_INDEX:Bo,READ_INDEX:ci,SEQ_INDEX:yF}=wte(),yKe=We("buffer"),mKe=We("assert"),be=Symbol("kImpl"),SKe=yKe.constants.MAX_STRING_LENGTH;function _E(n,r){Atomics.add(n[be].state,yF,1),r(),Atomics.add(n[be].state,yF,1),Atomics.notify(n[be].state,yF)}var wu=class{constructor(r){this._value=r}deref(){return this._value}},Cw=class{register(){}unregister(){}},DKe=process.env.NODE_V8_COVERAGE?Cw:global.FinalizationRegistry||Cw,wKe=process.env.NODE_V8_COVERAGE?wu:global.WeakRef||wu,Ote=new DKe(n=>{n.exited||n.terminate()});function OKe(n,r){let{filename:o,workerData:i}=r,a=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||BKe(__dirname,"lib","worker.js"),A=new uKe(a,{...r.workerOpts,trackUnmanagedFds:!1,workerData:{filename:o.indexOf("file://")===0?o:fKe(o).href,dataBuf:n[be].dataBuf,stateBuf:n[be].stateBuf,workerData:{$context:{threadStreamVersion:hKe},...i}}});return A.stream=new wu(n),A.on("message",bKe),A.on("exit",Mte),Ote.register(n,A),A}function bte(n){mKe(!n[be].sync),n[be].needDrain&&(n[be].needDrain=!1,n.emit("drain"))}function Ew(n){let r=Atomics.load(n[be].state,Bo),o=n[be].data.length-r;if(o>0){if(n[be].buf.length===0){n[be].flushing=!1,n[be].ending?OF(n):n[be].needDrain&&process.nextTick(bte,n);return}let i=n[be].buf.slice(0,o),e=Buffer.byteLength(i);e<=o?(n[be].buf=n[be].buf.slice(o),hw(n,i,Ew.bind(null,n))):n.flush(()=>{if(!n.destroyed){for(_E(n,()=>{Atomics.store(n[be].state,ci,0),Atomics.store(n[be].state,Bo,0)}),Atomics.notify(n[be].state,ci);e>n[be].data.length;)o=o/2,i=n[be].buf.slice(0,o),e=Buffer.byteLength(i);n[be].buf=n[be].buf.slice(o),hw(n,i,Ew.bind(null,n))}})}else if(o===0){if(r===0&&n[be].buf.length===0)return;n.flush(()=>{_E(n,()=>{Atomics.store(n[be].state,ci,0),Atomics.store(n[be].state,Bo,0)}),Atomics.notify(n[be].state,ci),Ew(n)})}else jn(n,new Error("overwritten"))}function bKe(n){let r=this.stream.deref();if(r===void 0){this.exited=!0,this.terminate();return}if(n?.code!=null)switch(n.code){case"READY":this.stream=new wKe(r),r.flush(()=>{r[be].ready=!0,r.emit("ready")});break;case"ERROR":jn(r,n.err);break;case"EVENT":Array.isArray(n.args)?r.emit(n.name,...n.args):r.emit(n.name,n.args);break;case"WARNING":process.emitWarning(n.err);break;default:jn(r,new Error("this should not happen: "+n.code))}}function Mte(n){let r=this.stream.deref();r!==void 0&&(Ote.unregister(r),r.worker.exited=!0,r.worker.off("exit",Mte),jn(r,n!==0?new Error("the worker thread exited"):null))}var SF=class extends dKe{constructor(r={}){if(super(),r.bufferSize<4)throw new Error("bufferSize must at least fit a 4-byte utf-8 char");this[be]={},this[be].stateBuf=new SharedArrayBuffer(128),this[be].state=new Int32Array(this[be].stateBuf),this[be].dataBuf=new SharedArrayBuffer(r.bufferSize||4*1024*1024),this[be].data=Buffer.from(this[be].dataBuf),this[be].sync=r.sync||!1,this[be].ending=!1,this[be].ended=!1,this[be].needDrain=!1,this[be].destroyed=!1,this[be].flushing=!1,this[be].ready=!1,this[be].finished=!1,this[be].errored=null,this[be].closed=!1,this[be].buf="",this.worker=OKe(this,r),this.on("message",(o,i)=>{this.worker.postMessage(o,i)})}write(r){if(this[be].destroyed)return DF(this,new Error("the worker has exited")),!1;if(this[be].ending)return DF(this,new Error("the worker is ending")),!1;if(this[be].flushing&&this[be].buf.length+r.length>=SKe)try{mF(this),this[be].flushing=!0}catch(o){return jn(this,o),!1}if(this[be].buf+=r,this[be].sync)try{return mF(this),!0}catch(o){return jn(this,o),!1}return this[be].flushing||(this[be].flushing=!0,setImmediate(Ew,this)),this[be].needDrain=this[be].data.length-this[be].buf.length-Atomics.load(this[be].state,Bo)<=0,!this[be].needDrain}end(){this[be].destroyed||(this[be].ending=!0,OF(this))}flush(r){if(this[be].destroyed){typeof r=="function"&&process.nextTick(r,new Error("the worker has exited"));return}let o=Atomics.load(this[be].state,Bo);QKe(this[be].state,ci,o,1/0,(i,e)=>{if(i){jn(this,i),process.nextTick(r,i);return}if(e==="not-equal"){this.flush(r);return}process.nextTick(r)})}flushSync(){this[be].destroyed||(mF(this),wF(this))}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[be].ready}get destroyed(){return this[be].destroyed}get closed(){return this[be].closed}get writable(){return!this[be].destroyed&&!this[be].ending}get writableEnded(){return this[be].ending}get writableFinished(){return this[be].finished}get writableNeedDrain(){return this[be].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[be].errored}};function DF(n,r){setImmediate(()=>{n.emit("error",r)})}function jn(n,r){n[be].destroyed||(n[be].destroyed=!0,r&&(n[be].errored=r,DF(n,r)),n.worker.exited?setImmediate(()=>{n[be].closed=!0,n.emit("close")}):n.worker.terminate().catch(()=>{}).then(()=>{n[be].closed=!0,n.emit("close")}))}function hw(n,r,o){let i=Atomics.load(n[be].state,Bo),e=Buffer.byteLength(r);return n[be].data.write(r,i),_E(n,()=>{Atomics.store(n[be].state,Bo,i+e)}),o(),!0}function OF(n){if(!(n[be].ended||!n[be].ending||n[be].flushing)){n[be].ended=!0;try{n.flushSync();let r=Atomics.load(n[be].state,ci);_E(n,()=>{Atomics.store(n[be].state,Bo,-1)});let o=0;for(;r!==-1;){if(Atomics.wait(n[be].state,ci,r,1e3),r=Atomics.load(n[be].state,ci),r===-2){jn(n,new Error("end() failed"));return}if(++o===10){jn(n,new Error("end() took too long (10s)"));return}}process.nextTick(()=>{n[be].finished=!0,n.emit("finish")})}catch(r){jn(n,r)}}}function mF(n){let r=()=>{n[be].ending?OF(n):n[be].needDrain&&process.nextTick(bte,n)};for(n[be].flushing=!1;n[be].buf.length!==0;){let o=Atomics.load(n[be].state,Bo),i=n[be].data.length-o;if(i===0){wF(n),_E(n,()=>{Atomics.store(n[be].state,ci,0),Atomics.store(n[be].state,Bo,0)}),Atomics.notify(n[be].state,ci);continue}else if(i<0)throw new Error("overwritten");let e=n[be].buf.slice(0,i),a=Buffer.byteLength(e);if(a<=i)n[be].buf=n[be].buf.slice(i),hw(n,e,r);else{for(wF(n),_E(n,()=>{Atomics.store(n[be].state,ci,0),Atomics.store(n[be].state,Bo,0)}),Atomics.notify(n[be].state,ci);a>n[be].buf.length;)i=i/2,e=n[be].buf.slice(0,i),a=Buffer.byteLength(e);n[be].buf=n[be].buf.slice(i),hw(n,e,r)}}}function wF(n){if(n[be].flushing)throw new Error("unable to flush while flushing");let r=Atomics.load(n[be].state,Bo),o=0;for(;;){let i=Atomics.load(n[be].state,ci);if(i===-2)throw Error("_flushSync failed");if(i!==r)Atomics.wait(n[be].state,ci,i,1e3);else break;if(++o===10)throw new Error("_flushSync took too long (10s)")}}_te.exports=SF});var _F=W((huA,Tte)=>{"use strict";var{createRequire:MKe}=We("module"),_Ke=pF(),{join:bF,isAbsolute:NKe,sep:TKe}=We("node:path"),RKe=uF(),MF=QF(),kKe=Nte();function vKe(n){MF.register(n,GKe),MF.registerBeforeExit(n,FKe),n.on("close",function(){MF.unregister(n)})}function PKe(n,r,o,i){let e=new kKe({filename:n,workerData:r,workerOpts:o,sync:i});e.on("ready",a),e.on("close",function(){process.removeListener("exit",A)}),process.on("exit",A);function a(){process.removeListener("exit",A),e.unref(),o.autoEnd!==!1&&vKe(e)}function A(){e.closed||(e.flushSync(),RKe(100),e.end())}return e}function GKe(n){n.ref(),n.flushSync(),n.end(),n.once("close",function(){n.unref()})}function FKe(n){n.flushSync()}function LKe(n){let{pipeline:r,targets:o,levels:i,dedupe:e,worker:a={},caller:A=_Ke(),sync:t=!1}=n,s={...n.options},g=typeof A=="string"?[A]:A,c="__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{},I=n.target;if(I&&o)throw new Error("only one of target or targets can be specified");return o?(I=c["pino-worker"]||bF(__dirname,"worker.js"),s.targets=o.filter(B=>B.target).map(B=>({...B,target:E(B.target)})),s.pipelines=o.filter(B=>B.pipeline).map(B=>B.pipeline.map(f=>({...f,level:B.level,target:E(f.target)})))):r&&(I=c["pino-worker"]||bF(__dirname,"worker.js"),s.pipelines=[r.map(B=>({...B,target:E(B.target)}))]),i&&(s.levels=i),e&&(s.dedupe=e),s.pinoWillSendConfig=!0,PKe(E(I),s,a,t);function E(B){if(B=c[B]||B,NKe(B)||B.indexOf("file://")===0)return B;if(B==="pino/file")return bF(__dirname,"..","file.js");let f;for(let Q of g)try{let y=Q==="node:repl"?process.cwd()+TKe:Q;f=MKe(y).resolve(B);break}catch{continue}if(!f)throw new Error(`unable to determine transport target for "${B}"`);return f}}Tte.exports=LKe});var fw=W((duA,jte)=>{"use strict";var Rte=We("node:diagnostics_channel"),kte=ste(),{mapHttpRequest:UKe,mapHttpResponse:HKe}=lF(),TF=hte(),vte=QF(),{lsCacheSym:KKe,chindingsSym:Lte,writeSym:Pte,serializersSym:Ute,formatOptsSym:Gte,endSym:YKe,stringifiersSym:Hte,stringifySym:Kte,stringifySafeSym:RF,wildcardFirstSym:Yte,nestedKeySym:xKe,formattersSym:xte,messageKeySym:jKe,errorKeySym:JKe,nestedKeyStrSym:qKe,msgPrefixSym:dw}=bE(),{isMainThread:VKe}=We("worker_threads"),zKe=_F(),Bw;typeof Rte.tracingChannel=="function"?Bw=Rte.tracingChannel("pino_asJson"):Bw={hasSubscribers:!1,traceSync(n,r,o,...i){return n.call(o,...i)}};function NE(){}function WKe(n,r){if(!r)return o;return function(...e){r.call(this,e,o,n)};function o(i,...e){if(typeof i=="object"){let a=i;i!==null&&(i.method&&i.headers&&i.socket?i=UKe(i):typeof i.setHeader=="function"&&(i=HKe(i)));let A;a===null&&e.length===0?A=[null]:(a=e.shift(),A=e),typeof this[dw]=="string"&&a!==void 0&&a!==null&&(a=this[dw]+a),this[Pte](i,kte(a,A,this[Gte]),n)}else{let a=i===void 0?e.shift():i;typeof this[dw]=="string"&&a!==void 0&&a!==null&&(a=this[dw]+a),this[Pte](null,kte(a,e,this[Gte]),n)}}}function NF(n){let r="",o=0,i=!1,e=255,a=n.length;if(a>100)return JSON.stringify(n);for(var A=0;A=32;A++)e=n.charCodeAt(A),(e===34||e===92)&&(r+=n.slice(o,A)+"\\",o=A,i=!0);return i?r+=n.slice(o):r=n,e<32?JSON.stringify(n):'"'+r+'"'}function ZKe(n,r,o,i){if(Bw.hasSubscribers===!1)return Fte.call(this,n,r,o,i);let e={instance:this,arguments};return Bw.traceSync(Fte,e,this,n,r,o,i)}function Fte(n,r,o,i){let e=this[Kte],a=this[RF],A=this[Hte],t=this[YKe],s=this[Lte],g=this[Ute],c=this[xte],I=this[jKe],E=this[JKe],B=this[KKe][o]+i;B=B+s;let f;c.log&&(n=c.log(n));let Q=A[Yte],y="";for(let T in n)if(f=n[T],Object.prototype.hasOwnProperty.call(n,T)&&f!==void 0){g[T]?f=g[T](f):T===E&&g.err&&(f=g.err(f));let _=A[T]||Q;switch(typeof f){case"undefined":case"function":continue;case"number":Number.isFinite(f)===!1&&(f=null);case"boolean":_&&(f=_(f));break;case"string":f=(_||NF)(f);break;default:f=(_||e)(f,a)}if(f===void 0)continue;let P=NF(T);y+=","+P+":"+f}let m="";if(r!==void 0){f=g[I]?g[I](r):r;let T=A[I]||Q;switch(typeof f){case"function":break;case"number":Number.isFinite(f)===!1&&(f=null);case"boolean":T&&(f=T(f)),m=',"'+I+'":'+f;break;case"string":f=(T||NF)(f),m=',"'+I+'":'+f;break;default:f=(T||e)(f,a),m=',"'+I+'":'+f}}return this[xKe]&&y?B+this[qKe]+y.slice(1)+"}"+m+t:B+y+m+t}function XKe(n,r){let o,i=n[Lte],e=n[Kte],a=n[RF],A=n[Hte],t=A[Yte],s=n[Ute],g=n[xte].bindings;r=g(r);for(let c in r)if(o=r[c],((c.length<5||c!=="level"&&c!=="serializers"&&c!=="formatters"&&c!=="customLevels")&&r.hasOwnProperty(c)&&o!==void 0)===!0){if(o=s[c]?s[c](o):o,o=(A[c]||t||e)(o,a),o===void 0)continue;i+=',"'+c+'":'+o}return i}function $Ke(n){return n.write!==n.constructor.prototype.write}function uw(n){let r=new TF(n);return r.on("error",o),!n.sync&&VKe&&(vte.register(r,eYe),r.on("close",function(){vte.unregister(r)})),r;function o(i){if(i.code==="EPIPE"){r.write=NE,r.end=NE,r.flushSync=NE,r.destroy=NE;return}r.removeListener("error",o),r.emit("error",i)}}function eYe(n,r){n.destroyed||(r==="beforeExit"?(n.flush(),n.on("drain",function(){n.end()})):n.flushSync())}function AYe(n){return function(o,i,e={},a){if(typeof e=="string")a=uw({dest:e}),e={};else if(typeof a=="string"){if(e&&e.transport)throw Error("only one of option.transport or stream can be specified");a=uw({dest:a})}else if(e instanceof TF||e.writable||e._writableState)a=e,e={};else if(e.transport){if(e.transport instanceof TF||e.transport.writable||e.transport._writableState)throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");if(e.transport.targets&&e.transport.targets.length&&e.formatters&&typeof e.formatters.level=="function")throw Error("option.transport.targets do not allow custom level formatters");let s;e.customLevels&&(s=e.useOnlyCustomLevels?e.customLevels:Object.assign({},e.levels,e.customLevels)),a=zKe({caller:i,...e.transport,levels:s})}if(e=Object.assign({},n,e),e.serializers=Object.assign({},n.serializers,e.serializers),e.formatters=Object.assign({},n.formatters,e.formatters),e.prettyPrint)throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");let{enabled:A,onChild:t}=e;return A===!1&&(e.level="silent"),t||(e.onChild=NE),a||($Ke(process.stdout)?a=process.stdout:a=uw({fd:process.stdout.fd||1})),{opts:e,stream:a}}}function tYe(n,r){try{return JSON.stringify(n)}catch{try{return(r||this[RF])(n)}catch{return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function rYe(n,r,o){return{level:n,bindings:r,log:o}}function aYe(n){let r=Number(n);return typeof n=="string"&&Number.isFinite(r)?r:n===void 0?1:n}jte.exports={noop:NE,buildSafeSonicBoom:uw,asChindings:XKe,asJson:ZKe,genLog:WKe,createArgsNormalizer:AYe,stringify:tYe,buildFormatters:rYe,normalizeDestFileDescriptor:aYe}});var Qw=W((uuA,Jte)=>{var iYe={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},oYe={ASC:"ASC",DESC:"DESC"};Jte.exports={DEFAULT_LEVELS:iYe,SORTING_ORDER:oYe}});var PF=W((BuA,Wte)=>{"use strict";var{lsCacheSym:nYe,levelValSym:kF,useOnlyCustomLevelsSym:sYe,streamSym:gYe,formattersSym:cYe,hooksSym:IYe,levelCompSym:qte}=bE(),{noop:lYe,genLog:kI}=fw(),{DEFAULT_LEVELS:Jn,SORTING_ORDER:Vte}=Qw(),zte={fatal:n=>{let r=kI(Jn.fatal,n);return function(...o){let i=this[gYe];if(r.call(this,...o),typeof i.flushSync=="function")try{i.flushSync()}catch{}}},error:n=>kI(Jn.error,n),warn:n=>kI(Jn.warn,n),info:n=>kI(Jn.info,n),debug:n=>kI(Jn.debug,n),trace:n=>kI(Jn.trace,n)},vF=Object.keys(Jn).reduce((n,r)=>(n[Jn[r]]=r,n),{}),pYe=Object.keys(vF).reduce((n,r)=>(n[r]='{"level":'+Number(r),n),{});function EYe(n){let r=n[cYe].level,{labels:o}=n.levels,i={};for(let e in o){let a=r(o[e],Number(e));i[e]=JSON.stringify(a).slice(0,-1)}return n[nYe]=i,n}function CYe(n,r){if(r)return!1;switch(n){case"fatal":case"error":case"warn":case"info":case"debug":case"trace":return!0;default:return!1}}function hYe(n){let{labels:r,values:o}=this.levels;if(typeof n=="number"){if(r[n]===void 0)throw Error("unknown level value"+n);n=r[n]}if(o[n]===void 0)throw Error("unknown level "+n);let i=this[kF],e=this[kF]=o[n],a=this[sYe],A=this[qte],t=this[IYe].logMethod;for(let s in o){if(A(o[s],e)===!1){this[s]=lYe;continue}this[s]=CYe(s,a)?zte[s](t):kI(o[s],t)}this.emit("level-change",n,e,r[i],i,this)}function dYe(n){let{levels:r,levelVal:o}=this;return r&&r.labels?r.labels[o]:""}function uYe(n){let{values:r}=this.levels,o=r[n];return o!==void 0&&this[qte](o,this[kF])}function BYe(n,r,o){return n===Vte.DESC?r<=o:r>=o}function fYe(n){return typeof n=="string"?BYe.bind(null,n):n}function QYe(n=null,r=!1){let o=n?Object.keys(n).reduce((a,A)=>(a[n[A]]=A,a),{}):null,i=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),r?null:vF,o),e=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),r?null:Jn,n);return{labels:i,values:e}}function yYe(n,r,o){if(typeof n=="number"){if(![].concat(Object.keys(r||{}).map(a=>r[a]),o?[]:Object.keys(vF).map(a=>+a),1/0).includes(n))throw Error(`default level:${n} must be included in custom levels`);return}let i=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),o?null:Jn,r);if(!(n in i))throw Error(`default level:${n} must be included in custom levels`)}function mYe(n,r){let{labels:o,values:i}=n;for(let e in r){if(e in i)throw Error("levels cannot be overridden");if(r[e]in o)throw Error("pre-existing level values cannot be used for new levels")}}function SYe(n){if(typeof n!="function"&&!(typeof n=="string"&&Object.values(Vte).includes(n)))throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type')}Wte.exports={initialLsCache:pYe,genLsCache:EYe,levelMethods:zte,getLevel:dYe,setLevel:hYe,isLevelEnabled:uYe,mappings:QYe,assertNoLevelCollisions:mYe,assertDefaultLevelFound:yYe,genLevelComparison:fYe,assertLevelComparison:SYe}});var GF=W((fuA,Zte)=>{"use strict";Zte.exports={version:"9.14.0"}});var ire=W((yuA,are)=>{"use strict";var{EventEmitter:DYe}=We("node:events"),{lsCacheSym:wYe,levelValSym:OYe,setLevelSym:mw,getLevelSym:Xte,chindingsSym:Sw,parsedChindingsSym:bYe,mixinSym:MYe,asJsonSym:ere,writeSym:_Ye,mixinMergeStrategySym:NYe,timeSym:TYe,timeSliceIndexSym:RYe,streamSym:Are,serializersSym:vI,formattersSym:Ou,errorKeySym:kYe,messageKeySym:vYe,useOnlyCustomLevelsSym:PYe,needsMetadataGsym:GYe,redactFmtSym:FYe,stringifySym:LYe,formatOptsSym:UYe,stringifiersSym:HYe,msgPrefixSym:LF,hooksSym:KYe}=bE(),{getLevel:YYe,setLevel:xYe,isLevelEnabled:jYe,mappings:JYe,initialLsCache:qYe,genLsCache:VYe,assertNoLevelCollisions:zYe}=PF(),{asChindings:UF,asJson:WYe,buildFormatters:FF,stringify:$te,noop:tre}=fw(),{version:ZYe}=GF(),XYe=hF(),$Ye=class{},rre={constructor:$Ye,child:exe,bindings:Axe,setBindings:txe,flush:ixe,isLevelEnabled:jYe,version:ZYe,get level(){return this[Xte]()},set level(n){this[mw](n)},get levelVal(){return this[OYe]},set levelVal(n){throw Error("levelVal is read-only")},get msgPrefix(){return this[LF]},get[Symbol.toStringTag](){return"Pino"},[wYe]:qYe,[_Ye]:axe,[ere]:WYe,[Xte]:YYe,[mw]:xYe};Object.setPrototypeOf(rre,DYe.prototype);are.exports=function(){return Object.create(rre)};var yw=n=>n;function exe(n,r){if(!n)throw Error("missing bindings for child Pino");let o=this[vI],i=this[Ou],e=Object.create(this);if(r==null)return e[Ou].bindings!==yw&&(e[Ou]=FF(i.level,yw,i.log)),e[Sw]=UF(e,n),e[mw](this.level),this.onChild!==tre&&this.onChild(e),e;if(r.hasOwnProperty("serializers")===!0){e[vI]=Object.create(null);for(let c in o)e[vI][c]=o[c];let s=Object.getOwnPropertySymbols(o);for(var a=0;a{"use strict";var{hasOwnProperty:bu}=Object.prototype,GI=YF();GI.configure=YF;GI.stringify=GI;GI.default=GI;xF.stringify=GI;xF.configure=YF;sre.exports=GI;var oxe=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function Ac(n){return n.length<5e3&&!oxe.test(n)?`"${n}"`:JSON.stringify(n)}function HF(n,r){if(n.length>200||r)return n.sort(r);for(let o=1;oi;)n[e]=n[e-1],e--;n[e]=i}return n}var nxe=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function KF(n){return nxe.call(n)!==void 0&&n.length!==0}function ore(n,r,o){n.length= 1`)}return o===void 0?1/0:o}function PI(n){return n===1?"1 item":`${n} items`}function Ixe(n){let r=new Set;for(let o of n)(typeof o=="string"||typeof o=="number")&&r.add(String(o));return r}function lxe(n){if(bu.call(n,"strict")){let r=n.strict;if(typeof r!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(r)return o=>{let i=`Object can not safely be stringified. Received type ${typeof o}`;throw typeof o!="function"&&(i+=` (${o.toString()})`),new Error(i)}}}function YF(n){n={...n};let r=lxe(n);r&&(n.bigint===void 0&&(n.bigint=!1),"circularValue"in n||(n.circularValue=Error));let o=sxe(n),i=cxe(n,"bigint"),e=gxe(n),a=typeof e=="function"?e:void 0,A=nre(n,"maximumDepth"),t=nre(n,"maximumBreadth");function s(B,f,Q,y,m,T){let _=f[B];switch(typeof _=="object"&&_!==null&&typeof _.toJSON=="function"&&(_=_.toJSON(B)),_=y.call(f,B,_),typeof _){case"string":return Ac(_);case"object":{if(_===null)return"null";if(Q.indexOf(_)!==-1)return o;let P="",Y=",",j=T;if(Array.isArray(_)){if(_.length===0)return"[]";if(AOAe(n,new Set),bAe=(n,r,o)=>{if(!Du(n))return"";let i=o?"":n.message||"";if(r.has(n))return i+": ...";let e=rF(n);if(e){r.add(n);let a=typeof n.cause=="function";return i+(a?"":": ")+bAe(e,r,a)}else return i},RUe=n=>bAe(n,new Set);MAe.exports={isErrorLike:Du,getErrorCause:rF,stackWithCauses:TUe,messageWithCauses:RUe}});var iF=W((euA,NAe)=>{"use strict";var kUe=Symbol("circular-ref-tag"),aw=Symbol("pino-raw-err-ref"),_Ae=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},aggregateErrors:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[aw]},set:function(n){this[aw]=n}}});Object.defineProperty(_Ae,aw,{writable:!0,value:{}});NAe.exports={pinoErrProto:_Ae,pinoErrorSymbols:{seen:kUe,rawSymbol:aw}}});var kAe=W((AuA,RAe)=>{"use strict";RAe.exports=nF;var{messageWithCauses:vUe,stackWithCauses:PUe,isErrorLike:TAe}=aF(),{pinoErrProto:GUe,pinoErrorSymbols:FUe}=iF(),{seen:oF}=FUe,{toString:LUe}=Object.prototype;function nF(n){if(!TAe(n))return n;n[oF]=void 0;let r=Object.create(GUe);r.type=LUe.call(n.constructor)==="[object Function]"?n.constructor.name:n.name,r.message=vUe(n),r.stack=PUe(n),Array.isArray(n.errors)&&(r.aggregateErrors=n.errors.map(o=>nF(o)));for(let o in n)if(r[o]===void 0){let i=n[o];TAe(i)?o!=="cause"&&!Object.prototype.hasOwnProperty.call(i,oF)&&(r[o]=nF(i)):r[o]=i}return delete n[oF],r.raw=n,r}});var PAe=W((tuA,vAe)=>{"use strict";vAe.exports=ow;var{isErrorLike:sF}=aF(),{pinoErrProto:UUe,pinoErrorSymbols:HUe}=iF(),{seen:iw}=HUe,{toString:KUe}=Object.prototype;function ow(n){if(!sF(n))return n;n[iw]=void 0;let r=Object.create(UUe);r.type=KUe.call(n.constructor)==="[object Function]"?n.constructor.name:n.name,r.message=n.message,r.stack=n.stack,Array.isArray(n.errors)&&(r.aggregateErrors=n.errors.map(o=>ow(o))),sF(n.cause)&&!Object.prototype.hasOwnProperty.call(n.cause,iw)&&(r.cause=ow(n.cause));for(let o in n)if(r[o]===void 0){let i=n[o];sF(i)?Object.prototype.hasOwnProperty.call(i,iw)||(r[o]=ow(i)):r[o]=i}return delete n[iw],r.raw=n,r}});var UAe=W((ruA,LAe)=>{"use strict";LAe.exports={mapHttpRequest:YUe,reqSerializer:FAe};var gF=Symbol("pino-raw-req-ref"),GAe=Object.create({},{id:{enumerable:!0,writable:!0,value:""},method:{enumerable:!0,writable:!0,value:""},url:{enumerable:!0,writable:!0,value:""},query:{enumerable:!0,writable:!0,value:""},params:{enumerable:!0,writable:!0,value:""},headers:{enumerable:!0,writable:!0,value:{}},remoteAddress:{enumerable:!0,writable:!0,value:""},remotePort:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[gF]},set:function(n){this[gF]=n}}});Object.defineProperty(GAe,gF,{writable:!0,value:{}});function FAe(n){let r=n.info||n.socket,o=Object.create(GAe);if(o.id=typeof n.id=="function"?n.id():n.id||(n.info?n.info.id:void 0),o.method=n.method,n.originalUrl)o.url=n.originalUrl;else{let i=n.path;o.url=typeof i=="string"?i:n.url?n.url.path||n.url:void 0}return n.query&&(o.query=n.query),n.params&&(o.params=n.params),o.headers=n.headers,o.remoteAddress=r&&r.remoteAddress,o.remotePort=r&&r.remotePort,o.raw=n.raw||n,o}function YUe(n){return{req:FAe(n)}}});var xAe=W((auA,YAe)=>{"use strict";YAe.exports={mapHttpResponse:xUe,resSerializer:KAe};var cF=Symbol("pino-raw-res-ref"),HAe=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[cF]},set:function(n){this[cF]=n}}});Object.defineProperty(HAe,cF,{writable:!0,value:{}});function KAe(n){let r=Object.create(HAe);return r.statusCode=n.headersSent?n.statusCode:null,r.headers=n.getHeaders?n.getHeaders():n._headers,r.raw=n,r}function xUe(n){return{res:KAe(n)}}});var lF=W((iuA,jAe)=>{"use strict";var IF=kAe(),jUe=PAe(),nw=UAe(),sw=xAe();jAe.exports={err:IF,errWithCause:jUe,mapHttpRequest:nw.mapHttpRequest,mapHttpResponse:sw.mapHttpResponse,req:nw.reqSerializer,res:sw.resSerializer,wrapErrorSerializer:function(r){return r===IF?r:function(i){return r(IF(i))}},wrapRequestSerializer:function(r){return r===nw.reqSerializer?r:function(i){return r(nw.reqSerializer(i))}},wrapResponseSerializer:function(r){return r===sw.resSerializer?r:function(i){return r(sw.resSerializer(i))}}}});var pF=W((ouA,JAe)=>{"use strict";function JUe(n,r){return r}JAe.exports=function(){let r=Error.prepareStackTrace;Error.prepareStackTrace=JUe;let o=new Error().stack;if(Error.prepareStackTrace=r,!Array.isArray(o))return;let i=o.slice(2),e=[];for(let a of i)a&&e.push(a.getFileName());return e}});var XAe=W((nuA,ZAe)=>{"use strict";function EF(n){if(n===null||typeof n!="object")return n;if(n instanceof Date)return new Date(n.getTime());if(n instanceof Array){let r=[];for(let o=0;o{let Q=[...s.slice(0,I),...f];return o(B,Q)}:o,e,a);else if(a)zAe(c,t);else{let E=typeof o=="function"?o(VUe(c,t),[...s.slice(0,I),...t]):o;VAe(c,t,E)}}if(A.length===0)g(n,0);else{let c=n;for(let I=0;I0)o?a===i&&(o=!1,i=""):(o=!0,i=a);else if(a==="["&&!o)r++;else if(a==="]"&&!o&&(r--,r<0))throw new Error(`Invalid redaction path (${n})`)}if(r!==0)throw new Error(`Invalid redaction path (${n})`)}function eHe(n){if(!Array.isArray(n))throw new TypeError("paths must be an array");for(let r of n)$Ue(r)}function AHe(n={}){let{paths:r=[],censor:o="[REDACTED]",serialize:i=JSON.stringify,strict:e=!0,remove:a=!1}=n;eHe(r);let A=ZUe(r);return function(s){if(e&&(s===null||typeof s!="object")&&(s==null||typeof s!="object"))return i?i(s):s;let g=XUe(s,A),c=s,I=o;return typeof o=="function"&&(I=o),zUe(g,r,I,a),i===!1?(g.restore=function(){return EF(c)},g):typeof i=="function"?i(g):JSON.stringify(g)}}ZAe.exports=AHe});var bE=W((suA,$Ae)=>{"use strict";var tHe=Symbol("pino.setLevel"),rHe=Symbol("pino.getLevel"),aHe=Symbol("pino.levelVal"),iHe=Symbol("pino.levelComp"),oHe=Symbol("pino.useLevelLabels"),nHe=Symbol("pino.useOnlyCustomLevels"),sHe=Symbol("pino.mixin"),gHe=Symbol("pino.lsCache"),cHe=Symbol("pino.chindings"),IHe=Symbol("pino.asJson"),lHe=Symbol("pino.write"),pHe=Symbol("pino.redactFmt"),EHe=Symbol("pino.time"),CHe=Symbol("pino.timeSliceIndex"),hHe=Symbol("pino.stream"),dHe=Symbol("pino.stringify"),uHe=Symbol("pino.stringifySafe"),BHe=Symbol("pino.stringifiers"),fHe=Symbol("pino.end"),QHe=Symbol("pino.formatOpts"),yHe=Symbol("pino.messageKey"),mHe=Symbol("pino.errorKey"),SHe=Symbol("pino.nestedKey"),DHe=Symbol("pino.nestedKeyStr"),wHe=Symbol("pino.mixinMergeStrategy"),OHe=Symbol("pino.msgPrefix"),bHe=Symbol("pino.wildcardFirst"),MHe=Symbol.for("pino.serializers"),_He=Symbol.for("pino.formatters"),NHe=Symbol.for("pino.hooks"),THe=Symbol.for("pino.metadata");$Ae.exports={setLevelSym:tHe,getLevelSym:rHe,levelValSym:aHe,levelCompSym:iHe,useLevelLabelsSym:oHe,mixinSym:sHe,lsCacheSym:gHe,chindingsSym:cHe,asJsonSym:IHe,writeSym:lHe,serializersSym:MHe,redactFmtSym:pHe,timeSym:EHe,timeSliceIndexSym:CHe,streamSym:hHe,stringifySym:dHe,stringifySafeSym:uHe,stringifiersSym:BHe,endSym:fHe,formatOptsSym:QHe,messageKeySym:yHe,errorKeySym:mHe,nestedKeySym:SHe,wildcardFirstSym:bHe,needsMetadataGsym:THe,useOnlyCustomLevelsSym:nHe,formattersSym:_He,hooksSym:NHe,nestedKeyStrSym:DHe,mixinMergeStrategySym:wHe,msgPrefixSym:OHe}});var hF=W((guA,rte)=>{"use strict";var ete=XAe(),{redactFmtSym:RHe,wildcardFirstSym:cw}=bE(),CF=/[^.[\]]+|\[([^[\]]*?)\]/g,Ate="[Redacted]",tte=!1;function kHe(n,r){let{paths:o,censor:i,remove:e}=vHe(n),a=o.reduce((s,g)=>{CF.lastIndex=0;let c=CF.exec(g),I=CF.exec(g),E=c[1]!==void 0?c[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):c[0];if(E==="*"&&(E=cw),I===null)return s[E]=null,s;if(s[E]===null)return s;let{index:B}=I,f=`${g.substr(B,g.length-1)}`;return s[E]=s[E]||[],E!==cw&&s[E].length===0&&s[E].push(...s[cw]||[]),E===cw&&Object.keys(s).forEach(function(Q){s[Q]&&s[Q].push(f)}),s[E].push(f),s},{}),A={[RHe]:ete({paths:o,censor:i,serialize:r,strict:tte,remove:e})},t=(...s)=>r(typeof i=="function"?i(...s):i);return[...Object.keys(a),...Object.getOwnPropertySymbols(a)].reduce((s,g)=>{if(a[g]===null)s[g]=c=>t(c,[g]);else{let c=typeof i=="function"?(I,E)=>i(I,[g,...E]):i;s[g]=ete({paths:a[g],censor:c,serialize:r,strict:tte,remove:e})}return s},A)}function vHe(n){if(Array.isArray(n))return n={paths:n,censor:Ate},n;let{paths:r,censor:o=Ate,remove:i}=n;if(Array.isArray(r)===!1)throw Error("pino \u2013 redact must contain an array of strings");return i===!0&&(o=void 0),{paths:r,censor:o,remove:i}}rte.exports=kHe});var ote=W((cuA,ite)=>{"use strict";var PHe=()=>"",GHe=()=>`,"time":${Date.now()}`,FHe=()=>`,"time":${Math.round(Date.now()/1e3)}`,LHe=()=>`,"time":"${new Date(Date.now()).toISOString()}"`,UHe=1000000n,ate=1000000000n,HHe=BigInt(Date.now())*UHe,KHe=process.hrtime.bigint(),YHe=()=>{let n=process.hrtime.bigint()-KHe,r=HHe+n,o=r/ate,i=r%ate,e=Number(o*1000n+i/1000000n),a=new Date(e),A=a.getUTCFullYear(),t=(a.getUTCMonth()+1).toString().padStart(2,"0"),s=a.getUTCDate().toString().padStart(2,"0"),g=a.getUTCHours().toString().padStart(2,"0"),c=a.getUTCMinutes().toString().padStart(2,"0"),I=a.getUTCSeconds().toString().padStart(2,"0");return`,"time":"${A}-${t}-${s}T${g}:${c}:${I}.${i.toString().padStart(9,"0")}Z"`};ite.exports={nullTime:PHe,epochTime:GHe,unixTime:FHe,isoTime:LHe,isoTimeNano:YHe}});var ste=W((IuA,nte)=>{"use strict";function xHe(n){try{return JSON.stringify(n)}catch{return'"[Circular]"'}}nte.exports=jHe;function jHe(n,r,o){var i=o&&o.stringify||xHe,e=1;if(typeof n=="object"&&n!==null){var a=r.length+e;if(a===1)return n;var A=new Array(a);A[0]=i(n);for(var t=1;t-1?I:0,n.charCodeAt(B+1)){case 100:case 102:if(c>=s||r[c]==null)break;I=s||r[c]==null)break;I=s||r[c]===void 0)break;I",I=B+2,B++;break}g+=i(r[c]),I=B+2,B++;break;case 115:if(c>=s)break;I{"use strict";if(typeof SharedArrayBuffer<"u"&&typeof Atomics<"u"){let r=function(o){if((o>0&&o<1/0)===!1)throw typeof o!="number"&&typeof o!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");Atomics.wait(n,0,0,Number(o))},n=new Int32Array(new SharedArrayBuffer(4));dF.exports=r}else{let n=function(r){if((r>0&&r<1/0)===!1)throw typeof r!="number"&&typeof r!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");let i=Date.now()+Number(r);for(;i>Date.now(););};dF.exports=n}});var hte=W((puA,Cte)=>{"use strict";var vt=We("fs"),JHe=We("events"),qHe=We("util").inherits,gte=We("path"),fF=uF(),VHe=We("assert"),Iw=100,lw=Buffer.allocUnsafe(0),zHe=16*1024,cte="buffer",Ite="utf8",[WHe,ZHe]=(process.versions.node||"0.0").split(".").map(Number),XHe=WHe>=22&&ZHe>=7;function lte(n,r){r._opening=!0,r._writing=!0,r._asyncDrainScheduled=!1;function o(a,A){if(a){r._reopening=!1,r._writing=!1,r._opening=!1,r.sync?process.nextTick(()=>{r.listenerCount("error")>0&&r.emit("error",a)}):r.emit("error",a);return}let t=r._reopening;r.fd=A,r.file=n,r._reopening=!1,r._opening=!1,r._writing=!1,r.sync?process.nextTick(()=>r.emit("ready")):r.emit("ready"),!r.destroyed&&(!r._writing&&r._len>r.minLength||r._flushPending?r._actualWrite():t&&process.nextTick(()=>r.emit("drain")))}let i=r.append?"a":"w",e=r.mode;if(r.sync)try{r.mkdir&&vt.mkdirSync(gte.dirname(n),{recursive:!0});let a=vt.openSync(n,i,e);o(null,a)}catch(a){throw o(a),a}else r.mkdir?vt.mkdir(gte.dirname(n),{recursive:!0},a=>{if(a)return o(a);vt.open(n,i,e,o)}):vt.open(n,i,e,o)}function Zo(n){if(!(this instanceof Zo))return new Zo(n);let{fd:r,dest:o,minLength:i,maxLength:e,maxWrite:a,periodicFlush:A,sync:t,append:s=!0,mkdir:g,retryEAGAIN:c,fsync:I,contentMode:E,mode:B}=n||{};r=r||o,this._len=0,this.fd=-1,this._bufs=[],this._lens=[],this._writing=!1,this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._flushPending=!1,this._hwm=Math.max(i||0,16387),this.file=null,this.destroyed=!1,this.minLength=i||0,this.maxLength=e||0,this.maxWrite=a||zHe,this._periodicFlush=A||0,this._periodicFlushTimer=void 0,this.sync=t||!1,this.writable=!0,this._fsync=I||!1,this.append=s||!1,this.mode=B,this.retryEAGAIN=c||(()=>!0),this.mkdir=g||!1;let f,Q;if(E===cte)this._writingBuf=lw,this.write=AKe,this.flush=rKe,this.flushSync=iKe,this._actualWrite=nKe,f=()=>vt.writeSync(this.fd,this._writingBuf),Q=()=>vt.write(this.fd,this._writingBuf,this.release);else if(E===void 0||E===Ite)this._writingBuf="",this.write=eKe,this.flush=tKe,this.flushSync=aKe,this._actualWrite=oKe,f=()=>Buffer.isBuffer(this._writingBuf)?vt.writeSync(this.fd,this._writingBuf):vt.writeSync(this.fd,this._writingBuf,"utf8"),Q=()=>Buffer.isBuffer(this._writingBuf)?vt.write(this.fd,this._writingBuf,this.release):vt.write(this.fd,this._writingBuf,"utf8",this.release);else throw new Error(`SonicBoom supports "${Ite}" and "${cte}", but passed ${E}`);if(typeof r=="number")this.fd=r,process.nextTick(()=>this.emit("ready"));else if(typeof r=="string")lte(r,this);else throw new Error("SonicBoom supports only file descriptors and files");if(this.minLength>=this.maxWrite)throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`);this.release=(y,m)=>{if(y){if((y.code==="EAGAIN"||y.code==="EBUSY")&&this.retryEAGAIN(y,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{fF(Iw),this.release(void 0,0)}catch(P){this.release(P)}else setTimeout(Q,Iw);else this._writing=!1,this.emit("error",y);return}this.emit("write",m);let T=BF(this._writingBuf,this._len,m);if(this._len=T.len,this._writingBuf=T.writingBuf,this._writingBuf.length){if(!this.sync){Q();return}try{do{let P=f(),Y=BF(this._writingBuf,this._len,P);this._len=Y.len,this._writingBuf=Y.writingBuf}while(this._writingBuf.length)}catch(P){this.release(P);return}}this._fsync&&vt.fsyncSync(this.fd);let _=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):_>this.minLength?this._actualWrite():this._ending?_>0?this._actualWrite():(this._writing=!1,pw(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick($He,this)):this.emit("drain"))},this.on("newListener",function(y){y==="drain"&&(this._asyncDrainScheduled=!1)}),this._periodicFlush!==0&&(this._periodicFlushTimer=setInterval(()=>this.flush(null),this._periodicFlush),this._periodicFlushTimer.unref())}function BF(n,r,o){return typeof n=="string"&&(n=Buffer.from(n)),r=Math.max(r-o,0),n=n.subarray(o),{writingBuf:n,len:r}}function $He(n){n.listenerCount("drain")>0&&(n._asyncDrainScheduled=!1,n.emit("drain"))}qHe(Zo,JHe);function pte(n,r){return n.length===0?lw:n.length===1?n[0]:Buffer.concat(n,r)}function eKe(n){if(this.destroyed)throw new Error("SonicBoom destroyed");n=""+n;let r=Buffer.byteLength(n),o=this._len+r,i=this._bufs;return this.maxLength&&o>this.maxLength?(this.emit("drop",n),this._lenthis.maxWrite?i.push(n):i[i.length-1]+=n,this._len=o,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._lenthis.maxLength?(this.emit("drop",n),this._lenthis.maxWrite?(o.push([n]),i.push(n.length)):(o[o.length-1].push(n),i[i.length-1]+=n.length),this._len=r,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len{if(this._fsync)this._flushPending=!1,n();else try{vt.fsync(this.fd,i=>{this._flushPending=!1,n(i)})}catch(i){n(i)}this.off("error",o)},o=i=>{this._flushPending=!1,n(i),this.off("drain",r)};this.once("drain",r),this.once("error",o)}function tKe(n){if(n!=null&&typeof n!="function")throw new Error("flush cb must be a function");if(this.destroyed){let r=new Error("SonicBoom destroyed");if(n){n(r);return}throw r}if(this.minLength<=0){n?.();return}n&&Ete.call(this,n),!this._writing&&(this._bufs.length===0&&this._bufs.push(""),this._actualWrite())}function rKe(n){if(n!=null&&typeof n!="function")throw new Error("flush cb must be a function");if(this.destroyed){let r=new Error("SonicBoom destroyed");if(n){n(r);return}throw r}if(this.minLength<=0){n?.();return}n&&Ete.call(this,n),!this._writing&&(this._bufs.length===0&&(this._bufs.push([]),this._lens.push(0)),this._actualWrite())}Zo.prototype.reopen=function(n){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.reopen(n)});return}if(this._ending)return;if(!this.file)throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(n&&(this.file=n),this._reopening=!0,this._writing)return;let r=this.fd;this.once("ready",()=>{r!==this.fd&&vt.close(r,o=>{if(o)return this.emit("error",o)})}),lte(this.file,this)};Zo.prototype.end=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.end()});return}this._ending||(this._ending=!0,!this._writing&&(this._len>0&&this.fd>=0?this._actualWrite():pw(this)))};function aKe(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");let n="";for(;this._bufs.length||n.length;){n.length<=0&&(n=this._bufs[0]);try{let r=Buffer.isBuffer(n)?vt.writeSync(this.fd,n):vt.writeSync(this.fd,n,"utf8"),o=BF(n,this._len,r);n=o.writingBuf,this._len=o.len,n.length<=0&&this._bufs.shift()}catch(r){if((r.code==="EAGAIN"||r.code==="EBUSY")&&!this.retryEAGAIN(r,n.length,this._len-n.length))throw r;fF(Iw)}}try{vt.fsyncSync(this.fd)}catch{}}function iKe(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift([this._writingBuf]),this._writingBuf=lw);let n=lw;for(;this._bufs.length||n.length;){n.length<=0&&(n=pte(this._bufs[0],this._lens[0]));try{let r=vt.writeSync(this.fd,n);n=n.subarray(r),this._len=Math.max(this._len-r,0),n.length<=0&&(this._bufs.shift(),this._lens.shift())}catch(r){if((r.code==="EAGAIN"||r.code==="EBUSY")&&!this.retryEAGAIN(r,n.length,this._len-n.length))throw r;fF(Iw)}}}Zo.prototype.destroy=function(){this.destroyed||pw(this)};function oKe(){let n=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:this._bufs.shift()||"",this.sync)try{let r=Buffer.isBuffer(this._writingBuf)?vt.writeSync(this.fd,this._writingBuf):vt.writeSync(this.fd,this._writingBuf,"utf8");n(null,r)}catch(r){n(r)}else vt.write(this.fd,this._writingBuf,n)}function nKe(){let n=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:pte(this._bufs.shift(),this._lens.shift()),this.sync)try{let r=vt.writeSync(this.fd,this._writingBuf);n(null,r)}catch(r){n(r)}else XHe&&(this._writingBuf=Buffer.from(this._writingBuf)),vt.write(this.fd,this._writingBuf,n)}function pw(n){if(n.fd===-1){n.once("ready",pw.bind(null,n));return}n._periodicFlushTimer!==void 0&&clearInterval(n._periodicFlushTimer),n.destroyed=!0,n._bufs=[],n._lens=[],VHe(typeof n.fd=="number",`sonic.fd must be a number, got ${typeof n.fd}`);try{vt.fsync(n.fd,r)}catch{}function r(){n.fd!==1&&n.fd!==2?vt.close(n.fd,o):o()}function o(i){if(i){n.emit("error",i);return}n._ending&&!n._writing&&n.emit("finish"),n.emit("close")}}Zo.SonicBoom=Zo;Zo.default=Zo;Cte.exports=Zo});var QF=W((EuA,Qte)=>{"use strict";var Xo={exit:[],beforeExit:[]},dte={exit:cKe,beforeExit:IKe},ME;function sKe(){ME===void 0&&(ME=new FinalizationRegistry(lKe))}function gKe(n){Xo[n].length>0||process.on(n,dte[n])}function ute(n){Xo[n].length>0||(process.removeListener(n,dte[n]),Xo.exit.length===0&&Xo.beforeExit.length===0&&(ME=void 0))}function cKe(){Bte("exit")}function IKe(){Bte("beforeExit")}function Bte(n){for(let r of Xo[n]){let o=r.deref(),i=r.fn;o!==void 0&&i(o,n)}Xo[n]=[]}function lKe(n){for(let r of["exit","beforeExit"]){let o=Xo[r].indexOf(n);Xo[r].splice(o,o+1),ute(r)}}function fte(n,r,o){if(r===void 0)throw new Error("the object can't be undefined");gKe(n);let i=new WeakRef(r);i.fn=o,sKe(),ME.register(r,i),Xo[n].push(i)}function pKe(n,r){fte("exit",n,r)}function EKe(n,r){fte("beforeExit",n,r)}function CKe(n){if(ME!==void 0){ME.unregister(n);for(let r of["exit","beforeExit"])Xo[r]=Xo[r].filter(o=>{let i=o.deref();return i&&i!==n}),ute(r)}}Qte.exports={register:pKe,registerBeforeExit:EKe,unregister:CKe}});var yte=W((CuA,hKe)=>{hKe.exports={name:"thread-stream",version:"3.2.0",description:"A streaming way to send data to a Node.js Worker Thread",main:"index.js",types:"index.d.ts",dependencies:{"real-require":"^0.2.0"},devDependencies:{"@types/node":"^20.1.0","@types/tap":"^15.0.0","@yao-pkg/pkg":"^5.11.5",desm:"^1.3.0",fastbench:"^1.0.1",husky:"^9.0.6","pino-elasticsearch":"^8.0.0","sonic-boom":"^4.0.1",standard:"^17.0.0",tap:"^16.2.0","ts-node":"^10.8.0",typescript:"^5.3.2","why-is-node-running":"^2.2.2"},scripts:{build:"tsc --noEmit",test:'standard && npm run build && npm run transpile && tap "test/**/*.test.*js" && tap --ts test/*.test.*ts',"test:ci":"standard && npm run transpile && npm run test:ci:js && npm run test:ci:ts","test:ci:js":'tap --no-check-coverage --timeout=120 --coverage-report=lcovonly "test/**/*.test.*js"',"test:ci:ts":'tap --ts --no-check-coverage --coverage-report=lcovonly "test/**/*.test.*ts"',"test:yarn":'npm run transpile && tap "test/**/*.test.js" --no-check-coverage',transpile:"sh ./test/ts/transpile.sh",prepare:"husky install"},standard:{ignore:["test/ts/**/*","test/syntax-error.mjs"]},repository:{type:"git",url:"git+https://github.com/mcollina/thread-stream.git"},keywords:["worker","thread","threads","stream"],author:"Matteo Collina ",license:"MIT",bugs:{url:"https://github.com/mcollina/thread-stream/issues"},homepage:"https://github.com/mcollina/thread-stream#readme"}});var Ste=W((huA,mte)=>{"use strict";function dKe(n,r,o,i,e){let a=Date.now()+i,A=Atomics.load(n,r);if(A===o){e(null,"ok");return}let t=A,s=g=>{Date.now()>a?e(null,"timed-out"):setTimeout(()=>{t=A,A=Atomics.load(n,r),A===t?s(g>=1e3?1e3:g*2):A===o?e(null,"ok"):e(null,"not-equal")},g)};s(1)}function uKe(n,r,o,i,e){let a=Date.now()+i,A=Atomics.load(n,r);if(A!==o){e(null,"ok");return}let t=s=>{Date.now()>a?e(null,"timed-out"):setTimeout(()=>{A=Atomics.load(n,r),A!==o?e(null,"ok"):t(s>=1e3?1e3:s*2)},s)};t(1)}mte.exports={wait:dKe,waitDiff:uKe}});var wte=W((duA,Dte)=>{"use strict";Dte.exports={WRITE_INDEX:4,READ_INDEX:8,SEQ_INDEX:2}});var Nte=W((uuA,_te)=>{"use strict";var{version:BKe}=yte(),{EventEmitter:fKe}=We("events"),{Worker:QKe}=We("worker_threads"),{join:yKe}=We("path"),{pathToFileURL:mKe}=We("url"),{wait:SKe}=Ste(),{WRITE_INDEX:Bo,READ_INDEX:ci,SEQ_INDEX:yF}=wte(),DKe=We("buffer"),wKe=We("assert"),be=Symbol("kImpl"),OKe=DKe.constants.MAX_STRING_LENGTH;function _E(n,r){Atomics.add(n[be].state,yF,1),r(),Atomics.add(n[be].state,yF,1),Atomics.notify(n[be].state,yF)}var wu=class{constructor(r){this._value=r}deref(){return this._value}},Cw=class{register(){}unregister(){}},bKe=process.env.NODE_V8_COVERAGE?Cw:global.FinalizationRegistry||Cw,MKe=process.env.NODE_V8_COVERAGE?wu:global.WeakRef||wu,Ote=new bKe(n=>{n.exited||n.terminate()});function _Ke(n,r){let{filename:o,workerData:i}=r,a=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||yKe(__dirname,"lib","worker.js"),A=new QKe(a,{...r.workerOpts,trackUnmanagedFds:!1,workerData:{filename:o.indexOf("file://")===0?o:mKe(o).href,dataBuf:n[be].dataBuf,stateBuf:n[be].stateBuf,workerData:{$context:{threadStreamVersion:BKe},...i}}});return A.stream=new wu(n),A.on("message",NKe),A.on("exit",Mte),Ote.register(n,A),A}function bte(n){wKe(!n[be].sync),n[be].needDrain&&(n[be].needDrain=!1,n.emit("drain"))}function Ew(n){let r=Atomics.load(n[be].state,Bo),o=n[be].data.length-r;if(o>0){if(n[be].buf.length===0){n[be].flushing=!1,n[be].ending?OF(n):n[be].needDrain&&process.nextTick(bte,n);return}let i=n[be].buf.slice(0,o),e=Buffer.byteLength(i);e<=o?(n[be].buf=n[be].buf.slice(o),hw(n,i,Ew.bind(null,n))):n.flush(()=>{if(!n.destroyed){for(_E(n,()=>{Atomics.store(n[be].state,ci,0),Atomics.store(n[be].state,Bo,0)}),Atomics.notify(n[be].state,ci);e>n[be].data.length;)o=o/2,i=n[be].buf.slice(0,o),e=Buffer.byteLength(i);n[be].buf=n[be].buf.slice(o),hw(n,i,Ew.bind(null,n))}})}else if(o===0){if(r===0&&n[be].buf.length===0)return;n.flush(()=>{_E(n,()=>{Atomics.store(n[be].state,ci,0),Atomics.store(n[be].state,Bo,0)}),Atomics.notify(n[be].state,ci),Ew(n)})}else jn(n,new Error("overwritten"))}function NKe(n){let r=this.stream.deref();if(r===void 0){this.exited=!0,this.terminate();return}if(n?.code!=null)switch(n.code){case"READY":this.stream=new MKe(r),r.flush(()=>{r[be].ready=!0,r.emit("ready")});break;case"ERROR":jn(r,n.err);break;case"EVENT":Array.isArray(n.args)?r.emit(n.name,...n.args):r.emit(n.name,n.args);break;case"WARNING":process.emitWarning(n.err);break;default:jn(r,new Error("this should not happen: "+n.code))}}function Mte(n){let r=this.stream.deref();r!==void 0&&(Ote.unregister(r),r.worker.exited=!0,r.worker.off("exit",Mte),jn(r,n!==0?new Error("the worker thread exited"):null))}var SF=class extends fKe{constructor(r={}){if(super(),r.bufferSize<4)throw new Error("bufferSize must at least fit a 4-byte utf-8 char");this[be]={},this[be].stateBuf=new SharedArrayBuffer(128),this[be].state=new Int32Array(this[be].stateBuf),this[be].dataBuf=new SharedArrayBuffer(r.bufferSize||4*1024*1024),this[be].data=Buffer.from(this[be].dataBuf),this[be].sync=r.sync||!1,this[be].ending=!1,this[be].ended=!1,this[be].needDrain=!1,this[be].destroyed=!1,this[be].flushing=!1,this[be].ready=!1,this[be].finished=!1,this[be].errored=null,this[be].closed=!1,this[be].buf="",this.worker=_Ke(this,r),this.on("message",(o,i)=>{this.worker.postMessage(o,i)})}write(r){if(this[be].destroyed)return DF(this,new Error("the worker has exited")),!1;if(this[be].ending)return DF(this,new Error("the worker is ending")),!1;if(this[be].flushing&&this[be].buf.length+r.length>=OKe)try{mF(this),this[be].flushing=!0}catch(o){return jn(this,o),!1}if(this[be].buf+=r,this[be].sync)try{return mF(this),!0}catch(o){return jn(this,o),!1}return this[be].flushing||(this[be].flushing=!0,setImmediate(Ew,this)),this[be].needDrain=this[be].data.length-this[be].buf.length-Atomics.load(this[be].state,Bo)<=0,!this[be].needDrain}end(){this[be].destroyed||(this[be].ending=!0,OF(this))}flush(r){if(this[be].destroyed){typeof r=="function"&&process.nextTick(r,new Error("the worker has exited"));return}let o=Atomics.load(this[be].state,Bo);SKe(this[be].state,ci,o,1/0,(i,e)=>{if(i){jn(this,i),process.nextTick(r,i);return}if(e==="not-equal"){this.flush(r);return}process.nextTick(r)})}flushSync(){this[be].destroyed||(mF(this),wF(this))}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[be].ready}get destroyed(){return this[be].destroyed}get closed(){return this[be].closed}get writable(){return!this[be].destroyed&&!this[be].ending}get writableEnded(){return this[be].ending}get writableFinished(){return this[be].finished}get writableNeedDrain(){return this[be].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[be].errored}};function DF(n,r){setImmediate(()=>{n.emit("error",r)})}function jn(n,r){n[be].destroyed||(n[be].destroyed=!0,r&&(n[be].errored=r,DF(n,r)),n.worker.exited?setImmediate(()=>{n[be].closed=!0,n.emit("close")}):n.worker.terminate().catch(()=>{}).then(()=>{n[be].closed=!0,n.emit("close")}))}function hw(n,r,o){let i=Atomics.load(n[be].state,Bo),e=Buffer.byteLength(r);return n[be].data.write(r,i),_E(n,()=>{Atomics.store(n[be].state,Bo,i+e)}),o(),!0}function OF(n){if(!(n[be].ended||!n[be].ending||n[be].flushing)){n[be].ended=!0;try{n.flushSync();let r=Atomics.load(n[be].state,ci);_E(n,()=>{Atomics.store(n[be].state,Bo,-1)});let o=0;for(;r!==-1;){if(Atomics.wait(n[be].state,ci,r,1e3),r=Atomics.load(n[be].state,ci),r===-2){jn(n,new Error("end() failed"));return}if(++o===10){jn(n,new Error("end() took too long (10s)"));return}}process.nextTick(()=>{n[be].finished=!0,n.emit("finish")})}catch(r){jn(n,r)}}}function mF(n){let r=()=>{n[be].ending?OF(n):n[be].needDrain&&process.nextTick(bte,n)};for(n[be].flushing=!1;n[be].buf.length!==0;){let o=Atomics.load(n[be].state,Bo),i=n[be].data.length-o;if(i===0){wF(n),_E(n,()=>{Atomics.store(n[be].state,ci,0),Atomics.store(n[be].state,Bo,0)}),Atomics.notify(n[be].state,ci);continue}else if(i<0)throw new Error("overwritten");let e=n[be].buf.slice(0,i),a=Buffer.byteLength(e);if(a<=i)n[be].buf=n[be].buf.slice(i),hw(n,e,r);else{for(wF(n),_E(n,()=>{Atomics.store(n[be].state,ci,0),Atomics.store(n[be].state,Bo,0)}),Atomics.notify(n[be].state,ci);a>n[be].buf.length;)i=i/2,e=n[be].buf.slice(0,i),a=Buffer.byteLength(e);n[be].buf=n[be].buf.slice(i),hw(n,e,r)}}}function wF(n){if(n[be].flushing)throw new Error("unable to flush while flushing");let r=Atomics.load(n[be].state,Bo),o=0;for(;;){let i=Atomics.load(n[be].state,ci);if(i===-2)throw Error("_flushSync failed");if(i!==r)Atomics.wait(n[be].state,ci,i,1e3);else break;if(++o===10)throw new Error("_flushSync took too long (10s)")}}_te.exports=SF});var _F=W((BuA,Tte)=>{"use strict";var{createRequire:TKe}=We("module"),RKe=pF(),{join:bF,isAbsolute:kKe,sep:vKe}=We("node:path"),PKe=uF(),MF=QF(),GKe=Nte();function FKe(n){MF.register(n,UKe),MF.registerBeforeExit(n,HKe),n.on("close",function(){MF.unregister(n)})}function LKe(n,r,o,i){let e=new GKe({filename:n,workerData:r,workerOpts:o,sync:i});e.on("ready",a),e.on("close",function(){process.removeListener("exit",A)}),process.on("exit",A);function a(){process.removeListener("exit",A),e.unref(),o.autoEnd!==!1&&FKe(e)}function A(){e.closed||(e.flushSync(),PKe(100),e.end())}return e}function UKe(n){n.ref(),n.flushSync(),n.end(),n.once("close",function(){n.unref()})}function HKe(n){n.flushSync()}function KKe(n){let{pipeline:r,targets:o,levels:i,dedupe:e,worker:a={},caller:A=RKe(),sync:t=!1}=n,s={...n.options},g=typeof A=="string"?[A]:A,c="__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{},I=n.target;if(I&&o)throw new Error("only one of target or targets can be specified");return o?(I=c["pino-worker"]||bF(__dirname,"worker.js"),s.targets=o.filter(B=>B.target).map(B=>({...B,target:E(B.target)})),s.pipelines=o.filter(B=>B.pipeline).map(B=>B.pipeline.map(f=>({...f,level:B.level,target:E(f.target)})))):r&&(I=c["pino-worker"]||bF(__dirname,"worker.js"),s.pipelines=[r.map(B=>({...B,target:E(B.target)}))]),i&&(s.levels=i),e&&(s.dedupe=e),s.pinoWillSendConfig=!0,LKe(E(I),s,a,t);function E(B){if(B=c[B]||B,kKe(B)||B.indexOf("file://")===0)return B;if(B==="pino/file")return bF(__dirname,"..","file.js");let f;for(let Q of g)try{let y=Q==="node:repl"?process.cwd()+vKe:Q;f=TKe(y).resolve(B);break}catch{continue}if(!f)throw new Error(`unable to determine transport target for "${B}"`);return f}}Tte.exports=KKe});var fw=W((fuA,jte)=>{"use strict";var Rte=We("node:diagnostics_channel"),kte=ste(),{mapHttpRequest:YKe,mapHttpResponse:xKe}=lF(),TF=hte(),vte=QF(),{lsCacheSym:jKe,chindingsSym:Lte,writeSym:Pte,serializersSym:Ute,formatOptsSym:Gte,endSym:JKe,stringifiersSym:Hte,stringifySym:Kte,stringifySafeSym:RF,wildcardFirstSym:Yte,nestedKeySym:qKe,formattersSym:xte,messageKeySym:VKe,errorKeySym:zKe,nestedKeyStrSym:WKe,msgPrefixSym:dw}=bE(),{isMainThread:ZKe}=We("worker_threads"),XKe=_F(),Bw;typeof Rte.tracingChannel=="function"?Bw=Rte.tracingChannel("pino_asJson"):Bw={hasSubscribers:!1,traceSync(n,r,o,...i){return n.call(o,...i)}};function NE(){}function $Ke(n,r){if(!r)return o;return function(...e){r.call(this,e,o,n)};function o(i,...e){if(typeof i=="object"){let a=i;i!==null&&(i.method&&i.headers&&i.socket?i=YKe(i):typeof i.setHeader=="function"&&(i=xKe(i)));let A;a===null&&e.length===0?A=[null]:(a=e.shift(),A=e),typeof this[dw]=="string"&&a!==void 0&&a!==null&&(a=this[dw]+a),this[Pte](i,kte(a,A,this[Gte]),n)}else{let a=i===void 0?e.shift():i;typeof this[dw]=="string"&&a!==void 0&&a!==null&&(a=this[dw]+a),this[Pte](null,kte(a,e,this[Gte]),n)}}}function NF(n){let r="",o=0,i=!1,e=255,a=n.length;if(a>100)return JSON.stringify(n);for(var A=0;A=32;A++)e=n.charCodeAt(A),(e===34||e===92)&&(r+=n.slice(o,A)+"\\",o=A,i=!0);return i?r+=n.slice(o):r=n,e<32?JSON.stringify(n):'"'+r+'"'}function eYe(n,r,o,i){if(Bw.hasSubscribers===!1)return Fte.call(this,n,r,o,i);let e={instance:this,arguments};return Bw.traceSync(Fte,e,this,n,r,o,i)}function Fte(n,r,o,i){let e=this[Kte],a=this[RF],A=this[Hte],t=this[JKe],s=this[Lte],g=this[Ute],c=this[xte],I=this[VKe],E=this[zKe],B=this[jKe][o]+i;B=B+s;let f;c.log&&(n=c.log(n));let Q=A[Yte],y="";for(let T in n)if(f=n[T],Object.prototype.hasOwnProperty.call(n,T)&&f!==void 0){g[T]?f=g[T](f):T===E&&g.err&&(f=g.err(f));let _=A[T]||Q;switch(typeof f){case"undefined":case"function":continue;case"number":Number.isFinite(f)===!1&&(f=null);case"boolean":_&&(f=_(f));break;case"string":f=(_||NF)(f);break;default:f=(_||e)(f,a)}if(f===void 0)continue;let P=NF(T);y+=","+P+":"+f}let m="";if(r!==void 0){f=g[I]?g[I](r):r;let T=A[I]||Q;switch(typeof f){case"function":break;case"number":Number.isFinite(f)===!1&&(f=null);case"boolean":T&&(f=T(f)),m=',"'+I+'":'+f;break;case"string":f=(T||NF)(f),m=',"'+I+'":'+f;break;default:f=(T||e)(f,a),m=',"'+I+'":'+f}}return this[qKe]&&y?B+this[WKe]+y.slice(1)+"}"+m+t:B+y+m+t}function AYe(n,r){let o,i=n[Lte],e=n[Kte],a=n[RF],A=n[Hte],t=A[Yte],s=n[Ute],g=n[xte].bindings;r=g(r);for(let c in r)if(o=r[c],((c.length<5||c!=="level"&&c!=="serializers"&&c!=="formatters"&&c!=="customLevels")&&r.hasOwnProperty(c)&&o!==void 0)===!0){if(o=s[c]?s[c](o):o,o=(A[c]||t||e)(o,a),o===void 0)continue;i+=',"'+c+'":'+o}return i}function tYe(n){return n.write!==n.constructor.prototype.write}function uw(n){let r=new TF(n);return r.on("error",o),!n.sync&&ZKe&&(vte.register(r,rYe),r.on("close",function(){vte.unregister(r)})),r;function o(i){if(i.code==="EPIPE"){r.write=NE,r.end=NE,r.flushSync=NE,r.destroy=NE;return}r.removeListener("error",o),r.emit("error",i)}}function rYe(n,r){n.destroyed||(r==="beforeExit"?(n.flush(),n.on("drain",function(){n.end()})):n.flushSync())}function aYe(n){return function(o,i,e={},a){if(typeof e=="string")a=uw({dest:e}),e={};else if(typeof a=="string"){if(e&&e.transport)throw Error("only one of option.transport or stream can be specified");a=uw({dest:a})}else if(e instanceof TF||e.writable||e._writableState)a=e,e={};else if(e.transport){if(e.transport instanceof TF||e.transport.writable||e.transport._writableState)throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");if(e.transport.targets&&e.transport.targets.length&&e.formatters&&typeof e.formatters.level=="function")throw Error("option.transport.targets do not allow custom level formatters");let s;e.customLevels&&(s=e.useOnlyCustomLevels?e.customLevels:Object.assign({},e.levels,e.customLevels)),a=XKe({caller:i,...e.transport,levels:s})}if(e=Object.assign({},n,e),e.serializers=Object.assign({},n.serializers,e.serializers),e.formatters=Object.assign({},n.formatters,e.formatters),e.prettyPrint)throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");let{enabled:A,onChild:t}=e;return A===!1&&(e.level="silent"),t||(e.onChild=NE),a||(tYe(process.stdout)?a=process.stdout:a=uw({fd:process.stdout.fd||1})),{opts:e,stream:a}}}function iYe(n,r){try{return JSON.stringify(n)}catch{try{return(r||this[RF])(n)}catch{return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function oYe(n,r,o){return{level:n,bindings:r,log:o}}function nYe(n){let r=Number(n);return typeof n=="string"&&Number.isFinite(r)?r:n===void 0?1:n}jte.exports={noop:NE,buildSafeSonicBoom:uw,asChindings:AYe,asJson:eYe,genLog:$Ke,createArgsNormalizer:aYe,stringify:iYe,buildFormatters:oYe,normalizeDestFileDescriptor:nYe}});var Qw=W((QuA,Jte)=>{var sYe={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},gYe={ASC:"ASC",DESC:"DESC"};Jte.exports={DEFAULT_LEVELS:sYe,SORTING_ORDER:gYe}});var PF=W((yuA,Wte)=>{"use strict";var{lsCacheSym:cYe,levelValSym:kF,useOnlyCustomLevelsSym:IYe,streamSym:lYe,formattersSym:pYe,hooksSym:EYe,levelCompSym:qte}=bE(),{noop:CYe,genLog:kI}=fw(),{DEFAULT_LEVELS:Jn,SORTING_ORDER:Vte}=Qw(),zte={fatal:n=>{let r=kI(Jn.fatal,n);return function(...o){let i=this[lYe];if(r.call(this,...o),typeof i.flushSync=="function")try{i.flushSync()}catch{}}},error:n=>kI(Jn.error,n),warn:n=>kI(Jn.warn,n),info:n=>kI(Jn.info,n),debug:n=>kI(Jn.debug,n),trace:n=>kI(Jn.trace,n)},vF=Object.keys(Jn).reduce((n,r)=>(n[Jn[r]]=r,n),{}),hYe=Object.keys(vF).reduce((n,r)=>(n[r]='{"level":'+Number(r),n),{});function dYe(n){let r=n[pYe].level,{labels:o}=n.levels,i={};for(let e in o){let a=r(o[e],Number(e));i[e]=JSON.stringify(a).slice(0,-1)}return n[cYe]=i,n}function uYe(n,r){if(r)return!1;switch(n){case"fatal":case"error":case"warn":case"info":case"debug":case"trace":return!0;default:return!1}}function BYe(n){let{labels:r,values:o}=this.levels;if(typeof n=="number"){if(r[n]===void 0)throw Error("unknown level value"+n);n=r[n]}if(o[n]===void 0)throw Error("unknown level "+n);let i=this[kF],e=this[kF]=o[n],a=this[IYe],A=this[qte],t=this[EYe].logMethod;for(let s in o){if(A(o[s],e)===!1){this[s]=CYe;continue}this[s]=uYe(s,a)?zte[s](t):kI(o[s],t)}this.emit("level-change",n,e,r[i],i,this)}function fYe(n){let{levels:r,levelVal:o}=this;return r&&r.labels?r.labels[o]:""}function QYe(n){let{values:r}=this.levels,o=r[n];return o!==void 0&&this[qte](o,this[kF])}function yYe(n,r,o){return n===Vte.DESC?r<=o:r>=o}function mYe(n){return typeof n=="string"?yYe.bind(null,n):n}function SYe(n=null,r=!1){let o=n?Object.keys(n).reduce((a,A)=>(a[n[A]]=A,a),{}):null,i=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),r?null:vF,o),e=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),r?null:Jn,n);return{labels:i,values:e}}function DYe(n,r,o){if(typeof n=="number"){if(![].concat(Object.keys(r||{}).map(a=>r[a]),o?[]:Object.keys(vF).map(a=>+a),1/0).includes(n))throw Error(`default level:${n} must be included in custom levels`);return}let i=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),o?null:Jn,r);if(!(n in i))throw Error(`default level:${n} must be included in custom levels`)}function wYe(n,r){let{labels:o,values:i}=n;for(let e in r){if(e in i)throw Error("levels cannot be overridden");if(r[e]in o)throw Error("pre-existing level values cannot be used for new levels")}}function OYe(n){if(typeof n!="function"&&!(typeof n=="string"&&Object.values(Vte).includes(n)))throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type')}Wte.exports={initialLsCache:hYe,genLsCache:dYe,levelMethods:zte,getLevel:fYe,setLevel:BYe,isLevelEnabled:QYe,mappings:SYe,assertNoLevelCollisions:wYe,assertDefaultLevelFound:DYe,genLevelComparison:mYe,assertLevelComparison:OYe}});var GF=W((muA,Zte)=>{"use strict";Zte.exports={version:"9.14.0"}});var ire=W((DuA,are)=>{"use strict";var{EventEmitter:bYe}=We("node:events"),{lsCacheSym:MYe,levelValSym:_Ye,setLevelSym:mw,getLevelSym:Xte,chindingsSym:Sw,parsedChindingsSym:NYe,mixinSym:TYe,asJsonSym:ere,writeSym:RYe,mixinMergeStrategySym:kYe,timeSym:vYe,timeSliceIndexSym:PYe,streamSym:Are,serializersSym:vI,formattersSym:Ou,errorKeySym:GYe,messageKeySym:FYe,useOnlyCustomLevelsSym:LYe,needsMetadataGsym:UYe,redactFmtSym:HYe,stringifySym:KYe,formatOptsSym:YYe,stringifiersSym:xYe,msgPrefixSym:LF,hooksSym:jYe}=bE(),{getLevel:JYe,setLevel:qYe,isLevelEnabled:VYe,mappings:zYe,initialLsCache:WYe,genLsCache:ZYe,assertNoLevelCollisions:XYe}=PF(),{asChindings:UF,asJson:$Ye,buildFormatters:FF,stringify:$te,noop:tre}=fw(),{version:exe}=GF(),Axe=hF(),txe=class{},rre={constructor:txe,child:rxe,bindings:axe,setBindings:ixe,flush:sxe,isLevelEnabled:VYe,version:exe,get level(){return this[Xte]()},set level(n){this[mw](n)},get levelVal(){return this[_Ye]},set levelVal(n){throw Error("levelVal is read-only")},get msgPrefix(){return this[LF]},get[Symbol.toStringTag](){return"Pino"},[MYe]:WYe,[RYe]:nxe,[ere]:$Ye,[Xte]:JYe,[mw]:qYe};Object.setPrototypeOf(rre,bYe.prototype);are.exports=function(){return Object.create(rre)};var yw=n=>n;function rxe(n,r){if(!n)throw Error("missing bindings for child Pino");let o=this[vI],i=this[Ou],e=Object.create(this);if(r==null)return e[Ou].bindings!==yw&&(e[Ou]=FF(i.level,yw,i.log)),e[Sw]=UF(e,n),e[mw](this.level),this.onChild!==tre&&this.onChild(e),e;if(r.hasOwnProperty("serializers")===!0){e[vI]=Object.create(null);for(let c in o)e[vI][c]=o[c];let s=Object.getOwnPropertySymbols(o);for(var a=0;a{"use strict";var{hasOwnProperty:bu}=Object.prototype,GI=YF();GI.configure=YF;GI.stringify=GI;GI.default=GI;xF.stringify=GI;xF.configure=YF;sre.exports=GI;var gxe=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function Ac(n){return n.length<5e3&&!gxe.test(n)?`"${n}"`:JSON.stringify(n)}function HF(n,r){if(n.length>200||r)return n.sort(r);for(let o=1;oi;)n[e]=n[e-1],e--;n[e]=i}return n}var cxe=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function KF(n){return cxe.call(n)!==void 0&&n.length!==0}function ore(n,r,o){n.length= 1`)}return o===void 0?1/0:o}function PI(n){return n===1?"1 item":`${n} items`}function Exe(n){let r=new Set;for(let o of n)(typeof o=="string"||typeof o=="number")&&r.add(String(o));return r}function Cxe(n){if(bu.call(n,"strict")){let r=n.strict;if(typeof r!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(r)return o=>{let i=`Object can not safely be stringified. Received type ${typeof o}`;throw typeof o!="function"&&(i+=` (${o.toString()})`),new Error(i)}}}function YF(n){n={...n};let r=Cxe(n);r&&(n.bigint===void 0&&(n.bigint=!1),"circularValue"in n||(n.circularValue=Error));let o=Ixe(n),i=pxe(n,"bigint"),e=lxe(n),a=typeof e=="function"?e:void 0,A=nre(n,"maximumDepth"),t=nre(n,"maximumBreadth");function s(B,f,Q,y,m,T){let _=f[B];switch(typeof _=="object"&&_!==null&&typeof _.toJSON=="function"&&(_=_.toJSON(B)),_=y.call(f,B,_),typeof _){case"string":return Ac(_);case"object":{if(_===null)return"null";if(Q.indexOf(_)!==-1)return o;let P="",Y=",",j=T;if(Array.isArray(_)){if(_.length===0)return"[]";if(At){let G=_.length-t-1;P+=`${Y}"... ${PI(G)} not stringified"`}return m!==""&&(P+=` ${j}`),Q.pop(),`[${P}]`}let K=Object.keys(_),q=K.length;if(q===0)return"{}";if(At){let V=P-t;j+=`${K}"...": "${PI(V)} not stringified"`,K=Y}return K!==""&&(j=` ${m}${j} -${T}`),Q.pop(),`{${j}}`}case"number":return isFinite(f)?String(f):r?r(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return r?r(f):void 0}}function I(B,f,Q){switch(typeof f){case"string":return Ac(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(B),typeof f!="object")return I(B,f,Q);if(f===null)return"null"}if(Q.indexOf(f)!==-1)return o;let y="",m=f.length!==void 0;if(m&&Array.isArray(f)){if(f.length===0)return"[]";if(At){let V=f.length-t-1;y+=`,"... ${PI(V)} not stringified"`}return Q.pop(),`[${y}]`}let T=Object.keys(f),_=T.length;if(_===0)return"{}";if(At){let j=_-t;y+=`${P}"...":"${PI(j)} not stringified"`}return Q.pop(),`{${y}}`}case"number":return isFinite(f)?String(f):r?r(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return r?r(f):void 0}}function E(B,f,Q){if(arguments.length>1){let y="";if(typeof Q=="number"?y=" ".repeat(Math.min(Q,10)):typeof Q=="string"&&(y=Q.slice(0,10)),f!=null){if(typeof f=="function")return s("",{"":B},[],f,y,"");if(Array.isArray(f))return g("",B,[],Ixe(f),y,"")}if(y.length!==0)return c("",B,[],y,"")}return I("",B,[])}return E}});var pre=W((muA,lre)=>{"use strict";var jF=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:Ire}=Qw(),pxe=Ire.info;function Exe(n,r){n=n||[],r=r||{dedupe:!1};let o=Object.create(Ire);o.silent=1/0,r.levels&&typeof r.levels=="object"&&Object.keys(r.levels).forEach(I=>{o[I]=r.levels[I]});let i={write:e,add:t,remove:s,emit:a,flushSync:A,end:g,minLevel:0,lastId:0,streams:[],clone:c,[jF]:!0,streamLevels:o};return Array.isArray(n)?n.forEach(t,i):t.call(i,n),n=null,i;function e(I){let E,B=this.lastLevel,{streams:f}=this,Q=0,y;for(let m=Cxe(f.length,r.dedupe);dxe(m,f.length,r.dedupe);m=hxe(m,r.dedupe))if(E=f[m],E.level<=B){if(Q!==0&&Q!==E.level)break;if(y=E.stream,y[jF]){let{lastTime:T,lastMsg:_,lastObj:P,lastLogger:Y}=this;y.lastLevel=B,y.lastTime=T,y.lastMsg=_,y.lastObj=P,y.lastLogger=Y}y.write(I),r.dedupe&&(Q=E.level)}else if(!r.dedupe)break}function a(...I){for(let{stream:E}of this.streams)typeof E.emit=="function"&&E.emit(...I)}function A(){for(let{stream:I}of this.streams)typeof I.flushSync=="function"&&I.flushSync()}function t(I){if(!I)return i;let E=typeof I.write=="function"||I.stream,B=I.write?I:I.stream;if(!E)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:f,streamLevels:Q}=this,y;typeof I.levelVal=="number"?y=I.levelVal:typeof I.level=="string"?y=Q[I.level]:typeof I.level=="number"?y=I.level:y=pxe;let m={stream:B,level:y,levelVal:void 0,id:++i.lastId};return f.unshift(m),f.sort(cre),this.minLevel=f[0].level,i}function s(I){let{streams:E}=this,B=E.findIndex(f=>f.id===I);return B>=0&&(E.splice(B,1),E.sort(cre),this.minLevel=E.length>0?E[0].level:-1),i}function g(){for(let{stream:I}of this.streams)typeof I.flushSync=="function"&&I.flushSync(),I.end()}function c(I){let E=new Array(this.streams.length);for(let B=0;B=0:n{"use strict";var uxe=We("node:os"),Qre=lF(),Bxe=pF(),fxe=hF(),yre=ote(),Qxe=ire(),mre=bE(),{configure:yxe}=gre(),{assertDefaultLevelFound:mxe,mappings:Sre,genLsCache:Sxe,genLevelComparison:Dxe,assertLevelComparison:wxe}=PF(),{DEFAULT_LEVELS:Dre,SORTING_ORDER:Oxe}=Qw(),{createArgsNormalizer:bxe,asChindings:Mxe,buildSafeSonicBoom:Ere,buildFormatters:_xe,stringify:JF,normalizeDestFileDescriptor:Cre,noop:Nxe}=fw(),{version:Txe}=GF(),{chindingsSym:hre,redactFmtSym:Rxe,serializersSym:dre,timeSym:kxe,timeSliceIndexSym:vxe,streamSym:Pxe,stringifySym:ure,stringifySafeSym:qF,stringifiersSym:Bre,setLevelSym:Gxe,endSym:Fxe,formatOptsSym:Lxe,messageKeySym:Uxe,errorKeySym:Hxe,nestedKeySym:Kxe,mixinSym:Yxe,levelCompSym:xxe,useOnlyCustomLevelsSym:jxe,formattersSym:fre,hooksSym:Jxe,nestedKeyStrSym:qxe,mixinMergeStrategySym:Vxe,msgPrefixSym:zxe}=mre,{epochTime:wre,nullTime:Wxe}=yre,{pid:Zxe}=process,Xxe=uxe.hostname(),$xe=Qre.err,e1e={level:"info",levelComparison:Oxe.ASC,levels:Dre,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:Zxe,hostname:Xxe},serializers:Object.assign(Object.create(null),{err:$xe}),formatters:Object.assign(Object.create(null),{bindings(n){return n},level(n,r){return{level:r}}}),hooks:{logMethod:void 0,streamWrite:void 0},timestamp:wre,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},A1e=bxe(e1e),t1e=Object.assign(Object.create(null),Qre);function VF(...n){let r={},{opts:o,stream:i}=A1e(r,Bxe(),...n);o.level&&typeof o.level=="string"&&Dre[o.level.toLowerCase()]!==void 0&&(o.level=o.level.toLowerCase());let{redact:e,crlf:a,serializers:A,timestamp:t,messageKey:s,errorKey:g,nestedKey:c,base:I,name:E,level:B,customLevels:f,levelComparison:Q,mixin:y,mixinMergeStrategy:m,useOnlyCustomLevels:T,formatters:_,hooks:P,depthLimit:Y,edgeLimit:j,onChild:K,msgPrefix:q}=o,V=yxe({maximumDepth:Y,maximumBreadth:j}),H=_xe(_.level,_.bindings,_.log),v=JF.bind({[qF]:V}),Z=e?fxe(e,v):{},U=e?{stringify:Z[Rxe]}:{stringify:v},M="}"+(a?`\r +${T}`),Q.pop(),`{${j}}`}case"number":return isFinite(f)?String(f):r?r(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return r?r(f):void 0}}function I(B,f,Q){switch(typeof f){case"string":return Ac(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(B),typeof f!="object")return I(B,f,Q);if(f===null)return"null"}if(Q.indexOf(f)!==-1)return o;let y="",m=f.length!==void 0;if(m&&Array.isArray(f)){if(f.length===0)return"[]";if(At){let V=f.length-t-1;y+=`,"... ${PI(V)} not stringified"`}return Q.pop(),`[${y}]`}let T=Object.keys(f),_=T.length;if(_===0)return"{}";if(At){let j=_-t;y+=`${P}"...":"${PI(j)} not stringified"`}return Q.pop(),`{${y}}`}case"number":return isFinite(f)?String(f):r?r(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return r?r(f):void 0}}function E(B,f,Q){if(arguments.length>1){let y="";if(typeof Q=="number"?y=" ".repeat(Math.min(Q,10)):typeof Q=="string"&&(y=Q.slice(0,10)),f!=null){if(typeof f=="function")return s("",{"":B},[],f,y,"");if(Array.isArray(f))return g("",B,[],Exe(f),y,"")}if(y.length!==0)return c("",B,[],y,"")}return I("",B,[])}return E}});var pre=W((wuA,lre)=>{"use strict";var jF=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:Ire}=Qw(),hxe=Ire.info;function dxe(n,r){n=n||[],r=r||{dedupe:!1};let o=Object.create(Ire);o.silent=1/0,r.levels&&typeof r.levels=="object"&&Object.keys(r.levels).forEach(I=>{o[I]=r.levels[I]});let i={write:e,add:t,remove:s,emit:a,flushSync:A,end:g,minLevel:0,lastId:0,streams:[],clone:c,[jF]:!0,streamLevels:o};return Array.isArray(n)?n.forEach(t,i):t.call(i,n),n=null,i;function e(I){let E,B=this.lastLevel,{streams:f}=this,Q=0,y;for(let m=uxe(f.length,r.dedupe);fxe(m,f.length,r.dedupe);m=Bxe(m,r.dedupe))if(E=f[m],E.level<=B){if(Q!==0&&Q!==E.level)break;if(y=E.stream,y[jF]){let{lastTime:T,lastMsg:_,lastObj:P,lastLogger:Y}=this;y.lastLevel=B,y.lastTime=T,y.lastMsg=_,y.lastObj=P,y.lastLogger=Y}y.write(I),r.dedupe&&(Q=E.level)}else if(!r.dedupe)break}function a(...I){for(let{stream:E}of this.streams)typeof E.emit=="function"&&E.emit(...I)}function A(){for(let{stream:I}of this.streams)typeof I.flushSync=="function"&&I.flushSync()}function t(I){if(!I)return i;let E=typeof I.write=="function"||I.stream,B=I.write?I:I.stream;if(!E)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:f,streamLevels:Q}=this,y;typeof I.levelVal=="number"?y=I.levelVal:typeof I.level=="string"?y=Q[I.level]:typeof I.level=="number"?y=I.level:y=hxe;let m={stream:B,level:y,levelVal:void 0,id:++i.lastId};return f.unshift(m),f.sort(cre),this.minLevel=f[0].level,i}function s(I){let{streams:E}=this,B=E.findIndex(f=>f.id===I);return B>=0&&(E.splice(B,1),E.sort(cre),this.minLevel=E.length>0?E[0].level:-1),i}function g(){for(let{stream:I}of this.streams)typeof I.flushSync=="function"&&I.flushSync(),I.end()}function c(I){let E=new Array(this.streams.length);for(let B=0;B=0:n{"use strict";var Qxe=We("node:os"),Qre=lF(),yxe=pF(),mxe=hF(),yre=ote(),Sxe=ire(),mre=bE(),{configure:Dxe}=gre(),{assertDefaultLevelFound:wxe,mappings:Sre,genLsCache:Oxe,genLevelComparison:bxe,assertLevelComparison:Mxe}=PF(),{DEFAULT_LEVELS:Dre,SORTING_ORDER:_xe}=Qw(),{createArgsNormalizer:Nxe,asChindings:Txe,buildSafeSonicBoom:Ere,buildFormatters:Rxe,stringify:JF,normalizeDestFileDescriptor:Cre,noop:kxe}=fw(),{version:vxe}=GF(),{chindingsSym:hre,redactFmtSym:Pxe,serializersSym:dre,timeSym:Gxe,timeSliceIndexSym:Fxe,streamSym:Lxe,stringifySym:ure,stringifySafeSym:qF,stringifiersSym:Bre,setLevelSym:Uxe,endSym:Hxe,formatOptsSym:Kxe,messageKeySym:Yxe,errorKeySym:xxe,nestedKeySym:jxe,mixinSym:Jxe,levelCompSym:qxe,useOnlyCustomLevelsSym:Vxe,formattersSym:fre,hooksSym:zxe,nestedKeyStrSym:Wxe,mixinMergeStrategySym:Zxe,msgPrefixSym:Xxe}=mre,{epochTime:wre,nullTime:$xe}=yre,{pid:e1e}=process,A1e=Qxe.hostname(),t1e=Qre.err,r1e={level:"info",levelComparison:_xe.ASC,levels:Dre,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:e1e,hostname:A1e},serializers:Object.assign(Object.create(null),{err:t1e}),formatters:Object.assign(Object.create(null),{bindings(n){return n},level(n,r){return{level:r}}}),hooks:{logMethod:void 0,streamWrite:void 0},timestamp:wre,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},a1e=Nxe(r1e),i1e=Object.assign(Object.create(null),Qre);function VF(...n){let r={},{opts:o,stream:i}=a1e(r,yxe(),...n);o.level&&typeof o.level=="string"&&Dre[o.level.toLowerCase()]!==void 0&&(o.level=o.level.toLowerCase());let{redact:e,crlf:a,serializers:A,timestamp:t,messageKey:s,errorKey:g,nestedKey:c,base:I,name:E,level:B,customLevels:f,levelComparison:Q,mixin:y,mixinMergeStrategy:m,useOnlyCustomLevels:T,formatters:_,hooks:P,depthLimit:Y,edgeLimit:j,onChild:K,msgPrefix:q}=o,V=Dxe({maximumDepth:Y,maximumBreadth:j}),H=Rxe(_.level,_.bindings,_.log),v=JF.bind({[qF]:V}),Z=e?mxe(e,v):{},U=e?{stringify:Z[Pxe]}:{stringify:v},M="}"+(a?`\r `:` -`),G=Mxe.bind(null,{[hre]:"",[dre]:A,[Bre]:Z,[ure]:JF,[qF]:V,[fre]:H}),te="";I!==null&&(E===void 0?te=G(I):te=G(Object.assign({},I,{name:E})));let Be=t instanceof Function?t:t?wre:Wxe,Ce=Be().indexOf(":")+1;if(T&&!f)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(y&&typeof y!="function")throw Error(`Unknown mixin type "${typeof y}" - expected "function"`);if(q&&typeof q!="string")throw Error(`Unknown msgPrefix type "${typeof q}" - expected "string"`);mxe(B,f,T);let ke=Sre(f,T);typeof i.emit=="function"&&i.emit("message",{code:"PINO_CONFIG",config:{levels:ke,messageKey:s,errorKey:g}}),wxe(Q);let Ee=Dxe(Q);return Object.assign(r,{levels:ke,[xxe]:Ee,[jxe]:T,[Pxe]:i,[kxe]:Be,[vxe]:Ce,[ure]:JF,[qF]:V,[Bre]:Z,[Fxe]:M,[Lxe]:U,[Uxe]:s,[Hxe]:g,[Kxe]:c,[qxe]:c?`,${JSON.stringify(c)}:{`:"",[dre]:A,[Yxe]:y,[Vxe]:m,[hre]:te,[fre]:H,[Jxe]:P,silent:Nxe,onChild:K,[zxe]:q}),Object.setPrototypeOf(r,Qxe()),Sxe(r),r[Gxe](B),r}fo.exports=VF;fo.exports.destination=(n=process.stdout.fd)=>typeof n=="object"?(n.dest=Cre(n.dest||process.stdout.fd),Ere(n)):Ere({dest:Cre(n),minLength:0});fo.exports.transport=_F();fo.exports.multistream=pre();fo.exports.levels=Sre();fo.exports.stdSerializers=t1e;fo.exports.stdTimeFunctions=Object.assign({},yre);fo.exports.symbols=mre;fo.exports.version=Txe;fo.exports.default=VF;fo.exports.pino=VF});import{unlink as ese}from"node:fs/promises";import{homedir as Ase}from"node:os";import{join as zE,resolve as gc}from"node:path";import{createHash as Vae,randomUUID as FL}from"node:crypto";import{mkdir as zae,readFile as Wae,rename as Zae,unlink as GL,writeFile as Xae}from"node:fs/promises";import{dirname as $ae}from"node:path";var eO=Object.freeze({version:1,bots:Object.freeze([])}),eie=new Set(["clientId","secretRef","approvedSenders"]);function So(n){return typeof n=="string"&&n.trim()?n.trim():null}function Aie(n){return Vae("sha256").update(n).digest("hex")}function LL(n){let r=So(n);return r&&/^dt_[a-f0-9]{24}$/.test(r)?r:null}function tie(n){let r=So(n);return r&&/^DSH_DINGTALK_BOT_SECRET_[A-F0-9]{24}$/.test(r)?r:null}function rie(n){let r=So(n);return r&&/^dt_sender_[a-f0-9]{32}$/.test(r)?r:null}function aie(n){let r=typeof n=="string"?{staffId:n}:n;if(!r||typeof r!="object"||Array.isArray(r))return null;let o=rie(r.senderKey),i=So(r.staffId);return!o||!i?null:Object.freeze({senderKey:o,staffId:i,displayName:So(r.displayName),approvedAt:So(r.approvedAt)})}function iie(n){if(!Array.isArray(n))return null;let r=n.map(aie);if(r.some(e=>e===null))return null;let o=new Set,i=new Set;for(let e of r){if(o.has(e.staffId)||i.has(e.senderKey))return null;o.add(e.staffId),i.add(e.senderKey)}return Object.freeze(r)}function ju(n){let r=So(n);if(!r)throw new TypeError("clientId is required");let o=Aie(r).slice(0,24);return Object.freeze({botId:`dt_${o}`,secretRef:`DSH_DINGTALK_BOT_SECRET_${o.toUpperCase()}`})}function UL(){return`dt_sender_${FL().replaceAll("-","")}`}function AO(n){return So(n)?"\u8EAB\u4EFD\u5DF2\u9690\u85CF":"\u9489\u9489\u7528\u6237"}function tO(n){let r=So(n);return r?r.length<=8?`${r.slice(0,2)}\u2022\u2022\u2022\u2022`:`${r.slice(0,4)}\u2022\u2022\u2022\u2022${r.slice(-4)}`:"\u9489\u9489\u673A\u5668\u4EBA"}function HL(n,{stored:r=!1}={}){if(!n||typeof n!="object"||Array.isArray(n)||"clientSecret"in n||"client_secret"in n||"deviceCode"in n||r&&Object.keys(n).some(t=>!eie.has(t)))return null;let o=So(n.clientId),i=tie(n.secretRef),e=iie(n.approvedSenders??[]);if(!o||!i||!e)return null;let a=ju(o);return a.secretRef!==i||(n.botId===void 0?a.botId:LL(n.botId))!==a.botId?null:Object.freeze({botId:a.botId,clientId:o,secretRef:i,approvedSenders:e})}function oie(n){if(!n||n.version!==1||!Array.isArray(n.bots))return null;let r=n.bots.map(a=>HL(a,{stored:!0}));if(r.some(a=>a===null))return null;let o=new Set,i=new Set,e=new Set;for(let a of r){if(o.has(a.botId)||i.has(a.clientId)||e.has(a.secretRef))return null;o.add(a.botId),i.add(a.clientId),e.add(a.secretRef)}return Object.freeze({version:1,bots:Object.freeze(r)})}function nie(n){return{version:1,bots:n.bots.map(r=>({clientId:r.clientId,secretRef:r.secretRef,approvedSenders:r.approvedSenders.map(o=>({senderKey:o.senderKey,staffId:o.staffId,displayName:o.displayName,approvedAt:o.approvedAt}))}))}}var xu=class{#e;#A=eO;#r=Promise.resolve();constructor(r){if(!So(r))throw new TypeError("config path is required");this.#e=r}async load(){try{let r=oie(JSON.parse(await Wae(this.#e,"utf8")));if(!r)throw new Error("dsh-dingtalk config contains invalid bot data");this.#A=r}catch(r){if(r?.code!=="ENOENT")throw r;this.#A=eO}return this}list(){return structuredClone(this.#A.bots)}get(r){let o=this.#A.bots.find(i=>i.botId===r);return o?structuredClone(o):null}getByClientId(r){let o=this.#A.bots.find(i=>i.clientId===r);return o?structuredClone(o):null}async save(r){let o=HL(r);if(!o)throw new Error("Refusing to persist invalid dsh-dingtalk bot data");return this.#t(i=>{if(i.find(A=>(A.clientId===o.clientId||A.secretRef===o.secretRef)&&A.botId!==o.botId))throw new Error("Duplicate DingTalk bot identity");let a=i.findIndex(A=>A.botId===o.botId);return a===-1?i.push(o):i[a]=o,structuredClone(o)})}async remove(r){if(!LL(r))throw new TypeError("Invalid DingTalk bot id");return this.#t(o=>{let i=o.findIndex(a=>a.botId===r);if(i===-1)return null;let[e]=o.splice(i,1);return structuredClone(e)})}async clear(){let r=this.#r.then(async()=>{try{await GL(this.#e)}catch(o){if(o?.code!=="ENOENT")throw o}this.#A=eO});this.#r=r.then(()=>{},()=>{}),await r}async#t(r){let o,i=this.#r.then(async()=>{let e=[...this.#A.bots];o=r(e);let a=Object.freeze({version:1,bots:Object.freeze(e)});await this.#n(a),this.#A=a});return this.#r=i.then(()=>{},()=>{}),await i,o}async#n(r){await zae($ae(this.#e),{recursive:!0,mode:448});let o=`${this.#e}.${process.pid}.${FL()}.tmp`;try{await Xae(o,`${JSON.stringify(nie(r),null,2)} +`),G=Txe.bind(null,{[hre]:"",[dre]:A,[Bre]:Z,[ure]:JF,[qF]:V,[fre]:H}),te="";I!==null&&(E===void 0?te=G(I):te=G(Object.assign({},I,{name:E})));let Be=t instanceof Function?t:t?wre:$xe,Ce=Be().indexOf(":")+1;if(T&&!f)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(y&&typeof y!="function")throw Error(`Unknown mixin type "${typeof y}" - expected "function"`);if(q&&typeof q!="string")throw Error(`Unknown msgPrefix type "${typeof q}" - expected "string"`);wxe(B,f,T);let ke=Sre(f,T);typeof i.emit=="function"&&i.emit("message",{code:"PINO_CONFIG",config:{levels:ke,messageKey:s,errorKey:g}}),Mxe(Q);let Ee=bxe(Q);return Object.assign(r,{levels:ke,[qxe]:Ee,[Vxe]:T,[Lxe]:i,[Gxe]:Be,[Fxe]:Ce,[ure]:JF,[qF]:V,[Bre]:Z,[Hxe]:M,[Kxe]:U,[Yxe]:s,[xxe]:g,[jxe]:c,[Wxe]:c?`,${JSON.stringify(c)}:{`:"",[dre]:A,[Jxe]:y,[Zxe]:m,[hre]:te,[fre]:H,[zxe]:P,silent:kxe,onChild:K,[Xxe]:q}),Object.setPrototypeOf(r,Sxe()),Oxe(r),r[Uxe](B),r}fo.exports=VF;fo.exports.destination=(n=process.stdout.fd)=>typeof n=="object"?(n.dest=Cre(n.dest||process.stdout.fd),Ere(n)):Ere({dest:Cre(n),minLength:0});fo.exports.transport=_F();fo.exports.multistream=pre();fo.exports.levels=Sre();fo.exports.stdSerializers=i1e;fo.exports.stdTimeFunctions=Object.assign({},yre);fo.exports.symbols=mre;fo.exports.version=vxe;fo.exports.default=VF;fo.exports.pino=VF});import{unlink as rse}from"node:fs/promises";import{homedir as ase}from"node:os";import{join as zE,resolve as gc}from"node:path";import{createHash as Vae,randomUUID as FL}from"node:crypto";import{mkdir as zae,readFile as Wae,rename as Zae,unlink as GL,writeFile as Xae}from"node:fs/promises";import{dirname as $ae}from"node:path";var eO=Object.freeze({version:1,bots:Object.freeze([])}),eie=new Set(["clientId","secretRef","approvedSenders"]);function So(n){return typeof n=="string"&&n.trim()?n.trim():null}function Aie(n){return Vae("sha256").update(n).digest("hex")}function LL(n){let r=So(n);return r&&/^dt_[a-f0-9]{24}$/.test(r)?r:null}function tie(n){let r=So(n);return r&&/^DSH_DINGTALK_BOT_SECRET_[A-F0-9]{24}$/.test(r)?r:null}function rie(n){let r=So(n);return r&&/^dt_sender_[a-f0-9]{32}$/.test(r)?r:null}function aie(n){let r=typeof n=="string"?{staffId:n}:n;if(!r||typeof r!="object"||Array.isArray(r))return null;let o=rie(r.senderKey),i=So(r.staffId);return!o||!i?null:Object.freeze({senderKey:o,staffId:i,displayName:So(r.displayName),approvedAt:So(r.approvedAt)})}function iie(n){if(!Array.isArray(n))return null;let r=n.map(aie);if(r.some(e=>e===null))return null;let o=new Set,i=new Set;for(let e of r){if(o.has(e.staffId)||i.has(e.senderKey))return null;o.add(e.staffId),i.add(e.senderKey)}return Object.freeze(r)}function ju(n){let r=So(n);if(!r)throw new TypeError("clientId is required");let o=Aie(r).slice(0,24);return Object.freeze({botId:`dt_${o}`,secretRef:`DSH_DINGTALK_BOT_SECRET_${o.toUpperCase()}`})}function UL(){return`dt_sender_${FL().replaceAll("-","")}`}function AO(n){return So(n)?"\u8EAB\u4EFD\u5DF2\u9690\u85CF":"\u9489\u9489\u7528\u6237"}function tO(n){let r=So(n);return r?r.length<=8?`${r.slice(0,2)}\u2022\u2022\u2022\u2022`:`${r.slice(0,4)}\u2022\u2022\u2022\u2022${r.slice(-4)}`:"\u9489\u9489\u673A\u5668\u4EBA"}function HL(n,{stored:r=!1}={}){if(!n||typeof n!="object"||Array.isArray(n)||"clientSecret"in n||"client_secret"in n||"deviceCode"in n||r&&Object.keys(n).some(t=>!eie.has(t)))return null;let o=So(n.clientId),i=tie(n.secretRef),e=iie(n.approvedSenders??[]);if(!o||!i||!e)return null;let a=ju(o);return a.secretRef!==i||(n.botId===void 0?a.botId:LL(n.botId))!==a.botId?null:Object.freeze({botId:a.botId,clientId:o,secretRef:i,approvedSenders:e})}function oie(n){if(!n||n.version!==1||!Array.isArray(n.bots))return null;let r=n.bots.map(a=>HL(a,{stored:!0}));if(r.some(a=>a===null))return null;let o=new Set,i=new Set,e=new Set;for(let a of r){if(o.has(a.botId)||i.has(a.clientId)||e.has(a.secretRef))return null;o.add(a.botId),i.add(a.clientId),e.add(a.secretRef)}return Object.freeze({version:1,bots:Object.freeze(r)})}function nie(n){return{version:1,bots:n.bots.map(r=>({clientId:r.clientId,secretRef:r.secretRef,approvedSenders:r.approvedSenders.map(o=>({senderKey:o.senderKey,staffId:o.staffId,displayName:o.displayName,approvedAt:o.approvedAt}))}))}}var xu=class{#e;#A=eO;#r=Promise.resolve();constructor(r){if(!So(r))throw new TypeError("config path is required");this.#e=r}async load(){try{let r=oie(JSON.parse(await Wae(this.#e,"utf8")));if(!r)throw new Error("dsh-dingtalk config contains invalid bot data");this.#A=r}catch(r){if(r?.code!=="ENOENT")throw r;this.#A=eO}return this}list(){return structuredClone(this.#A.bots)}get(r){let o=this.#A.bots.find(i=>i.botId===r);return o?structuredClone(o):null}getByClientId(r){let o=this.#A.bots.find(i=>i.clientId===r);return o?structuredClone(o):null}async save(r){let o=HL(r);if(!o)throw new Error("Refusing to persist invalid dsh-dingtalk bot data");return this.#t(i=>{if(i.find(A=>(A.clientId===o.clientId||A.secretRef===o.secretRef)&&A.botId!==o.botId))throw new Error("Duplicate DingTalk bot identity");let a=i.findIndex(A=>A.botId===o.botId);return a===-1?i.push(o):i[a]=o,structuredClone(o)})}async remove(r){if(!LL(r))throw new TypeError("Invalid DingTalk bot id");return this.#t(o=>{let i=o.findIndex(a=>a.botId===r);if(i===-1)return null;let[e]=o.splice(i,1);return structuredClone(e)})}async clear(){let r=this.#r.then(async()=>{try{await GL(this.#e)}catch(o){if(o?.code!=="ENOENT")throw o}this.#A=eO});this.#r=r.then(()=>{},()=>{}),await r}async#t(r){let o,i=this.#r.then(async()=>{let e=[...this.#A.bots];o=r(e);let a=Object.freeze({version:1,bots:Object.freeze(e)});await this.#n(a),this.#A=a});return this.#r=i.then(()=>{},()=>{}),await i,o}async#n(r){await zae($ae(this.#e),{recursive:!0,mode:448});let o=`${this.#e}.${process.pid}.${FL()}.tmp`;try{await Xae(o,`${JSON.stringify(nie(r),null,2)} `,{encoding:"utf8",flag:"wx",mode:384}),await Zae(o,this.#e)}catch(i){try{await GL(o)}catch(e){if(e?.code!=="ENOENT")throw new AggregateError([i,e])}throw i}}};var YL="https://oapi.dingtalk.com",sie="DING_DWS_CLAW";function Do(n){return typeof n=="string"&&n.trim()?n.trim():null}function KL(n,r){let o=Number(n);return Number.isFinite(o)&&o>0?o:r}function gie(n){let r;try{r=new URL(Do(n)??YL)}catch{throw new TypeError("DingTalk registration base URL must be a valid HTTPS URL")}let o=r.hostname==="dingtalk.com"||r.hostname.endsWith(".dingtalk.com");if(r.protocol!=="https:"||r.port||!o||r.username||r.password||r.search||r.hash)throw new TypeError("DingTalk registration base URL must be a valid HTTPS URL");return r.pathname=r.pathname.replace(/\/+$/,""),r.href.replace(/\/$/,"")}function cie(n){let r=typeof n?.now=="function"?n.now():n();if(!Number.isFinite(r))throw new TypeError("clock must return a finite timestamp");return r}function Iie(n,r){if(!n||typeof n!="object"||Array.isArray(n))throw new en("invalid-response",`DingTalk ${r} returned an invalid response`,r);if(Number(n.errcode)!==0)throw new en("api-error",`DingTalk ${r} request was rejected`,r);return n}var en=class extends Error{constructor(r,o,i,e={}){super(o,e),this.name="DingtalkDeviceAuthError",this.code=r,this.action=i}},Ju=class{#e;#A;#r;#t;constructor({fetch:r=globalThis.fetch,clock:o=Date,baseUrl:i=YL,timeoutMs:e=15e3}={}){if(typeof r!="function")throw new TypeError("fetch is required");if(typeof o!="function"&&typeof o?.now!="function")throw new TypeError("clock must be a function or expose now()");if(!Number.isFinite(e)||e<=0)throw new TypeError("timeoutMs must be a positive number");this.#e=r,this.#A=o,this.#r=gie(i),this.#t=e}async start({signal:r}={}){let o=await this.#n("/app/registration/init",{source:sie},"initialization",r),i=Do(o.nonce);if(!i)throw new en("missing-nonce","DingTalk registration initialization did not return a nonce","initialization");let e=await this.#n("/app/registration/begin",{nonce:i},"begin",r),a=Do(e.device_code),A=Do(e.verification_uri_complete);if(!a||!A)throw new en("incomplete-registration","DingTalk registration did not return complete QR metadata","begin");let t=KL(e.expires_in,7200),s=KL(e.interval,5)*1e3;return Object.freeze({deviceCode:a,verificationUrl:A,verificationUri:Do(e.verification_uri),userCode:Do(e.user_code),expiresAt:cie(this.#A)+t*1e3,pollIntervalMs:s})}async poll(r){let o=Do(typeof r=="string"?r:r?.deviceCode),i=typeof r=="object"?r?.signal:void 0;if(!o)throw new TypeError("deviceCode is required");let e=await this.#n("/app/registration/poll",{device_code:o},"poll",i),a=Do(e.status)?.toUpperCase(),A=["WAITING","SUCCESS","FAIL","EXPIRED"].includes(a)?a:"UNKNOWN";return Object.freeze({status:A,clientId:Do(e.client_id),clientSecret:Do(e.client_secret),failReason:Do(e.fail_reason)})}async#n(r,o,i,e){let a,A=AbortSignal.timeout(this.#t),t=e?AbortSignal.any([e,A]):A;try{a=await this.#e(`${this.#r}${r}`,{method:"POST",headers:{accept:"application/json","content-type":"application/json"},body:JSON.stringify(o),redirect:"error",signal:t})}catch(g){throw e?.aborted?e.reason??g:A.aborted?new en("timeout",`DingTalk ${i} request timed out`,i,{cause:g}):g?.name==="AbortError"?g:new en("network-error",`DingTalk ${i} request could not be completed`,i,{cause:g})}if(!a||a.ok===!1||typeof a.json!="function")throw new en("http-error",`DingTalk ${i} request failed`,i);let s;try{s=await a.json()}catch(g){throw new en("invalid-json",`DingTalk ${i} returned invalid JSON`,i,{cause:g})}return Iie(s,i)}};import{randomUUID as pie}from"node:crypto";var xL=new WeakMap,rO=Symbol("dsh-im.connection-test-state-identity");function jL(n){return n?.[rO]??n}function lie(n){return typeof n=="string"&&n.trim()?n.trim():null}function Pi(n,r){if(!n||!r||typeof r!="object")return!1;try{return xL.set(jL(n),structuredClone(r)),!0}catch{return!1}}function UE(n){let r=n?xL.get(jL(n)):null;return r?structuredClone(r):null}function ga(n,r="\u673A\u5668\u4EBA"){return`\u2705 DeepSeek Harness \u8FDE\u63A5\u6D4B\u8BD5\u6210\u529F \u8FD9\u6761\u6D88\u606F\u7531\u63D2\u4EF6\u9875\u9762\u4E2D\u7684\u201C${lie(n)??r}\u201D\u673A\u5668\u4EBA\u5361\u7247\u53D1\u51FA\u3002`}function tr(n="\u673A\u5668\u4EBA"){let r=new Error(`${n}\u5C1A\u672A\u6536\u5230\u53EF\u7528\u4E8E\u6D4B\u8BD5\u7684\u79C1\u804A\u6D88\u606F\u3002`);return r.code="test-target-unavailable",r}async function Ys({state:n,send:r,text:o,channelLabel:i}){let e=UE(n);if(!e)throw tr(i);return await r(e,o),{sent:!0}}function qt(n){return Object.freeze(n?{sent:!1,code:n?.code==="test-target-unavailable"?"test-target-unavailable":"test-message-failed"}:{sent:!0})}var JL=new Set(["starting","pending","connecting"]),qu=new Set(["connected","expired","failed","cancelled"]);function Gr(n){return typeof n=="string"&&n.trim()?n.trim():null}function ca(n,r){return Object.freeze({code:n,message:r})}function zL(n){return typeof n?.now=="function"?n.now():n()}function Eie(n){return new Date(zL(n)).toISOString()}function xs(){return new DOMException("DingTalk provisioning was cancelled","AbortError")}function rc(n){return n?{attemptId:n.id,status:n.state,...n.verificationUrl?{verificationUrl:n.verificationUrl}:{},...n.expiresAt?{expiresAt:n.expiresAt}:{},...n.pollIntervalMs?{pollIntervalMs:n.pollIntervalMs}:{},...n.botId?{botId:n.botId}:{},...n.alreadyConnected?{alreadyConnected:!0}:{},...n.error?{error:structuredClone(n.error)}:{}}:null}function aO(n){if(!n)return{};let r=typeof n.status=="function"?n.status():n.status;return r&&typeof r=="object"&&!Array.isArray(r)?r:{}}function qL(n,r){if(!n||r.connected===!1||r.ready===!1)return!1;let o=Gr(r.dingtalkStreamState??r.dingtalkConnectionState??r.connectionState??r.state)?.toLowerCase();return["failed","error","offline","disconnected","stopped"].includes(o)?!1:r.connected===!0||r.ready===!0||o==="connected"||o==="ready"}function WL(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let r=Gr(n.staffId??n.senderStaffId??n.senderId);if(!r)return null;let o=Gr(n.requestId),i=o&&/^ding_sender_[A-Za-z0-9_-]{1,100}$/.test(o)&&!o.includes(r)?o:null;return i?{requestId:i,staffId:r,displayName:Gr(n.displayName??n.senderName??n.senderNick)??"\u9489\u9489\u7528\u6237",requestedAt:Gr(n.requestedAt)}:null}function VL(n){if(!Array.isArray(n.pendingSenders))return[];let r=new Set,o=[];for(let i of n.pendingSenders){let e=WL(i);!e||r.has(e.staffId)||(r.add(e.staffId),o.push(e))}return o}function Cie(n){return{requestId:n.requestId,displayName:n.displayName,senderIdMasked:AO(n.staffId),requestedAt:n.requestedAt}}function hie(n){return{senderKey:n.senderKey,displayName:Gr(n.displayName)??"\u9489\u9489\u7528\u6237",senderIdMasked:AO(n.staffId),approvedAt:Gr(n.approvedAt)}}var HE=class{#e;#A;#r;#t;#n;#o;#l;#s=new Map;#I=new Map;#a=new Map;#i=null;#c=new Map;#g=0;#p=!1;constructor({deviceAuth:r,credentials:o,configStore:i,createRuntime:e,deleteState:a=async()=>{},logger:A=console,clock:t=Date}){if(!r||typeof r.start!="function"||typeof r.poll!="function")throw new TypeError("DingtalkController requires a DingTalk device auth client");if(!o||typeof o.resolve!="function"||typeof o.set!="function"||typeof o.unset!="function")throw new TypeError("DingtalkController requires the DSH credential provider");if(!i||typeof i.list!="function"||typeof i.get!="function"||typeof i.getByClientId!="function"||typeof i.save!="function"||typeof i.remove!="function")throw new TypeError("DingtalkController requires a loaded config store");if(typeof e!="function")throw new TypeError("createRuntime is required");if(typeof a!="function")throw new TypeError("deleteState must be a function");if(typeof t!="function"&&typeof t?.now!="function")throw new TypeError("clock must be a function or expose now()");this.#e=r,this.#A=o,this.#r=i,this.#t=e,this.#n=a,this.#o=A,this.#l=t}async initialize(){if(this.#p)return this.status();for(let r of this.#r.list()){let o=this.#s.get(r.botId);try{if(qL(o,aO(o)))continue}catch{}await this.#f(r.botId,async()=>{let i=this.#r.get(r.botId);if(!i||this.#p)return;let e=await this.#u(i.secretRef);if(!e){this.#I.set(i.botId,ca("missing-secret","\u9489\u9489\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u626B\u7801\u3002")),this.#D();return}try{await this.#d(i,e),this.#I.delete(i.botId)}catch{this.#I.set(i.botId,ca("connection-failed","\u9489\u9489\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")),this.#o.warn?.(`[dsh-dingtalk] bot ${i.botId} failed to initialize`)}this.#D()})}return this.status()}async startProvisioning({signal:r}={}){if(this.#p)throw new Error("dsh-dingtalk controller is closed");this.#i&&await this.cancelProvisioning(this.#i);let o={id:pie(),state:"starting",controller:new AbortController,deviceCode:null,verificationUrl:null,expiresAt:null,pollIntervalMs:null,pollTask:null,botId:null,alreadyConnected:!1,error:null};this.#a.set(o.id,o),this.#i=o.id,this.#D();let i=()=>o.controller.abort(r?.reason);r?.aborted?i():r?.addEventListener("abort",i,{once:!0});try{let e=await this.#e.start({signal:o.controller.signal});if(this.#m(o),o.deviceCode=Gr(e.deviceCode),o.verificationUrl=Gr(e.verificationUrl),o.expiresAt=Number(e.expiresAt),o.pollIntervalMs=Number(e.pollIntervalMs),!o.deviceCode||!o.verificationUrl||!Number.isFinite(o.expiresAt)||!Number.isFinite(o.pollIntervalMs)||o.pollIntervalMs<=0)throw new Error("DingTalk device auth returned incomplete registration metadata");return o.state="pending",this.#D(),rc(o)}catch(e){if(o.controller.signal.aborted||e?.name==="AbortError"?(o.state="cancelled",o.error=ca("cancelled","\u626B\u7801\u63A5\u5165\u5DF2\u53D6\u6D88\u3002")):(o.state="failed",o.error=ca("qr-start-failed","\u65E0\u6CD5\u751F\u6210\u9489\u9489\u4E8C\u7EF4\u7801\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")),this.#i===o.id&&(this.#i=null),this.#D(),o.state==="failed")throw e;return rc(o)}finally{r?.removeEventListener("abort",i)}}async bindCredentials({clientId:r,clientSecret:o}={}){if(this.#p)throw new Error("dsh-dingtalk controller is closed");let i=Gr(r),e=Gr(o);if(!i||!e)throw new TypeError("DingTalk Client ID and Client Secret are required");if(this.#i&&await this.cancelProvisioning(this.#i),this.#p)throw new Error("dsh-dingtalk controller is closed");let a=ju(i);return await this.#f(a.botId,async()=>{if(this.#p)throw xs();let A=this.#r.getByClientId(i),t=await this.#A.resolve(a.secretRef).catch(()=>{});if(this.#p)throw xs();let s={botId:a.botId,clientId:i,secretRef:a.secretRef,approvedSenders:A?.approvedSenders??[]};await this.#A.set(a.secretRef,e);try{await this.#r.save(s)}catch(g){throw await this.#Q(a.secretRef,t),g}try{await this.#d(s,e),this.#I.delete(a.botId)}catch{this.#I.set(a.botId,ca("connection-failed","\u9489\u9489\u5DF2\u63A5\u5165\uFF0C\u4F46\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")),this.#o.warn?.("[dsh-dingtalk] credential-bound bot saved but its connection is not ready")}this.#D()}),this.status()}async registrationStatus(r){let o=this.#a.get(r);if(!o)return null;if(qu.has(o.state)||o.state==="starting")return rc(o);if(zL(this.#l)>=o.expiresAt)return o.state="expired",o.error=ca("expired","\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u3002"),this.#i===o.id&&(this.#i=null),this.#D(),rc(o);if(!o.pollTask){let i=this.#h(o).finally(()=>{o.pollTask===i&&(o.pollTask=null)});o.pollTask=i}return await o.pollTask,rc(o)}async cancelProvisioning(r){let o=this.#a.get(r);return o?(qu.has(o.state)||(o.controller.abort(),await o.pollTask?.catch(()=>{}),qu.has(o.state)||(o.state="cancelled"),o.error??=ca("cancelled","\u626B\u7801\u63A5\u5165\u5DF2\u53D6\u6D88\u3002")),this.#i===o.id&&(this.#i=null),this.#D(),rc(o)):null}async reconnectBot(r){let o=this.#r.get(r);if(!o)throw new Error("Unknown DingTalk bot");return await this.#f(r,async()=>{let i=await this.#u(o.secretRef);if(!i)throw new Error("The DingTalk client secret is missing");try{await this.#d(o,i),this.#I.delete(r)}catch(e){throw this.#I.set(r,ca("connection-failed","\u9489\u9489\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")),e}finally{this.#D()}}),this.status()}async sendConnectionTest(r){let o=this.#r.get(r);if(!o)throw new Error("Unknown DingTalk bot");return this.#f(r,async()=>{let i=this.#s.get(r);if(!i?.status?.ready||typeof i.sendConnectionTest!="function")throw tr("\u9489\u9489\u673A\u5668\u4EBA");return i.sendConnectionTest(ga(`\u9489\u9489\u673A\u5668\u4EBA\uFF08${tO(o.clientId)}\uFF09`))})}async deleteBot(r){let o=this.#r.get(r);if(!o)throw new Error("Unknown DingTalk bot");return await this.#f(r,async()=>{let i=await this.#A.resolve(o.secretRef).catch(()=>{});await this.#B(r);try{await this.#A.unset(o.secretRef),await this.#r.remove(r)}catch(e){throw Gr(i?.value)&&(await this.#A.set(o.secretRef,i.value).catch(()=>{}),await this.#d(o,i.value).catch(()=>{})),new Error("Unable to remove the DingTalk bot safely.",{cause:e})}try{await this.#n({botId:r,config:o})}catch{this.#o.warn?.(`[dsh-dingtalk] bot ${r} state cleanup failed`)}this.#I.delete(r),this.#D()}),this.status()}async approveSender(r,o){let i=this.#r.get(r);if(!i)throw new Error("Unknown DingTalk bot");let e=this.#s.get(r),a=typeof e?.pendingSender=="function"?WL(e.pendingSender(o)):null,A=VL(aO(e)),t=a?.requestId===o?a:A.find(g=>g.requestId===o);if(!t)throw new Error("Unknown DingTalk sender approval request");if(i.approvedSenders.some(g=>g.staffId===t.staffId))return this.status();let s={...i,approvedSenders:[...i.approvedSenders,{senderKey:UL(),staffId:t.staffId,displayName:t.displayName,approvedAt:Eie(this.#l)}]};return await this.#E(i,s),this.status()}async revokeSender(r,o){let i=this.#r.get(r);if(!i)throw new Error("Unknown DingTalk bot");let e=i.approvedSenders.findIndex(A=>A.senderKey===o);if(e===-1)throw new Error("Unknown approved DingTalk sender");let a=[...i.approvedSenders];return a.splice(e,1),await this.#E(i,{...i,approvedSenders:a}),this.status()}status(){let r=this.#r.list().map(e=>{let a=this.#s.get(e.botId),A={};try{A=aO(a)}catch{A={state:"error"}}let t=qL(a,A),s=this.#I.get(e.botId),g=t?"connected":s?"error":"offline",c=new Set(e.approvedSenders.map(E=>E.staffId)),I=VL(A).filter(E=>!c.has(E.staffId)).map(Cie);return{botId:e.botId,state:g,connected:t,configured:!0,bot:{name:"\u9489\u9489\u673A\u5668\u4EBA",clientIdMasked:tO(e.clientId)},health:{status:t?"healthy":s?"error":"offline",summary:t?"\u9489\u9489 Stream \u6D88\u606F\u8FDE\u63A5\u8FD0\u884C\u6B63\u5E38":s?.message??"\u9489\u9489\u6D88\u606F\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF",lastCheckedAt:A.lastCheckedAt??null},stats:{messagesReceived:Number(A.messagesReceived)||0,messagesReplied:Number(A.messagesReplied)||0},senders:{pending:I,approved:e.approvedSenders.map(hie)},error:s?structuredClone(s):null}}),o=r.filter(e=>e.connected).length,i=this.#i?this.#a.get(this.#i):null;return{schemaVersion:1,revision:this.#g,state:i&&JL.has(i.state)?"provisioning":r.length===0?"disconnected":o===r.length?"connected":o>0?"degraded":"offline",bots:r,totals:{configured:r.length,connected:o},...i&&JL.has(i.state)?{provisioning:rc(i)}:{}}}async close(){this.#p||(this.#p=!0,this.#i&&await this.cancelProvisioning(this.#i),await Promise.allSettled([...this.#s.keys()].map(r=>this.#B(r))),await Promise.allSettled([...this.#c.values()]),await Promise.allSettled([...this.#s.keys()].map(r=>this.#B(r))))}async#h(r){try{this.#m(r);let o=await this.#e.poll({deviceCode:r.deviceCode,signal:r.controller.signal});this.#m(r);let i=Gr(o.status)?.toUpperCase();if(i==="WAITING")r.state="pending",r.error=null;else if(i==="SUCCESS"){let e=Gr(o.clientId),a=Gr(o.clientSecret);if(!e||!a)throw new Error("DingTalk returned incomplete credentials");r.state="connecting",r.error=null,this.#D();let A=await this.#C(r,{clientId:e,clientSecret:a});r.botId=A.botId,r.alreadyConnected=A.alreadyConnected,r.state="connected",this.#i===r.id&&(this.#i=null)}else i==="EXPIRED"?(r.state="expired",r.error=ca("expired","\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u3002"),this.#i===r.id&&(this.#i=null)):i==="FAIL"?(r.state="failed",r.error=ca("authorization-failed","\u9489\u9489\u672A\u5B8C\u6210\u673A\u5668\u4EBA\u6388\u6743\uFF0C\u8BF7\u91CD\u65B0\u626B\u7801\u3002"),this.#i===r.id&&(this.#i=null)):(r.state="pending",r.error=ca("poll-pending","\u9489\u9489\u6388\u6743\u72B6\u6001\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u6B63\u5728\u91CD\u8BD5\u3002"))}catch(o){r.controller.signal.aborted||o?.name==="AbortError"?(r.state="cancelled",r.error=ca("cancelled","\u626B\u7801\u63A5\u5165\u5DF2\u53D6\u6D88\u3002"),this.#i===r.id&&(this.#i=null)):r.state==="connecting"?(r.state="failed",r.error=ca("activation-failed","\u9489\u9489\u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u5B89\u5168\u4FDD\u5B58\u63A5\u5165\u914D\u7F6E\u3002"),this.#i===r.id&&(this.#i=null),this.#o.error?.("[dsh-dingtalk] bot activation failed")):(r.state="pending",r.error=ca("poll-failed","\u9489\u9489\u6388\u6743\u67E5\u8BE2\u6682\u65F6\u5931\u8D25\uFF0C\u6B63\u5728\u91CD\u8BD5\u3002"))}finally{this.#D(),this.#y()}}async#C(r,{clientId:o,clientSecret:i}){let e=ju(o),a=this.#r.getByClientId(o),A=await this.#A.resolve(e.secretRef).catch(()=>{}),t={botId:e.botId,clientId:o,secretRef:e.secretRef,approvedSenders:a?.approvedSenders??[]};return this.#f(e.botId,async()=>{let s=async()=>{await this.#B(e.botId),a?await this.#r.save(a).catch(()=>{}):this.#r.get(e.botId)&&await this.#r.remove(e.botId).catch(()=>null)&&await this.#n({botId:e.botId,config:t}).catch(c=>{this.#o.warn?.("[dsh-dingtalk] failed to clean up cancelled bot state:",c)}),await this.#Q(e.secretRef,A),a&&Gr(A?.value)&&await this.#d(a,A.value).catch(()=>{})};await this.#A.set(e.secretRef,i);try{this.#m(r),await this.#r.save(t),this.#m(r)}catch(g){throw await s(),g}try{await this.#d(t,i),this.#m(r),this.#I.delete(e.botId)}catch{if(r.controller.signal.aborted||this.#i!==r.id)throw await s(),xs();this.#I.set(e.botId,ca("connection-failed","\u9489\u9489\u5DF2\u63A5\u5165\uFF0C\u4F46\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")),this.#o.warn?.("[dsh-dingtalk] authorized bot saved but its connection is not ready")}return{botId:e.botId,alreadyConnected:!!a}})}async#E(r,o){return this.#f(r.botId,async()=>{let i=await this.#u(r.secretRef);if(!i)throw new Error("The DingTalk client secret is missing");await this.#r.save(o);try{await this.#d(o,i),this.#I.delete(r.botId)}catch(e){throw await this.#r.save(r).catch(()=>{}),await this.#d(r,i).catch(()=>{}),this.#I.set(r.botId,ca("connection-failed","\u9489\u9489\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")),e}finally{this.#D()}})}async#d(r,o){if(this.#p||(await this.#B(r.botId),this.#p))throw xs();let i=await this.#t({botId:r.botId,config:structuredClone(r),clientSecret:o});if(!i||typeof i.start!="function"||typeof i.stop!="function")throw new TypeError("createRuntime returned an invalid DingTalk runtime");if(this.#p)throw await i.stop().catch(()=>{}),xs();this.#s.set(r.botId,i);try{if(await i.start(),this.#p)throw await i.stop().catch(()=>{}),xs()}catch(e){throw this.#s.get(r.botId)===i&&this.#s.delete(r.botId),await i.stop().catch(()=>{}),e}}async#B(r){let o=this.#s.get(r);this.#s.delete(r),await o?.stop().catch(()=>{this.#o.warn?.(`[dsh-dingtalk] bot ${r} failed to stop cleanly`)})}async#u(r){let o=await this.#A.resolve(r).catch(()=>{});return Gr(o?.value)}async#Q(r,o){try{Gr(o?.value)?await this.#A.set(r,o.value):await this.#A.unset(r)}catch{this.#o.error?.(`[dsh-dingtalk] failed to restore credential ${r}`)}}#m(r){if(r.controller.signal.aborted||this.#i!==r.id)throw xs()}#f(r,o){if(this.#p)return Promise.reject(new Error("dsh-dingtalk controller is closed"));let a=(this.#c.get(r)??Promise.resolve()).catch(()=>{}).then(o).finally(()=>{this.#c.get(r)===a&&this.#c.delete(r)});return this.#c.set(r,a),a}#y(){for(let[r,o]of this.#a)r!==this.#i&&qu.has(o.state)&&this.#a.size>16&&this.#a.delete(r)}#D(){this.#g+=1}};import{randomUUID as KE}from"node:crypto";var die="\u8BF7\u5206\u6790\u8FD9\u5F20\u56FE\u7247\u3002",ct=class extends Error{constructor(r,o,i,e={}){super(o,e),this.name="ImagePromptError",this.code=r,this.userMessage=i}},ZL=Object.freeze({MODEL_DOES_NOT_SUPPORT_IMAGES:"\u5F53\u524D\u6A21\u578B\u4E0D\u652F\u6301\u56FE\u7247\uFF0C\u8BF7\u7528 /models \u67E5\u770B\u53EF\u7528\u6A21\u578B\uFF0C\u518D\u7528 /model <\u5E8F\u53F7> \u5207\u6362\u540E\u91CD\u53D1\u3002",IMAGE_TOO_LARGE:"\u56FE\u7247\u8D85\u8FC7\u5BBF\u4E3B\u5141\u8BB8\u7684\u5927\u5C0F\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002",IMAGE_TOO_MANY_PIXELS:"\u56FE\u7247\u5206\u8FA8\u7387\u8FC7\u9AD8\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002",INVALID_IMAGE:"\u56FE\u7247\u5185\u5BB9\u65E0\u6548\u6216\u683C\u5F0F\u4E0D\u53D7\u652F\u6301\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002",INVALID_IMAGE_BASE64:"\u672A\u80FD\u8BFB\u53D6\u56FE\u7247\u5185\u5BB9\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002",IMAGE_TYPE_MISMATCH:"\u56FE\u7247\u683C\u5F0F\u4E0E\u5B9E\u9645\u5185\u5BB9\u4E0D\u4E00\u81F4\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002",TOO_MANY_IMAGES:"\u4E00\u6B21\u53D1\u9001\u7684\u56FE\u7247\u6570\u91CF\u8D85\u8FC7\u5BBF\u4E3B\u9650\u5236\uFF0C\u8BF7\u51CF\u5C11\u540E\u91CD\u8BD5\u3002",IMAGES_TOO_LARGE:"\u56FE\u7247\u603B\u5927\u5C0F\u8D85\u8FC7\u5BBF\u4E3B\u9650\u5236\uFF0C\u8BF7\u51CF\u5C11\u56FE\u7247\u6216\u538B\u7F29\u540E\u91CD\u8BD5\u3002"});function uie(n,r){let o=AbortSignal.timeout(r);return n?AbortSignal.any([n,o]):o}async function iO(n){try{await n?.body?.cancel?.()}catch{}}async function Gi(n,{fetchImpl:r=fetch,headers:o,signal:i,maxBytes:e=5242880,timeoutMs:a=15e3,allowedHosts:A}={}){let t=new URL(n);if(t.protocol!=="https:")throw new Error("Image download URL must use HTTPS");if(Array.isArray(A)&&!A.some(I=>typeof I=="string"&&(t.hostname===I||I.startsWith(".")&&(t.hostname===I.slice(1)||t.hostname.endsWith(I)))))throw new Error("Image download URL is not hosted by the messaging platform");let s=await r(t,{method:"GET",headers:o,signal:uie(i,a),redirect:"manual"});if(Number.isInteger(s?.status)&&s.status>=300&&s.status<400)throw await iO(s),new ct("image-redirect-blocked",`Image download redirect was blocked (HTTP ${s.status})`,"\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\u53D1\u751F\u4E86\u91CD\u5B9A\u5411\uFF0C\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u3002");if(!s?.ok)throw await iO(s),new ct("image-http-error",`Image download failed with HTTP ${s?.status??"unknown"}`,`\u56FE\u7247\u4E0B\u8F7D\u5931\u8D25\uFF08HTTP ${s?.status??"unknown"}\uFF09\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002`);let g=Number(s.headers?.get?.("content-length"));if(Number.isFinite(g)&&g>e)throw await iO(s),new ct("image-too-large",`Image response declares ${g} bytes; the limit is ${e}`,"\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002");if(s.body?.[Symbol.asyncIterator]){let I=[],E=0;for await(let B of s.body){let f=Buffer.from(B);if(E+=f.length,E>e)throw await s.body.cancel?.().catch?.(()=>{}),new ct("image-too-large",`Image response exceeded ${e} bytes`,"\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002");I.push(f)}return Buffer.concat(I,E)}let c=Buffer.from(await s.arrayBuffer());if(c.length>e)throw new ct("image-too-large",`Image response contains ${c.length} bytes; the limit is ${e}`,"\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002");return c}function Bie(n){return typeof n=="string"?n.trim():""}function $L(n){return Array.isArray(n?.images)?n.images.filter(Boolean):[]}function XL(n){return typeof n!="string"?void 0:n.replaceAll("\\","/").split("/").at(-1)?.replace(/[\u0000-\u001f\u007f]/g,"").trim().slice(0,255)||void 0}function fie(n){if(n.length>=8&&n[0]===137&&n[1]===80&&n[2]===78&&n[3]===71&&n[4]===13&&n[5]===10&&n[6]===26&&n[7]===10)return"image/png";if(n.length>=3&&n[0]===255&&n[1]===216&&n[2]===255)return"image/jpeg";if(n.length>=6){let r=n.subarray(0,6).toString("ascii");if(r==="GIF87a"||r==="GIF89a")return"image/gif"}return n.length>=12&&n.subarray(0,4).toString("ascii")==="RIFF"&&n.subarray(8,12).toString("ascii")==="WEBP"?"image/webp":null}function Qie(n){if(Buffer.isBuffer(n)||n instanceof Uint8Array)return{data:Buffer.from(n)};let r=n?.data??n?.buffer;return Buffer.isBuffer(r)||r instanceof Uint8Array?{data:Buffer.from(r),name:n?.name??n?.filename}:null}function Ir(n){return $L(n).length>0}async function Fi(n,{signal:r,maxImageBytes:o=5242880,maxImages:i=20,maxTotalImageBytes:e=20971520}={}){let a=$L(n);if(a.length>i)throw new ct("too-many-images",`Image message contains ${a.length} images; the limit is ${i}`,`\u4E00\u6B21\u6700\u591A\u53EA\u80FD\u5904\u7406 ${i} \u5F20\u56FE\u7247\u3002`);let A=Bie(n?.content),t=[],s=0;A?t.push({type:"text",text:A}):a.length>0&&t.push({type:"text",text:die});for(let[g,c]of a.entries()){if(r?.throwIfAborted(),Number.isFinite(c?.size)&&c.size>o)throw new ct("image-too-large",`Image ${g+1} declares ${c.size} bytes; the limit is ${o}`,"\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002");if(Number.isFinite(c?.size)&&s+c.size>e)throw new ct("images-too-large",`Images declare more than ${e} bytes in total`,"\u4E00\u6B21\u53D1\u9001\u7684\u56FE\u7247\u603B\u5927\u5C0F\u8FC7\u5927\uFF0C\u8BF7\u51CF\u5C11\u56FE\u7247\u6570\u91CF\u6216\u538B\u7F29\u540E\u91CD\u8BD5\u3002");let I;try{I=c?.data===void 0?await c?.load?.({signal:r,maxBytes:o}):c.data}catch(f){throw r?.aborted||f?.name==="AbortError"||f?.name==="TimeoutError"||f instanceof ct?f:new ct("image-download-failed",`Unable to download image ${g+1}: ${f?.message??String(f)}`,"\u56FE\u7247\u4E0B\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002",{cause:f})}let E=Qie(I);if(!E?.data.length)throw new ct("invalid-image-data",`Image ${g+1} returned no data`,"\u672A\u80FD\u8BFB\u53D6\u56FE\u7247\u5185\u5BB9\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002");if(E.data.length>o)throw new ct("image-too-large",`Image ${g+1} contains ${E.data.length} bytes; the limit is ${o}`,"\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002");if(s+E.data.length>e)throw new ct("images-too-large",`Images contain more than ${e} bytes in total`,"\u4E00\u6B21\u53D1\u9001\u7684\u56FE\u7247\u603B\u5927\u5C0F\u8FC7\u5927\uFF0C\u8BF7\u51CF\u5C11\u56FE\u7247\u6570\u91CF\u6216\u538B\u7F29\u540E\u91CD\u8BD5\u3002");s+=E.data.length;let B=fie(E.data);if(!B)throw new ct("unsupported-image-type",`Image ${g+1} is not JPEG, PNG, GIF, or WebP`,"\u6682\u4E0D\u652F\u6301\u8BE5\u56FE\u7247\u683C\u5F0F\uFF0C\u8BF7\u53D1\u9001 JPEG\u3001PNG\u3001WebP \u6216 GIF \u56FE\u7247\u3002");t.push({type:"image",mediaType:B,data:E.data.toString("base64"),...XL(E.name??c?.name)?{name:XL(E.name??c?.name)}:{}})}return t}function oO(n){if(n instanceof ct)return{code:"image-prompt-error",reason:n.code,userMessage:n.userMessage};if(n?.code!=="attachment-error"||typeof n?.details?.reason!="string")return null;let r=n.details.reason,o=Object.hasOwn(ZL,r)?ZL[r]:null;return o?{code:"attachment-error",reason:r,userMessage:o}:null}function Li(n){return oO(n)?.userMessage??null}var yie="https://oapi.dingtalk.com/",mie="https://api.dingtalk.com/",Sie="DING_DWS_CLAW",Die="02fcf2f4-5e02-4a85-b672-46d1f715543e.schema",wie=15e3,Oie=new Set(["WAITING","SUCCESS","FAIL","EXPIRED"]),Vt=class extends Error{constructor(r,o,i={}){super(o,i),this.name="DingtalkApiError",this.code=r,this.status=i.status,this.providerCode=i.providerCode}};function Ct(n){return typeof n=="string"&&n.trim()?n.trim():null}function bie(n){let r=Ct(n);return r&&/^[A-Za-z0-9_.:-]{1,160}$/.test(r)?r:void 0}function Mie(n){let r;try{r=new URL(n)}catch(o){throw new Vt("invalid-image-download","\u9489\u9489\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\u3002",{cause:o})}return r.protocol==="http:"&&(!r.port||r.port==="80")&&(r.protocol="https:",r.port=""),r}function e2(n){let r=n.toLowerCase().replace(/\.$/,"");return r==="dingtalk.com"||r.endsWith(".dingtalk.com")}function cO(n,{label:r,requireSubdomain:o=!0}={}){let i;try{i=new URL(n)}catch{throw new Vt("invalid-url",`${r??"\u9489\u9489\u670D\u52A1"}\u8FD4\u56DE\u4E86\u65E0\u6548\u5730\u5740\u3002`)}let e=i.hostname.toLowerCase().replace(/\.$/,""),a=o?e!=="dingtalk.com"&&e2(e):e2(e);if(i.protocol!=="https:"||!a||i.port&&i.port!=="443")throw new Vt("untrusted-url",`${r??"\u9489\u9489\u670D\u52A1"}\u5730\u5740\u4E0D\u53D7\u4FE1\u4EFB\u3002`);if(i.username||i.password)throw new Vt("untrusted-url",`${r??"\u9489\u9489\u670D\u52A1"}\u5730\u5740\u4E0D\u53D7\u4FE1\u4EFB\u3002`);return i}function ac(n){let r=Ct(n);if(!r)throw new Vt("invalid-session-webhook","\u9489\u9489\u6D88\u606F\u6CA1\u6709\u53EF\u7528\u7684\u56DE\u590D\u5730\u5740\u3002");let o=cO(r,{label:"\u9489\u9489\u56DE\u590D",requireSubdomain:!1});return o.hash="",o.toString()}function A2(n,r=4e3){let o=typeof n=="string"?n.trim():"";if(!o)return[];if(!Number.isInteger(r)||r<1)throw new TypeError("maxChars must be a positive integer");if(o.length<=r)return[o];let i=[],e=o;for(;e.length>r;){let a=e.lastIndexOf(` `,r);a{if(r?.aborted){i(Vu(r));return}let e=setTimeout(()=>{r?.removeEventListener("abort",a),o()},n),a=()=>{clearTimeout(e),i(Vu(r))};r?.addEventListener("abort",a,{once:!0})})}async function js(n,r,{body:o,signal:i,timeoutMs:e=wie,headers:a={},method:A="POST",action:t="request"}={}){let s=new AbortController,g=!1,c=()=>s.abort(i?.reason);if(i?.aborted)throw Vu(i);i?.addEventListener("abort",c,{once:!0});let I=e>0?setTimeout(()=>{g=!0,s.abort()},e):null;try{let E=await n(r,{method:A,redirect:"error",headers:{"content-type":"application/json",...a},body:JSON.stringify(o??{}),signal:s.signal});if(!E.ok){let B;try{let f=await E.json();B=bie(f?.code??f?.errcode)}catch{}throw new Vt("http-error",`\u9489\u9489\u670D\u52A1\u8BF7\u6C42\u5931\u8D25\uFF08HTTP ${E.status}\uFF09\u3002`,{status:E.status,providerCode:B})}try{return await E.json()}catch(B){throw new Vt("invalid-response","\u9489\u9489\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u89E3\u6790\u7684\u54CD\u5E94\u3002",{cause:B})}}catch(E){throw i?.aborted?Vu(i):g?new Vt("timeout","\u9489\u9489\u670D\u52A1\u8BF7\u6C42\u8D85\u65F6\u3002",{cause:E}):E instanceof Vt?E:new Vt("network-error",`\u6682\u65F6\u65E0\u6CD5\u5B8C\u6210\u9489\u9489${t}\u8BF7\u6C42\u3002`,{cause:E})}finally{I&&clearTimeout(I),i?.removeEventListener("abort",c)}}function Nie(n){if(n?.type==="user"){let r=Ct(n.userId);if(r)return{type:"user",userId:r}}if(n?.type==="group"){let r=Ct(n.openConversationId);if(r)return{type:"group",openConversationId:r}}throw new TypeError("DingTalk AI Card target is invalid")}function nO(n,r){return{cardParamMap:{flowStatus:r,msgContent:YE(n),staticMsgContent:"",sys_full_json_obj:JSON.stringify({order:["msgContent"]}),config:JSON.stringify({autoLayout:!0})}}}function Tie(n,r,o){let i={outTrackId:n,userIdType:1};return r.type==="group"?{...i,openSpaceId:`dtv1.card//IM_GROUP.${r.openConversationId}`,imGroupOpenDeliverModel:{robotCode:o}}:{...i,openSpaceId:`dtv1.card//IM_ROBOT.${r.userId}`,imRobotOpenDeliverModel:{spaceType:"IM_ROBOT",robotCode:o,extension:{dynamicSummary:"true"}}}}function YE(n){let o=(typeof n=="string"?n.replace(/\r\n?/g,` @@ -110,7 +110,7 @@ ${u2}`:["session-not-registered","session-not-found"].includes(n?.code)?"\u672A\ `));if(c){if(typeof c.session.selectModel!="function")throw new TypeError("Harness session does not support model selection");await c.session.selectModel(E,A)}else{if(typeof r?.createSession!="function"||typeof r?.workspaceSession!="function"||typeof o?.sessionFor!="function"||typeof o?.setSession!="function")throw new TypeError("Harness cannot create a conversation session");let B=await r.createSession(A);if(typeof B!="string"||!B)throw new TypeError("Harness returned an invalid session id");let f=r.workspaceSession(B);if(!f||typeof f.selectModel!="function")throw new TypeError("Harness session does not support model selection");await f.selectModel(E,A);let Q=o.sessionFor(i);if(typeof Q=="string"&&Q){let y=new Error("Conversation binding changed during model selection");throw y.code=m2,y}if(await o.setSession(i,B)===!1){let y=new Error("Workspace changed while binding the new session");throw y.code=Ja,y}}return la(`\u6A21\u578B\u5DF2\u5207\u6362\u4E3A\uFF1A ${xE(E.provider,E.model)} -\u540E\u7EED\u6D88\u606F\u5C06\u4F7F\u7528\u8BE5\u6A21\u578B\u3002`)})}catch(c){return la(BO(c,"select"))}}var yO=/^[a-z0-9][a-z0-9-]*$/,k3e=Object.freeze({defaultId:"",items:Object.freeze([])});function Wn(n){if(n==null||typeof n!="string")return null;let r=n.trim();return yO.test(r)?r:null}function JI(n){if(n==null||n==="")return null;let r=Wn(n);if(!r){let o=new Error("Agent Preset \u65E0\u6548\u3002");throw o.code="agent-preset-invalid",o}return r}function Ooe(n){if(typeof n=="string"){let i=Wn(n);return i?{id:i,label:i}:null}if(!n||typeof n!="object"||n.broken!==void 0)return null;let r=Wn(n.id);if(!r)return null;let o=typeof n.name=="string"&&n.name.trim()?n.name.trim().slice(0,128):typeof n.label=="string"&&n.label.trim()?n.label.trim().slice(0,128):r;return{id:r,label:o}}function tn(n){if(!n||typeof n!="object"||Array.isArray(n))return{defaultId:"",items:[]};let r=[],o=new Set;for(let i of Array.isArray(n.items)?n.items:[]){let e=Ooe(i);!e||o.has(e.id)||(o.add(e.id),r.push(e))}return{defaultId:Wn(n.defaultId)??"",items:r}}async function pa(n){try{let r=typeof n?.get=="function"?n.get("agentPresets"):n?.agentPresets;if(!r||typeof r.list!="function")return{defaultId:"",items:[]};let o=await r.list();return tn({defaultId:typeof r.defaultId=="string"?r.defaultId:"",items:Array.isArray(o)?o:[]})}catch{return{defaultId:"",items:[]}}}var boe=/^\/preset(?=$|\s)/iu,O2=/^\/presetlist(?=$|\s)/iu,Moe="\u7528\u6CD5\uFF1A/presetlist\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",SO=["\u7528\u6CD5\uFF1A","/preset \u67E5\u770B\u5F53\u524D\u8BBE\u7F6E","/preset <\u5E8F\u53F7> \u6309\u6700\u8FD1\u4E00\u6B21 /presetlist \u7684\u5E8F\u53F7\u9009\u62E9","/preset \u6309 Agent Preset ID \u9009\u62E9","/preset id:<\u7EAF\u6570\u5B57 ID> \u9009\u62E9\u7EAF\u6570\u5B57 ID","/preset --default \u8DDF\u968F Host \u9ED8\u8BA4"].join(` +\u540E\u7EED\u6D88\u606F\u5C06\u4F7F\u7528\u8BE5\u6A21\u578B\u3002`)})}catch(c){return la(BO(c,"select"))}}var yO=/^[a-z0-9][a-z0-9-]*$/,G3e=Object.freeze({defaultId:"",items:Object.freeze([])});function Wn(n){if(n==null||typeof n!="string")return null;let r=n.trim();return yO.test(r)?r:null}function JI(n){if(n==null||n==="")return null;let r=Wn(n);if(!r){let o=new Error("Agent Preset \u65E0\u6548\u3002");throw o.code="agent-preset-invalid",o}return r}function Ooe(n){if(typeof n=="string"){let i=Wn(n);return i?{id:i,label:i}:null}if(!n||typeof n!="object"||n.broken!==void 0)return null;let r=Wn(n.id);if(!r)return null;let o=typeof n.name=="string"&&n.name.trim()?n.name.trim().slice(0,128):typeof n.label=="string"&&n.label.trim()?n.label.trim().slice(0,128):r;return{id:r,label:o}}function tn(n){if(!n||typeof n!="object"||Array.isArray(n))return{defaultId:"",items:[]};let r=[],o=new Set;for(let i of Array.isArray(n.items)?n.items:[]){let e=Ooe(i);!e||o.has(e.id)||(o.add(e.id),r.push(e))}return{defaultId:Wn(n.defaultId)??"",items:r}}async function pa(n){try{let r=typeof n?.get=="function"?n.get("agentPresets"):n?.agentPresets;if(!r||typeof r.list!="function")return{defaultId:"",items:[]};let o=await r.list();return tn({defaultId:typeof r.defaultId=="string"?r.defaultId:"",items:Array.isArray(o)?o:[]})}catch{return{defaultId:"",items:[]}}}var boe=/^\/preset(?=$|\s)/iu,O2=/^\/presetlist(?=$|\s)/iu,Moe="\u7528\u6CD5\uFF1A/presetlist\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",SO=["\u7528\u6CD5\uFF1A","/preset \u67E5\u770B\u5F53\u524D\u8BBE\u7F6E","/preset <\u5E8F\u53F7> \u6309\u6700\u8FD1\u4E00\u6B21 /presetlist \u7684\u5E8F\u53F7\u9009\u62E9","/preset \u6309 Agent Preset ID \u9009\u62E9","/preset id:<\u7EAF\u6570\u5B57 ID> \u9009\u62E9\u7EAF\u6570\u5B57 ID","/preset --default \u8DDF\u968F Host \u9ED8\u8BA4"].join(` `),_oe=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]+/gu,D2=new WeakMap,Noe=15*6e4,Toe=256;function wo(n){return{handled:!0,message:n,messages:oc(n)}}function Roe(n){return typeof n!="string"?"":n.replace(_oe," ").replace(/\s+/gu," ").trim()}function koe(n){return n?{signal:n}:{}}function b2(n){if(!n||typeof n!="object"||Array.isArray(n)||!n.agentPresetCatalog||typeof n.agentPresetCatalog!="object"||!Array.isArray(n.agentPresetCatalog.items))throw new TypeError("Harness returned invalid Agent Preset settings");let r=n.agentPreset===null?null:Wn(n.agentPreset);if(n.agentPreset!==null&&r===null)throw new TypeError("Harness returned an invalid current Agent Preset");return{agentPreset:r,agentPresetCatalog:tn(n.agentPresetCatalog)}}function $u(n){return`${Roe(n.label)||n.id}\uFF08${n.id}\uFF09`}function DO(n,r){return n.items.find(o=>o.id===r)??null}function voe(n){if(!n.defaultId)return"\u672A\u8BBE\u7F6E\u6216\u5F53\u524D\u4E0D\u53EF\u7528";let r=DO(n,n.defaultId);return r?$u(r):`${n.defaultId}\uFF08\u5F53\u524D\u4E0D\u53EF\u7528\uFF09`}function wO(n){let{agentPreset:r,agentPresetCatalog:o}=n;if(r===null){let e=DO(o,o.defaultId);return e?`\u8DDF\u968F Host \u9ED8\u8BA4\uFF1A${$u(e)}`:"\u8DDF\u968F Host \u9ED8\u8BA4\uFF08Host \u9ED8\u8BA4\u5F53\u524D\u4E0D\u53EF\u7528\uFF09"}let i=DO(o,r);return i?$u(i):`${r}\uFF08\u5DF2\u4E0D\u53EF\u7528\uFF09`}function Poe(n){return["\u5F53\u524D\u673A\u5668\u4EBA\u7528\u4E8E\u65B0\u4F1A\u8BDD\u7684 Agent Preset\uFF1A",wO(n),"","\u5DF2\u6709\u4F1A\u8BDD\u4E0D\u4F1A\u53D7\u6B64\u8BBE\u7F6E\u5F71\u54CD\u3002","\u67E5\u770B\u53EF\u7528\u9879\uFF1A/presetlist","\u6062\u590D\u8DDF\u968F Host \u9ED8\u8BA4\uFF1A/preset --default"].join(` `)}function Goe(n){let{agentPreset:r,agentPresetCatalog:o}=n,i=["\u5F53\u524D\u673A\u5668\u4EBA\u7528\u4E8E\u65B0\u4F1A\u8BDD\u7684 Agent Preset\uFF1A",wO(n),"",`Host \u9ED8\u8BA4\uFF1A${voe(o)}`,"",`\u53EF\u7528 Agent Preset\uFF08${o.items.length}\uFF09\uFF1A`];return o.items.length===0?i.push("\u5F53\u524D\u6CA1\u6709\u53EF\u7528 Agent Preset\u3002"):o.items.forEach((e,a)=>{let A=[];e.id===o.defaultId&&A.push("Host \u9ED8\u8BA4"),e.id===r&&A.push("\u5F53\u524D\u9009\u62E9"),r===null&&e.id===o.defaultId&&A.push("\u5F53\u524D\u751F\u6548");let t=A.length>0?`\uFF08${A.join("\uFF0C")}\uFF09`:"";i.push(`${a+1}. ${$u(e)}${t}`)}),i.push("","\u9009\u62E9\uFF1A/preset <\u5E8F\u53F7\u6216 ID>","\u7EAF\u6570\u5B57 ID\uFF1A/preset id:","\u6062\u590D\u8DDF\u968F Host \u9ED8\u8BA4\uFF1A/preset --default"),i.join(` `)}function Foe(n){return["\u5F53\u524D\u673A\u5668\u4EBA\u7528\u4E8E\u65B0\u4F1A\u8BDD\u7684 Agent Preset \u5DF2\u8BBE\u7F6E\u4E3A\uFF1A",wO(n),"","\u5DF2\u6709\u4F1A\u8BDD\u4E0D\u53D8\u3002\u82E5\u5F53\u524D\u804A\u5929\u5DF2\u6709\u4F1A\u8BDD\uFF0C\u8BF7\u5148\u53D1\u9001 /new\uFF0C\u518D\u53D1\u9001\u666E\u901A\u6D88\u606F\uFF0C\u624D\u4F1A\u4F7F\u7528\u65B0\u8BBE\u7F6E\u521B\u5EFA\u4F1A\u8BDD\u3002"].join(` @@ -118,48 +118,48 @@ ${xE(E.provider,E.model)} ${SO}`:o==="agent-preset-unavailable"?"Agent Preset \u4E0D\u5B58\u5728\u6216\u5F53\u524D\u4E0D\u53EF\u7528\uFF0C\u8BF7\u91CD\u65B0\u6267\u884C /presetlist\u3002":o===Ja||o==="workspace-bot-not-found"?"\u5DE5\u4F5C\u533A\u6216\u673A\u5668\u4EBA\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u8BD5\u3002":o==="cancelled"||n?.name==="AbortError"?r==="list"?"\u83B7\u53D6 Agent Preset \u5217\u8868\u5DF2\u53D6\u6D88\u3002":r==="current"?"\u83B7\u53D6 Agent Preset \u8BBE\u7F6E\u5DF2\u53D6\u6D88\u3002":"Agent Preset \u4FEE\u6539\u5DF2\u53D6\u6D88\u3002":r==="list"?"\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6 Agent Preset \u5217\u8868\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":r==="current"?"\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6 Agent Preset \u8BBE\u7F6E\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Agent Preset \u4FEE\u6539\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"}async function w2(n,r){if(typeof n?.agentPresetSettings!="function")throw new TypeError("Harness does not support Agent Preset settings");return b2(await n.agentPresetSettings(r))}async function xoe(n,r,o){if(typeof n?.updateAgentPreset!="function")throw new TypeError("Harness does not support updating Agent Preset settings");return b2(await n.updateAgentPreset(r,o))}function Ci(n){if(typeof n!="string")return!1;let r=n.trim();return O2.test(r)||boe.test(r)}async function xi(n,r,o,i,e={}){if(!Ci(n))return null;let a=n.trim();if(e.hasImages)return wo("Agent Preset \u547D\u4EE4\u4EC5\u652F\u6301\u7EAF\u6587\u5B57\uFF0C\u8BF7\u79FB\u9664\u56FE\u7247\u540E\u91CD\u8BD5\u3002");let A=koe(e.signal);if(O2.test(a)){if(!/^\/presetlist[ \t]*$/iu.test(a))return wo(Moe);try{let c=await w2(r,A);return Uoe(o,i,c.agentPresetCatalog.items),wo(Goe(c))}catch(c){return wo(mO(c,"list"))}}let t=/^\/preset(?:[ \t]+([^\s]+))?[ \t]*$/iu.exec(a);if(!t)return wo(SO);let s=t[1];if(!s)try{return wo(Poe(await w2(r,A)))}catch(c){return wo(mO(c,"current"))}let g;if(s.toLowerCase()==="--default")g=null;else{let c=/^id:(\d+)$/iu.exec(s);if(c)g=c[1];else{let I=Koe(o,i,s);if(I.numeric){if(I.error)return wo(I.error);g=I.id}else if(g=Wn(s),!g)return wo(`Agent Preset ID \u683C\u5F0F\u65E0\u6548\u3002 ${SO}`)}}try{return await YI(o,i,async()=>wo(Foe(await xoe(r,g,A))))}catch(c){return wo(mO(c,"update"))}}var joe="\u5DF2\u8FDE\u63A5 DeepSeek Harness\uFF0C\u6B63\u5728\u601D\u8003\u2026",_2="\u6D88\u606F\u5904\u7406\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",OO="\u8FD9\u4E2A\u95EE\u9898\u5DF2\u5728\u5176\u4ED6\u5BA2\u6237\u7AEF\u5904\u7406\uFF0C\u65E0\u9700\u518D\u6B21\u56DE\u7B54\u3002",Joe=["\u9489\u9489\u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002","","\u76F4\u63A5\u53D1\u9001\u6587\u5B57\u6216\u56FE\u7247\u5373\u53EF\u7EE7\u7EED\u5F53\u524D\u4F1A\u8BDD\u3002","/new \u5F00\u542F\u4E00\u4E2A\u5168\u65B0\u4F1A\u8BDD","/compact \u538B\u7F29\u5F53\u524D\u4F1A\u8BDD\u7684\u8F83\u65E9\u4E0A\u4E0B\u6587","/workspace \u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84 \u5207\u6362\u5DE5\u4F5C\u533A","/workspacelist \u5217\u51FA\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84","/sessionlist [\u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84] \u5217\u51FA\u4F1A\u8BDD ID \u548C\u6807\u9898","/session Session ID \u6216\u5F53\u524D\u5DE5\u4F5C\u533A\u5E8F\u53F7 \u5C06\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u5230\u6307\u5B9A\u4F1A\u8BDD","/models \u6309\u5E8F\u53F7\u5217\u51FA\u6240\u6709\u53EF\u7528\u6A21\u578B","/model [\u5E8F\u53F7\u6216\u5B8C\u6574\u6A21\u578BID] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B","\u793A\u4F8B\uFF1A\u5148\u53D1 /models\uFF0C\u518D\u53D1 /model 2","/presetlist \u6309\u5E8F\u53F7\u5217\u51FA\u53EF\u7528 Agent Preset","/preset [\u5E8F\u53F7\u6216\u5B8C\u6574ID] \u67E5\u770B\u6216\u8BBE\u7F6E\u5F53\u524D\u673A\u5668\u4EBA Agent Preset","\u7EAF\u6570\u5B57 ID\uFF1A/preset id:","/preset --default \u8DDF\u968F Host \u9ED8\u8BA4","/stop \u505C\u6B62\u5F53\u524D\u4EFB\u52A1","/steer \u8865\u5145\u6307\u4EE4 \u7EA0\u504F\u5F53\u524D\u4EFB\u52A1","/status \u68C0\u67E5\u8FDE\u63A5\u72B6\u6001","/help \u663E\u793A\u672C\u5E2E\u52A9"].join(` `);function Ft(n){return typeof n=="string"&&n.trim()?n.trim():null}function N2(n){let r=[],o=new Set,i=n;for(;i&&typeof i=="object"&&r.length<3&&!o.has(i);){o.add(i);let e=Ft(i.name)?.slice(0,80),a=Ft(i.code)?.slice(0,80),A=Ft(i.providerCode)?.slice(0,160),t=Number.isInteger(i.status)?i.status:void 0;r.push({...e?{name:e}:{},...a?{code:a}:{},...A?{providerCode:A}:{},...t?{status:t}:{}}),i=i.cause}return r}function qoe(n){let r=n,o=new Set;for(;r&&typeof r=="object"&&!o.has(r);){if(o.add(r),r.code==="image-download-address-failed")return"\u9489\u9489\u672A\u80FD\u6362\u53D6\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\uFF1B\u82E5\u6301\u7EED\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u673A\u5668\u4EBA\u7684\u201C\u4F01\u4E1A\u5185\u673A\u5668\u4EBA\u53D1\u9001\u6D88\u606F\u6743\u9650\u201D\u3002";if(r.code==="invalid-image-download")return"\u9489\u9489\u6CA1\u6709\u8FD4\u56DE\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002";if(r.code==="image-content-download-failed")return"\u9489\u9489\u8FD4\u56DE\u7684\u56FE\u7247\u4E34\u65F6\u5730\u5740\u65E0\u6CD5\u8BFB\u53D6\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002";r=r.cause}return Li(n)}function Voe(n){return Ft(n?.senderStaffId)??Ft(n?.senderId)}function zoe(n){if(n?.content&&typeof n.content=="object")return n.content;if(typeof n?.content!="string")return null;try{let r=JSON.parse(n.content);return r&&typeof r=="object"?r:null}catch{return null}}function Woe(n){let r=n?.richText??n?.rich_text;return Array.isArray(r)?r:[]}function Zoe(n){return typeof n?.text=="string"?Ft(n.text):typeof n?.text?.content=="string"?Ft(n.text.content):String(n?.type).toLowerCase()==="text"&&typeof n?.content=="string"?Ft(n.content):null}function T2(n){return Ft(n?.downloadCode)??Ft(n?.pictureDownloadCode)}function R2(n,{api:r,clientId:o,clientSecret:i}={}){let e=String(n?.msgtype??"").toLowerCase(),a=zoe(n),A=e==="richtext"?Woe(a):[],t=e==="text"?Ft(n?.text?.content)??"":A.map(Zoe).filter(Boolean).join(` -`),s=[];if(e==="picture"){let g=T2(a);g&&s.push(g)}else if(e==="richtext")for(let g of A){if(String(g?.type??"").toLowerCase()!=="picture")continue;let c=T2(g);c&&s.push(c)}return{content:t,images:s.map((g,c)=>({name:c===0?"image":`image-${c+1}`,load:({signal:I,maxBytes:E})=>{if(typeof r?.downloadImage!="function")throw new Error("DingTalk API does not support image downloads");return r.downloadImage({clientId:o,clientSecret:i,robotCode:n?.robotCode,downloadCode:g,signal:I,maxBytes:E})}}))}}function Xoe(n,r){if(String(n?.conversationType)==="2"){let o=Ft(n?.conversationId);if(!o)throw new Error("DingTalk group message has no conversation id");return`group:${o}`}return`p2p:${r}`}function $oe(n,r){return String(n?.conversationType)==="2"?{type:"group",openConversationId:Ft(n?.conversationId)}:{type:"user",userId:r}}function ene(n){return n?.type==="text"&&Ft(n.text)?n.text:n?.type==="tool"?n.name==="web_search"?"_\u6B63\u5728\u641C\u7D22\u7F51\u7EDC\u5E76\u6574\u7406\u4FE1\u606F\u2026_":`_\u6B63\u5728\u4F7F\u7528 ${Ft(n.name)??"\u5DE5\u5177"}\u2026_`:`_${Ft(n?.text)??"\u6B63\u5728\u5904\u7406\u2026"}_`}function Ane(n,r,o){if(r.needsPresentation||!r.questions[r.index]||r.actor!==o||String(n?.conversationType)==="2"&&n?.isInAtList!==!0||n?.msgtype!=="text"||!Ft(n?.text?.content))return!1;try{return ac(n.sessionWebhook),!0}catch{return!1}}function tne(n){n.stats??={};for(let r of["messagesReceived","messagesReplied","messagesRejected","messagesIgnored"])n[r]??=0,n.stats[r]=n[r];n.pendingSenders??=[]}function hi(n,r){n[r]=(n[r]??0)+1,n.stats??={},n.stats[r]=n[r]}function bO({pendingSenders:n=[]}={}){return{messagesReceived:0,messagesReplied:0,messagesRejected:0,messagesIgnored:0,lastMessageAt:null,lastReplyAt:null,lastRejectedAt:null,lastError:null,pendingSenders:structuredClone(n),stats:{messagesReceived:0,messagesReplied:0,messagesRejected:0,messagesIgnored:0}}}var eB=class{#e;#A;#r;#t;#n;#o;#l;#s;#I;#a;#i=new Map;#c=new Map;#g=new Map;#p=new Set;#h=new Set;#C=new Set;#E;constructor({api:r,clientId:o,clientSecret:i,harness:e,state:a,status:A=bO(),logger:t=console,replyTimeoutMs:s=6e5,maxMessageChars:g=4e3,signal:c}){if(!r||typeof r.sendText!="function")throw new TypeError("DingTalk API is required");if(!Ft(o)||!Ft(i))throw new TypeError("DingTalk app credentials are required");if(!e||!a)throw new TypeError("Harness client and state store are required");this.#e=r,this.#A=o.trim(),this.#r=i.trim(),this.#t=e,this.#n=a,this.#o=A,this.#l=t,this.#E=new ja({label:"DingTalk",logger:t}),this.#s=s,this.#I=g,this.#a=c,tne(this.#o),this.#T()}get status(){return this.#T(),structuredClone(this.#o)}accept(r){if(this.#a?.aborted)return Promise.resolve();let o=Ft(r?.msgId),i=Voe(r);if(!o||!i||this.#n.hasSeen(o)||this.#C.has(o))return Promise.resolve();this.#C.add(o);let e;try{e=Xoe(r,i)}catch{return this.#C.delete(o),hi(this.#o,"messagesRejected"),this.#o.lastRejectedAt=new Date().toISOString(),Promise.resolve()}let a=null;try{a=ac(r.sessionWebhook)}catch{}a&&String(r.conversationType)!=="2"&&Pi(this.#n,{sessionWebhook:a});let A=this.#c.get(e),t=R2(r,{api:this.#e,clientId:this.#A,clientSecret:this.#r}),s=Ft(t.content)??"",g=pi(s)?Hi:Ei(s)?Yi:Ci(s)?xi:null,c=String(r.conversationType)!=="2"||r?.isInAtList===!0;if(g&&a&&c){let E;return E=this.#B(r,o,e,a,t,g).catch(B=>{if(!(B?.code==="turn-stopped"||this.#a?.aborted))return this.#o.lastError="\u9489\u9489\u547D\u4EE4\u5904\u7406\u5931\u8D25\u3002",this.#l.error?.("[dsh-dingtalk] failed to process a command",N2(B)),this.#O(a,_2).catch(()=>{})}).finally(()=>{this.#C.delete(o),this.#h.delete(E)}),this.#h.add(E),E}let I=this.#E.claimReply({key:e,actor:i,messageId:o,text:a&&r?.msgtype==="text"?Ft(r?.text?.content)??"":"",addressed:String(r?.conversationType)!=="2"||r?.isInAtList===!0,hasPendingQuestion:!!A,questionCompletion:A?.submitting||A?.claimedReplyMessageId?A.queue:null,isQuestionPending:()=>this.#c.has(e),send:a?E=>this.#O(a,E):async()=>{}});if(I){let E;return E=I.process(async()=>this.#n.hasSeen(o)?!1:(await this.#n.markSeen(o),hi(this.#o,"messagesReceived"),this.#o.lastMessageAt=new Date().toISOString(),a||(hi(this.#o,"messagesRejected"),this.#o.lastRejectedAt=new Date().toISOString(),this.#o.lastError="\u9489\u9489\u6D88\u606F\u6CA1\u6709\u5B89\u5168\u7684\u56DE\u590D\u5730\u5740\u3002"),!0)).catch(B=>{this.#a?.aborted||(this.#o.lastError="\u9489\u9489\u5BA1\u6279\u5904\u7406\u5931\u8D25\u3002",this.#l.error?.("[dsh-dingtalk] failed to process an approval reply",B))}).finally(()=>{this.#C.delete(o),this.#p.delete(E)}),this.#p.add(E),E}if(A&&A.actor!==i)return this.#d(r,o,i,e);if(A?.submitting||A?.claimedReplyMessageId)return this.#d(r,o,i,e);if(A){Ane(r,A,i)&&(A.claimedReplyMessageId=o);let B=(A.queue??Promise.resolve()).catch(()=>{}).then(()=>this.#Q(r,o,i,e,A)).finally(()=>{this.#C.delete(o),A.claimedReplyMessageId===o&&(A.claimedReplyMessageId=null),A.queue===B&&(A.queue=null)});return A.queue=B,B}return this.#d(r,o,i,e)}#d(r,o,i,e,{releaseMessageId:a=!0,alreadyRecorded:A=!1}={}){let s=(this.#i.get(e)??Promise.resolve()).catch(()=>{}).then(()=>this.#u(r,o,i,e,{alreadyRecorded:A})).finally(()=>{a&&this.#C.delete(o),this.#i.get(e)===s&&this.#i.delete(e)});return this.#i.set(e,s),s}async waitForIdle(){await Promise.allSettled([...this.#i.values(),...[...this.#c.values()].flatMap(r=>r.queue?[r.queue]:[]),...this.#p,...this.#h])}async#B(r,o,i,e,a,A){if(this.#a?.throwIfAborted(),this.#n.hasSeen(o))return;await this.#n.markSeen(o),hi(this.#o,"messagesReceived"),this.#o.lastMessageAt=new Date().toISOString();let t=await A(Ft(a.content)??"",this.#t,this.#n,i,{signal:this.#a,hasImages:Ir(a),pendingInteraction:this.#c.has(i)||this.#E.hasPending(i),control:{owner:this,key:i}});t?.stopped&&await Promise.allSettled([this.#M(i),this.#E.closeRoute(i)]);for(let s of t?.messages??[t?.message])s&&await this.#O(e,s);this.#o.lastError=null}async#u(r,o,i,e,{alreadyRecorded:a=!1}={}){if(this.#a?.throwIfAborted(),!a){if(this.#n.hasSeen(o))return;await this.#n.markSeen(o),hi(this.#o,"messagesReceived"),this.#o.lastMessageAt=new Date().toISOString()}if(String(r.conversationType)==="2"&&r.isInAtList!==!0){hi(this.#o,"messagesIgnored");return}let A;try{A=ac(r.sessionWebhook)}catch{hi(this.#o,"messagesRejected"),this.#o.lastRejectedAt=new Date().toISOString(),this.#o.lastError="\u9489\u9489\u6D88\u606F\u6CA1\u6709\u5B89\u5168\u7684\u56DE\u590D\u5730\u5740\u3002";return}let t=R2(r,{api:this.#e,clientId:this.#A,clientSecret:this.#r}),s=t.content,g=Ir(t),c=String(r?.msgtype).toLowerCase()==="text",I=null,E=!1;try{if(!s&&!g){await this.#O(A,"\u76EE\u524D\u652F\u6301\u6587\u5B57\u548C\u56FE\u7247\u6D88\u606F\u3002");return}let B=s.toLowerCase();if(c&&!g&&B==="/help"){await this.#O(A,Joe);return}if(c&&!g&&B==="/status"){await this.#t.ensureRunning({signal:this.#a}),await this.#O(A,"\u9489\u9489\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002");return}if(c&&!g&&B==="/new"){await this.#n.clearSession(e),await this.#O(A,"\u5DF2\u5F00\u542F\u65B0\u4F1A\u8BDD\u3002\u8BF7\u53D1\u9001\u4F60\u7684\u95EE\u9898\u3002");return}let f=c&&!g?await Ki(s,this.#t,e):null;if(f){for(let _ of f.messages??[f.message])await this.#O(A,_);return}let Q=c&&!g?await Ui(s,this.#t,this.#n,e,{signal:this.#a}):null;if(Q){await this.#O(A,Q.message);return}let y=g?await Fi(t,{signal:this.#a}):void 0;typeof this.#e.createAiCard=="function"&&typeof this.#e.updateAiCard=="function"&&typeof this.#e.finishAiCard=="function"&&(I=a2({api:this.#e,clientId:this.#A,clientSecret:this.#r,target:$oe(r,i),signal:this.#a,logger:this.#l}),E=await I.start(joe));let{answer:m}=await qa({harness:this.#t,state:this.#n,key:e,...g?{content:y}:{text:s},createOptions:{signal:this.#a},existsOptions:{signal:this.#a},askOptions:{timeoutMs:this.#s,signal:this.#a,control:{owner:this,key:e},onUpdate:E?_=>I.push(ene(_)):void 0,onInteraction:_=>this.#m(_,{key:e,actor:i,sessionWebhook:A,requiresMention:String(r.conversationType)==="2"}),onInteractionResolved:_=>this.#f(_)}});E&&await I.finish(m)||await this.#O(A,m),hi(this.#o,"messagesReplied"),this.#o.lastReplyAt=new Date().toISOString(),this.#o.lastError=null}catch(B){if(B?.code==="turn-stopped"){E&&await I.finish("\u5DF2\u505C\u6B62\u3002").catch(()=>{});return}if(this.#a?.aborted)return;this.#o.lastError="\u9489\u9489\u6D88\u606F\u5904\u7406\u5931\u8D25\u3002",this.#l.error?.("[dsh-dingtalk] failed to process an inbound message",N2(B));try{let f=qoe(B)??_2;E&&await I.finish(f)||await this.#O(A,f)}catch{this.#l.error?.("[dsh-dingtalk] failed to send the safe error reply")}}finally{await this.#M(e),await this.#E.closeRoute(e)}}async#Q(r,o,i,e,a){this.#a?.throwIfAborted();let A=this.#c.get(e),t=a.claimedReplyMessageId===o;if(!A||A!==a||A.submitting)return t&&(!A||A!==a)?this.#D(r,o):this.#d(r,o,i,e,{releaseMessageId:!1});if(this.#n.hasSeen(o))return;if(await this.#n.markSeen(o),hi(this.#o,"messagesReceived"),this.#o.lastMessageAt=new Date().toISOString(),String(r.conversationType)==="2"&&r.isInAtList!==!0){hi(this.#o,"messagesIgnored");return}let s;try{s=ac(r.sessionWebhook)}catch{hi(this.#o,"messagesRejected"),this.#o.lastRejectedAt=new Date().toISOString(),this.#o.lastError="\u9489\u9489\u6D88\u606F\u6CA1\u6709\u5B89\u5168\u7684\u56DE\u590D\u5730\u5740\u3002";return}let g=r?.msgtype==="text"?Ft(r?.text?.content):null;if(!g){try{await this.#O(s,"\u8BF7\u7528\u6587\u5B57\u56DE\u7B54\u5F53\u524D\u95EE\u9898\u3002")}catch{this.#l.error?.("[dsh-dingtalk] failed to reject a non-text interaction reply")}return}let c=this.#c.get(e);if(!c||c!==a||c.submitting){if(t&&(!c||c!==a)){try{await this.#O(s,OO)}catch{this.#l.error?.("[dsh-dingtalk] failed to send an expired interaction notice")}return}return this.#d(r,o,i,e,{releaseMessageId:!1,alreadyRecorded:!0})}if(c.sessionWebhook=s,c.needsPresentation){try{await this.#y(c)}catch{this.#o.lastError="\u9489\u9489\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002",this.#l.error?.("[dsh-dingtalk] failed to retry an interaction question"),c.interaction.reconnect?.()}return}let I=c.questions[c.index];if(I){if(c.answers.push(xa(I,g)),c.index+=1,c.indexthis.#O(e,c)})||r?.kind!=="question")return;let A=r?.payload?.questions,t=typeof r?.interactionId=="string"?r.interactionId:r?.rpcId;if(typeof r.rpcId!="string"||typeof t!="string"||typeof r.sessionId!="string"||!Array.isArray(A)||A.length===0||A.some(c=>!Ka(c))){this.#l.warn?.("[dsh-dingtalk] ignored an invalid Harness question interaction");return}if(r.recovered===!0){await r.respond({ok:!1,error:{code:"cancelled",message:"DingTalk safely cancelled an interaction left by an earlier client.",details:{}}});try{await this.#O(e,"\u68C0\u6D4B\u5230\u8FD9\u4E2A Session \u4E2D\u9057\u7559\u7684\u5F85\u56DE\u7B54\u95EE\u9898\uFF0C\u5DF2\u5B89\u5168\u53D6\u6D88\u5E76\u7EE7\u7EED\u5904\u7406\u4F60\u521A\u624D\u7684\u6D88\u606F\u3002")}catch{this.#l.error?.("[dsh-dingtalk] failed to send an interaction recovery notice")}return}let s=this.#c.get(o);if(s?.interactionId===t){s.interaction=r,s.needsPresentation&&await this.#y(s);return}if(this.#g.has(t))return;if(s){this.#l.warn?.("[dsh-dingtalk] cancelled a second pending Harness question"),await r.respond({ok:!1,error:{code:"cancelled",message:"DingTalk is already handling another user interaction.",details:{}}});return}let g={kind:"question",interactionId:t,sessionId:r.sessionId,interaction:r,actor:i,requiresMention:a,questions:A,answers:[],index:0,sessionWebhook:e,queue:null,claimedReplyMessageId:null,submitting:!1,needsPresentation:!0};this.#c.set(o,g),this.#g.set(g.interactionId,o),await this.#y(g)}async#f(r){if(await this.#E.handleResolved(r))return;let o=r?.interactionId;if(r?.kind!=="question"||typeof o!="string")return;let i=this.#g.get(o);i&&this.#R(i,o)}async#y(r){let o=r.questions[r.index];o&&(await this.#O(r.sessionWebhook,Ya(o,r.index,r.questions.length,{requiresMention:r.requiresMention})),r.needsPresentation=!1)}async#D(r,o){if(this.#n.hasSeen(o))return;await this.#n.markSeen(o),hi(this.#o,"messagesReceived"),this.#o.lastMessageAt=new Date().toISOString();let i;try{i=ac(r.sessionWebhook)}catch{hi(this.#o,"messagesRejected"),this.#o.lastRejectedAt=new Date().toISOString();return}try{await this.#O(i,OO)}catch{this.#l.error?.("[dsh-dingtalk] failed to send an expired interaction notice")}}#w(r,o){let i=this.#c.get(r);return!i||o!==void 0&&i.interactionId!==o?null:(this.#c.delete(r),this.#g.delete(i.interactionId),i)}#R(r,o){return this.#w(r,o)!==null}async#M(r){let o=this.#w(r);if(!(!o||o.kind!=="question"))try{await o.interaction.respond({ok:!1,error:{code:"cancelled",message:"The DingTalk interaction ended before the user answered.",details:{}}},{signal:AbortSignal.timeout(5e3)})}catch(i){i?.code!=="interaction-not-pending"&&this.#l.warn?.("[dsh-dingtalk] failed to cancel a pending Harness interaction")}}#T(){typeof this.#n.pendingSenders=="function"&&(this.#o.pendingSenders=this.#n.pendingSenders())}async#O(r,o){for(let i of A2(o,this.#I))this.#a?.throwIfAborted(),await this.#e.sendText({clientId:this.#A,clientSecret:this.#r,sessionWebhook:r,text:i,signal:this.#a})}};function AB(n){return typeof n=="string"&&n.trim()?n.trim():null}function k2(n){let r=Array.isArray(n?.approvedSenders)?n.approvedSenders:n?.approvedSenders instanceof Set?[...n.approvedSenders]:[];return new Set(r.map(o=>AB(typeof o=="string"?o:o?.staffId)).filter(Boolean))}function rne(n){return k2(n).size}function v2(n){return n?.connected===!0||n?.socket?.readyState===1}function ane(n,r){return new Promise((o,i)=>{if(r.aborted){i(r.reason);return}let e=()=>i(r.reason);r.addEventListener("abort",e,{once:!0}),Promise.resolve(n).then(a=>{r.removeEventListener("abort",e),o(a)},a=>{r.removeEventListener("abort",e),i(a)})})}async function ine(n,r,o){for(;;){if(o?.throwIfAborted(),v2(n))return;await new Promise((i,e)=>{let a=setTimeout(()=>{o?.removeEventListener("abort",A),i()},r),A=()=>{clearTimeout(a),e(o.reason??new DOMException("Aborted","AbortError"))};o?.addEventListener("abort",A,{once:!0})})}}async function one(n,r,o,i){let e=AbortSignal.timeout(r),a=AbortSignal.any([i,e]),A=!1,t=Promise.resolve().then(()=>n.connect()).finally(()=>{A=!0});try{await ane(t,a),await ine(n,o,a)}catch(s){throw a.aborted?(A||t.then(()=>n.disconnect()).catch(()=>{}),i.aborted?i.reason:new Error(`DingTalk Stream handshake timed out after ${r}ms`)):s}}async function nne({clientId:n,clientSecret:r}){let{DWClient:o,TOPIC_ROBOT:i}=await import("dingtalk-stream");return{client:new o({clientId:n,clientSecret:r,endpoint:"https://api.dingtalk.com",autoReconnect:!1,keepAlive:!0,debug:!1}),topic:i}}function sne({pendingSenders:n=[],approvedSenders:r=0}={}){return{startedAt:null,ready:!1,dingtalkStreamState:"idle",harnessReachable:!1,lastConnectedAt:null,lastCheckedAt:null,lastCallbackAt:null,authorizationMode:"sender-staff-id-approval",approvedSenderCount:r,...bO({pendingSenders:n})}}var jE=class{#e;#A;#r;#t;#n;#o;#l;#s;#I;#a;#i;#c;#g=null;#p=null;#h=null;#C=null;#E=null;#d=null;#B=new Set;constructor({config:r,clientSecret:o,harness:i,state:e,logger:a=console,replyTimeoutMs:A=6e5,maxMessageChars:t=4e3,connectTimeoutMs:s=15e3,connectPollIntervalMs:g=25,api:c=t2(),streamFactory:I=nne}){if(!r||!AB(r.clientId)||!AB(o))throw new TypeError("DingtalkRuntime requires app credentials");if(!i||!e)throw new TypeError("DingtalkRuntime requires Harness and state");if(typeof I!="function")throw new TypeError("streamFactory must be a function");this.#e=r,this.#A=o.trim(),this.#r=i,this.#t=e,this.#n=a,this.#o=A,this.#l=t,this.#s=s,this.#I=g,this.#a=c,this.#i=I,this.#c=sne({pendingSenders:this.#Q(),approvedSenders:rne(r)})}get status(){if(this.#p){let r=this.#p.status;Object.assign(this.#c,r)}else this.#c.pendingSenders=this.#Q();return structuredClone(this.#c)}pendingSender(r){return typeof this.#t.pendingSender=="function"?this.#t.pendingSender(r):null}pendingSenders(){return this.#Q()}async start(){return this.#g&&this.#c.ready?this.status:this.#C?this.#C:(this.#C=this.#u().finally(()=>{this.#C=null}),this.#C)}async#u(){await this.stop();let r=new AbortController;this.#d=r;let{signal:o}=r;this.#c.startedAt=new Date().toISOString(),this.#c.dingtalkStreamState="connecting",this.#c.lastError=null;try{if(await this.#r.ensureRunning({signal:o}),this.#c.harnessReachable=!0,typeof this.#t.removePendingSenderByStaffId=="function"){for(let A of k2(this.#e))await this.#t.removePendingSenderByStaffId(A);this.#c.pendingSenders=this.#Q()}this.#p=new eB({api:this.#a,clientId:this.#e.clientId,clientSecret:this.#A,approvedSenders:this.#e.approvedSenders,harness:this.#r,state:this.#t,status:this.#c,logger:this.#n,replyTimeoutMs:this.#o,maxMessageChars:this.#l,signal:o});let i=await this.#i({clientId:this.#e.clientId,clientSecret:this.#A});if(o.throwIfAborted(),this.#g=i?.client??i,this.#h=i?.topic??i?.TOPIC_ROBOT??"/v1.0/im/bot/messages/get",!this.#g||typeof this.#g.registerCallbackListener!="function"||typeof this.#g.connect!="function"||typeof this.#g.disconnect!="function"||typeof this.#g.socketCallBackResponse!="function")throw new TypeError("streamFactory returned an invalid DingTalk Stream client");let e=this.#g,a=this.#p;return e.registerCallbackListener(this.#h,A=>{if(this.#g!==e||this.#p!==a)return;let t=AB(A?.headers?.messageId);if(t)try{e.socketCallBackResponse(t,{success:!0})}catch{this.#n.warn?.("[dsh-dingtalk] unable to acknowledge an inbound callback")}let s=Promise.resolve().then(async()=>{if(this.#p!==a)return;let g;try{g=typeof A?.data=="string"?JSON.parse(A.data):A?.data}catch{this.#c.lastError="\u9489\u9489\u6D88\u606F\u683C\u5F0F\u65E0\u6548\u3002",this.#n.warn?.("[dsh-dingtalk] ignored an invalid callback payload");return}!g||typeof g!="object"||(this.#c.lastCallbackAt=Date.now(),await a.accept(g))}).catch(()=>{o.aborted||this.#p!==a||(this.#c.lastError="\u9489\u9489\u6D88\u606F\u5904\u7406\u5931\u8D25\u3002",this.#n.error?.("[dsh-dingtalk] callback processing failed"))}).finally(()=>this.#B.delete(s));this.#B.add(s)}),await one(e,this.#s,this.#I,o),this.#c.ready=!0,this.#c.dingtalkStreamState="connected",this.#c.lastConnectedAt=Date.now(),this.#c.lastCheckedAt=Date.now(),this.#c.lastError=null,this.#E=setInterval(()=>{let A=v2(e);this.#c.ready=A,this.#c.dingtalkStreamState=A?"connected":"reconnecting",this.#c.lastCheckedAt=Date.now(),A&&(this.#c.lastError=null)},1e3),this.#E.unref?.(),this.status}catch(i){let e=o.aborted;throw this.#c.ready=!1,this.#c.dingtalkStreamState=e?"idle":"failed",this.#c.lastError=e?null:i?.message??String(i),await this.stop({preserveError:!e}),i}}async stop({preserveError:r=!1}={}){let o=r?this.#c.lastError:null,i=this.#d;this.#d=null,i?.abort(new DOMException("DingTalk runtime stopped","AbortError")),this.#E&&clearInterval(this.#E),this.#E=null,this.#c.ready=!1;let e=this.#g;if(this.#g=null,this.#h=null,e)try{await e.disconnect()}catch{this.#n.warn?.("[dsh-dingtalk] DingTalk Stream disconnect failed")}return await Promise.allSettled([...this.#B]),this.#B.clear(),this.#p&&await this.#p.waitForIdle(),this.#p=null,this.#c.dingtalkStreamState=r?"failed":"idle",this.#c.lastError=o,this.status}async sendConnectionTest(r){return Ys({state:this.#t,text:r,channelLabel:"\u9489\u9489\u673A\u5668\u4EBA",send:async({sessionWebhook:o},i)=>{if(!this.#c.ready||!this.#d)throw new Error("DingTalk runtime is not connected");await this.#a.sendText({clientId:this.#e.clientId,clientSecret:this.#A,sessionWebhook:o,text:i,signal:this.#d.signal})}})}#Q(){return typeof this.#t.pendingSenders=="function"?this.#t.pendingSenders():[]}};import{spawn as hne}from"node:child_process";import{randomUUID as G2}from"node:crypto";import{isAbsolute as dne}from"node:path";import{isAbsolute as gne}from"node:path";var cne=256,Ine=/[\p{White_Space}\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/u,lne=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/u;function JE(n,r){let o=new Error(r);return o.code=n,o}function pne(n){if(typeof n!="string"||!n||n.length>cne||Ine.test(n))throw JE("session-id-invalid","A non-empty, safe session id is required");return n}function Ene(n,r){if(!Array.isArray(r?.items)||!Array.isArray(r?.archivedSessionIds)||r.archivedSessionIds.some(i=>typeof i!="string"||!i))throw new Error("Harness returned an invalid response for workspace.list");let o=[];for(let i of r.items){if(typeof i?.workspaceId!="string"||!i.workspaceId||typeof i.path!="string"||!gne(i.path)||!Array.isArray(i.sessionIds)||i.sessionIds.some(e=>typeof e!="string"||!e))throw new Error("Harness returned an invalid response for workspace.list");for(let e of i.sessionIds)e===n&&o.push(i)}if(o.length===0)throw JE("session-not-registered","The session is not registered to a Harness workspace");if(o.length!==1)throw JE("session-workspace-ambiguous","The session is registered to more than one Harness workspace");if(lne.test(o[0].path))throw new Error("Harness returned an unsafe workspace path for the session");return{workspace:o[0],archived:r.archivedSessionIds.includes(n)}}function Cne(n,r){if(!Array.isArray(r?.items)||r.items.some(a=>typeof a?.sessionId!="string"||!a.sessionId))throw new Error("Harness returned an invalid response for session.list");let o=r.items.filter(a=>a.sessionId===n);if(o.length===0)throw JE("session-summary-unavailable","The session is no longer available from Harness");if(o.length!==1)throw new Error("Harness returned duplicate session summaries for session.list");let[i]=o;if(i.origin==="subagent")throw JE("session-subagent-unsupported","Subagent sessions cannot be adopted as a bot conversation");if(i.origin!==void 0)throw new Error("Harness returned an invalid session origin for session.list");let e=i.projections?.values?.title;if(e!=null&&typeof e!="string")throw new Error("Harness returned an invalid session title for session.list");return{title:typeof e=="string"?e:null}}async function P2(n,r,o={},i=3e4){let e=pne(r);await n.ensureRunning(o);let a=await n.rpc("workspace.list",{},i,o),{workspace:A,archived:t}=Ene(e,a),s=Cne(e,await n.rpc("session.list",{},i,o)),g=await n.rpc("session.create",{workspaceId:A.workspaceId,sessionId:e},i,o);if(!g||g.sessionId!==e)throw new Error("Harness returned an invalid response for session.create");return{sessionId:e,workspace:A.path,title:s.title,archived:t}}var F2=new Map;function une(n){let r=F2.get(n);return r||(r={ownerships:new Map,claims:new Map,controls:new WeakMap,nextOrder:0},F2.set(n,r)),r}function L2(n){let r=typeof n?.owner;return r!=="object"&&r!=="function"||n.owner===null||typeof n.key!="string"||!n.key?null:{owner:n.owner,key:n.key}}function MO(n){return n!==null&&typeof n=="object"&&typeof n.provider=="string"&&!!n.provider&&typeof n.model=="string"&&!!n.model&&(n.reasoningEffort===void 0||typeof n.reasoningEffort=="string")}function U2(n,r,{session:o=!1}={}){if(!n||typeof n!="object"||!Array.isArray(n.groups)||!Array.isArray(n.failures))throw new Error(`Harness returned an invalid response for ${r}`);for(let i of n.groups){if(!i||typeof i!="object"||typeof i.id!="string"||!i.id||typeof i.name!="string"||!i.name||!Array.isArray(i.models))throw new Error(`Harness returned an invalid response for ${r}`);for(let e of i.models)if(!e||typeof e!="object"||typeof e.id!="string"||!e.id||typeof e.name!="string"||!e.name)throw new Error(`Harness returned an invalid response for ${r}`)}for(let i of n.failures)if(!i||typeof i!="object"||typeof i.id!="string"||!i.id||typeof i.name!="string"||!i.name||i.message!==void 0&&typeof i.message!="string")throw new Error(`Harness returned an invalid response for ${r}`);if(o&&(!MO(n.current)||typeof n.routable!="boolean"))throw new Error(`Harness returned an invalid response for ${r}`);return n}function H2(){let n=new Error("Harness turn was stopped before producing a text reply");return n.code="turn-stopped",n}function Bne(n){return Array.isArray(n?.items)?n.items.flatMap(r=>typeof r?.path=="string"&&dne(r.path)?[r.path]:[]):[]}function fne(n,r){if(!Array.isArray(r?.items)||!Array.isArray(r?.archivedSessionIds))throw new Error("Harness returned an invalid response for workspace.list");let o=r.items.find(i=>i?.path===n);if(!o)return null;if(!Array.isArray(o.sessionIds)||o.sessionIds.some(i=>typeof i!="string"))throw new Error("Harness returned invalid session IDs for workspace.list");return o}function Qne(n){if(typeof n=="number"&&Number.isFinite(n))return n<1e12?n*1e3:n;if(typeof n=="string"&&n){let r=Date.parse(n);if(!Number.isNaN(r))return r}return null}function yne(n){if(!n||typeof n!="object")return null;let r=[n?.header?.lastActivityAt,n?.header?.updatedAt,n?.header?.createdAt,n?.projections?.values?.lastActivityAt,n?.projections?.values?.updatedAt,n?.projections?.values?.createdAt,n?.lastActivityAt,n?.updatedAt,n?.createdAt];for(let o of r){let i=Qne(o);if(i!==null)return i}return null}function mne(n,r,o){if(!Array.isArray(o?.items))throw new Error("Harness returned an invalid response for session.list");let i=new Set(r),e=new Map(o.items.flatMap(a=>typeof a?.sessionId=="string"?[[a.sessionId,a]]:[]));return{workspace:n.path,sessions:n.sessionIds.map(a=>{let A=e.get(a),t=A?.projections?.values?.title,s={sessionId:a,title:typeof t=="string"?t:null,archived:i.has(a),blank:A?.blank===!0,origin:A?.origin==="subagent"?"subagent":null,summaryAvailable:A!==void 0},g=yne(A);return g!==null&&(s.time=g),s})}}function qE(n,r){return new Promise((o,i)=>{if(r?.aborted){i(r.reason??new DOMException("Aborted","AbortError"));return}let e=setTimeout(()=>{r?.removeEventListener("abort",a),o()},n),a=()=>{clearTimeout(e),i(r.reason??new DOMException("Aborted","AbortError"))};r?.addEventListener("abort",a,{once:!0})})}function Sne(n){return(n?.data?.message?.content??[]).filter(r=>r.type==="text"&&typeof r.text=="string").map(r=>r.text).join(` -`).trim()}function Dne(n,r){let o=[...r].map(i=>i?.event??i).filter(Boolean).sort((i,e)=>(i.seq??-1)-(e.seq??-1));for(let i of o){let e=i.seq??-1;if(e<=n.lastSeq)continue;if(n.lastSeq=e,i.type==="turn/start"){let A=i.data?.turn??null;n.active&&A!==n.turn&&(n.active=!1),n.turn!==null&&A!==n.turn&&(n.completed=!0),n.openTurn=A;continue}if(i.type==="user/message"&&i.data?.source?.rpcId===n.promptRpcId){n.active=!0,n.started=!0,n.completed=!1,n.turn=i.data?.turn??n.openTurn;continue}if(i.type==="turn/end"&&i.data?.turn===n.turn){n.active=!1,n.completed=!0;continue}let a=null;if(i.type==="tool/call"&&n.active&&i.data?.turn===n.turn&&typeof i.data?.callId=="string"&&i.data.callId)a={callId:i.data.callId,name:i.data?.name,arguments:i.data?.arguments};else if(i.type==="tool/code-dispatch-start"&&n.active&&typeof i.data?.subCallId=="string"&&i.data.subCallId){let A;try{A=JSON.stringify(i.data?.arguments)}catch{A=void 0}a={callId:i.data.subCallId,name:i.data?.name,arguments:A}}a&&n.toolCalls.set(a.callId,Object.freeze(a))}}var qI=class{#e;#A;#r=null;#t=null;#n=new Map;#o="";#l=!1;#s=null;constructor({promptRpcId:r,afterSeq:o=-1}){this.#e=r,this.#A=o}get finished(){return this.#l}get answer(){return this.#o.trim()}get reason(){return this.#s}get tracking(){return this.#t!==null&&!this.#l}get turn(){return this.#t}consume(r){let o=null,i=[...r].map(e=>e?.event??e).filter(Boolean).sort((e,a)=>(e.seq??-1)-(a.seq??-1));for(let e of i){let a=e.seq??-1;if(!(a<=this.#A)){if(this.#A=a,e.type==="turn/start"&&(this.#r=e.data?.turn??null),e.type==="user/message"&&e.data?.source?.rpcId===this.#e){this.#t=this.#r;continue}if(this.#t!==null){if(e.type==="turn/end"){if(e.data?.turn!==this.#t)continue;this.#l=!0,this.#s=e.data?.reason??null,this.#r=null;continue}if(e.data?.turn===this.#t){if(e.type==="assistant/chunk"&&e.data?.chunk?.type==="text-delta"){let A=e.data?.step??0,t=e.data.chunk.index??0,s=`${A}:${t}`;this.#n.set(s,(this.#n.get(s)??"")+e.data.chunk.text);let g=`${A}:`,c=[...this.#n.entries()].filter(([I])=>I.startsWith(g)).sort(([I],[E])=>Number(I.split(":")[1])-Number(E.split(":")[1])).map(([,I])=>I).join(` -`).trim();c&&c!==this.#o&&(this.#o=c,o={type:"text",text:c});continue}if(e.type==="assistant/message"){let A=Sne(e);A&&A!==this.#o&&(this.#o=A,o={type:"text",text:A});continue}e.type==="tool/call"?o={type:"tool",name:e.data?.name??"\u5DE5\u5177"}:e.type==="tool/result"&&(o={type:"status",text:"\u6B63\u5728\u6574\u7406\u7ED3\u679C\u2026"})}}}}return o}},Oo=class extends Error{constructor(r,o){super(`${r}: ${o?.message??"unknown Harness RPC error"}`),this.name="HarnessRpcError",this.method=r,this.code=o?.code??"internal",this.details=o?.details??{}}},Js=class extends Error{constructor(r,o,{cause:i,status:e}={}){let a=Number.isInteger(e)?`, HTTP ${e}`:"";super(`Harness ${o} transport failed (${r}${a})`,{cause:i}),this.name="HarnessTransportError",this.code=r,this.method=o,Number.isInteger(e)&&(this.status=e)}},_O=class extends Error{constructor(r){super("Harness health RPC was rejected",{cause:r}),this.name="HarnessHealthError",this.code="harness-rpc-rejected",this.method="host.describe"}},VI=class extends Error{constructor(r,o){super(o),this.name="HarnessInteractionError",this.code=r}},rr=class{#e;#A;#r;#t;#n;#o;#l;#s;#I;#a;#i;#c;#g;#p=null;#h;#C;#E;#d;constructor({baseUrl:r,workspace:o,agentPreset:i,autostart:e=!1,dshBin:a="dsh",fetchImpl:A=fetch,createWebSocket:t=f=>new WebSocket(f),interactionReconnectDelayMs:s=500,rpcIdPrefix:g="im",logPrefix:c="dsh-im",commandExecutor:I,controlExecutor:E,sessionMaintenanceExecutor:B}){if(typeof t!="function")throw new TypeError("createWebSocket must be a function");if(!Number.isFinite(s)||s<0)throw new TypeError("interactionReconnectDelayMs must be a non-negative number");if(typeof g!="string"||!g.trim())throw new TypeError("rpcIdPrefix must be a non-empty string");if(typeof c!="string"||!c.trim())throw new TypeError("logPrefix must be a non-empty string");if(I!==void 0&&typeof I!="function")throw new TypeError("commandExecutor must be a function");if(E!==void 0&&typeof E!="function")throw new TypeError("controlExecutor must be a function");if(B!==void 0&&typeof B!="function")throw new TypeError("sessionMaintenanceExecutor must be a function");this.#e=new URL(r),this.#A=o,this.#r=i??void 0,this.#t=e,this.#n=a,this.#o=A,this.#l=t,this.#s=s,this.#I=g.trim(),this.#a=c.trim(),this.#i=I,this.#c=E,this.#g=B,this.#h=une(this.#e.origin),this.#C=this.#h.ownerships,this.#E=this.#h.claims,this.#d=this.#h.controls}async rpc(r,o={},i=3e4,e={}){let a=e.rpcId??`${this.#I}-${G2()}`,A=AbortSignal.timeout(i),t=e.signal?AbortSignal.any([e.signal,A]):A,s;try{s=await this.#o(new URL(`/api/${r}`,this.#e),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({type:"client-request",rpcId:a,method:r,payload:o}),signal:t})}catch(c){throw e.signal?.aborted?c:new Js(A.aborted?"harness-timeout":"harness-connect-failed",r,{cause:c})}if(!s.ok){let c=s.status===401||s.status===403?"harness-access-denied":s.status===404?"harness-api-not-found":"harness-http-failed";throw new Js(c,r,{status:s.status})}let g;try{g=await s.json()}catch(c){throw new Js("harness-response-invalid",r,{cause:c})}if(g?.type!=="server-response"||g?.rpcId!==a)throw new Js("harness-response-invalid",r,{cause:new Error(`Harness returned an invalid response for ${r}`)});if(!g.result||typeof g.result!="object"||typeof g.result.ok!="boolean")throw new Js("harness-response-invalid",r,{cause:new Error(`Harness returned an invalid result for ${r}`)});if(!g.result?.ok)throw new Oo(r,g.result?.error);return g.result.value}async health(r={}){try{return await this.rpc("host.describe",{},5e3,r),!0}catch(o){throw o instanceof Oo?new _O(o):o}}async ensureRunning(r={}){try{return await this.health(r)}catch(e){if(!this.#t)throw e}if(!this.#p||this.#p.exitCode!==null){let e=this.#e.port||(this.#e.protocol==="https:"?"443":"80");this.#p=hne(this.#n,["web","--host",this.#e.hostname,"--port",e],{cwd:this.#A,env:process.env,stdio:["ignore","inherit","inherit"]}),this.#p.on("error",a=>{console.error(`[${this.#a}] failed to start Harness:`,a.message)})}let o=Date.now()+6e4,i;for(;Date.now(){let t=A&&i.signal?AbortSignal.any([A,i.signal]):A??i.signal;return this.rpc("session.selectModel",{sessionId:r,provider:o.provider,model:o.model},3e4,t?{...i,signal:t}:i)},a=this.#g?await this.#g({sessionId:r,operation:e}):await e();if(!a||typeof a!="object"||!MO(a.selected))throw new Error("Harness returned an invalid response for session.selectModel");return a}async isSessionRunning(r,o={}){if(typeof r!="string"||!r)throw new TypeError("sessionId is required");await this.ensureRunning(o);let i=await this.rpc("session.list",{},3e4,o);if(!i||typeof i!="object"||!Array.isArray(i.items))throw new Error("Harness returned an invalid response for session.list");for(let e of i.items)if(!e||typeof e!="object"||typeof e.sessionId!="string"||!e.sessionId||typeof e.running!="boolean")throw new Error("Harness returned an invalid response for session.list");return i.items.find(e=>e.sessionId===r)?.running??!1}async adoptWorkspaceSession(r,o={}){return P2(this,r,o)}async workspaceId(r={}){let{workspace:o=this.#A,...i}=r,{items:e}=await this.rpc("workspace.list",{},3e4,i),a=e.find(t=>t.path===o);return a?a.workspaceId:(await this.rpc("workspace.create",{path:o},3e4,i)).workspace.workspaceId}async createSession(r={}){let{agentPreset:o,...i}=r;await this.ensureRunning(i);let a={workspaceId:await this.workspaceId(i)},A=o!==void 0?o:this.#r;return A!=null&&(a.agentPreset=A),(await this.rpc("session.create",a,3e4,i)).sessionId}async executeCommand(r,o,i={}){if(typeof r!="string"||!r)throw new TypeError("sessionId is required");if(typeof o!="string"||!o)throw new TypeError("command line is required");if(!this.#i){let e=new Error("Harness command execution is unavailable");throw e.code="commands-unavailable",e}try{return await this.#i(r,o,i)}catch(e){throw e?.failure&&typeof e.failure=="object"?new Oo("commands.execute",e.failure):e}}async sessionExists(r,o={}){try{return await this.rpc("session.history",{sessionId:r,maxMessages:1},3e4,o),!0}catch(i){if(i instanceof Oo&&i.code==="session-not-found")return!1;throw i}}async respondInteraction(r,o,i={}){if(typeof r!="string"||!r)throw new TypeError("rpcId is required");if(!o||typeof o!="object"||typeof o.ok!="boolean")throw new TypeError("A Harness RPC result is required");let e=AbortSignal.timeout(i.timeoutMs??3e4),a=i.signal?AbortSignal.any([i.signal,e]):e,A=await this.#o(new URL("/api/respond",this.#e),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({type:"client-response",rpcId:r,result:o}),signal:a});if(!A.ok)throw new Error(`Harness transport respond failed: HTTP ${A.status}`);let t=await A.json();if(t?.accepted===!0)return t;if(t?.accepted!==!1||t.reason!=="bad-response"&&t.reason!=="not-pending")throw new Error("Harness returned an invalid interaction response receipt");let s=t.reason;throw new VI(`interaction-${s}`,`Harness interaction response was rejected (${s})`)}async watchInteractions(r,{signal:o,onInteraction:i,onResolved:e,onOpen:a,ownership:A}={}){if(typeof r!="string"||!r)throw new TypeError("sessionId is required");if(!o||typeof o.addEventListener!="function")throw new TypeError("watchInteractions requires an AbortSignal");if(i!==void 0&&typeof i!="function")throw new TypeError("onInteraction must be a function");if(e!==void 0&&typeof e!="function")throw new TypeError("onResolved must be a function");if(a!==void 0&&typeof a!="function")throw new TypeError("onOpen must be a function");for(;!o.aborted;){try{await this.#T(r,{signal:o,onInteraction:i,onResolved:e,onOpen:a,ownership:A})}catch(t){if(o.aborted)return;console.warn(`[${this.#a}] Harness interaction stream disconnected:`,t.message)}if(o.aborted)return;try{await qE(this.#s,o)}catch{if(o.aborted)return;throw new Error("Harness interaction reconnect wait failed")}}}#B(r,o){let i=this.#C.get(r)??new Set;o.order=this.#h.nextOrder,this.#h.nextOrder+=1,i.add(o),this.#C.set(r,i)}#u(r,o){let i=this.#C.get(r);i?.delete(o),i?.size===0&&this.#C.delete(r);for(let[e,a]of this.#E)a.ownership===o&&this.#E.delete(e)}#Q(r){if(!r.control)return;let o=this.#d.get(r.control.owner);o||(o=new Map,this.#d.set(r.control.owner,o));let i=o.get(r.control.key)??new Set;i.add(r),o.set(r.control.key,i)}#m(r){if(!r.control)return;let o=this.#d.get(r.control.owner),i=o?.get(r.control.key);i?.delete(r),i?.size===0&&o.delete(r.control.key),o?.size===0&&this.#d.delete(r.control.owner)}#f(r,o){let i=L2(o);return i?[...this.#d.get(i.owner)?.get(i.key)??[]].filter(a=>a.sessionId===r).sort((a,A)=>a.order-A.order):[]}#y(r,o){return this.#f(r,o).find(i=>i.started&&i.active&&!i.completed&&i.turn!==null)??null}async#D(r,o,i){let e=this.#f(r,o);if(e.length===0)return null;try{let a=await this.rpc("session.history",{sessionId:r,maxMessages:50},3e4,i);this.#w(r,a.events??[])}catch(a){if(!(a instanceof Oo)||a.code!=="session-not-found")throw a;for(let A of e)A.active=!1,A.completed=!0;return null}return this.#y(r,o)}async hasActiveTurn(r,o,i={}){if(typeof r!="string"||!r)throw new TypeError("sessionId is required");return!!await this.#D(r,o,i)}async stopActiveTurn(r,o,i={}){if(typeof r!="string"||!r)throw new TypeError("sessionId is required");let e=await this.#D(r,o,i);if(!e)return!1;if(e.stopRequested)return!0;if(this.#y(r,o)!==e)return!1;e.stopRequested=!0;try{if(this.#c){let a=this.#c({sessionId:r,expectedTurn:e.turn,promptRpcId:e.promptRpcId,action:"stop"});if(a&&typeof a.then=="function")throw new TypeError("controlExecutor must return synchronously");if(a!==void 0){if(typeof a!="boolean")throw new TypeError("controlExecutor must return a boolean or undefined");return a||(e.stopRequested=!1),a}}return await this.rpc("session.cancel",{sessionId:r,keepInbox:!0},3e4,i),!0}catch(a){if(this.#y(r,o)===e&&(e.stopRequested=!1),a instanceof Oo&&a.code==="session-not-found")return!1;throw a}}async steerActiveTurn(r,o,i,e={}){if(typeof r!="string"||!r)throw new TypeError("sessionId is required");if(typeof o!="string"||!o.trim())throw new TypeError("Steering text is required");let a=await this.#D(r,i,e);if(!a||a.stopRequested||this.#y(r,i)!==a)return!1;if(this.#c){let A=this.#c({sessionId:r,expectedTurn:a.turn,promptRpcId:a.promptRpcId,action:"steer",text:o});if(A&&typeof A.then=="function")throw new TypeError("controlExecutor must return synchronously");if(A!==void 0){if(typeof A!="boolean")throw new TypeError("controlExecutor must return a boolean or undefined");return A}}return await this.rpc("session.prompt",{sessionId:r,mode:"steer",content:[{type:"text",text:o}],clientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone},3e4,e),!0}#w(r,o){for(let i of this.#C.get(r)??[])Dne(i,o)}async#R(r,o){let i=await this.rpc("session.history",{sessionId:r,maxMessages:50},3e4,{signal:o});this.#w(r,i.events??[])}#M(r,o,i){let e=this.#E.get(o);if(e&&this.#C.get(r)?.has(e.ownership))return e;let a=[...this.#C.get(r)??[]],A=a.filter(s=>s.active).sort((s,g)=>s.order-g.order);if(A.length>0)return{ownership:A[0],recovered:!1};let t=a.filter(s=>!s.started&&!s.completed).sort((s,g)=>s.order-g.order)[0]??null;return t?{ownership:t,recovered:!0}:null}async ask(r,o,i={}){typeof i=="number"&&(i={timeoutMs:i});let e=i.timeoutMs??6e5,a=i.signal,A=typeof i.onUpdate=="function"?i.onUpdate:null,t=typeof i.onInteraction=="function"?i.onInteraction:void 0,s=typeof i.onInteractionResolved=="function"?i.onInteractionResolved:void 0,g=L2(i.control);await this.ensureRunning({signal:a});let c=await this.rpc("session.history",{sessionId:r,maxMessages:1},3e4,{signal:a}),I=Math.max(-1,...(c.events??[]).map(({event:T})=>T.seq??-1)),E=`${this.#I}-${G2()}`,B=new qI({promptRpcId:E,afterSeq:I}),f=t||s?new AbortController:null,Q=f?a?AbortSignal.any([a,f.signal]):f.signal:null,y=f||g?{sessionId:r,promptRpcId:E,active:!1,started:!1,completed:!1,stopRequested:!1,turn:null,openTurn:null,lastSeq:I,reconnect:null,order:-1,toolCalls:new Map,control:g}:null,m=null;y&&(this.#B(r,y),this.#Q(y));try{if(Q){let _,P=new Promise(Y=>{_=Y});m=this.watchInteractions(r,{signal:Q,onInteraction:t,onResolved:s,onOpen:_,ownership:y}),m.catch(()=>{}),await Promise.race([P,qE(3e4,Q).then(()=>{throw new Error("Harness interaction stream did not open within 30 seconds")})])}let T=typeof o=="string"?[{type:"text",text:o}]:o;if(!Array.isArray(T)||T.length===0)throw new TypeError("Harness prompt content is required");await this.rpc("session.prompt",{sessionId:r,mode:"queue",content:T,clientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone},3e4,{rpcId:E,signal:a});try{let _=Date.now()+e;for(;Date.now()<_;){await qE(300,a);let P=await this.rpc("session.history",{sessionId:r,maxMessages:50},3e4,{signal:a}),Y=y?.active===!0;y&&(this.#w(r,P.events??[]),!Y&&y.active&&y.reconnect?.());let j=B.consume(P.events??[]);if(j&&A)try{await A(j)}catch(K){console.warn(`[${this.#a}] ignored a progress update failure:`,K.message)}if(B.finished){if(B.answer)return B.answer;throw y?.stopRequested?H2():new Error(`Harness turn ended without a text reply${B.reason?` (${JSON.stringify(B.reason)})`:""}`)}}throw new Error(`Harness reply timed out after ${Math.round(e/1e3)} seconds`)}catch(_){if(!y?.stopRequested)throw _;if(B.answer)return B.answer;throw _?.code==="turn-stopped"?_:H2()}}finally{y&&(this.#m(y),this.#u(r,y)),f?.abort(new DOMException("Harness turn finished","AbortError")),m&&await m.catch(()=>{})}}#T(r,{signal:o,onInteraction:i,onResolved:e,onOpen:a,ownership:A}){let t=new URL("/api/events.mux",this.#e);return t.protocol=t.protocol==="https:"?"wss:":"ws:",new Promise((s,g)=>{let c;try{c=this.#l(t.toString())}catch(H){g(H);return}let I=!1,E=!1,B=null,f=Promise.resolve(),Q=A==null,y=[],m=H=>{if(!E){if(E=!0,c.removeEventListener("open",_),c.removeEventListener("message",j),c.removeEventListener("close",K),c.removeEventListener("error",q),o.removeEventListener("abort",V),A?.reconnect===T&&(A.reconnect=null),o.aborted){s();return}f.then(()=>{let v=H??B;v?g(v):s()},g)}},T=()=>{try{(c.readyState===0||c.readyState===1)&&c.close()}catch{}},_=()=>{I=!0,A&&(A.reconnect=T);try{a?.()}catch(H){console.warn(`[${this.#a}] ignored an interaction open callback failure:`,H.message)}A&&this.#R(r,o).then(()=>{if(!E){Q=!0;for(let H of y.splice(0))Y(H)}}).catch(H=>{B??=H,T(),m(H)})},P=(H,v)=>{H&&(f=f.then(()=>H(v)).catch(Z=>{B??=Z,T(),m(B)}))},Y=H=>{let v=H.payload;if(A&&v.type==="session/event"){this.#w(r,[v.event]);return}if(v.type==="question/requested"||v.type==="approval/requested"){let Z=v.type==="question/requested"?"question":"approval",U=Z==="question"?H.rpcId:v.approvalId,M=`${Z}:${U}`;if(A){let te=this.#M(r,M,Z);if(te?.ownership!==A)return;this.#E.set(M,te)}let G=Z==="approval"&&A&&typeof v.callId=="string"?this.#E.get(M)?.ownership.toolCalls.get(v.callId):void 0;P(i,Object.freeze({kind:Z,interactionId:U,rpcId:H.rpcId,sessionId:r,payload:v,recovered:A?this.#E.get(M)?.recovered===!0:!1,...G?{toolCall:G}:{},reconnect:T,respond:(te,Be={})=>this.respondInteraction(H.rpcId,te,{...Be,signal:Be.signal??o})}));return}if(v.type==="question/resolved"||v.type==="approval/resolved"){let Z=v.type==="question/resolved"?"question":"approval",U=Z==="question"?v.questionRpcId:v.approvalId,M=`${Z}:${U}`;if(A){if(this.#E.get(M)?.ownership!==A)return;this.#E.delete(M)}P(e,Object.freeze({kind:Z,interactionId:U,sessionId:r,outcome:v.outcome,payload:v}))}},j=H=>{try{if(typeof H.data!="string")throw new Error("binary WebSocket frame");let v=JSON.parse(H.data),Z=v?.payload;if(v?.type!=="server-request"||typeof v.rpcId!="string"||!Z||typeof Z!="object"||v.method!==Z.type)throw new Error("invalid server-request envelope");if(Z.sessionId!==r)return;Q?Y(v):y.push(v)}catch(v){console.warn(`[${this.#a}] ignored a malformed Harness interaction frame:`,v.message)}},K=()=>m(I?null:new Error("Harness interaction WebSocket closed before opening")),q=()=>{m(new Error(I?"Harness interaction WebSocket failed":"Harness interaction WebSocket failed before opening")),T()},V=()=>{T(),m()};c.addEventListener("open",_),c.addEventListener("message",j),c.addEventListener("close",K,{once:!0}),c.addEventListener("error",q,{once:!0}),o.addEventListener("abort",V,{once:!0}),o.aborted&&V()})}async watchHarnessEvents({signal:r,onSessionEvent:o,onReconnect:i}={}){if(typeof o!="function")throw new TypeError("watchHarnessEvents requires onSessionEvent");if(!r||typeof r.addEventListener!="function")throw new TypeError("watchHarnessEvents requires an AbortSignal");if(i!==void 0&&typeof i!="function")throw new TypeError("onReconnect must be a function");let e=new URL("/api/events.mux",this.#e);for(e.protocol=e.protocol==="https:"?"wss:":"ws:";!r.aborted;){try{await this.#O(e.toString(),{signal:r,onSessionEvent:o,onReconnect:i})}catch(a){if(r.aborted)return;console.warn(`[${this.#a}] Harness event mux disconnected:`,a.message)}if(r.aborted)return;try{await qE(this.#s,r)}catch{if(r.aborted)return;throw new Error("Harness event mux reconnect wait failed")}}}#O(r,{signal:o,onSessionEvent:i,onReconnect:e}){return new Promise((a,A)=>{let t;try{t=this.#l(r)}catch(m){A(m);return}let s=!1,g=!1,c=()=>{try{t.close()}catch{}},I=m=>{g||(g=!0,t.removeEventListener("open",E),t.removeEventListener("message",B),t.removeEventListener("close",f),t.removeEventListener("error",Q),o.removeEventListener("abort",y),m?A(m):a())},E=()=>{s=!0;try{e?.()}catch(m){console.warn(`[${this.#a}] mux reconnect hook failed:`,m.message)}},B=m=>{try{if(typeof m.data!="string")return;let T=JSON.parse(m.data),_=T?.payload;if(T?.type!=="server-request"||!_||typeof _!="object"||T.method!==_.type||_.type!=="session/event"||typeof _.sessionId!="string"||!_.event||typeof _.event!="object")return;i({sessionId:_.sessionId,event:_.event})}catch(T){console.warn(`[${this.#a}] ignored a malformed global mux frame:`,T.message)}},f=()=>I(s?null:new Error("Harness event mux WebSocket closed before opening")),Q=()=>{I(new Error(s?"Harness event mux WebSocket failed":"Harness event mux WebSocket failed before opening")),c()},y=()=>{c(),I()};t.addEventListener("open",E),t.addEventListener("message",B),t.addEventListener("close",f,{once:!0}),t.addEventListener("error",Q,{once:!0}),o.addEventListener("abort",y,{once:!0}),o.aborted&&y()})}stopManagedProcess(){this.#p?.exitCode===null&&this.#p.kill("SIGTERM")}};var tB=class extends rr{constructor(r){super({...r,rpcIdPrefix:"dingtalk",logPrefix:"dsh-dingtalk"})}};import{randomUUID as wne}from"node:crypto";import{mkdir as One,readFile as bne,rename as Mne,unlink as _ne,writeFile as Nne}from"node:fs/promises";import{dirname as Tne}from"node:path";var rB=Object.freeze({version:1,sessions:{},seenMessageIds:[],pendingSenders:{}});function ar(n){return typeof n=="string"&&n.trim()?n.trim():null}function K2(n){return(ar(n)??"\u9489\u9489\u7528\u6237").slice(0,100)}function Rne(n,r){if(!n||typeof n!="object")return null;let o=ar(n.requestId)??ar(r),i=ar(n.staffId),e=ar(n.requestedAt)??ar(n.lastSeenAt),a=ar(n.lastSeenAt)??e;return!o||!i||!e||!a?null:{requestId:o,staffId:i,displayName:K2(n.displayName??n.nick),requestedAt:e,lastSeenAt:a}}function kne(n){if(!n||typeof n!="object")return structuredClone(rB);let r={};if(n.sessions&&typeof n.sessions=="object"&&!Array.isArray(n.sessions))for(let[e,a]of Object.entries(n.sessions)){let A=ar(e),t=ar(a);A&&t&&(r[A]=t)}let o={},i=Array.isArray(n.pendingSenders)?n.pendingSenders.map(e=>[e?.requestId,e]):Object.entries(n.pendingSenders&&typeof n.pendingSenders=="object"?n.pendingSenders:{});for(let[e,a]of i){let A=Rne(a,e);if(!A)continue;let t=Object.values(o).find(s=>s.staffId===A.staffId);(!t||t.lastSeenAtnew Date().toISOString()}={}){if(!ar(r))throw new TypeError("state path is required");if(typeof o!="function"||typeof i!="function")throw new TypeError("idFactory and now must be functions");this.#e=r,this.#t=o,this.#n=i}async load(){try{this.#A=kne(JSON.parse(await bne(this.#e,"utf8")))}catch(r){if(r?.code!=="ENOENT")throw r;this.#A=structuredClone(rB),await this.#o()}return this}sessionFor(r){return this.#A.sessions[r]??null}async setSession(r,o){let i=ar(r),e=ar(o);if(!i||!e)throw new TypeError("key and sessionId are required");this.#A.sessions[i]=e,await this.#o()}async clearSession(r){let o=ar(r);!o||!(o in this.#A.sessions)||(delete this.#A.sessions[o],await this.#o())}async clearSessions(){this.#A.sessions={},await this.#o()}hasSeen(r){let o=ar(r);return!!(o&&this.#A.seenMessageIds.includes(o))}async markSeen(r){let o=ar(r);if(!o)throw new TypeError("messageId is required");this.hasSeen(o)||(this.#A.seenMessageIds.push(o),this.#A.seenMessageIds.length>1e3&&this.#A.seenMessageIds.splice(0,this.#A.seenMessageIds.length-1e3),await this.#o())}pendingSenders(){return Object.values(this.#A.pendingSenders).sort((r,o)=>r.requestedAt.localeCompare(o.requestedAt)).map(r=>structuredClone(r))}pendingSender(r){let o=ar(r),i=o?this.#A.pendingSenders[o]:null;return i?structuredClone(i):null}async recordPendingSender(r,o,i){let e=r&&typeof r=="object"?r:{staffId:r,displayName:o,lastSeenAt:i},a=ar(e.staffId);if(!a)throw new TypeError("staffId is required");let A=ar(e.lastSeenAt)??ar(e.requestedAt)??this.#n(),t=Object.values(this.#A.pendingSenders).find(g=>g.staffId===a),s={requestId:t?.requestId??`ding_sender_${this.#t()}`,staffId:a,displayName:K2(e.displayName??e.nick??o),requestedAt:t?.requestedAt??A,lastSeenAt:A};return this.#A.pendingSenders[s.requestId]=s,await this.#o(),structuredClone(s)}async removePendingSender(r){let o=ar(r);return!o||!this.#A.pendingSenders[o]?!1:(delete this.#A.pendingSenders[o],await this.#o(),!0)}async removePendingSenderByStaffId(r){let o=ar(r),i=o?Object.values(this.#A.pendingSenders).find(e=>e.staffId===o):null;return i?this.removePendingSender(i.requestId):!1}snapshot(){return structuredClone(this.#A)}async remove(){await this.#r;try{await _ne(this.#e)}catch(r){if(r?.code!=="ENOENT")throw r}this.#A=structuredClone(rB)}async#o(){let r=`${JSON.stringify(this.#A,null,2)} -`,o=this.#r.then(async()=>{await One(Tne(this.#e),{recursive:!0,mode:448});let i=`${this.#e}.tmp`;await Nne(i,r,{encoding:"utf8",mode:384}),await Mne(i,this.#e)});this.#r=o.then(()=>{},()=>{}),await o}};import{mkdir as vne,readFile as Pne,realpath as Gne,rename as Fne,stat as Lne,unlink as Une,writeFile as Hne}from"node:fs/promises";import{dirname as Kne,isAbsolute as j2,resolve as VE}from"node:path";var mje=Object.freeze({version:1,workspaces:Object.freeze({})});function sc(n){let r=new Error(n);return r.code=Ja,r}async function NO(n){return VE(await Gne(n))}async function Yne(n,r){if(n===r)return!0;try{return await NO(n)===await NO(r)}catch{return!1}}function Va(n){if(typeof n!="string"||!/^[A-Za-z0-9_-]{1,128}$/.test(n))throw new TypeError("Invalid bot id");return n}function xne(n){if(!n||n.version!==1||!n.workspaces||typeof n.workspaces!="object"||Array.isArray(n.workspaces))return null;let r={};for(let[i,e]of Object.entries(n.workspaces)){if(!/^[A-Za-z0-9_-]{1,128}$/.test(i)||typeof e!="string"||!j2(e))return null;r[i]=VE(e)}let o={};if(n.agentPresets!==void 0){if(!n.agentPresets||typeof n.agentPresets!="object"||Array.isArray(n.agentPresets))return null;for(let[i,e]of Object.entries(n.agentPresets)){if(!/^[A-Za-z0-9_-]{1,128}$/.test(i))return null;try{let a=JI(e);if(!a)return null;o[i]=a}catch{return null}}}return{version:1,workspaces:r,agentPresets:o}}async function Y2(n){if(typeof n!="string"||!n.trim()||!j2(n.trim())){let i=new Error("\u5DE5\u4F5C\u533A\u5FC5\u987B\u662F\u7EDD\u5BF9\u8DEF\u5F84\u3002");throw i.code="workspace-not-absolute",i}let r=VE(n.trim()),o;try{o=await Lne(r)}catch(i){let e=new Error("\u5DE5\u4F5C\u533A\u8DEF\u5F84\u4E0D\u5B58\u5728\u3002",{cause:i});throw e.code="workspace-not-found",e}if(!o.isDirectory()){let i=new Error("\u5DE5\u4F5C\u533A\u8DEF\u5F84\u5FC5\u987B\u6307\u5411\u4E00\u4E2A\u76EE\u5F55\u3002");throw i.code="workspace-not-directory",i}return r}var Fr=class{#e;#A;#r={};#t={};#n=new Map;#o=1;#l=new Map;#s=1;#I=new Map;#a=new WeakMap;#i=new Set;#c=Promise.resolve();#g=new Map;constructor(r,{defaultWorkspace:o=process.cwd()}={}){if(typeof r!="string"||!r)throw new TypeError("workspace store path is required");this.#e=r,this.#A=VE(o)}async load(){try{let r=xne(JSON.parse(await Pne(this.#e,"utf8")));if(!r)throw new Error("dsh-im workspace config is invalid");this.#r=r.workspaces,this.#t=r.agentPresets}catch(r){if(r?.code!=="ENOENT")throw r;this.#r={},this.#t={}}this.#n.clear(),this.#o=1,this.#l.clear(),this.#s=1,this.#I.clear(),this.#i.clear();for(let r of Object.keys(this.#r))this.#n.set(r,this.#p()),this.#l.set(r,this.#h());return this}has(r){let o=Va(r);return Object.hasOwn(this.#r,o)&&!this.#I.has(o)}incarnationFor(r){return this.#l.get(Va(r))??null}workspaceFor(r){return this.#r[Va(r)]??this.#A}agentPresetFor(r){return this.#t[Va(r)]??null}generationFor(r){return this.#n.get(Va(r))??null}async whenIdle(){await this.#c}async whenBotIdle(r){let o=Va(r);for(;;){let i=this.#g.get(o);if(!i||(await i,this.#g.get(o)===i))return}}async ensure(r,{workspace:o=this.#A,defaultAgentPreset:i}={}){let e=Va(r),a=VE(o);return this.#d(e,async()=>{if(this.#r[e])this.#n.has(e)||this.#n.set(e,this.#p());else{let A=JI(i),t=Object.hasOwn(this.#t,e),s=this.#t[e];this.#r[e]=a,A&&(this.#t[e]=A),this.#n.set(e,this.#p()),this.#l.set(e,this.#h());try{await this.#B()}catch(g){throw delete this.#r[e],t?this.#t[e]=s:delete this.#t[e],this.#n.delete(e),this.#l.delete(e),g}}return this.#r[e]})}async setWorkspace(r,o,{clearSessions:i,incarnation:e}={}){let a=Va(r);if(!this.has(a)||e!==void 0&&e!==this.incarnationFor(a)){let t=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw t.code="workspace-bot-not-found",t}let A=await Y2(o);return this.#d(a,async()=>{if(!this.has(a)||e!==void 0&&e!==this.incarnationFor(a)){let s=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw s.code="workspace-bot-not-found",s}if(A===this.workspaceFor(a))return A;let t=this.#r[a];this.#n.set(a,this.#p()),await i?.(),this.#r[a]=A;try{await this.#B()}catch(s){throw this.#r[a]=t,s}return A})}async setAgentPreset(r,o,{incarnation:i}={}){let e=Va(r);if(!this.has(e)||i!==void 0&&i!==this.incarnationFor(e)){let A=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw A.code="workspace-bot-not-found",A}let a=JI(o);return this.#d(e,async()=>{if(!this.has(e)||i!==void 0&&i!==this.incarnationFor(e)){let t=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw t.code="workspace-bot-not-found",t}let A=this.#t[e]??null;if(A===a)return a;a?this.#t[e]=a:delete this.#t[e];try{await this.#B()}catch(t){throw A?this.#t[e]=A:delete this.#t[e],t}return a})}async bindWorkspaceSession(r,o,{conversationKey:i,sessionId:e,clearSessions:a,setSession:A,incarnation:t,expectedGeneration:s}={}){let g=Va(r);if(typeof i!="string"||!i||typeof e!="string"||!e)throw new TypeError("conversationKey and sessionId are required");if(typeof a!="function"||typeof A!="function")throw new TypeError("session state callbacks are required");if(!this.has(g)||t!==void 0&&t!==this.incarnationFor(g)){let I=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw I.code="workspace-bot-not-found",I}let c=await NO(await Y2(o));return this.#d(g,async()=>{if(!this.has(g)||t!==void 0&&t!==this.incarnationFor(g)){let I=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw I.code="workspace-bot-not-found",I}if(s!==void 0&&s!==this.generationFor(g))throw sc("The bot workspace changed before the session binding could be committed.");if(!await Yne(c,this.workspaceFor(g))){let I=this.#r[g];this.#n.set(g,this.#p()),await a(),this.#r[g]=c;try{await this.#B()}catch(E){throw this.#r[g]=I,E}}return await A(i,e),{workspace:c,sessionId:e,generation:this.#n.get(g)}})}async invalidateSessions(r,{clearSessions:o}={}){let i=Va(r);return this.#d(i,async()=>{this.#n.set(i,this.#p()),await o?.()})}async beginRemoval(r,{clearSessions:o}={}){let i=Va(r);return this.#d(i,async()=>{let e=this.#I.get(i);if(e)return e;let a=Object.freeze({});this.#I.set(i,a),this.#a.set(a,{botId:i,incarnation:this.incarnationFor(i)}),this.#n.set(i,this.#p());try{await o?.()}catch(A){throw this.#I.get(i)===a&&this.#I.delete(i),A}return a})}async abortRemoval(r){let{botId:o}=this.#C(r);return this.#d(o,async()=>this.#I.get(o)!==r?!1:(this.#I.delete(o),Object.hasOwn(this.#r,o)&&(this.#n.set(o,this.#p()),this.#l.has(o)||this.#l.set(o,this.#h())),!0))}async finishRemoval(r){let{botId:o,incarnation:i}=this.#C(r);return this.#d(o,async()=>this.#I.get(o)!==r?{removed:!1,persisted:!0,error:null,stale:!0}:this.incarnationFor(o)!==i?(this.#I.delete(o),{removed:!1,persisted:!0,error:null,stale:!0}):(this.#I.delete(o),this.#E(o)))}async retireAfterConfigCommit(r){let o=Va(r);return this.#d(o,async()=>(this.#I.delete(o),this.#E(o)))}async remove(r){let o=await this.retireAfterConfigCommit(r);if(o.error)throw o.error;return o.removed}async reconcile(r){let o=new Set([...r].map(Va)),i=new Set([...Object.keys(this.#r),...Object.keys(this.#t),...this.#i]);for(let e of i)o.has(e)||await this.remove(e)}decorateStatus(r){return!r||typeof r!="object"||!Array.isArray(r.bots)?r:{...r,bots:r.bots.map(o=>o?.botId?{...o,workspace:this.workspaceFor(o.botId),agentPreset:this.agentPresetFor(o.botId)}:o)}}#p(){let r=this.#o;return this.#o+=1,r}#h(){let r=this.#s;return this.#s+=1,r}#C(r){if(!r||typeof r!="object")throw new TypeError("Invalid workspace removal transaction");let o=this.#a.get(r);if(!o)throw new TypeError("Invalid workspace removal transaction");return o}async#E(r){let o=Object.hasOwn(this.#r,r),i=Object.hasOwn(this.#t,r),e=o||i||this.#i.has(r);if(delete this.#r[r],delete this.#t[r],this.#n.delete(r),this.#l.delete(r),!e)return{removed:!1,persisted:!0,error:null,stale:!1};try{return await this.#u(),{removed:o,persisted:!0,error:null,stale:!1}}catch(a){return this.#i.add(r),{removed:o,persisted:!1,error:a,stale:!1}}}async#d(r,o){let i=this.#c.then(o,o),e=i.then(()=>{},()=>{});return this.#c=e,this.#g.set(r,e),e.finally(()=>{this.#g.get(r)===e&&this.#g.delete(r)}),i}async#B(){let r={version:1,workspaces:this.#r};Object.keys(this.#t).length>0&&(r.agentPresets=this.#t),await vne(Kne(this.#e),{recursive:!0,mode:448});let o=`${this.#e}.tmp`;await Hne(o,`${JSON.stringify(r,null,2)} -`,{encoding:"utf8",mode:384}),await Fne(o,this.#e),this.#i.clear()}async#u(){if(Object.keys(this.#r).length>0||Object.keys(this.#t).length>0){await this.#B();return}try{await Une(this.#e),this.#i.clear()}catch(r){if(r?.code!=="ENOENT")throw r;this.#i.clear()}}};function TO(n){if(!n)return null;let r=typeof n=="function"?n():n;return r&&typeof r.then=="function"?r.then(tn):tn(r)}function J2(){let n=new Error("Agent Preset \u4E0D\u5B58\u5728\u6216\u4E0D\u53EF\u7528\u3002");return n.code="agent-preset-unavailable",n}function zI(n){if(n())return;let r=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw r.code="workspace-bot-not-found",r}function x2(n,r,o){let i=e=>{let a=n.decorateStatus(e);if(!o||!a||typeof a!="object")return a;let A=s=>s?{...a,agentPresetCatalog:s}:a,t=TO(o);return t&&typeof t.then=="function"?t.then(A):A(t)};return r&&typeof r.then=="function"?r.then(i):i(r)}function jne(n){return Promise.resolve(n.status())}function Ea(n,{workspaces:r,method:o="remove",botIdFromRemoved:i=e=>e?.botId}){if(!n||!r||typeof n[o]!="function")throw new TypeError("configStore removal observer dependencies are required");return new Proxy(n,{get(e,a){let A=Reflect.get(e,a,e);return a===o?async(...t)=>{let s=await A.apply(e,t),g=s?i(s,t):null;return g&&await r.retireAfterConfigCommit(g),s}:typeof A=="function"?A.bind(e):A}})}function Ca(n,{botId:r,workspaces:o,state:i,agentPresetCatalog:e}={}){if(!n||!o||!i)throw new TypeError("harness, workspaces, and state are required");let a=o.incarnationFor(r),A=()=>o.has(r)&&o.incarnationFor(r)===a,t=async(I=e)=>{let E;try{E=await TO(I)??tn(null)}catch(B){throw zI(A),B}return zI(A),{agentPreset:o.agentPresetFor(r),agentPresetCatalog:E}},s=new Map,g=new Proxy(n,{get(I,E){if(E==="agentPresetSettings")return async(f={})=>{f?.signal?.throwIfAborted(),zI(A);let Q=await t();return f?.signal?.throwIfAborted(),Q};if(E==="updateAgentPreset")return async(f,Q={})=>{Q?.signal?.throwIfAborted(),zI(A);let y=f==="--default"?null:JI(f),m=null;if(y&&({agentPresetCatalog:m}=await t(),Q?.signal?.throwIfAborted(),!m.items.some(T=>T.id===y)))throw J2();if(await o.setAgentPreset(r,y,{incarnation:a}),zI(A),m)return{agentPreset:o.agentPresetFor(r),agentPresetCatalog:m};try{return await t()}catch(T){if(T?.code==="workspace-bot-not-found")throw T;return zI(A),{agentPreset:o.agentPresetFor(r),agentPresetCatalog:tn(null)}}};if(E==="currentWorkspace")return()=>{if(!A()){let f=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw f.code="workspace-bot-not-found",f}return o.workspaceFor(r)};if(E==="assertWorkspaceScope")return()=>{if(!A()){let f=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw f.code="workspace-bot-not-found",f}};if((E==="listWorkspaces"||E==="listWorkspaceSessions"||E==="listModels")&&typeof I[E]=="function")return async(...f)=>{if(!A()){let y=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw y.code="workspace-bot-not-found",y}let Q=await I[E](...f);if(!A()){let y=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw y.code="workspace-bot-not-found",y}return Q};if(E==="switchWorkspace")return f=>{if(!A()){let Q=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");return Q.code="workspace-bot-not-found",Promise.reject(Q)}return o.setWorkspace(r,f,{clearSessions:()=>i.clearSessions(),incarnation:a})};if(E==="bindWorkspaceSession")return async(f,Q)=>{if(typeof f!="string"||!f||typeof Q!="string"||!Q)throw new TypeError("conversationKey and sessionId are required");if(!A()){let _=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw _.code="workspace-bot-not-found",_}if(typeof I.adoptWorkspaceSession!="function")throw new TypeError("Harness does not support adopting workspace sessions");let y=o.generationFor(r),m=await I.adoptWorkspaceSession(Q);if(!A()){let _=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw _.code="workspace-bot-not-found",_}if(y!==o.generationFor(r))throw sc("The bot workspace changed while the session was being adopted.");if(!m||typeof m!="object"||m.sessionId!==Q||typeof m.workspace!="string")throw new TypeError("Harness returned an invalid adopted workspace session");let T=await o.bindWorkspaceSession(r,m.workspace,{conversationKey:f,sessionId:Q,clearSessions:()=>i.clearSessions(),setSession:(_,P)=>i.setSession(_,P),incarnation:a,expectedGeneration:y});if(!A()){let _=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw _.code="workspace-bot-not-found",_}if(T.generation!==o.generationFor(r))throw sc("The bot workspace changed before the session binding completed.");return s.set(Q,T.generation),{...m,workspace:T.workspace,sessionId:T.sessionId}};if(E==="createSession")return async(f={})=>{if(await o.whenBotIdle(r),!A()){let T=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw T.code="workspace-bot-not-found",T}let Q=o.generationFor(r),y=o.agentPresetFor(r),m=await I.createSession({...f,workspace:o.workspaceFor(r),...y==null?{}:{agentPreset:y}});return s.set(m,Q),m};if(E==="workspaceSession")return f=>{if(typeof f!="string"||!f)throw new TypeError("sessionId is required");let Q=s.get(f)??o.generationFor(r);s.delete(f);let y=()=>A()&&Q===o.generationFor(r),m=async(_,P,Y)=>{if(!y())throw sc(`The bot workspace changed before this ${Y} started.`);let j=await I[_](f,...P);if(!y())throw sc(`The bot workspace changed while this ${Y} was running.`);return j},T=async(_,P,Y)=>{if(!y())throw sc(`The bot workspace changed before this ${Y} started.`);return I[_](f,...P)};return Object.freeze({sessionId:f,async sessionExists(..._){if(!y())return!1;let P=await I.sessionExists(f,..._);return y()&&P},models(..._){return m("getSessionModels",_,"model listing")},selectModel(..._){return m("selectSessionModel",_,"model selection")},isRunning(..._){return m("isSessionRunning",_,"run-state check")},hasActiveTurn(..._){return m("hasActiveTurn",_,"turn ownership check")},stopActiveTurn(..._){return T("stopActiveTurn",_,"turn stop")},steerActiveTurn(..._){return T("steerActiveTurn",_,"turn steering")},ask(..._){if(!y())throw sc("The bot workspace changed before this prompt started.");return I.ask(f,..._)}})};if(E==="sessionExists")return(f,...Q)=>{if(!A())return!1;let y=s.get(f);return y!==void 0&&y!==o.generationFor(r)?(s.delete(f),!1):I.sessionExists(f,...Q)};if(E==="ask")return(f,...Q)=>{let y=s.get(f);if(s.delete(f),!A()||y!==void 0&&y!==o.generationFor(r)){let m=new Error("The bot workspace changed before this prompt started.");throw m.code=Ja,m}return I.ask(f,...Q)};if(E==="executeCommand"&&typeof I.executeCommand=="function")return(f,...Q)=>{let y=s.get(f);if(s.delete(f),!A()||y!==void 0&&y!==o.generationFor(r)){let m=new Error("The bot workspace changed before this command started.");throw m.code=Ja,m}return I.executeCommand(f,...Q)};let B=Reflect.get(I,E,I);return typeof B=="function"?B.bind(I):B}}),c=new Proxy(i,{get(I,E){if(E===rO)return I;if(E==="sessionFor")return(f,...Q)=>{if(!A())return null;let y=I.sessionFor(f,...Q);return y&&!s.has(y)&&s.set(y,o.generationFor(r)),y};if(E==="setSession")return(f,Q,...y)=>{let m=s.get(Q);return!A()||m!==void 0&&m!==o.generationFor(r)?(s.delete(Q),!1):I.setSession(f,Q,...y)};let B=Reflect.get(I,E,I);return typeof B=="function"?B.bind(I):B}});return Object.freeze({harness:g,state:c})}function ha(n,{workspaces:r,stateFor:o,agentPresetCatalog:i}={}){if(!n||!r||typeof o!="function")throw new TypeError("controller, workspaces, and stateFor are required");let e=new Map,a=(c,I)=>{let B=(e.get(c)??Promise.resolve()).catch(()=>{}).then(I);return e.set(c,B),B.finally(()=>{e.get(c)===B&&e.delete(c)})},A=c=>x2(r,c,i),t=(c,I)=>{let E=r.incarnationFor(c);return a(c,async()=>{if(!(await n.status())?.bots?.some(Q=>Q?.botId===c)){let Q=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw Q.code="workspace-bot-not-found",Q}let f=await o(c);return await r.setWorkspace(c,I,{clearSessions:()=>f.clearSessions(),incarnation:E}),A(await n.status())})},s=(c,I)=>{let E=r.incarnationFor(c),B=JI(I);return a(c,async()=>{if(!(await n.status())?.bots?.some(y=>y?.botId===c)){let y=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw y.code="workspace-bot-not-found",y}let Q=B&&i?await TO(i):null;if(B&&i&&!Q?.items.some(y=>y.id===B))throw J2();return await r.setAgentPreset(c,B,{incarnation:E}),x2(r,await n.status(),Q??i)})},g=(c,I)=>a(c,async()=>{let E=await r.beginRemoval(c,{clearSessions:async()=>{try{let B=await o(c);if(!B||typeof B.clearSessions!="function")throw new TypeError("bot state does not support session cleanup");await B.clearSessions()}catch(B){console.warn(`[dsh-im] ignored session cleanup failure while deleting bot ${c}:`,B?.message??B)}}});try{let B=await I();return await r.finishRemoval(E),A(B)}catch(B){let f=await jne(n).catch(()=>null);throw Array.isArray(f?.bots)&&!f.bots.some(y=>y?.botId===c)?await r.finishRemoval(E):await r.abortRemoval(E),B}});return new Proxy(n,{get(c,I){if(I==="updateWorkspace")return t;if(I==="updateAgentPreset")return s;let E=Reflect.get(c,I,c);return typeof E!="function"?E:I==="deleteBot"?(B,...f)=>g(B,()=>E.call(c,B,...f)):I==="disconnect"?async(...B)=>{let Q=(await c.status())?.bots?.[0]?.botId;return Q?g(Q,()=>E.apply(c,B)):A(E.apply(c,B))}:(...B)=>A(E.apply(c,B))}})}var q2=Object.freeze([250,1e3,3e3,5e3,1e4,3e4]);function Jne(n){if(!Array.isArray(n)||n.length===0)return[...q2];let r=n.filter(o=>Number.isFinite(o)&&o>=0);return r.length>0?r:[...q2]}var iB=class{#e;#A;#r;#t;#n;#o;#l;#s=null;#I=null;#a=0;#i=!1;#c=!1;#g;#p;constructor({controller:r,harness:o,logger:i=console,retryDelaysMs:e,healthyIntervalMs:a=15e3,setTimeoutImpl:A=setTimeout,clearTimeoutImpl:t=clearTimeout}){if(!r||typeof r.initialize!="function"||typeof r.status!="function")throw new TypeError("ConnectionSupervisor requires a controller");if(!o||typeof o.ensureRunning!="function")throw new TypeError("ConnectionSupervisor requires a Harness client");this.#e=r,this.#A=o,this.#r=i,this.#t=Jne(e),this.#n=Number.isFinite(a)&&a>=0?a:15e3,this.#o=A,this.#l=t,this.#g=new Promise(s=>{this.#p=s})}get ready(){return this.#g}start(){return this.#c||this.#i?this:(this.#c=!0,this.#h(0),this)}async close(){this.#i||(this.#i=!0,this.#s!==null&&this.#l(this.#s),this.#s=null,await this.#I?.catch(()=>{}),this.#p?.(null),this.#p=null)}#h(r){this.#i||(this.#s=this.#o(()=>{this.#s=null,this.#C()},r),this.#s?.unref?.())}async#C(){if(this.#i||this.#I)return;let r=this.#E();this.#I=r;try{await r}finally{this.#I===r&&(this.#I=null)}}async#E(){try{if(await this.#A.ensureRunning(),this.#i)return;let r=await this.#e.initialize();if(this.#i)return;this.#p?.(r),this.#p=null;let{configured:o,connected:i}=r.totals;if(io.invoke({namespace:"commands",method:"execute",args:{agentId:i,line:e},signal:a.signal})}}import{randomUUID as qne}from"node:crypto";function Vne(n){if(typeof n?.get!="function")return;let r;try{r=n.get("agents")}catch{return}if(r!=null){if(typeof r.get!="function")throw new TypeError('dsh-im requires a callable AgentRegistry when ctx.get("agents") is present');return r}}function zne(n,r,o){if(n?.status!=="running")return!1;let i=n?.session?.events;if(!Array.isArray(i))return!1;let e=null,a=!1;for(let A of i){if(A?.type==="turn/start"){e=A.data?.turn??null,a=!1;continue}if(A?.type==="turn/end"&&A.data?.turn===e){e=null,a=!1;continue}e===r&&A?.type==="user/message"&&A.data?.source?.rpcId===o&&(a=!0)}return e===r&&a}function V2(n){if(!n||typeof n!="object"||Object.isFrozen(n))return n;for(let r of Object.values(n))V2(r);return Object.freeze(n)}function Wne(n){return V2({id:qne(),role:"user",content:[{type:"text",text:n}],source:{kind:"user"}})}function Zne(n){let r=new Error("Session is busy with an active turn or maintenance task",{cause:n});return r.code="agent-busy",r}function Xne(n){return({sessionId:r,expectedTurn:o,promptRpcId:i,action:e,text:a})=>{let A=n.get(r);if(A){if(!zne(A,o,i))return!1;if(e==="stop")return A.cancel({kind:"user"},{keepInbox:!0}),!0;if(e==="steer")return typeof a!="string"||!a.trim()?!1:(A.inject(Wne(a)),!0);throw new TypeError(`Unsupported Harness control action: ${String(e)}`)}}}function $ne(n){return({sessionId:r,operation:o})=>{if(typeof o!="function")throw new TypeError("maintenance operation is required");let i=n.get(r);if(!i)return o();try{return i.runMaintenance(e=>{if(n.get(r)!==i){let a=new Error("Session agent changed before maintenance started");throw a.code="agent-unavailable",a}return o(e)})}catch(e){throw Zne(e)}}}function ua(n,r={}){let{controlExecutor:o,sessionMaintenanceExecutor:i}=r;if(o!==void 0&&typeof o!="function")throw new TypeError("controlExecutor must be a function");if(i!==void 0&&typeof i!="function")throw new TypeError("sessionMaintenanceExecutor must be a function");let e=o&&i?void 0:Vne(n);return{controlExecutor:o??(e?Xne(e):void 0),sessionMaintenanceExecutor:i??(e?$ne(e):void 0)}}function tse(n,r){if(r!==void 0)return new URL(r);let o=n?.port;if(!Number.isInteger(o)||o<1||o>65535)throw new Error("dsh-dingtalk requires an initialized DSH webServer port");return new URL(`http://127.0.0.1:${o}`)}function rse(n){let r=gc(n.dshHome??process.env.DSH_HOME??zE(Ase(),".dsh")),o=gc(n.dataDir??zE(r,"integrations","dsh-dingtalk"));return{root:o,config:gc(n.configPath??zE(o,"config.json")),bots:gc(n.botsDir??zE(o,"bots")),workspaces:gc(n.workspacesPath??zE(o,"workspaces.json"))}}async function kO(n,r={},o={}){if(!n?.credentials)throw new TypeError("dsh-dingtalk requires ctx.credentials");if(!n?.webServer)throw new TypeError("dsh-dingtalk requires ctx.webServer");let i=o.ConfigStore??xu,e=o.DeviceAuth??Ju,a=o.StateStore??aB,A=o.HarnessClient??tB,t=o.Controller??HE,s=o.Runtime??jE,g=o.createConnectionSupervisor??RO,c=typeof n.logger=="function"?n.logger("dsh-dingtalk"):n.logger??console,I=()=>pa(n),E=rse(r),B=await new i(E.config).load(),f=gc(r.workspace??process.cwd()),Q=o.WorkspaceStore??Fr,y=o.workspaces??await new Q(E.workspaces,{defaultWorkspace:f}).load(),m=typeof B.list=="function",T=m?B.list():[];m&&await y.reconcile(T.map(G=>G.botId)),await Promise.all(T.map(G=>y.ensure(G.botId,{defaultAgentPreset:r.agentPreset})));let _=typeof B.remove=="function"?Ea(B,{workspaces:y}):B,P=o.deviceAuth??new e({baseUrl:r.registrationBaseUrl}),Y=new Map,j=G=>gc(E.bots,G,"state.json"),K=async G=>{let te=Y.get(G);return te||(te=await new a(j(G)).load(),Y.set(G,te)),te},q=da(n,o.commandExecutor),{controlExecutor:V,sessionMaintenanceExecutor:H}=ua(n,{controlExecutor:o.controlExecutor,sessionMaintenanceExecutor:o.sessionMaintenanceExecutor}),v=new A({baseUrl:tse(n.webServer,r.harnessBaseUrl),workspace:f,autostart:!1,dshBin:r.dshBin??"dsh",...q?{commandExecutor:q}:{},...V?{controlExecutor:V}:{},...H?{sessionMaintenanceExecutor:H}:{}}),Z=new t({deviceAuth:P,credentials:n.credentials,configStore:_,logger:c,createRuntime:async({botId:G,config:te,clientSecret:Be})=>{let Ce=await K(G);await y.ensure(G,{defaultAgentPreset:r.agentPreset});let ke=Ca(v,{botId:G,workspaces:y,state:Ce,agentPresetCatalog:I});return new s({config:te,clientSecret:Be,harness:ke.harness,state:ke.state,replyTimeoutMs:r.replyTimeoutMs??6e5,maxMessageChars:r.maxMessageChars??4e3,connectTimeoutMs:r.connectTimeoutMs??15e3,logger:{error:(...Ee)=>c.error?.(`[${G}]`,...Ee),warn:(...Ee)=>c.warn?.(`[${G}]`,...Ee),info:(...Ee)=>c.info?.(`[${G}]`,...Ee),debug:(...Ee)=>c.debug?.(`[${G}]`,...Ee)}})},deleteState:async({botId:G})=>{let te=Y.get(G);if(Y.delete(G),te&&typeof te.remove=="function")await te.remove();else try{await ese(j(G))}catch(Be){if(Be?.code!=="ENOENT")throw Be}}}),U=ha(Z,{workspaces:y,stateFor:K,agentPresetCatalog:I}),M=g({controller:U,harness:v,logger:c,retryDelaysMs:r.retryDelaysMs,healthyIntervalMs:r.healthyIntervalMs}).start();return{controller:U,ready:M.ready,async close(){await M.close(),await U.close(),v.stopManagedProcess()}}}import nse from"qrcode";var ase=new Set(["loopback","trusted-host"]);function Er(n){if(n===void 0)return"loopback";if(ase.has(n))return n;throw new TypeError('dsh-im rpcAuthority must be "loopback" or "trusted-host"')}import{isAbsolute as ise}from"node:path";var za="bot.workspace.set";function Ba(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)&&Object.keys(n).every(r=>["botId","workspace"].includes(r))&&typeof n.botId=="string"&&/^[A-Za-z0-9_-]{1,128}$/.test(n.botId)&&typeof n.workspace=="string"&&n.workspace.length<=4096&&ise(n.workspace.trim())}function fa(n){return["workspace-not-absolute","workspace-not-found","workspace-not-directory","workspace-bot-not-found","agent-preset-invalid","agent-preset-unavailable"].includes(n?.code)?{code:n.code,message:n.message}:null}var Wa="bot.preset.set";function ose(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function Qa(n){return ose(n)&&Object.keys(n).every(r=>["botId","agentPreset"].includes(r))&&typeof n.botId=="string"&&/^[A-Za-z0-9_-]{1,128}$/.test(n.botId)&&(n.agentPreset===null||typeof n.agentPreset=="string"&&yO.test(n.agentPreset))}var W2="/dingtalk",zt=Object.freeze({status:"connection.status",beginProvisioning:"provision.begin",pollProvisioning:"provision.poll",cancelProvisioning:"provision.cancel",bindCredentials:"bot.bind-credentials",reconnectBot:"bot.reconnect",deleteBot:"bot.delete",setWorkspace:za,setAgentPreset:Wa,approveSender:"bot.sender.approve",revokeSender:"bot.sender.revoke"}),Z2=Object.freeze(Object.values(zt)),sse=new Set(["clientSecret","client_secret","deviceCode","device_code","secretRef","staffId","senderStaffId","verificationUrl","verificationUri","userCode"]);function PO(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function qs(n,r){return PO(n)&&Object.keys(n).every(o=>r.includes(o))}function cc(n){return typeof n=="string"&&/^[A-Za-z0-9_-]{1,128}$/.test(n)}function z2(n,r){return typeof n=="string"&&n.trim().length>0&&n.length<=r}function gse(n,r){return PO(r)?n===zt.status?qs(r,[])?null:"connection.status does not accept fields.":n===zt.beginProvisioning?qs(r,["locale"])&&(r.locale===void 0||r.locale==="zh-CN")?null:"provision.begin received unsupported fields.":[zt.pollProvisioning,zt.cancelProvisioning].includes(n)?qs(r,["attemptId"])&&cc(r.attemptId)?null:`${n} requires an attemptId.`:n===zt.bindCredentials?qs(r,["clientId","clientSecret"])&&z2(r.clientId,256)&&z2(r.clientSecret,1024)?null:"bot.bind-credentials requires Client ID and Client Secret.":n===zt.reconnectBot?qs(r,["botId","sendTest"])&&cc(r.botId)&&(r.sendTest===void 0||r.sendTest===!0)?null:"bot.reconnect requires a botId and optional sendTest=true.":n===zt.deleteBot?qs(r,["botId","confirm"])&&cc(r.botId)&&r.confirm===!0?null:"bot.delete requires a botId and confirm=true.":n===zt.setWorkspace?Ba(r)?null:"\u8BF7\u8F93\u5165\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84\u3002":n===zt.setAgentPreset?Qa(r)?null:"\u8BF7\u9009\u62E9 Agent Preset\u3002":n===zt.approveSender?qs(r,["botId","requestId","confirm"])&&cc(r.botId)&&cc(r.requestId)&&r.confirm===!0?null:"bot.sender.approve requires botId, requestId, and confirm=true.":n===zt.revokeSender?qs(r,["botId","senderKey","confirm"])&&cc(r.botId)&&cc(r.senderKey)&&r.confirm===!0?null:"bot.sender.revoke requires botId, senderKey, and confirm=true.":"Unknown DingTalk endpoint.":"Payload must be an object."}function oB(n){return{ok:!1,error:{code:"bad-request",message:n}}}function WE(){return{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}}}function cse(){return{ok:!1,error:{code:"dingtalk-operation-failed",message:"\u9489\u9489\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"}}}function WI(n){if(Array.isArray(n))return n.map(WI);if(!PO(n))return n;let r={};for(let[o,i]of Object.entries(n))sse.has(o)||(r[o]=WI(i));return r}async function Ise(n){return nse.toDataURL(n,{type:"image/png",errorCorrectionLevel:"M",margin:2,width:320})}async function vO(n,r){return!n||typeof n.verificationUrl!="string"?WI(n):WI({...n,qrCodeDataUrl:await r(n.verificationUrl)})}async function Vs(n,r){let o=structuredClone(n);return o?.provisioning&&(o.provisioning=await vO(o.provisioning,r)),WI(o)}function lse(n){for(let r of["status","startProvisioning","registrationStatus","cancelProvisioning","bindCredentials","reconnectBot","deleteBot","approveSender","revokeSender"])if(typeof n?.[r]!="function")throw new TypeError(`A complete DingTalk controller is required (${r})`)}function X2(n,{encodeQr:r=Ise}={}){lse(n);let o=new Map,i=e=>{let a=o.get(e);return a||(o.size>=16&&o.delete(o.keys().next().value),a=Promise.resolve().then(()=>r(e)),o.set(e,a)),a};return async(e,a,A)=>{if(A?.aborted)return WE();if(!Z2.includes(e))return oB("Unknown DingTalk endpoint.");let t=gse(e,a);if(t)return oB(t);try{let s;if(e===zt.status)s=await Vs(await n.status(),i);else if(e===zt.beginProvisioning){let g=await n.startProvisioning({signal:A});if(A?.aborted)return await n.cancelProvisioning(g.attemptId),WE();s=await vO(g,i)}else if(e===zt.pollProvisioning){let g=await n.registrationStatus(a.attemptId);if(!g)return oB("The provisioning attempt no longer exists.");s=await vO(g,i)}else if(e===zt.cancelProvisioning){if(s=await n.cancelProvisioning(a.attemptId),!s)return oB("The provisioning attempt no longer exists.");s=WI(s)}else if(e===zt.bindCredentials)s=await Vs(await n.bindCredentials(a),i);else if(e===zt.reconnectBot){let g=await n.reconnectBot(a.botId);if(A?.aborted)return WE();let c;if(a.sendTest===!0)if(!g?.bots?.some(E=>E?.botId===a.botId&&E?.connected===!0)||typeof n.sendConnectionTest!="function")c=qt(tr("\u9489\u9489\u673A\u5668\u4EBA"));else try{await n.sendConnectionTest(a.botId),c=qt()}catch(E){c=qt(E)}s=await Vs({...g,...c?{testMessage:c}:{}},i)}else if(e===zt.deleteBot)s=await Vs(await n.deleteBot(a.botId),i);else if(e===zt.setWorkspace){if(typeof n.updateWorkspace!="function")throw new Error("Workspace update is unavailable");s=await Vs(await n.updateWorkspace(a.botId,a.workspace),i)}else if(e===zt.setAgentPreset){if(typeof n.updateAgentPreset!="function")throw new Error("Agent preset update is unavailable");s=await Vs(await n.updateAgentPreset(a.botId,a.agentPreset),i)}else e===zt.approveSender?s=await Vs(await n.approveSender(a.botId,a.requestId),i):s=await Vs(await n.revokeSender(a.botId,a.senderKey),i);return A?.aborted?WE():{ok:!0,value:s}}catch(s){let g=fa(s);return A?.aborted?WE():g?{ok:!1,error:g}:cse()}}}function nB(n,r,o,i){if(!n?.connection?.rpc||typeof n.connection.rpc.handle!="function")throw new TypeError("DSH Host Connection RPC is required");return n.connection.rpc.handle(W2,X2(r,o),{authority:Er(i)})}async function $2(n,r={}){if(r?.controller)return nB(n,r.controller,r.rpcOptions,r.rpcAuthority);let o=await kO(n,r,r.internals),i=nB(n,o.controller,r.rpcOptions,r.rpcAuthority);return n.effect(()=>async()=>{await o.close()},"dsh-dingtalk: close bot connections"),i}import{createHash as pse}from"node:crypto";import{mkdir as Ese,readFile as Cse,rename as hse,unlink as dse,writeFile as use}from"node:fs/promises";import{dirname as Bse}from"node:path";var GO=Object.freeze({version:1,bots:Object.freeze([])});function Zn(n){return typeof n=="string"&&n.trim()?n.trim():null}function eU(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ZE(n,{botPrefix:r,tokenRefPrefix:o}){let i=Zn(n);if(!i)throw new TypeError("platformId is required");let e=pse("sha256").update(i).digest("hex").slice(0,24);return{botId:`${r}_${e}`,tokenRef:`${o}_${e.toUpperCase()}`}}function sB(n,r){let o=Zn(n)??"";return o.length<=10?o?`${o.slice(0,3)}\u2022\u2022\u2022`:r:`${o.slice(0,6)}\u2022\u2022\u2022\u2022${o.slice(-4)}`}var ZI=class{#e;#A;#r;#t;#n;#o;#l;#s=GO;#I=Promise.resolve();constructor(r,{channel:o,botPrefix:i,tokenRefPrefix:e,normalizeBotExtension:a=()=>({})}){if(typeof a!="function")throw new TypeError("normalizeBotExtension must be a function");this.#e=r,this.#A=o,this.#r=i,this.#t=e,this.#n=a,this.#o=new RegExp(`^${eU(i)}_[a-f0-9]{24}$`),this.#l=new RegExp(`^${eU(e)}_[A-F0-9]{24}$`)}async load(){try{let r=this.#i(JSON.parse(await Cse(this.#e,"utf8")));if(!r)throw new Error(`dsh-im ${this.#A} config contains invalid bot data`);this.#s=r}catch(r){if(r?.code!=="ENOENT")throw r;this.#s=GO}return this}list(){return structuredClone(this.#s.bots)}get(r){let o=this.#s.bots.find(i=>i.botId===r);return o?structuredClone(o):null}getByPlatformId(r){let o=this.#s.bots.find(i=>i.platformId===r);return o?structuredClone(o):null}async save(r){let o=this.#a(r);if(!o)throw new Error(`Refusing to persist incomplete ${this.#A} bot data`);return this.#c(i=>{let e=i.find(t=>t.platformId===o.platformId&&t.botId!==o.botId),a=i.find(t=>t.tokenRef===o.tokenRef&&t.botId!==o.botId);if(e||a)throw new Error(`Duplicate ${this.#A} bot identity`);let A=i.findIndex(t=>t.botId===o.botId);return A===-1?i.push(o):i[A]=o,structuredClone(o)})}async remove(r){if(!this.#o.test(r))throw new TypeError(`Invalid ${this.#A} bot id`);return this.#c(o=>{let i=o.findIndex(a=>a.botId===r);if(i===-1)return null;let[e]=o.splice(i,1);return structuredClone(e)})}async clear(){let r=this.#I.then(async()=>{try{await dse(this.#e)}catch(o){if(o?.code!=="ENOENT")throw o}this.#s=GO});this.#I=r.then(()=>{},()=>{}),await r}#a(r){if(!r||typeof r!="object")return null;let o=Zn(r.platformId),i=Zn(r.botId),e=Zn(r.tokenRef),a=Zn(r.name);if(!o||!i||!e||!a||!this.#o.test(i)||!this.#l.test(e))return null;let A=ZE(o,{botPrefix:this.#r,tokenRefPrefix:this.#t});if(A.botId!==i||A.tokenRef!==e)return null;let t=this.#n(r);return!t||typeof t!="object"||Array.isArray(t)?null:Object.freeze({botId:i,platformId:o,tokenRef:e,name:a,username:Zn(r.username),createdAt:Zn(r.createdAt)??new Date().toISOString(),connectedAt:Zn(r.connectedAt),...t})}#i(r){if(!r||r.version!==1||!Array.isArray(r.bots))return null;let o=r.bots.map(A=>this.#a(A));if(o.some(A=>A===null))return null;let i=new Set,e=new Set,a=new Set;for(let A of o){if(i.has(A.botId)||e.has(A.platformId)||a.has(A.tokenRef))return null;i.add(A.botId),e.add(A.platformId),a.add(A.tokenRef)}return Object.freeze({version:1,bots:Object.freeze(o)})}async#c(r){let o,i=this.#I.then(async()=>{let e=[...this.#s.bots];o=r(e);let a=Object.freeze({version:1,bots:Object.freeze(e)});await this.#g(a),this.#s=a});return this.#I=i.then(()=>{},()=>{}),await i,o}async#g(r){await Ese(Bse(this.#e),{recursive:!0,mode:448});let o=`${this.#e}.tmp`;await use(o,`${JSON.stringify(r,null,2)} -`,{encoding:"utf8",mode:384}),await hse(o,this.#e)}};var AU=Object.freeze({botPrefix:"discord",tokenRefPrefix:"DSH_DISCORD_BOT_TOKEN"});function tU(n){return ZE(n,AU)}function rU(n){return sB(n,"Discord\u673A\u5668\u4EBA")}var gB=class extends ZI{constructor(r){super(r,{channel:"Discord",...AU})}};function XE(n){return typeof n=="string"&&n.trim()?n.trim():null}function $E(n,r){return Object.freeze({code:n,message:r})}var XI=class{#e;#A;#r;#t;#n;#o;#l;#s;#I;#a=new Map;#i=new Map;#c=new Map;#g=0;#p=!1;constructor({descriptor:r,credentials:o,configStore:i,inspectToken:e,deriveIdentity:a,maskPlatformId:A,createRuntime:t,deleteState:s=async()=>{},logger:g=console}){if(!r?.key||!r?.label||!r?.connectionLabel)throw new TypeError("TokenBotController requires a channel descriptor");if(!o||typeof o.resolve!="function"||typeof o.set!="function"||typeof o.unset!="function")throw new TypeError(`${r.label} requires the DSH credential provider`);if(!i||typeof i.list!="function"||typeof i.save!="function"||typeof i.remove!="function")throw new TypeError(`${r.label} requires a config store`);if(typeof e!="function"||typeof a!="function"||typeof A!="function"||typeof t!="function")throw new TypeError(`${r.label} controller dependencies are incomplete`);this.#e=r,this.#A=o,this.#r=i,this.#t=e,this.#n=a,this.#o=A,this.#l=t,this.#s=s,this.#I=g}async initialize(){if(this.#p)return this.status();for(let r of this.#r.list())await this.#B(r.botId,async()=>{if(this.#p||this.#a.get(r.botId)?.status?.ready)return;let o=await this.#E(r.tokenRef);if(!o){this.#i.set(r.botId,$E("missing-token",`${this.#e.label}\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u63A5\u5165\u3002`));return}try{await this.#h(r,o),this.#i.delete(r.botId)}catch(i){this.#i.set(r.botId,$E("connection-failed",`${this.#e.label}\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002`)),this.#I.warn?.(`[dsh-im:${this.#e.key}] bot ${r.botId} failed to initialize:`,i)}finally{this.#u()}});return this.status()}async bindCredentials({token:r}={}){if(this.#p)throw new Error(`${this.#e.label} controller is closed`);let o=XE(r);if(!o)throw new TypeError(`${this.#e.label} Bot Token is required`);let i=await this.#t(o),e=XE(i?.platformId),a=XE(i?.name);if(!e||!a)throw new Error(`${this.#e.label} returned an invalid bot identity`);let A=this.#n(e);return await this.#B(A.botId,async()=>{if(this.#p)throw new Error(`${this.#e.label} controller is closed`);let t=this.#r.getByPlatformId(e),s=await this.#A.resolve(A.tokenRef).catch(()=>{}),g={botId:A.botId,platformId:e,tokenRef:A.tokenRef,name:a,username:XE(i.username),createdAt:t?.createdAt??new Date().toISOString(),connectedAt:new Date().toISOString()};await this.#A.set(A.tokenRef,o);try{await this.#r.save(g)}catch(c){throw await this.#d(A.tokenRef,s),c}try{await this.#h(g,o),this.#i.delete(A.botId)}catch(c){this.#i.set(A.botId,$E("connection-failed",`${this.#e.label}\u673A\u5668\u4EBA\u5DF2\u63A5\u5165\uFF0C\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002`)),this.#I.warn?.(`[dsh-im:${this.#e.key}] bot ${A.botId} credential connection failed:`,c)}this.#u()}),this.status()}async reconnectBot(r){let o=this.#r.get(r);if(!o)throw new Error(`Unknown ${this.#e.label} bot`);return await this.#B(r,async()=>{let i=await this.#E(o.tokenRef);if(!i)throw new Error(`${this.#e.label} bot token is missing`);try{await this.#h(o,i),this.#i.delete(r)}catch(e){throw this.#i.set(r,$E("connection-failed",`${this.#e.label}\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002`)),e}finally{this.#u()}}),this.status()}async updateBotConfig(r,o){if(this.#p)throw new Error(`${this.#e.label} controller is closed`);if(typeof o!="function")throw new TypeError("Bot config update must be a function");return await this.#B(r,async()=>{if(this.#p)throw new Error(`${this.#e.label} controller is closed`);let i=this.#r.get(r);if(!i)throw new Error(`Unknown ${this.#e.label} bot`);let e=await this.#E(i.tokenRef);if(!e)throw new Error(`${this.#e.label} bot token is missing`);if(this.#p)throw new Error(`${this.#e.label} controller is closed`);let a=o(i),A=await this.#r.save(a);try{await this.#h(A,e),this.#i.delete(r)}catch(t){throw this.#i.set(r,$E("connection-failed",`${this.#e.label}\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002`)),t}finally{this.#u()}}),this.status()}async sendConnectionTest(r){let o=this.#r.get(r);if(!o)throw new Error(`Unknown ${this.#e.label} bot`);return this.#B(r,async()=>{let i=this.#a.get(r);if(!i?.status?.ready||typeof i.sendConnectionTest!="function"){let a=new Error(`${this.#e.label}\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5`);throw a.code="test-target-unavailable",a}let e=`${o.name}\uFF08${this.#o(o.platformId)}\uFF09`;return await i.sendConnectionTest(ga(e,`${this.#e.label}\u673A\u5668\u4EBA`)),{sent:!0}})}async deleteBot(r){let o=this.#r.get(r);if(!o)throw new Error(`Unknown ${this.#e.label} bot`);return await this.#B(r,async()=>{let i=await this.#A.resolve(o.tokenRef).catch(()=>{});await this.#C(r);try{await this.#A.unset(o.tokenRef),await this.#r.remove(r)}catch(e){throw i?.value&&(await this.#A.set(o.tokenRef,i.value).catch(()=>{}),await this.#h(o,i.value).catch(()=>{})),new Error(`Unable to remove the ${this.#e.label} bot safely.`,{cause:e})}await this.#s({botId:r,config:o}).catch(e=>{this.#I.warn?.(`[dsh-im:${this.#e.key}] bot ${r} state cleanup failed:`,e)}),this.#i.delete(r),this.#u()}),this.status()}status(){let r=this.#r.list().map(i=>{let e=this.#a.get(i.botId)?.status??null,a=e?.ready===!0&&e.connectionState==="connected"&&e.harnessReachable===!0,A=a?"connected":e?.connectionState==="connecting"?"connecting":this.#i.has(i.botId)||e?.connectionState==="failed"?"error":"offline";return{botId:i.botId,state:A,connected:a,configured:!0,bot:{name:i.name,username:i.username,idMasked:this.#o(i.platformId)},health:{status:a?"healthy":A==="error"?"error":"offline",summary:a?`${this.#e.label}${this.#e.connectionLabel}\u8FD0\u884C\u6B63\u5E38`:A==="error"?`${this.#e.label}\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5`:`${this.#e.label}\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF`,lastCheckedAt:e?.lastCheckedAt??null,lastConnectedAt:e?.lastConnectedAt??null},stats:{messagesReceived:e?.messagesReceived??0,messagesReplied:e?.messagesReplied??0},error:structuredClone(this.#i.get(i.botId)??null)}}),o=r.filter(i=>i.connected).length;return{schemaVersion:1,revision:this.#g,state:r.length===0?"disconnected":o===r.length?"connected":o>0?"degraded":"offline",bots:r,totals:{configured:r.length,connected:o}}}async close(){this.#p||(this.#p=!0,await Promise.allSettled([...this.#c.values()]),await Promise.allSettled([...this.#a.keys()].map(r=>this.#C(r))))}async#h(r,o){if(this.#p)throw new Error(`${this.#e.label} controller is closed`);if(await this.#C(r.botId),this.#p)throw new Error(`${this.#e.label} controller is closed`);let i=await this.#l({botId:r.botId,config:r,token:o});if(!i||typeof i.start!="function"||typeof i.stop!="function")throw new TypeError(`createRuntime returned an invalid ${this.#e.label} runtime`);this.#a.set(r.botId,i);try{await i.start()}catch(e){throw await i.stop().catch(()=>{}),this.#a.delete(r.botId),e}}async#C(r){let o=this.#a.get(r);this.#a.delete(r),await o?.stop().catch(i=>{this.#I.warn?.(`[dsh-im:${this.#e.key}] bot ${r} failed to stop cleanly:`,i)})}async#E(r){let o=await this.#A.resolve(r).catch(()=>{});return XE(o?.value)}async#d(r,o){o?.value?await this.#A.set(r,o.value).catch(()=>{}):await this.#A.unset(r).catch(()=>{})}#B(r,o){let a=(this.#c.get(r)??Promise.resolve()).catch(()=>{}).then(o).finally(()=>{this.#c.get(r)===a&&this.#c.delete(r)});return this.#c.set(r,a),a}#u(){this.#g+=1}};var fse="https://discord.com/api/v10/";function eC(n){return typeof n=="string"&&n.trim()?n.trim():null}function Qse(n,r){let o=AbortSignal.timeout(r);return n?AbortSignal.any([n,o]):o}function yse(n,r){return new Promise((o,i)=>{if(r?.aborted){i(r.reason??new DOMException("Aborted","AbortError"));return}let e=setTimeout(o,n);e?.unref?.(),r?.addEventListener("abort",()=>{clearTimeout(e),i(r.reason??new DOMException("Aborted","AbortError"))},{once:!0})})}function $I(n,r){let o=eC(n);if(!o||!/^\d{5,30}$/.test(o))throw new TypeError(`Invalid Discord ${r}`);return o}function mse(n){return typeof n=="string"&&/^[A-Za-z0-9_-]{20,}\.[A-Za-z0-9_-]{4,}\.[A-Za-z0-9_-]{20,}$/.test(n.trim())}var AC=class{#e;#A;#r;constructor({token:r,fetchImpl:o=fetch,baseUrl:i=fse}){if(!mse(r))throw new TypeError("Discord Bot Token is invalid");if(typeof o!="function")throw new TypeError("DiscordApi requires fetch");this.#e=r.trim(),this.#A=o,this.#r=new URL(i)}getCurrentUser(r={}){return this.#t("users/@me",{...r,method:"GET"})}getGatewayBot(r={}){return this.#t("gateway/bot",{...r,method:"GET"})}createMessage({channelId:r,content:o,replyToMessageId:i,signal:e}){return this.#t(`channels/${$I(r,"channel id")}/messages`,{method:"POST",signal:e,body:{content:o,allowed_mentions:{parse:[],replied_user:!1},...i?{message_reference:{message_id:$I(i,"message id"),channel_id:$I(r,"channel id"),fail_if_not_exists:!1}}:{}}})}editMessage({channelId:r,messageId:o,content:i,signal:e}){return this.#t(`channels/${$I(r,"channel id")}/messages/${$I(o,"message id")}`,{method:"PATCH",signal:e,body:{content:i,allowed_mentions:{parse:[],replied_user:!1}}})}sendTyping({channelId:r,signal:o}){return this.#t(`channels/${$I(r,"channel id")}/typing`,{method:"POST",signal:o,expectBody:!1})}async#t(r,{method:o,body:i,signal:e,timeoutMs:a=15e3,expectBody:A=!0,retry:t=!0}){let s;try{s=await this.#A(new URL(r,this.#r),{method:o,headers:{authorization:`Bot ${this.#e}`,"content-type":"application/json","user-agent":"DeepSeek-Harness-dsh-im (https://github.com/xmanrui/dsh-im, 1.0.2)"},...i===void 0?{}:{body:JSON.stringify(i)},signal:Qse(e,a),redirect:"error"})}catch(c){throw c?.name==="AbortError"||c?.name==="TimeoutError"?c:new Error(`Discord ${o} transport failed`)}let g=null;if(A||s.status===429||!s.ok)try{g=await s.json()}catch{if(A)throw new Error(`Discord ${o} returned invalid JSON`)}if(s.status===429&&t){let c=Math.min(1e4,Math.max(50,Number(g?.retry_after)*1e3||1e3));return await yse(c,e),this.#t(r,{method:o,body:i,signal:e,timeoutMs:a,expectBody:A,retry:!1})}if(!s.ok){let c=new Error(eC(g?.message)??`Discord API failed with HTTP ${s.status}`);throw c.code=`discord-${s.status}`,c}return A?g:null}};async function aU(n,r={}){let i=await new AC({token:n,...r}).getCurrentUser();if(!i?.id||i?.bot!==!0)throw new Error("Discord token does not belong to a bot");return{platformId:String(i.id),name:eC(i.global_name)??eC(i.username)??"Discord\u673A\u5668\u4EBA",username:eC(i.username)}}var iU="\u8FD9\u4E2A\u95EE\u9898\u5DF2\u5728\u5176\u4ED6\u5BA2\u6237\u7AEF\u5904\u7406\uFF0C\u65E0\u9700\u518D\u6B21\u56DE\u7B54\u3002";function di(n){return typeof n=="string"?n.trim():""}function Sse(n,r,o){return r.actor===o&&(n.kind!=="group"||n.addressed===!0)&&!Ir(n)&&!!di(n.content)}function ui(){return{messagesReceived:0,messagesReplied:0,messagesRejected:0,lastMessageAt:null,lastReplyAt:null,lastRejectedAt:null,lastError:null}}var rn=class{#e;#A;#r;#t;#n;#o;#l;#s;#I=new Map;#a=new Map;#i=new Map;#c=new Set;#g=new Set;#p=new Set;#h;constructor({descriptor:r,bot:o,harness:i,state:e,status:a=ui(),logger:A=console,replyTimeoutMs:t=6e5,signal:s}){if(!r?.key||!r?.label)throw new TypeError("A channel descriptor is required");if(!o||typeof o.sendText!="function")throw new TypeError("A bot client is required");if(!i||!e)throw new TypeError("Harness client and state store are required");this.#e=r,this.#A=o,this.#r=i,this.#t=e,this.#n=a,this.#o=A,this.#l=t,this.#s=s,this.#h=new ja({label:r.key,logger:A})}get status(){return structuredClone(this.#n)}accept(r){if(this.#s?.aborted)return Promise.resolve();let o=di(r?.conversationId),i=r?.kind==="group"?"group":"direct",e={...r,kind:i,conversationId:o},a=di(e.messageId),A=di(e.senderId);if(!a||!A||!o||e.senderIsBot===!0||this.#t.hasSeen(a)||this.#c.has(a))return Promise.resolve();this.#c.add(a),e.kind==="direct"&&Pi(this.#t,e.connectionTestTarget??e.replyTarget);let t=`${i}:${o}`,s=this.#a.get(t),g=di(e.content),c=pi(g)?Hi:Ei(g)?Yi:Ci(g)?xi:null;if(c&&(e.kind!=="group"||e.addressed===!0)){let E;return E=this.#E(e,a,t,c).finally(()=>{this.#c.delete(a),this.#p.delete(E)}),this.#p.add(E),E}let I=this.#h.claimReply({key:t,actor:A,messageId:a,text:Ir(e)?"":e.content,addressed:e.kind!=="group"||e.addressed===!0,hasPendingQuestion:!!s,questionCompletion:s?.submitting||s?.claimedReplyMessageId?s.queue:null,isQuestionPending:()=>this.#a.has(t),send:E=>this.#A.sendText(e.replyTarget,E)});if(I){let E;return E=I.process(async()=>this.#t.hasSeen(a)?!1:(await this.#t.markSeen(a),this.#n.messagesReceived+=1,this.#n.lastMessageAt=new Date().toISOString(),!0)).finally(()=>{this.#c.delete(a),this.#g.delete(E)}),this.#g.add(E),E}if(s&&s.actor!==A)return this.#C(e,a,A,t);if(s?.submitting||s?.claimedReplyMessageId)return this.#C(e,a,A,t);if(s){Sse(e,s,A)&&(s.claimedReplyMessageId=a);let B=(s.queue??Promise.resolve()).catch(()=>{}).then(()=>this.#B(e,a,A,t,s)).finally(()=>{this.#c.delete(a),s.claimedReplyMessageId===a&&(s.claimedReplyMessageId=null),s.queue===B&&(s.queue=null)});return s.queue=B,B}return this.#C(e,a,A,t)}#C(r,o,i,e,{releaseMessageId:a=!0,alreadyRecorded:A=!1}={}){let s=(this.#I.get(e)??Promise.resolve()).catch(()=>{}).then(()=>this.#d(r,o,i,e,{alreadyRecorded:A})).finally(()=>{a&&this.#c.delete(o),this.#I.get(e)===s&&this.#I.delete(e)});return this.#I.set(e,s),s}async waitForIdle(){await Promise.allSettled([...this.#I.values(),...[...this.#a.values()].flatMap(r=>r.queue?[r.queue]:[]),...this.#g,...this.#p])}async#E(r,o,i,e){if(this.#t.hasSeen(o))return;await this.#t.markSeen(o),this.#n.messagesReceived+=1,this.#n.lastMessageAt=new Date().toISOString();let a=r.replyTarget;try{let A=await e(di(r.content),this.#r,this.#t,i,{signal:this.#s,hasImages:Ir(r),pendingInteraction:this.#a.has(i)||this.#h.hasPending(i),control:{owner:this,key:i}});A?.stopped&&await Promise.allSettled([this.#R(i),this.#h.closeRoute(i)]);for(let t of A?.messages??[A?.message])t&&await this.#A.sendText(a,t);this.#n.lastError=null}catch(A){if(A?.code==="turn-stopped"||this.#s?.aborted)return;this.#n.lastError=A?.message??String(A),this.#o.error?.(`[dsh-im:${this.#e.key}] failed to process a command:`,A),await this.#A.sendText(a,"\u6D88\u606F\u5904\u7406\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002").catch(()=>{})}}sendConnectionTest(r){return Ys({state:this.#t,text:r,channelLabel:`${this.#e.label}\u673A\u5668\u4EBA`,send:(o,i)=>this.#A.sendText(o,i)})}async#d(r,o,i,e,{alreadyRecorded:a=!1}={}){if(!a){if(this.#t.hasSeen(o))return;await this.#t.markSeen(o),this.#n.messagesReceived+=1,this.#n.lastMessageAt=new Date().toISOString()}let A=r.replyTarget,t=di(r.content),s=null;try{if(this.#s?.throwIfAborted(),r.kind==="group"&&r.addressed!==!0){this.#n.messagesRejected+=1,this.#n.lastRejectedAt=new Date().toISOString();return}let g=Ir(r);if(!t&&!g){await this.#A.sendText(A,"\u76EE\u524D\u652F\u6301\u6587\u5B57\u548C\u56FE\u7247\u6D88\u606F\u3002");return}let c=t.toLowerCase();if(!g&&c==="/help"){await this.#A.sendText(A,[`${this.#e.label}\u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002`,"","\u76F4\u63A5\u53D1\u9001\u6587\u5B57\u6216\u56FE\u7247\u5373\u53EF\u7EE7\u7EED\u5F53\u524D\u4F1A\u8BDD\u3002","/new \u5F00\u542F\u4E00\u4E2A\u5168\u65B0\u4F1A\u8BDD","/compact \u538B\u7F29\u5F53\u524D\u4F1A\u8BDD\u7684\u8F83\u65E9\u4E0A\u4E0B\u6587","/workspace \u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84 \u5207\u6362\u5DE5\u4F5C\u533A","/workspacelist \u5217\u51FA\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84","/sessionlist [\u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84] \u5217\u51FA\u4F1A\u8BDD ID \u548C\u6807\u9898","/session Session ID \u6216\u5F53\u524D\u5DE5\u4F5C\u533A\u5E8F\u53F7 \u5C06\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u5230\u6307\u5B9A\u4F1A\u8BDD","/models \u6309\u5E8F\u53F7\u5217\u51FA\u6240\u6709\u53EF\u7528\u6A21\u578B","/model [\u5E8F\u53F7\u6216\u5B8C\u6574\u6A21\u578BID] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B","\u793A\u4F8B\uFF1A\u5148\u53D1 /models\uFF0C\u518D\u53D1 /model 2","/presetlist \u6309\u5E8F\u53F7\u5217\u51FA\u53EF\u7528 Agent Preset","/preset [\u5E8F\u53F7\u6216\u5B8C\u6574ID] \u67E5\u770B\u6216\u8BBE\u7F6E\u5F53\u524D\u673A\u5668\u4EBA Agent Preset","\u7EAF\u6570\u5B57 ID\uFF1A/preset id:","/preset --default \u8DDF\u968F Host \u9ED8\u8BA4","/stop \u505C\u6B62\u5F53\u524D\u4EFB\u52A1","/steer \u8865\u5145\u6307\u4EE4 \u7EA0\u504F\u5F53\u524D\u4EFB\u52A1","/status \u68C0\u67E5\u8FDE\u63A5\u72B6\u6001","/help \u663E\u793A\u672C\u5E2E\u52A9"].join(` +`),s=[];if(e==="picture"){let g=T2(a);g&&s.push(g)}else if(e==="richtext")for(let g of A){if(String(g?.type??"").toLowerCase()!=="picture")continue;let c=T2(g);c&&s.push(c)}return{content:t,images:s.map((g,c)=>({name:c===0?"image":`image-${c+1}`,load:({signal:I,maxBytes:E})=>{if(typeof r?.downloadImage!="function")throw new Error("DingTalk API does not support image downloads");return r.downloadImage({clientId:o,clientSecret:i,robotCode:n?.robotCode,downloadCode:g,signal:I,maxBytes:E})}}))}}function Xoe(n,r){if(String(n?.conversationType)==="2"){let o=Ft(n?.conversationId);if(!o)throw new Error("DingTalk group message has no conversation id");return`group:${o}`}return`p2p:${r}`}function $oe(n,r){return String(n?.conversationType)==="2"?{type:"group",openConversationId:Ft(n?.conversationId)}:{type:"user",userId:r}}function ene(n){return n?.type==="text"&&Ft(n.text)?n.text:n?.type==="tool"?n.name==="web_search"?"_\u6B63\u5728\u641C\u7D22\u7F51\u7EDC\u5E76\u6574\u7406\u4FE1\u606F\u2026_":`_\u6B63\u5728\u4F7F\u7528 ${Ft(n.name)??"\u5DE5\u5177"}\u2026_`:`_${Ft(n?.text)??"\u6B63\u5728\u5904\u7406\u2026"}_`}function Ane(n,r,o){if(r.needsPresentation||!r.questions[r.index]||r.actor!==o||String(n?.conversationType)==="2"&&n?.isInAtList!==!0||n?.msgtype!=="text"||!Ft(n?.text?.content))return!1;try{return ac(n.sessionWebhook),!0}catch{return!1}}function tne(n){n.stats??={};for(let r of["messagesReceived","messagesReplied","messagesRejected","messagesIgnored"])n[r]??=0,n.stats[r]=n[r];n.pendingSenders??=[]}function hi(n,r){n[r]=(n[r]??0)+1,n.stats??={},n.stats[r]=n[r]}function bO({pendingSenders:n=[]}={}){return{messagesReceived:0,messagesReplied:0,messagesRejected:0,messagesIgnored:0,lastMessageAt:null,lastReplyAt:null,lastRejectedAt:null,lastError:null,pendingSenders:structuredClone(n),stats:{messagesReceived:0,messagesReplied:0,messagesRejected:0,messagesIgnored:0}}}var eB=class{#e;#A;#r;#t;#n;#o;#l;#s;#I;#a;#i=new Map;#c=new Map;#g=new Map;#p=new Set;#h=new Set;#C=new Set;#E;constructor({api:r,clientId:o,clientSecret:i,harness:e,state:a,status:A=bO(),logger:t=console,replyTimeoutMs:s=6e5,maxMessageChars:g=4e3,signal:c}){if(!r||typeof r.sendText!="function")throw new TypeError("DingTalk API is required");if(!Ft(o)||!Ft(i))throw new TypeError("DingTalk app credentials are required");if(!e||!a)throw new TypeError("Harness client and state store are required");this.#e=r,this.#A=o.trim(),this.#r=i.trim(),this.#t=e,this.#n=a,this.#o=A,this.#l=t,this.#E=new ja({label:"DingTalk",logger:t}),this.#s=s,this.#I=g,this.#a=c,tne(this.#o),this.#T()}get status(){return this.#T(),structuredClone(this.#o)}accept(r){if(this.#a?.aborted)return Promise.resolve();let o=Ft(r?.msgId),i=Voe(r);if(!o||!i||this.#n.hasSeen(o)||this.#C.has(o))return Promise.resolve();this.#C.add(o);let e;try{e=Xoe(r,i)}catch{return this.#C.delete(o),hi(this.#o,"messagesRejected"),this.#o.lastRejectedAt=new Date().toISOString(),Promise.resolve()}let a=null;try{a=ac(r.sessionWebhook)}catch{}a&&String(r.conversationType)!=="2"&&Pi(this.#n,{sessionWebhook:a});let A=this.#c.get(e),t=R2(r,{api:this.#e,clientId:this.#A,clientSecret:this.#r}),s=Ft(t.content)??"",g=pi(s)?Hi:Ei(s)?Yi:Ci(s)?xi:null,c=String(r.conversationType)!=="2"||r?.isInAtList===!0;if(g&&a&&c){let E;return E=this.#B(r,o,e,a,t,g).catch(B=>{if(!(B?.code==="turn-stopped"||this.#a?.aborted))return this.#o.lastError="\u9489\u9489\u547D\u4EE4\u5904\u7406\u5931\u8D25\u3002",this.#l.error?.("[dsh-dingtalk] failed to process a command",N2(B)),this.#O(a,_2).catch(()=>{})}).finally(()=>{this.#C.delete(o),this.#h.delete(E)}),this.#h.add(E),E}let I=this.#E.claimReply({key:e,actor:i,messageId:o,text:a&&r?.msgtype==="text"?Ft(r?.text?.content)??"":"",addressed:String(r?.conversationType)!=="2"||r?.isInAtList===!0,hasPendingQuestion:!!A,questionCompletion:A?.submitting||A?.claimedReplyMessageId?A.queue:null,isQuestionPending:()=>this.#c.has(e),send:a?E=>this.#O(a,E):async()=>{}});if(I){let E;return E=I.process(async()=>this.#n.hasSeen(o)?!1:(await this.#n.markSeen(o),hi(this.#o,"messagesReceived"),this.#o.lastMessageAt=new Date().toISOString(),a||(hi(this.#o,"messagesRejected"),this.#o.lastRejectedAt=new Date().toISOString(),this.#o.lastError="\u9489\u9489\u6D88\u606F\u6CA1\u6709\u5B89\u5168\u7684\u56DE\u590D\u5730\u5740\u3002"),!0)).catch(B=>{this.#a?.aborted||(this.#o.lastError="\u9489\u9489\u5BA1\u6279\u5904\u7406\u5931\u8D25\u3002",this.#l.error?.("[dsh-dingtalk] failed to process an approval reply",B))}).finally(()=>{this.#C.delete(o),this.#p.delete(E)}),this.#p.add(E),E}if(A&&A.actor!==i)return this.#d(r,o,i,e);if(A?.submitting||A?.claimedReplyMessageId)return this.#d(r,o,i,e);if(A){Ane(r,A,i)&&(A.claimedReplyMessageId=o);let B=(A.queue??Promise.resolve()).catch(()=>{}).then(()=>this.#Q(r,o,i,e,A)).finally(()=>{this.#C.delete(o),A.claimedReplyMessageId===o&&(A.claimedReplyMessageId=null),A.queue===B&&(A.queue=null)});return A.queue=B,B}return this.#d(r,o,i,e)}#d(r,o,i,e,{releaseMessageId:a=!0,alreadyRecorded:A=!1}={}){let s=(this.#i.get(e)??Promise.resolve()).catch(()=>{}).then(()=>this.#u(r,o,i,e,{alreadyRecorded:A})).finally(()=>{a&&this.#C.delete(o),this.#i.get(e)===s&&this.#i.delete(e)});return this.#i.set(e,s),s}async waitForIdle(){await Promise.allSettled([...this.#i.values(),...[...this.#c.values()].flatMap(r=>r.queue?[r.queue]:[]),...this.#p,...this.#h])}async#B(r,o,i,e,a,A){if(this.#a?.throwIfAborted(),this.#n.hasSeen(o))return;await this.#n.markSeen(o),hi(this.#o,"messagesReceived"),this.#o.lastMessageAt=new Date().toISOString();let t=await A(Ft(a.content)??"",this.#t,this.#n,i,{signal:this.#a,hasImages:Ir(a),pendingInteraction:this.#c.has(i)||this.#E.hasPending(i),control:{owner:this,key:i}});t?.stopped&&await Promise.allSettled([this.#M(i),this.#E.closeRoute(i)]);for(let s of t?.messages??[t?.message])s&&await this.#O(e,s);this.#o.lastError=null}async#u(r,o,i,e,{alreadyRecorded:a=!1}={}){if(this.#a?.throwIfAborted(),!a){if(this.#n.hasSeen(o))return;await this.#n.markSeen(o),hi(this.#o,"messagesReceived"),this.#o.lastMessageAt=new Date().toISOString()}if(String(r.conversationType)==="2"&&r.isInAtList!==!0){hi(this.#o,"messagesIgnored");return}let A;try{A=ac(r.sessionWebhook)}catch{hi(this.#o,"messagesRejected"),this.#o.lastRejectedAt=new Date().toISOString(),this.#o.lastError="\u9489\u9489\u6D88\u606F\u6CA1\u6709\u5B89\u5168\u7684\u56DE\u590D\u5730\u5740\u3002";return}let t=R2(r,{api:this.#e,clientId:this.#A,clientSecret:this.#r}),s=t.content,g=Ir(t),c=String(r?.msgtype).toLowerCase()==="text",I=null,E=!1;try{if(!s&&!g){await this.#O(A,"\u76EE\u524D\u652F\u6301\u6587\u5B57\u548C\u56FE\u7247\u6D88\u606F\u3002");return}let B=s.toLowerCase();if(c&&!g&&B==="/help"){await this.#O(A,Joe);return}if(c&&!g&&B==="/status"){await this.#t.ensureRunning({signal:this.#a}),await this.#O(A,"\u9489\u9489\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002");return}if(c&&!g&&B==="/new"){await this.#n.clearSession(e),await this.#O(A,"\u5DF2\u5F00\u542F\u65B0\u4F1A\u8BDD\u3002\u8BF7\u53D1\u9001\u4F60\u7684\u95EE\u9898\u3002");return}let f=c&&!g?await Ki(s,this.#t,e):null;if(f){for(let _ of f.messages??[f.message])await this.#O(A,_);return}let Q=c&&!g?await Ui(s,this.#t,this.#n,e,{signal:this.#a}):null;if(Q){await this.#O(A,Q.message);return}let y=g?await Fi(t,{signal:this.#a}):void 0;typeof this.#e.createAiCard=="function"&&typeof this.#e.updateAiCard=="function"&&typeof this.#e.finishAiCard=="function"&&(I=a2({api:this.#e,clientId:this.#A,clientSecret:this.#r,target:$oe(r,i),signal:this.#a,logger:this.#l}),E=await I.start(joe));let{answer:m}=await qa({harness:this.#t,state:this.#n,key:e,...g?{content:y}:{text:s},createOptions:{signal:this.#a},existsOptions:{signal:this.#a},askOptions:{timeoutMs:this.#s,signal:this.#a,control:{owner:this,key:e},onUpdate:E?_=>I.push(ene(_)):void 0,onInteraction:_=>this.#m(_,{key:e,actor:i,sessionWebhook:A,requiresMention:String(r.conversationType)==="2"}),onInteractionResolved:_=>this.#f(_)}});E&&await I.finish(m)||await this.#O(A,m),hi(this.#o,"messagesReplied"),this.#o.lastReplyAt=new Date().toISOString(),this.#o.lastError=null}catch(B){if(B?.code==="turn-stopped"){E&&await I.finish("\u5DF2\u505C\u6B62\u3002").catch(()=>{});return}if(this.#a?.aborted)return;this.#o.lastError="\u9489\u9489\u6D88\u606F\u5904\u7406\u5931\u8D25\u3002",this.#l.error?.("[dsh-dingtalk] failed to process an inbound message",N2(B));try{let f=qoe(B)??_2;E&&await I.finish(f)||await this.#O(A,f)}catch{this.#l.error?.("[dsh-dingtalk] failed to send the safe error reply")}}finally{await this.#M(e),await this.#E.closeRoute(e)}}async#Q(r,o,i,e,a){this.#a?.throwIfAborted();let A=this.#c.get(e),t=a.claimedReplyMessageId===o;if(!A||A!==a||A.submitting)return t&&(!A||A!==a)?this.#D(r,o):this.#d(r,o,i,e,{releaseMessageId:!1});if(this.#n.hasSeen(o))return;if(await this.#n.markSeen(o),hi(this.#o,"messagesReceived"),this.#o.lastMessageAt=new Date().toISOString(),String(r.conversationType)==="2"&&r.isInAtList!==!0){hi(this.#o,"messagesIgnored");return}let s;try{s=ac(r.sessionWebhook)}catch{hi(this.#o,"messagesRejected"),this.#o.lastRejectedAt=new Date().toISOString(),this.#o.lastError="\u9489\u9489\u6D88\u606F\u6CA1\u6709\u5B89\u5168\u7684\u56DE\u590D\u5730\u5740\u3002";return}let g=r?.msgtype==="text"?Ft(r?.text?.content):null;if(!g){try{await this.#O(s,"\u8BF7\u7528\u6587\u5B57\u56DE\u7B54\u5F53\u524D\u95EE\u9898\u3002")}catch{this.#l.error?.("[dsh-dingtalk] failed to reject a non-text interaction reply")}return}let c=this.#c.get(e);if(!c||c!==a||c.submitting){if(t&&(!c||c!==a)){try{await this.#O(s,OO)}catch{this.#l.error?.("[dsh-dingtalk] failed to send an expired interaction notice")}return}return this.#d(r,o,i,e,{releaseMessageId:!1,alreadyRecorded:!0})}if(c.sessionWebhook=s,c.needsPresentation){try{await this.#y(c)}catch{this.#o.lastError="\u9489\u9489\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002",this.#l.error?.("[dsh-dingtalk] failed to retry an interaction question"),c.interaction.reconnect?.()}return}let I=c.questions[c.index];if(I){if(c.answers.push(xa(I,g)),c.index+=1,c.indexthis.#O(e,c)})||r?.kind!=="question")return;let A=r?.payload?.questions,t=typeof r?.interactionId=="string"?r.interactionId:r?.rpcId;if(typeof r.rpcId!="string"||typeof t!="string"||typeof r.sessionId!="string"||!Array.isArray(A)||A.length===0||A.some(c=>!Ka(c))){this.#l.warn?.("[dsh-dingtalk] ignored an invalid Harness question interaction");return}if(r.recovered===!0){await r.respond({ok:!1,error:{code:"cancelled",message:"DingTalk safely cancelled an interaction left by an earlier client.",details:{}}});try{await this.#O(e,"\u68C0\u6D4B\u5230\u8FD9\u4E2A Session \u4E2D\u9057\u7559\u7684\u5F85\u56DE\u7B54\u95EE\u9898\uFF0C\u5DF2\u5B89\u5168\u53D6\u6D88\u5E76\u7EE7\u7EED\u5904\u7406\u4F60\u521A\u624D\u7684\u6D88\u606F\u3002")}catch{this.#l.error?.("[dsh-dingtalk] failed to send an interaction recovery notice")}return}let s=this.#c.get(o);if(s?.interactionId===t){s.interaction=r,s.needsPresentation&&await this.#y(s);return}if(this.#g.has(t))return;if(s){this.#l.warn?.("[dsh-dingtalk] cancelled a second pending Harness question"),await r.respond({ok:!1,error:{code:"cancelled",message:"DingTalk is already handling another user interaction.",details:{}}});return}let g={kind:"question",interactionId:t,sessionId:r.sessionId,interaction:r,actor:i,requiresMention:a,questions:A,answers:[],index:0,sessionWebhook:e,queue:null,claimedReplyMessageId:null,submitting:!1,needsPresentation:!0};this.#c.set(o,g),this.#g.set(g.interactionId,o),await this.#y(g)}async#f(r){if(await this.#E.handleResolved(r))return;let o=r?.interactionId;if(r?.kind!=="question"||typeof o!="string")return;let i=this.#g.get(o);i&&this.#R(i,o)}async#y(r){let o=r.questions[r.index];o&&(await this.#O(r.sessionWebhook,Ya(o,r.index,r.questions.length,{requiresMention:r.requiresMention})),r.needsPresentation=!1)}async#D(r,o){if(this.#n.hasSeen(o))return;await this.#n.markSeen(o),hi(this.#o,"messagesReceived"),this.#o.lastMessageAt=new Date().toISOString();let i;try{i=ac(r.sessionWebhook)}catch{hi(this.#o,"messagesRejected"),this.#o.lastRejectedAt=new Date().toISOString();return}try{await this.#O(i,OO)}catch{this.#l.error?.("[dsh-dingtalk] failed to send an expired interaction notice")}}#w(r,o){let i=this.#c.get(r);return!i||o!==void 0&&i.interactionId!==o?null:(this.#c.delete(r),this.#g.delete(i.interactionId),i)}#R(r,o){return this.#w(r,o)!==null}async#M(r){let o=this.#w(r);if(!(!o||o.kind!=="question"))try{await o.interaction.respond({ok:!1,error:{code:"cancelled",message:"The DingTalk interaction ended before the user answered.",details:{}}},{signal:AbortSignal.timeout(5e3)})}catch(i){i?.code!=="interaction-not-pending"&&this.#l.warn?.("[dsh-dingtalk] failed to cancel a pending Harness interaction")}}#T(){typeof this.#n.pendingSenders=="function"&&(this.#o.pendingSenders=this.#n.pendingSenders())}async#O(r,o){for(let i of A2(o,this.#I))this.#a?.throwIfAborted(),await this.#e.sendText({clientId:this.#A,clientSecret:this.#r,sessionWebhook:r,text:i,signal:this.#a})}};function AB(n){return typeof n=="string"&&n.trim()?n.trim():null}function k2(n){let r=Array.isArray(n?.approvedSenders)?n.approvedSenders:n?.approvedSenders instanceof Set?[...n.approvedSenders]:[];return new Set(r.map(o=>AB(typeof o=="string"?o:o?.staffId)).filter(Boolean))}function rne(n){return k2(n).size}function v2(n){return n?.connected===!0||n?.socket?.readyState===1}function ane(n,r){return new Promise((o,i)=>{if(r.aborted){i(r.reason);return}let e=()=>i(r.reason);r.addEventListener("abort",e,{once:!0}),Promise.resolve(n).then(a=>{r.removeEventListener("abort",e),o(a)},a=>{r.removeEventListener("abort",e),i(a)})})}async function ine(n,r,o){for(;;){if(o?.throwIfAborted(),v2(n))return;await new Promise((i,e)=>{let a=setTimeout(()=>{o?.removeEventListener("abort",A),i()},r),A=()=>{clearTimeout(a),e(o.reason??new DOMException("Aborted","AbortError"))};o?.addEventListener("abort",A,{once:!0})})}}async function one(n,r,o,i){let e=AbortSignal.timeout(r),a=AbortSignal.any([i,e]),A=!1,t=Promise.resolve().then(()=>n.connect()).finally(()=>{A=!0});try{await ane(t,a),await ine(n,o,a)}catch(s){throw a.aborted?(A||t.then(()=>n.disconnect()).catch(()=>{}),i.aborted?i.reason:new Error(`DingTalk Stream handshake timed out after ${r}ms`)):s}}async function nne({clientId:n,clientSecret:r}){let{DWClient:o,TOPIC_ROBOT:i}=await import("dingtalk-stream");return{client:new o({clientId:n,clientSecret:r,endpoint:"https://api.dingtalk.com",autoReconnect:!1,keepAlive:!0,debug:!1}),topic:i}}function sne({pendingSenders:n=[],approvedSenders:r=0}={}){return{startedAt:null,ready:!1,dingtalkStreamState:"idle",harnessReachable:!1,lastConnectedAt:null,lastCheckedAt:null,lastCallbackAt:null,authorizationMode:"sender-staff-id-approval",approvedSenderCount:r,...bO({pendingSenders:n})}}var jE=class{#e;#A;#r;#t;#n;#o;#l;#s;#I;#a;#i;#c;#g=null;#p=null;#h=null;#C=null;#E=null;#d=null;#B=new Set;constructor({config:r,clientSecret:o,harness:i,state:e,logger:a=console,replyTimeoutMs:A=6e5,maxMessageChars:t=4e3,connectTimeoutMs:s=15e3,connectPollIntervalMs:g=25,api:c=t2(),streamFactory:I=nne}){if(!r||!AB(r.clientId)||!AB(o))throw new TypeError("DingtalkRuntime requires app credentials");if(!i||!e)throw new TypeError("DingtalkRuntime requires Harness and state");if(typeof I!="function")throw new TypeError("streamFactory must be a function");this.#e=r,this.#A=o.trim(),this.#r=i,this.#t=e,this.#n=a,this.#o=A,this.#l=t,this.#s=s,this.#I=g,this.#a=c,this.#i=I,this.#c=sne({pendingSenders:this.#Q(),approvedSenders:rne(r)})}get status(){if(this.#p){let r=this.#p.status;Object.assign(this.#c,r)}else this.#c.pendingSenders=this.#Q();return structuredClone(this.#c)}pendingSender(r){return typeof this.#t.pendingSender=="function"?this.#t.pendingSender(r):null}pendingSenders(){return this.#Q()}async start(){return this.#g&&this.#c.ready?this.status:this.#C?this.#C:(this.#C=this.#u().finally(()=>{this.#C=null}),this.#C)}async#u(){await this.stop();let r=new AbortController;this.#d=r;let{signal:o}=r;this.#c.startedAt=new Date().toISOString(),this.#c.dingtalkStreamState="connecting",this.#c.lastError=null;try{if(await this.#r.ensureRunning({signal:o}),this.#c.harnessReachable=!0,typeof this.#t.removePendingSenderByStaffId=="function"){for(let A of k2(this.#e))await this.#t.removePendingSenderByStaffId(A);this.#c.pendingSenders=this.#Q()}this.#p=new eB({api:this.#a,clientId:this.#e.clientId,clientSecret:this.#A,approvedSenders:this.#e.approvedSenders,harness:this.#r,state:this.#t,status:this.#c,logger:this.#n,replyTimeoutMs:this.#o,maxMessageChars:this.#l,signal:o});let i=await this.#i({clientId:this.#e.clientId,clientSecret:this.#A});if(o.throwIfAborted(),this.#g=i?.client??i,this.#h=i?.topic??i?.TOPIC_ROBOT??"/v1.0/im/bot/messages/get",!this.#g||typeof this.#g.registerCallbackListener!="function"||typeof this.#g.connect!="function"||typeof this.#g.disconnect!="function"||typeof this.#g.socketCallBackResponse!="function")throw new TypeError("streamFactory returned an invalid DingTalk Stream client");let e=this.#g,a=this.#p;return e.registerCallbackListener(this.#h,A=>{if(this.#g!==e||this.#p!==a)return;let t=AB(A?.headers?.messageId);if(t)try{e.socketCallBackResponse(t,{success:!0})}catch{this.#n.warn?.("[dsh-dingtalk] unable to acknowledge an inbound callback")}let s=Promise.resolve().then(async()=>{if(this.#p!==a)return;let g;try{g=typeof A?.data=="string"?JSON.parse(A.data):A?.data}catch{this.#c.lastError="\u9489\u9489\u6D88\u606F\u683C\u5F0F\u65E0\u6548\u3002",this.#n.warn?.("[dsh-dingtalk] ignored an invalid callback payload");return}!g||typeof g!="object"||(this.#c.lastCallbackAt=Date.now(),await a.accept(g))}).catch(()=>{o.aborted||this.#p!==a||(this.#c.lastError="\u9489\u9489\u6D88\u606F\u5904\u7406\u5931\u8D25\u3002",this.#n.error?.("[dsh-dingtalk] callback processing failed"))}).finally(()=>this.#B.delete(s));this.#B.add(s)}),await one(e,this.#s,this.#I,o),this.#c.ready=!0,this.#c.dingtalkStreamState="connected",this.#c.lastConnectedAt=Date.now(),this.#c.lastCheckedAt=Date.now(),this.#c.lastError=null,this.#E=setInterval(()=>{let A=v2(e);this.#c.ready=A,this.#c.dingtalkStreamState=A?"connected":"reconnecting",this.#c.lastCheckedAt=Date.now(),A&&(this.#c.lastError=null)},1e3),this.#E.unref?.(),this.status}catch(i){let e=o.aborted;throw this.#c.ready=!1,this.#c.dingtalkStreamState=e?"idle":"failed",this.#c.lastError=e?null:i?.message??String(i),await this.stop({preserveError:!e}),i}}async stop({preserveError:r=!1}={}){let o=r?this.#c.lastError:null,i=this.#d;this.#d=null,i?.abort(new DOMException("DingTalk runtime stopped","AbortError")),this.#E&&clearInterval(this.#E),this.#E=null,this.#c.ready=!1;let e=this.#g;if(this.#g=null,this.#h=null,e)try{await e.disconnect()}catch{this.#n.warn?.("[dsh-dingtalk] DingTalk Stream disconnect failed")}return await Promise.allSettled([...this.#B]),this.#B.clear(),this.#p&&await this.#p.waitForIdle(),this.#p=null,this.#c.dingtalkStreamState=r?"failed":"idle",this.#c.lastError=o,this.status}async sendConnectionTest(r){return Ys({state:this.#t,text:r,channelLabel:"\u9489\u9489\u673A\u5668\u4EBA",send:async({sessionWebhook:o},i)=>{if(!this.#c.ready||!this.#d)throw new Error("DingTalk runtime is not connected");await this.#a.sendText({clientId:this.#e.clientId,clientSecret:this.#A,sessionWebhook:o,text:i,signal:this.#d.signal})}})}#Q(){return typeof this.#t.pendingSenders=="function"?this.#t.pendingSenders():[]}};import{spawn as hne}from"node:child_process";import{randomUUID as G2}from"node:crypto";import{isAbsolute as dne}from"node:path";import{isAbsolute as gne}from"node:path";var cne=256,Ine=/[\p{White_Space}\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/u,lne=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/u;function JE(n,r){let o=new Error(r);return o.code=n,o}function pne(n){if(typeof n!="string"||!n||n.length>cne||Ine.test(n))throw JE("session-id-invalid","A non-empty, safe session id is required");return n}function Ene(n,r){if(!Array.isArray(r?.items)||!Array.isArray(r?.archivedSessionIds)||r.archivedSessionIds.some(i=>typeof i!="string"||!i))throw new Error("Harness returned an invalid response for workspace.list");let o=[];for(let i of r.items){if(typeof i?.workspaceId!="string"||!i.workspaceId||typeof i.path!="string"||!gne(i.path)||!Array.isArray(i.sessionIds)||i.sessionIds.some(e=>typeof e!="string"||!e))throw new Error("Harness returned an invalid response for workspace.list");for(let e of i.sessionIds)e===n&&o.push(i)}if(o.length===0)throw JE("session-not-registered","The session is not registered to a Harness workspace");if(o.length!==1)throw JE("session-workspace-ambiguous","The session is registered to more than one Harness workspace");if(lne.test(o[0].path))throw new Error("Harness returned an unsafe workspace path for the session");return{workspace:o[0],archived:r.archivedSessionIds.includes(n)}}function Cne(n,r){if(!Array.isArray(r?.items)||r.items.some(a=>typeof a?.sessionId!="string"||!a.sessionId))throw new Error("Harness returned an invalid response for session.list");let o=r.items.filter(a=>a.sessionId===n);if(o.length===0)throw JE("session-summary-unavailable","The session is no longer available from Harness");if(o.length!==1)throw new Error("Harness returned duplicate session summaries for session.list");let[i]=o;if(i.origin==="subagent")throw JE("session-subagent-unsupported","Subagent sessions cannot be adopted as a bot conversation");if(i.origin!==void 0)throw new Error("Harness returned an invalid session origin for session.list");let e=i.projections?.values?.title;if(e!=null&&typeof e!="string")throw new Error("Harness returned an invalid session title for session.list");return{title:typeof e=="string"?e:null}}async function P2(n,r,o={},i=3e4){let e=pne(r);await n.ensureRunning(o);let a=await n.rpc("workspace.list",{},i,o),{workspace:A,archived:t}=Ene(e,a),s=Cne(e,await n.rpc("session.list",{},i,o)),g=await n.rpc("session.create",{workspaceId:A.workspaceId,sessionId:e},i,o);if(!g||g.sessionId!==e)throw new Error("Harness returned an invalid response for session.create");return{sessionId:e,workspace:A.path,title:s.title,archived:t}}var F2=new Map,une=64;async function Bne(n){let r=n?.body;if(!r||typeof r.getReader!="function")return null;let o=r.getReader(),i=[],e=0;try{for(;;){let{done:t,value:s}=await o.read();if(t)break;if(!(s instanceof Uint8Array)||e+s.byteLength>une)return null;i.push(s),e+=s.byteLength}}catch{return null}finally{try{await o.cancel()}catch{}}let a=new Uint8Array(e),A=0;for(let t of i)a.set(t,A),A+=t.byteLength;return new TextDecoder().decode(a)}async function fne(n){return n.status===401?"harness-auth-required":n.status===403?(await Bne(n))?.trim()==="forbidden"?"harness-host-untrusted":"harness-request-forbidden":n.status===404?"harness-api-not-found":"harness-http-failed"}function Qne(n){let r=F2.get(n);return r||(r={ownerships:new Map,claims:new Map,controls:new WeakMap,nextOrder:0},F2.set(n,r)),r}function L2(n){let r=typeof n?.owner;return r!=="object"&&r!=="function"||n.owner===null||typeof n.key!="string"||!n.key?null:{owner:n.owner,key:n.key}}function MO(n){return n!==null&&typeof n=="object"&&typeof n.provider=="string"&&!!n.provider&&typeof n.model=="string"&&!!n.model&&(n.reasoningEffort===void 0||typeof n.reasoningEffort=="string")}function U2(n,r,{session:o=!1}={}){if(!n||typeof n!="object"||!Array.isArray(n.groups)||!Array.isArray(n.failures))throw new Error(`Harness returned an invalid response for ${r}`);for(let i of n.groups){if(!i||typeof i!="object"||typeof i.id!="string"||!i.id||typeof i.name!="string"||!i.name||!Array.isArray(i.models))throw new Error(`Harness returned an invalid response for ${r}`);for(let e of i.models)if(!e||typeof e!="object"||typeof e.id!="string"||!e.id||typeof e.name!="string"||!e.name)throw new Error(`Harness returned an invalid response for ${r}`)}for(let i of n.failures)if(!i||typeof i!="object"||typeof i.id!="string"||!i.id||typeof i.name!="string"||!i.name||i.message!==void 0&&typeof i.message!="string")throw new Error(`Harness returned an invalid response for ${r}`);if(o&&(!MO(n.current)||typeof n.routable!="boolean"))throw new Error(`Harness returned an invalid response for ${r}`);return n}function H2(){let n=new Error("Harness turn was stopped before producing a text reply");return n.code="turn-stopped",n}function yne(n){return Array.isArray(n?.items)?n.items.flatMap(r=>typeof r?.path=="string"&&dne(r.path)?[r.path]:[]):[]}function mne(n,r){if(!Array.isArray(r?.items)||!Array.isArray(r?.archivedSessionIds))throw new Error("Harness returned an invalid response for workspace.list");let o=r.items.find(i=>i?.path===n);if(!o)return null;if(!Array.isArray(o.sessionIds)||o.sessionIds.some(i=>typeof i!="string"))throw new Error("Harness returned invalid session IDs for workspace.list");return o}function Sne(n){if(typeof n=="number"&&Number.isFinite(n))return n<1e12?n*1e3:n;if(typeof n=="string"&&n){let r=Date.parse(n);if(!Number.isNaN(r))return r}return null}function Dne(n){if(!n||typeof n!="object")return null;let r=[n?.header?.lastActivityAt,n?.header?.updatedAt,n?.header?.createdAt,n?.projections?.values?.lastActivityAt,n?.projections?.values?.updatedAt,n?.projections?.values?.createdAt,n?.lastActivityAt,n?.updatedAt,n?.createdAt];for(let o of r){let i=Sne(o);if(i!==null)return i}return null}function wne(n,r,o){if(!Array.isArray(o?.items))throw new Error("Harness returned an invalid response for session.list");let i=new Set(r),e=new Map(o.items.flatMap(a=>typeof a?.sessionId=="string"?[[a.sessionId,a]]:[]));return{workspace:n.path,sessions:n.sessionIds.map(a=>{let A=e.get(a),t=A?.projections?.values?.title,s={sessionId:a,title:typeof t=="string"?t:null,archived:i.has(a),blank:A?.blank===!0,origin:A?.origin==="subagent"?"subagent":null,summaryAvailable:A!==void 0},g=Dne(A);return g!==null&&(s.time=g),s})}}function qE(n,r){return new Promise((o,i)=>{if(r?.aborted){i(r.reason??new DOMException("Aborted","AbortError"));return}let e=setTimeout(()=>{r?.removeEventListener("abort",a),o()},n),a=()=>{clearTimeout(e),i(r.reason??new DOMException("Aborted","AbortError"))};r?.addEventListener("abort",a,{once:!0})})}function One(n){return(n?.data?.message?.content??[]).filter(r=>r.type==="text"&&typeof r.text=="string").map(r=>r.text).join(` +`).trim()}function bne(n,r){let o=[...r].map(i=>i?.event??i).filter(Boolean).sort((i,e)=>(i.seq??-1)-(e.seq??-1));for(let i of o){let e=i.seq??-1;if(e<=n.lastSeq)continue;if(n.lastSeq=e,i.type==="turn/start"){let A=i.data?.turn??null;n.active&&A!==n.turn&&(n.active=!1),n.turn!==null&&A!==n.turn&&(n.completed=!0),n.openTurn=A;continue}if(i.type==="user/message"&&i.data?.source?.rpcId===n.promptRpcId){n.active=!0,n.started=!0,n.completed=!1,n.turn=i.data?.turn??n.openTurn;continue}if(i.type==="turn/end"&&i.data?.turn===n.turn){n.active=!1,n.completed=!0;continue}let a=null;if(i.type==="tool/call"&&n.active&&i.data?.turn===n.turn&&typeof i.data?.callId=="string"&&i.data.callId)a={callId:i.data.callId,name:i.data?.name,arguments:i.data?.arguments};else if(i.type==="tool/code-dispatch-start"&&n.active&&typeof i.data?.subCallId=="string"&&i.data.subCallId){let A;try{A=JSON.stringify(i.data?.arguments)}catch{A=void 0}a={callId:i.data.subCallId,name:i.data?.name,arguments:A}}a&&n.toolCalls.set(a.callId,Object.freeze(a))}}var qI=class{#e;#A;#r=null;#t=null;#n=new Map;#o="";#l=!1;#s=null;constructor({promptRpcId:r,afterSeq:o=-1}){this.#e=r,this.#A=o}get finished(){return this.#l}get answer(){return this.#o.trim()}get reason(){return this.#s}get tracking(){return this.#t!==null&&!this.#l}get turn(){return this.#t}consume(r){let o=null,i=[...r].map(e=>e?.event??e).filter(Boolean).sort((e,a)=>(e.seq??-1)-(a.seq??-1));for(let e of i){let a=e.seq??-1;if(!(a<=this.#A)){if(this.#A=a,e.type==="turn/start"&&(this.#r=e.data?.turn??null),e.type==="user/message"&&e.data?.source?.rpcId===this.#e){this.#t=this.#r;continue}if(this.#t!==null){if(e.type==="turn/end"){if(e.data?.turn!==this.#t)continue;this.#l=!0,this.#s=e.data?.reason??null,this.#r=null;continue}if(e.data?.turn===this.#t){if(e.type==="assistant/chunk"&&e.data?.chunk?.type==="text-delta"){let A=e.data?.step??0,t=e.data.chunk.index??0,s=`${A}:${t}`;this.#n.set(s,(this.#n.get(s)??"")+e.data.chunk.text);let g=`${A}:`,c=[...this.#n.entries()].filter(([I])=>I.startsWith(g)).sort(([I],[E])=>Number(I.split(":")[1])-Number(E.split(":")[1])).map(([,I])=>I).join(` +`).trim();c&&c!==this.#o&&(this.#o=c,o={type:"text",text:c});continue}if(e.type==="assistant/message"){let A=One(e);A&&A!==this.#o&&(this.#o=A,o={type:"text",text:A});continue}e.type==="tool/call"?o={type:"tool",name:e.data?.name??"\u5DE5\u5177"}:e.type==="tool/result"&&(o={type:"status",text:"\u6B63\u5728\u6574\u7406\u7ED3\u679C\u2026"})}}}}return o}},Oo=class extends Error{constructor(r,o){super(`${r}: ${o?.message??"unknown Harness RPC error"}`),this.name="HarnessRpcError",this.method=r,this.code=o?.code??"internal",this.details=o?.details??{}}},Js=class extends Error{constructor(r,o,{cause:i,status:e}={}){let a=Number.isInteger(e)?`, HTTP ${e}`:"";super(`Harness ${o} transport failed (${r}${a})`,{cause:i}),this.name="HarnessTransportError",this.code=r,this.method=o,Number.isInteger(e)&&(this.status=e)}},_O=class extends Error{constructor(r){super("Harness health RPC was rejected",{cause:r}),this.name="HarnessHealthError",this.code="harness-rpc-rejected",this.method="host.describe"}},VI=class extends Error{constructor(r,o){super(o),this.name="HarnessInteractionError",this.code=r}},rr=class{#e;#A;#r;#t;#n;#o;#l;#s;#I;#a;#i;#c;#g;#p=null;#h;#C;#E;#d;constructor({baseUrl:r,workspace:o,agentPreset:i,autostart:e=!1,dshBin:a="dsh",fetchImpl:A=fetch,createWebSocket:t=f=>new WebSocket(f),interactionReconnectDelayMs:s=500,rpcIdPrefix:g="im",logPrefix:c="dsh-im",commandExecutor:I,controlExecutor:E,sessionMaintenanceExecutor:B}){if(typeof t!="function")throw new TypeError("createWebSocket must be a function");if(!Number.isFinite(s)||s<0)throw new TypeError("interactionReconnectDelayMs must be a non-negative number");if(typeof g!="string"||!g.trim())throw new TypeError("rpcIdPrefix must be a non-empty string");if(typeof c!="string"||!c.trim())throw new TypeError("logPrefix must be a non-empty string");if(I!==void 0&&typeof I!="function")throw new TypeError("commandExecutor must be a function");if(E!==void 0&&typeof E!="function")throw new TypeError("controlExecutor must be a function");if(B!==void 0&&typeof B!="function")throw new TypeError("sessionMaintenanceExecutor must be a function");this.#e=new URL(r),this.#A=o,this.#r=i??void 0,this.#t=e,this.#n=a,this.#o=A,this.#l=t,this.#s=s,this.#I=g.trim(),this.#a=c.trim(),this.#i=I,this.#c=E,this.#g=B,this.#h=Qne(this.#e.origin),this.#C=this.#h.ownerships,this.#E=this.#h.claims,this.#d=this.#h.controls}async rpc(r,o={},i=3e4,e={}){let a=e.rpcId??`${this.#I}-${G2()}`,A=AbortSignal.timeout(i),t=e.signal?AbortSignal.any([e.signal,A]):A,s;try{s=await this.#o(new URL(`/api/${r}`,this.#e),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({type:"client-request",rpcId:a,method:r,payload:o}),signal:t})}catch(c){throw e.signal?.aborted?c:new Js(A.aborted?"harness-timeout":"harness-connect-failed",r,{cause:c})}if(!s.ok){let c=await fne(s);throw new Js(c,r,{status:s.status})}let g;try{g=await s.json()}catch(c){throw new Js("harness-response-invalid",r,{cause:c})}if(g?.type!=="server-response"||g?.rpcId!==a)throw new Js("harness-response-invalid",r,{cause:new Error(`Harness returned an invalid response for ${r}`)});if(!g.result||typeof g.result!="object"||typeof g.result.ok!="boolean")throw new Js("harness-response-invalid",r,{cause:new Error(`Harness returned an invalid result for ${r}`)});if(!g.result?.ok)throw new Oo(r,g.result?.error);return g.result.value}async health(r={}){try{return await this.rpc("host.describe",{},5e3,r),!0}catch(o){throw o instanceof Oo?new _O(o):o}}async ensureRunning(r={}){try{return await this.health(r)}catch(e){if(!this.#t)throw e}if(!this.#p||this.#p.exitCode!==null){let e=this.#e.port||(this.#e.protocol==="https:"?"443":"80");this.#p=hne(this.#n,["web","--host",this.#e.hostname,"--port",e],{cwd:this.#A,env:process.env,stdio:["ignore","inherit","inherit"]}),this.#p.on("error",a=>{console.error(`[${this.#a}] failed to start Harness:`,a.message)})}let o=Date.now()+6e4,i;for(;Date.now(){let t=A&&i.signal?AbortSignal.any([A,i.signal]):A??i.signal;return this.rpc("session.selectModel",{sessionId:r,provider:o.provider,model:o.model},3e4,t?{...i,signal:t}:i)},a=this.#g?await this.#g({sessionId:r,operation:e}):await e();if(!a||typeof a!="object"||!MO(a.selected))throw new Error("Harness returned an invalid response for session.selectModel");return a}async isSessionRunning(r,o={}){if(typeof r!="string"||!r)throw new TypeError("sessionId is required");await this.ensureRunning(o);let i=await this.rpc("session.list",{},3e4,o);if(!i||typeof i!="object"||!Array.isArray(i.items))throw new Error("Harness returned an invalid response for session.list");for(let e of i.items)if(!e||typeof e!="object"||typeof e.sessionId!="string"||!e.sessionId||typeof e.running!="boolean")throw new Error("Harness returned an invalid response for session.list");return i.items.find(e=>e.sessionId===r)?.running??!1}async adoptWorkspaceSession(r,o={}){return P2(this,r,o)}async workspaceId(r={}){let{workspace:o=this.#A,...i}=r,{items:e}=await this.rpc("workspace.list",{},3e4,i),a=e.find(t=>t.path===o);return a?a.workspaceId:(await this.rpc("workspace.create",{path:o},3e4,i)).workspace.workspaceId}async createSession(r={}){let{agentPreset:o,...i}=r;await this.ensureRunning(i);let a={workspaceId:await this.workspaceId(i)},A=o!==void 0?o:this.#r;return A!=null&&(a.agentPreset=A),(await this.rpc("session.create",a,3e4,i)).sessionId}async executeCommand(r,o,i={}){if(typeof r!="string"||!r)throw new TypeError("sessionId is required");if(typeof o!="string"||!o)throw new TypeError("command line is required");if(!this.#i){let e=new Error("Harness command execution is unavailable");throw e.code="commands-unavailable",e}try{return await this.#i(r,o,i)}catch(e){throw e?.failure&&typeof e.failure=="object"?new Oo("commands.execute",e.failure):e}}async sessionExists(r,o={}){try{return await this.rpc("session.history",{sessionId:r,maxMessages:1},3e4,o),!0}catch(i){if(i instanceof Oo&&i.code==="session-not-found")return!1;throw i}}async respondInteraction(r,o,i={}){if(typeof r!="string"||!r)throw new TypeError("rpcId is required");if(!o||typeof o!="object"||typeof o.ok!="boolean")throw new TypeError("A Harness RPC result is required");let e=AbortSignal.timeout(i.timeoutMs??3e4),a=i.signal?AbortSignal.any([i.signal,e]):e,A=await this.#o(new URL("/api/respond",this.#e),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({type:"client-response",rpcId:r,result:o}),signal:a});if(!A.ok)throw new Error(`Harness transport respond failed: HTTP ${A.status}`);let t=await A.json();if(t?.accepted===!0)return t;if(t?.accepted!==!1||t.reason!=="bad-response"&&t.reason!=="not-pending")throw new Error("Harness returned an invalid interaction response receipt");let s=t.reason;throw new VI(`interaction-${s}`,`Harness interaction response was rejected (${s})`)}async watchInteractions(r,{signal:o,onInteraction:i,onResolved:e,onOpen:a,ownership:A}={}){if(typeof r!="string"||!r)throw new TypeError("sessionId is required");if(!o||typeof o.addEventListener!="function")throw new TypeError("watchInteractions requires an AbortSignal");if(i!==void 0&&typeof i!="function")throw new TypeError("onInteraction must be a function");if(e!==void 0&&typeof e!="function")throw new TypeError("onResolved must be a function");if(a!==void 0&&typeof a!="function")throw new TypeError("onOpen must be a function");for(;!o.aborted;){try{await this.#T(r,{signal:o,onInteraction:i,onResolved:e,onOpen:a,ownership:A})}catch(t){if(o.aborted)return;console.warn(`[${this.#a}] Harness interaction stream disconnected:`,t.message)}if(o.aborted)return;try{await qE(this.#s,o)}catch{if(o.aborted)return;throw new Error("Harness interaction reconnect wait failed")}}}#B(r,o){let i=this.#C.get(r)??new Set;o.order=this.#h.nextOrder,this.#h.nextOrder+=1,i.add(o),this.#C.set(r,i)}#u(r,o){let i=this.#C.get(r);i?.delete(o),i?.size===0&&this.#C.delete(r);for(let[e,a]of this.#E)a.ownership===o&&this.#E.delete(e)}#Q(r){if(!r.control)return;let o=this.#d.get(r.control.owner);o||(o=new Map,this.#d.set(r.control.owner,o));let i=o.get(r.control.key)??new Set;i.add(r),o.set(r.control.key,i)}#m(r){if(!r.control)return;let o=this.#d.get(r.control.owner),i=o?.get(r.control.key);i?.delete(r),i?.size===0&&o.delete(r.control.key),o?.size===0&&this.#d.delete(r.control.owner)}#f(r,o){let i=L2(o);return i?[...this.#d.get(i.owner)?.get(i.key)??[]].filter(a=>a.sessionId===r).sort((a,A)=>a.order-A.order):[]}#y(r,o){return this.#f(r,o).find(i=>i.started&&i.active&&!i.completed&&i.turn!==null)??null}async#D(r,o,i){let e=this.#f(r,o);if(e.length===0)return null;try{let a=await this.rpc("session.history",{sessionId:r,maxMessages:50},3e4,i);this.#w(r,a.events??[])}catch(a){if(!(a instanceof Oo)||a.code!=="session-not-found")throw a;for(let A of e)A.active=!1,A.completed=!0;return null}return this.#y(r,o)}async hasActiveTurn(r,o,i={}){if(typeof r!="string"||!r)throw new TypeError("sessionId is required");return!!await this.#D(r,o,i)}async stopActiveTurn(r,o,i={}){if(typeof r!="string"||!r)throw new TypeError("sessionId is required");let e=await this.#D(r,o,i);if(!e)return!1;if(e.stopRequested)return!0;if(this.#y(r,o)!==e)return!1;e.stopRequested=!0;try{if(this.#c){let a=this.#c({sessionId:r,expectedTurn:e.turn,promptRpcId:e.promptRpcId,action:"stop"});if(a&&typeof a.then=="function")throw new TypeError("controlExecutor must return synchronously");if(a!==void 0){if(typeof a!="boolean")throw new TypeError("controlExecutor must return a boolean or undefined");return a||(e.stopRequested=!1),a}}return await this.rpc("session.cancel",{sessionId:r,keepInbox:!0},3e4,i),!0}catch(a){if(this.#y(r,o)===e&&(e.stopRequested=!1),a instanceof Oo&&a.code==="session-not-found")return!1;throw a}}async steerActiveTurn(r,o,i,e={}){if(typeof r!="string"||!r)throw new TypeError("sessionId is required");if(typeof o!="string"||!o.trim())throw new TypeError("Steering text is required");let a=await this.#D(r,i,e);if(!a||a.stopRequested||this.#y(r,i)!==a)return!1;if(this.#c){let A=this.#c({sessionId:r,expectedTurn:a.turn,promptRpcId:a.promptRpcId,action:"steer",text:o});if(A&&typeof A.then=="function")throw new TypeError("controlExecutor must return synchronously");if(A!==void 0){if(typeof A!="boolean")throw new TypeError("controlExecutor must return a boolean or undefined");return A}}return await this.rpc("session.prompt",{sessionId:r,mode:"steer",content:[{type:"text",text:o}],clientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone},3e4,e),!0}#w(r,o){for(let i of this.#C.get(r)??[])bne(i,o)}async#R(r,o){let i=await this.rpc("session.history",{sessionId:r,maxMessages:50},3e4,{signal:o});this.#w(r,i.events??[])}#M(r,o,i){let e=this.#E.get(o);if(e&&this.#C.get(r)?.has(e.ownership))return e;let a=[...this.#C.get(r)??[]],A=a.filter(s=>s.active).sort((s,g)=>s.order-g.order);if(A.length>0)return{ownership:A[0],recovered:!1};let t=a.filter(s=>!s.started&&!s.completed).sort((s,g)=>s.order-g.order)[0]??null;return t?{ownership:t,recovered:!0}:null}async ask(r,o,i={}){typeof i=="number"&&(i={timeoutMs:i});let e=i.timeoutMs??6e5,a=i.signal,A=typeof i.onUpdate=="function"?i.onUpdate:null,t=typeof i.onInteraction=="function"?i.onInteraction:void 0,s=typeof i.onInteractionResolved=="function"?i.onInteractionResolved:void 0,g=L2(i.control);await this.ensureRunning({signal:a});let c=await this.rpc("session.history",{sessionId:r,maxMessages:1},3e4,{signal:a}),I=Math.max(-1,...(c.events??[]).map(({event:T})=>T.seq??-1)),E=`${this.#I}-${G2()}`,B=new qI({promptRpcId:E,afterSeq:I}),f=t||s?new AbortController:null,Q=f?a?AbortSignal.any([a,f.signal]):f.signal:null,y=f||g?{sessionId:r,promptRpcId:E,active:!1,started:!1,completed:!1,stopRequested:!1,turn:null,openTurn:null,lastSeq:I,reconnect:null,order:-1,toolCalls:new Map,control:g}:null,m=null;y&&(this.#B(r,y),this.#Q(y));try{if(Q){let _,P=new Promise(Y=>{_=Y});m=this.watchInteractions(r,{signal:Q,onInteraction:t,onResolved:s,onOpen:_,ownership:y}),m.catch(()=>{}),await Promise.race([P,qE(3e4,Q).then(()=>{throw new Error("Harness interaction stream did not open within 30 seconds")})])}let T=typeof o=="string"?[{type:"text",text:o}]:o;if(!Array.isArray(T)||T.length===0)throw new TypeError("Harness prompt content is required");await this.rpc("session.prompt",{sessionId:r,mode:"queue",content:T,clientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone},3e4,{rpcId:E,signal:a});try{let _=Date.now()+e;for(;Date.now()<_;){await qE(300,a);let P=await this.rpc("session.history",{sessionId:r,maxMessages:50},3e4,{signal:a}),Y=y?.active===!0;y&&(this.#w(r,P.events??[]),!Y&&y.active&&y.reconnect?.());let j=B.consume(P.events??[]);if(j&&A)try{await A(j)}catch(K){console.warn(`[${this.#a}] ignored a progress update failure:`,K.message)}if(B.finished){if(B.answer)return B.answer;throw y?.stopRequested?H2():new Error(`Harness turn ended without a text reply${B.reason?` (${JSON.stringify(B.reason)})`:""}`)}}throw new Error(`Harness reply timed out after ${Math.round(e/1e3)} seconds`)}catch(_){if(!y?.stopRequested)throw _;if(B.answer)return B.answer;throw _?.code==="turn-stopped"?_:H2()}}finally{y&&(this.#m(y),this.#u(r,y)),f?.abort(new DOMException("Harness turn finished","AbortError")),m&&await m.catch(()=>{})}}#T(r,{signal:o,onInteraction:i,onResolved:e,onOpen:a,ownership:A}){let t=new URL("/api/events.mux",this.#e);return t.protocol=t.protocol==="https:"?"wss:":"ws:",new Promise((s,g)=>{let c;try{c=this.#l(t.toString())}catch(H){g(H);return}let I=!1,E=!1,B=null,f=Promise.resolve(),Q=A==null,y=[],m=H=>{if(!E){if(E=!0,c.removeEventListener("open",_),c.removeEventListener("message",j),c.removeEventListener("close",K),c.removeEventListener("error",q),o.removeEventListener("abort",V),A?.reconnect===T&&(A.reconnect=null),o.aborted){s();return}f.then(()=>{let v=H??B;v?g(v):s()},g)}},T=()=>{try{(c.readyState===0||c.readyState===1)&&c.close()}catch{}},_=()=>{I=!0,A&&(A.reconnect=T);try{a?.()}catch(H){console.warn(`[${this.#a}] ignored an interaction open callback failure:`,H.message)}A&&this.#R(r,o).then(()=>{if(!E){Q=!0;for(let H of y.splice(0))Y(H)}}).catch(H=>{B??=H,T(),m(H)})},P=(H,v)=>{H&&(f=f.then(()=>H(v)).catch(Z=>{B??=Z,T(),m(B)}))},Y=H=>{let v=H.payload;if(A&&v.type==="session/event"){this.#w(r,[v.event]);return}if(v.type==="question/requested"||v.type==="approval/requested"){let Z=v.type==="question/requested"?"question":"approval",U=Z==="question"?H.rpcId:v.approvalId,M=`${Z}:${U}`;if(A){let te=this.#M(r,M,Z);if(te?.ownership!==A)return;this.#E.set(M,te)}let G=Z==="approval"&&A&&typeof v.callId=="string"?this.#E.get(M)?.ownership.toolCalls.get(v.callId):void 0;P(i,Object.freeze({kind:Z,interactionId:U,rpcId:H.rpcId,sessionId:r,payload:v,recovered:A?this.#E.get(M)?.recovered===!0:!1,...G?{toolCall:G}:{},reconnect:T,respond:(te,Be={})=>this.respondInteraction(H.rpcId,te,{...Be,signal:Be.signal??o})}));return}if(v.type==="question/resolved"||v.type==="approval/resolved"){let Z=v.type==="question/resolved"?"question":"approval",U=Z==="question"?v.questionRpcId:v.approvalId,M=`${Z}:${U}`;if(A){if(this.#E.get(M)?.ownership!==A)return;this.#E.delete(M)}P(e,Object.freeze({kind:Z,interactionId:U,sessionId:r,outcome:v.outcome,payload:v}))}},j=H=>{try{if(typeof H.data!="string")throw new Error("binary WebSocket frame");let v=JSON.parse(H.data),Z=v?.payload;if(v?.type!=="server-request"||typeof v.rpcId!="string"||!Z||typeof Z!="object"||v.method!==Z.type)throw new Error("invalid server-request envelope");if(Z.sessionId!==r)return;Q?Y(v):y.push(v)}catch(v){console.warn(`[${this.#a}] ignored a malformed Harness interaction frame:`,v.message)}},K=()=>m(I?null:new Error("Harness interaction WebSocket closed before opening")),q=()=>{m(new Error(I?"Harness interaction WebSocket failed":"Harness interaction WebSocket failed before opening")),T()},V=()=>{T(),m()};c.addEventListener("open",_),c.addEventListener("message",j),c.addEventListener("close",K,{once:!0}),c.addEventListener("error",q,{once:!0}),o.addEventListener("abort",V,{once:!0}),o.aborted&&V()})}async watchHarnessEvents({signal:r,onSessionEvent:o,onReconnect:i}={}){if(typeof o!="function")throw new TypeError("watchHarnessEvents requires onSessionEvent");if(!r||typeof r.addEventListener!="function")throw new TypeError("watchHarnessEvents requires an AbortSignal");if(i!==void 0&&typeof i!="function")throw new TypeError("onReconnect must be a function");let e=new URL("/api/events.mux",this.#e);for(e.protocol=e.protocol==="https:"?"wss:":"ws:";!r.aborted;){try{await this.#O(e.toString(),{signal:r,onSessionEvent:o,onReconnect:i})}catch(a){if(r.aborted)return;console.warn(`[${this.#a}] Harness event mux disconnected:`,a.message)}if(r.aborted)return;try{await qE(this.#s,r)}catch{if(r.aborted)return;throw new Error("Harness event mux reconnect wait failed")}}}#O(r,{signal:o,onSessionEvent:i,onReconnect:e}){return new Promise((a,A)=>{let t;try{t=this.#l(r)}catch(m){A(m);return}let s=!1,g=!1,c=()=>{try{t.close()}catch{}},I=m=>{g||(g=!0,t.removeEventListener("open",E),t.removeEventListener("message",B),t.removeEventListener("close",f),t.removeEventListener("error",Q),o.removeEventListener("abort",y),m?A(m):a())},E=()=>{s=!0;try{e?.()}catch(m){console.warn(`[${this.#a}] mux reconnect hook failed:`,m.message)}},B=m=>{try{if(typeof m.data!="string")return;let T=JSON.parse(m.data),_=T?.payload;if(T?.type!=="server-request"||!_||typeof _!="object"||T.method!==_.type||_.type!=="session/event"||typeof _.sessionId!="string"||!_.event||typeof _.event!="object")return;i({sessionId:_.sessionId,event:_.event})}catch(T){console.warn(`[${this.#a}] ignored a malformed global mux frame:`,T.message)}},f=()=>I(s?null:new Error("Harness event mux WebSocket closed before opening")),Q=()=>{I(new Error(s?"Harness event mux WebSocket failed":"Harness event mux WebSocket failed before opening")),c()},y=()=>{c(),I()};t.addEventListener("open",E),t.addEventListener("message",B),t.addEventListener("close",f,{once:!0}),t.addEventListener("error",Q,{once:!0}),o.addEventListener("abort",y,{once:!0}),o.aborted&&y()})}stopManagedProcess(){this.#p?.exitCode===null&&this.#p.kill("SIGTERM")}};var tB=class extends rr{constructor(r){super({...r,rpcIdPrefix:"dingtalk",logPrefix:"dsh-dingtalk"})}};import{randomUUID as Mne}from"node:crypto";import{mkdir as _ne,readFile as Nne,rename as Tne,unlink as Rne,writeFile as kne}from"node:fs/promises";import{dirname as vne}from"node:path";var rB=Object.freeze({version:1,sessions:{},seenMessageIds:[],pendingSenders:{}});function ar(n){return typeof n=="string"&&n.trim()?n.trim():null}function K2(n){return(ar(n)??"\u9489\u9489\u7528\u6237").slice(0,100)}function Pne(n,r){if(!n||typeof n!="object")return null;let o=ar(n.requestId)??ar(r),i=ar(n.staffId),e=ar(n.requestedAt)??ar(n.lastSeenAt),a=ar(n.lastSeenAt)??e;return!o||!i||!e||!a?null:{requestId:o,staffId:i,displayName:K2(n.displayName??n.nick),requestedAt:e,lastSeenAt:a}}function Gne(n){if(!n||typeof n!="object")return structuredClone(rB);let r={};if(n.sessions&&typeof n.sessions=="object"&&!Array.isArray(n.sessions))for(let[e,a]of Object.entries(n.sessions)){let A=ar(e),t=ar(a);A&&t&&(r[A]=t)}let o={},i=Array.isArray(n.pendingSenders)?n.pendingSenders.map(e=>[e?.requestId,e]):Object.entries(n.pendingSenders&&typeof n.pendingSenders=="object"?n.pendingSenders:{});for(let[e,a]of i){let A=Pne(a,e);if(!A)continue;let t=Object.values(o).find(s=>s.staffId===A.staffId);(!t||t.lastSeenAtnew Date().toISOString()}={}){if(!ar(r))throw new TypeError("state path is required");if(typeof o!="function"||typeof i!="function")throw new TypeError("idFactory and now must be functions");this.#e=r,this.#t=o,this.#n=i}async load(){try{this.#A=Gne(JSON.parse(await Nne(this.#e,"utf8")))}catch(r){if(r?.code!=="ENOENT")throw r;this.#A=structuredClone(rB),await this.#o()}return this}sessionFor(r){return this.#A.sessions[r]??null}async setSession(r,o){let i=ar(r),e=ar(o);if(!i||!e)throw new TypeError("key and sessionId are required");this.#A.sessions[i]=e,await this.#o()}async clearSession(r){let o=ar(r);!o||!(o in this.#A.sessions)||(delete this.#A.sessions[o],await this.#o())}async clearSessions(){this.#A.sessions={},await this.#o()}hasSeen(r){let o=ar(r);return!!(o&&this.#A.seenMessageIds.includes(o))}async markSeen(r){let o=ar(r);if(!o)throw new TypeError("messageId is required");this.hasSeen(o)||(this.#A.seenMessageIds.push(o),this.#A.seenMessageIds.length>1e3&&this.#A.seenMessageIds.splice(0,this.#A.seenMessageIds.length-1e3),await this.#o())}pendingSenders(){return Object.values(this.#A.pendingSenders).sort((r,o)=>r.requestedAt.localeCompare(o.requestedAt)).map(r=>structuredClone(r))}pendingSender(r){let o=ar(r),i=o?this.#A.pendingSenders[o]:null;return i?structuredClone(i):null}async recordPendingSender(r,o,i){let e=r&&typeof r=="object"?r:{staffId:r,displayName:o,lastSeenAt:i},a=ar(e.staffId);if(!a)throw new TypeError("staffId is required");let A=ar(e.lastSeenAt)??ar(e.requestedAt)??this.#n(),t=Object.values(this.#A.pendingSenders).find(g=>g.staffId===a),s={requestId:t?.requestId??`ding_sender_${this.#t()}`,staffId:a,displayName:K2(e.displayName??e.nick??o),requestedAt:t?.requestedAt??A,lastSeenAt:A};return this.#A.pendingSenders[s.requestId]=s,await this.#o(),structuredClone(s)}async removePendingSender(r){let o=ar(r);return!o||!this.#A.pendingSenders[o]?!1:(delete this.#A.pendingSenders[o],await this.#o(),!0)}async removePendingSenderByStaffId(r){let o=ar(r),i=o?Object.values(this.#A.pendingSenders).find(e=>e.staffId===o):null;return i?this.removePendingSender(i.requestId):!1}snapshot(){return structuredClone(this.#A)}async remove(){await this.#r;try{await Rne(this.#e)}catch(r){if(r?.code!=="ENOENT")throw r}this.#A=structuredClone(rB)}async#o(){let r=`${JSON.stringify(this.#A,null,2)} +`,o=this.#r.then(async()=>{await _ne(vne(this.#e),{recursive:!0,mode:448});let i=`${this.#e}.tmp`;await kne(i,r,{encoding:"utf8",mode:384}),await Tne(i,this.#e)});this.#r=o.then(()=>{},()=>{}),await o}};import{mkdir as Fne,readFile as Lne,realpath as Une,rename as Hne,stat as Kne,unlink as Yne,writeFile as xne}from"node:fs/promises";import{dirname as jne,isAbsolute as j2,resolve as VE}from"node:path";var wje=Object.freeze({version:1,workspaces:Object.freeze({})});function sc(n){let r=new Error(n);return r.code=Ja,r}async function NO(n){return VE(await Une(n))}async function Jne(n,r){if(n===r)return!0;try{return await NO(n)===await NO(r)}catch{return!1}}function Va(n){if(typeof n!="string"||!/^[A-Za-z0-9_-]{1,128}$/.test(n))throw new TypeError("Invalid bot id");return n}function qne(n){if(!n||n.version!==1||!n.workspaces||typeof n.workspaces!="object"||Array.isArray(n.workspaces))return null;let r={};for(let[i,e]of Object.entries(n.workspaces)){if(!/^[A-Za-z0-9_-]{1,128}$/.test(i)||typeof e!="string"||!j2(e))return null;r[i]=VE(e)}let o={};if(n.agentPresets!==void 0){if(!n.agentPresets||typeof n.agentPresets!="object"||Array.isArray(n.agentPresets))return null;for(let[i,e]of Object.entries(n.agentPresets)){if(!/^[A-Za-z0-9_-]{1,128}$/.test(i))return null;try{let a=JI(e);if(!a)return null;o[i]=a}catch{return null}}}return{version:1,workspaces:r,agentPresets:o}}async function Y2(n){if(typeof n!="string"||!n.trim()||!j2(n.trim())){let i=new Error("\u5DE5\u4F5C\u533A\u5FC5\u987B\u662F\u7EDD\u5BF9\u8DEF\u5F84\u3002");throw i.code="workspace-not-absolute",i}let r=VE(n.trim()),o;try{o=await Kne(r)}catch(i){let e=new Error("\u5DE5\u4F5C\u533A\u8DEF\u5F84\u4E0D\u5B58\u5728\u3002",{cause:i});throw e.code="workspace-not-found",e}if(!o.isDirectory()){let i=new Error("\u5DE5\u4F5C\u533A\u8DEF\u5F84\u5FC5\u987B\u6307\u5411\u4E00\u4E2A\u76EE\u5F55\u3002");throw i.code="workspace-not-directory",i}return r}var Fr=class{#e;#A;#r={};#t={};#n=new Map;#o=1;#l=new Map;#s=1;#I=new Map;#a=new WeakMap;#i=new Set;#c=Promise.resolve();#g=new Map;constructor(r,{defaultWorkspace:o=process.cwd()}={}){if(typeof r!="string"||!r)throw new TypeError("workspace store path is required");this.#e=r,this.#A=VE(o)}async load(){try{let r=qne(JSON.parse(await Lne(this.#e,"utf8")));if(!r)throw new Error("dsh-im workspace config is invalid");this.#r=r.workspaces,this.#t=r.agentPresets}catch(r){if(r?.code!=="ENOENT")throw r;this.#r={},this.#t={}}this.#n.clear(),this.#o=1,this.#l.clear(),this.#s=1,this.#I.clear(),this.#i.clear();for(let r of Object.keys(this.#r))this.#n.set(r,this.#p()),this.#l.set(r,this.#h());return this}has(r){let o=Va(r);return Object.hasOwn(this.#r,o)&&!this.#I.has(o)}incarnationFor(r){return this.#l.get(Va(r))??null}workspaceFor(r){return this.#r[Va(r)]??this.#A}agentPresetFor(r){return this.#t[Va(r)]??null}generationFor(r){return this.#n.get(Va(r))??null}async whenIdle(){await this.#c}async whenBotIdle(r){let o=Va(r);for(;;){let i=this.#g.get(o);if(!i||(await i,this.#g.get(o)===i))return}}async ensure(r,{workspace:o=this.#A,defaultAgentPreset:i}={}){let e=Va(r),a=VE(o);return this.#d(e,async()=>{if(this.#r[e])this.#n.has(e)||this.#n.set(e,this.#p());else{let A=JI(i),t=Object.hasOwn(this.#t,e),s=this.#t[e];this.#r[e]=a,A&&(this.#t[e]=A),this.#n.set(e,this.#p()),this.#l.set(e,this.#h());try{await this.#B()}catch(g){throw delete this.#r[e],t?this.#t[e]=s:delete this.#t[e],this.#n.delete(e),this.#l.delete(e),g}}return this.#r[e]})}async setWorkspace(r,o,{clearSessions:i,incarnation:e}={}){let a=Va(r);if(!this.has(a)||e!==void 0&&e!==this.incarnationFor(a)){let t=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw t.code="workspace-bot-not-found",t}let A=await Y2(o);return this.#d(a,async()=>{if(!this.has(a)||e!==void 0&&e!==this.incarnationFor(a)){let s=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw s.code="workspace-bot-not-found",s}if(A===this.workspaceFor(a))return A;let t=this.#r[a];this.#n.set(a,this.#p()),await i?.(),this.#r[a]=A;try{await this.#B()}catch(s){throw this.#r[a]=t,s}return A})}async setAgentPreset(r,o,{incarnation:i}={}){let e=Va(r);if(!this.has(e)||i!==void 0&&i!==this.incarnationFor(e)){let A=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw A.code="workspace-bot-not-found",A}let a=JI(o);return this.#d(e,async()=>{if(!this.has(e)||i!==void 0&&i!==this.incarnationFor(e)){let t=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw t.code="workspace-bot-not-found",t}let A=this.#t[e]??null;if(A===a)return a;a?this.#t[e]=a:delete this.#t[e];try{await this.#B()}catch(t){throw A?this.#t[e]=A:delete this.#t[e],t}return a})}async bindWorkspaceSession(r,o,{conversationKey:i,sessionId:e,clearSessions:a,setSession:A,incarnation:t,expectedGeneration:s}={}){let g=Va(r);if(typeof i!="string"||!i||typeof e!="string"||!e)throw new TypeError("conversationKey and sessionId are required");if(typeof a!="function"||typeof A!="function")throw new TypeError("session state callbacks are required");if(!this.has(g)||t!==void 0&&t!==this.incarnationFor(g)){let I=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw I.code="workspace-bot-not-found",I}let c=await NO(await Y2(o));return this.#d(g,async()=>{if(!this.has(g)||t!==void 0&&t!==this.incarnationFor(g)){let I=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw I.code="workspace-bot-not-found",I}if(s!==void 0&&s!==this.generationFor(g))throw sc("The bot workspace changed before the session binding could be committed.");if(!await Jne(c,this.workspaceFor(g))){let I=this.#r[g];this.#n.set(g,this.#p()),await a(),this.#r[g]=c;try{await this.#B()}catch(E){throw this.#r[g]=I,E}}return await A(i,e),{workspace:c,sessionId:e,generation:this.#n.get(g)}})}async invalidateSessions(r,{clearSessions:o}={}){let i=Va(r);return this.#d(i,async()=>{this.#n.set(i,this.#p()),await o?.()})}async beginRemoval(r,{clearSessions:o}={}){let i=Va(r);return this.#d(i,async()=>{let e=this.#I.get(i);if(e)return e;let a=Object.freeze({});this.#I.set(i,a),this.#a.set(a,{botId:i,incarnation:this.incarnationFor(i)}),this.#n.set(i,this.#p());try{await o?.()}catch(A){throw this.#I.get(i)===a&&this.#I.delete(i),A}return a})}async abortRemoval(r){let{botId:o}=this.#C(r);return this.#d(o,async()=>this.#I.get(o)!==r?!1:(this.#I.delete(o),Object.hasOwn(this.#r,o)&&(this.#n.set(o,this.#p()),this.#l.has(o)||this.#l.set(o,this.#h())),!0))}async finishRemoval(r){let{botId:o,incarnation:i}=this.#C(r);return this.#d(o,async()=>this.#I.get(o)!==r?{removed:!1,persisted:!0,error:null,stale:!0}:this.incarnationFor(o)!==i?(this.#I.delete(o),{removed:!1,persisted:!0,error:null,stale:!0}):(this.#I.delete(o),this.#E(o)))}async retireAfterConfigCommit(r){let o=Va(r);return this.#d(o,async()=>(this.#I.delete(o),this.#E(o)))}async remove(r){let o=await this.retireAfterConfigCommit(r);if(o.error)throw o.error;return o.removed}async reconcile(r){let o=new Set([...r].map(Va)),i=new Set([...Object.keys(this.#r),...Object.keys(this.#t),...this.#i]);for(let e of i)o.has(e)||await this.remove(e)}decorateStatus(r){return!r||typeof r!="object"||!Array.isArray(r.bots)?r:{...r,bots:r.bots.map(o=>o?.botId?{...o,workspace:this.workspaceFor(o.botId),agentPreset:this.agentPresetFor(o.botId)}:o)}}#p(){let r=this.#o;return this.#o+=1,r}#h(){let r=this.#s;return this.#s+=1,r}#C(r){if(!r||typeof r!="object")throw new TypeError("Invalid workspace removal transaction");let o=this.#a.get(r);if(!o)throw new TypeError("Invalid workspace removal transaction");return o}async#E(r){let o=Object.hasOwn(this.#r,r),i=Object.hasOwn(this.#t,r),e=o||i||this.#i.has(r);if(delete this.#r[r],delete this.#t[r],this.#n.delete(r),this.#l.delete(r),!e)return{removed:!1,persisted:!0,error:null,stale:!1};try{return await this.#u(),{removed:o,persisted:!0,error:null,stale:!1}}catch(a){return this.#i.add(r),{removed:o,persisted:!1,error:a,stale:!1}}}async#d(r,o){let i=this.#c.then(o,o),e=i.then(()=>{},()=>{});return this.#c=e,this.#g.set(r,e),e.finally(()=>{this.#g.get(r)===e&&this.#g.delete(r)}),i}async#B(){let r={version:1,workspaces:this.#r};Object.keys(this.#t).length>0&&(r.agentPresets=this.#t),await Fne(jne(this.#e),{recursive:!0,mode:448});let o=`${this.#e}.tmp`;await xne(o,`${JSON.stringify(r,null,2)} +`,{encoding:"utf8",mode:384}),await Hne(o,this.#e),this.#i.clear()}async#u(){if(Object.keys(this.#r).length>0||Object.keys(this.#t).length>0){await this.#B();return}try{await Yne(this.#e),this.#i.clear()}catch(r){if(r?.code!=="ENOENT")throw r;this.#i.clear()}}};function TO(n){if(!n)return null;let r=typeof n=="function"?n():n;return r&&typeof r.then=="function"?r.then(tn):tn(r)}function J2(){let n=new Error("Agent Preset \u4E0D\u5B58\u5728\u6216\u4E0D\u53EF\u7528\u3002");return n.code="agent-preset-unavailable",n}function zI(n){if(n())return;let r=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw r.code="workspace-bot-not-found",r}function x2(n,r,o){let i=e=>{let a=n.decorateStatus(e);if(!o||!a||typeof a!="object")return a;let A=s=>s?{...a,agentPresetCatalog:s}:a,t=TO(o);return t&&typeof t.then=="function"?t.then(A):A(t)};return r&&typeof r.then=="function"?r.then(i):i(r)}function Vne(n){return Promise.resolve(n.status())}function Ea(n,{workspaces:r,method:o="remove",botIdFromRemoved:i=e=>e?.botId}){if(!n||!r||typeof n[o]!="function")throw new TypeError("configStore removal observer dependencies are required");return new Proxy(n,{get(e,a){let A=Reflect.get(e,a,e);return a===o?async(...t)=>{let s=await A.apply(e,t),g=s?i(s,t):null;return g&&await r.retireAfterConfigCommit(g),s}:typeof A=="function"?A.bind(e):A}})}function Ca(n,{botId:r,workspaces:o,state:i,agentPresetCatalog:e}={}){if(!n||!o||!i)throw new TypeError("harness, workspaces, and state are required");let a=o.incarnationFor(r),A=()=>o.has(r)&&o.incarnationFor(r)===a,t=async(I=e)=>{let E;try{E=await TO(I)??tn(null)}catch(B){throw zI(A),B}return zI(A),{agentPreset:o.agentPresetFor(r),agentPresetCatalog:E}},s=new Map,g=new Proxy(n,{get(I,E){if(E==="agentPresetSettings")return async(f={})=>{f?.signal?.throwIfAborted(),zI(A);let Q=await t();return f?.signal?.throwIfAborted(),Q};if(E==="updateAgentPreset")return async(f,Q={})=>{Q?.signal?.throwIfAborted(),zI(A);let y=f==="--default"?null:JI(f),m=null;if(y&&({agentPresetCatalog:m}=await t(),Q?.signal?.throwIfAborted(),!m.items.some(T=>T.id===y)))throw J2();if(await o.setAgentPreset(r,y,{incarnation:a}),zI(A),m)return{agentPreset:o.agentPresetFor(r),agentPresetCatalog:m};try{return await t()}catch(T){if(T?.code==="workspace-bot-not-found")throw T;return zI(A),{agentPreset:o.agentPresetFor(r),agentPresetCatalog:tn(null)}}};if(E==="currentWorkspace")return()=>{if(!A()){let f=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw f.code="workspace-bot-not-found",f}return o.workspaceFor(r)};if(E==="assertWorkspaceScope")return()=>{if(!A()){let f=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw f.code="workspace-bot-not-found",f}};if((E==="listWorkspaces"||E==="listWorkspaceSessions"||E==="listModels")&&typeof I[E]=="function")return async(...f)=>{if(!A()){let y=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw y.code="workspace-bot-not-found",y}let Q=await I[E](...f);if(!A()){let y=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw y.code="workspace-bot-not-found",y}return Q};if(E==="switchWorkspace")return f=>{if(!A()){let Q=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");return Q.code="workspace-bot-not-found",Promise.reject(Q)}return o.setWorkspace(r,f,{clearSessions:()=>i.clearSessions(),incarnation:a})};if(E==="bindWorkspaceSession")return async(f,Q)=>{if(typeof f!="string"||!f||typeof Q!="string"||!Q)throw new TypeError("conversationKey and sessionId are required");if(!A()){let _=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw _.code="workspace-bot-not-found",_}if(typeof I.adoptWorkspaceSession!="function")throw new TypeError("Harness does not support adopting workspace sessions");let y=o.generationFor(r),m=await I.adoptWorkspaceSession(Q);if(!A()){let _=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw _.code="workspace-bot-not-found",_}if(y!==o.generationFor(r))throw sc("The bot workspace changed while the session was being adopted.");if(!m||typeof m!="object"||m.sessionId!==Q||typeof m.workspace!="string")throw new TypeError("Harness returned an invalid adopted workspace session");let T=await o.bindWorkspaceSession(r,m.workspace,{conversationKey:f,sessionId:Q,clearSessions:()=>i.clearSessions(),setSession:(_,P)=>i.setSession(_,P),incarnation:a,expectedGeneration:y});if(!A()){let _=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw _.code="workspace-bot-not-found",_}if(T.generation!==o.generationFor(r))throw sc("The bot workspace changed before the session binding completed.");return s.set(Q,T.generation),{...m,workspace:T.workspace,sessionId:T.sessionId}};if(E==="createSession")return async(f={})=>{if(await o.whenBotIdle(r),!A()){let T=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw T.code="workspace-bot-not-found",T}let Q=o.generationFor(r),y=o.agentPresetFor(r),m=await I.createSession({...f,workspace:o.workspaceFor(r),...y==null?{}:{agentPreset:y}});return s.set(m,Q),m};if(E==="workspaceSession")return f=>{if(typeof f!="string"||!f)throw new TypeError("sessionId is required");let Q=s.get(f)??o.generationFor(r);s.delete(f);let y=()=>A()&&Q===o.generationFor(r),m=async(_,P,Y)=>{if(!y())throw sc(`The bot workspace changed before this ${Y} started.`);let j=await I[_](f,...P);if(!y())throw sc(`The bot workspace changed while this ${Y} was running.`);return j},T=async(_,P,Y)=>{if(!y())throw sc(`The bot workspace changed before this ${Y} started.`);return I[_](f,...P)};return Object.freeze({sessionId:f,async sessionExists(..._){if(!y())return!1;let P=await I.sessionExists(f,..._);return y()&&P},models(..._){return m("getSessionModels",_,"model listing")},selectModel(..._){return m("selectSessionModel",_,"model selection")},isRunning(..._){return m("isSessionRunning",_,"run-state check")},hasActiveTurn(..._){return m("hasActiveTurn",_,"turn ownership check")},stopActiveTurn(..._){return T("stopActiveTurn",_,"turn stop")},steerActiveTurn(..._){return T("steerActiveTurn",_,"turn steering")},ask(..._){if(!y())throw sc("The bot workspace changed before this prompt started.");return I.ask(f,..._)}})};if(E==="sessionExists")return(f,...Q)=>{if(!A())return!1;let y=s.get(f);return y!==void 0&&y!==o.generationFor(r)?(s.delete(f),!1):I.sessionExists(f,...Q)};if(E==="ask")return(f,...Q)=>{let y=s.get(f);if(s.delete(f),!A()||y!==void 0&&y!==o.generationFor(r)){let m=new Error("The bot workspace changed before this prompt started.");throw m.code=Ja,m}return I.ask(f,...Q)};if(E==="executeCommand"&&typeof I.executeCommand=="function")return(f,...Q)=>{let y=s.get(f);if(s.delete(f),!A()||y!==void 0&&y!==o.generationFor(r)){let m=new Error("The bot workspace changed before this command started.");throw m.code=Ja,m}return I.executeCommand(f,...Q)};let B=Reflect.get(I,E,I);return typeof B=="function"?B.bind(I):B}}),c=new Proxy(i,{get(I,E){if(E===rO)return I;if(E==="sessionFor")return(f,...Q)=>{if(!A())return null;let y=I.sessionFor(f,...Q);return y&&!s.has(y)&&s.set(y,o.generationFor(r)),y};if(E==="setSession")return(f,Q,...y)=>{let m=s.get(Q);return!A()||m!==void 0&&m!==o.generationFor(r)?(s.delete(Q),!1):I.setSession(f,Q,...y)};let B=Reflect.get(I,E,I);return typeof B=="function"?B.bind(I):B}});return Object.freeze({harness:g,state:c})}function ha(n,{workspaces:r,stateFor:o,agentPresetCatalog:i}={}){if(!n||!r||typeof o!="function")throw new TypeError("controller, workspaces, and stateFor are required");let e=new Map,a=(c,I)=>{let B=(e.get(c)??Promise.resolve()).catch(()=>{}).then(I);return e.set(c,B),B.finally(()=>{e.get(c)===B&&e.delete(c)})},A=c=>x2(r,c,i),t=(c,I)=>{let E=r.incarnationFor(c);return a(c,async()=>{if(!(await n.status())?.bots?.some(Q=>Q?.botId===c)){let Q=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw Q.code="workspace-bot-not-found",Q}let f=await o(c);return await r.setWorkspace(c,I,{clearSessions:()=>f.clearSessions(),incarnation:E}),A(await n.status())})},s=(c,I)=>{let E=r.incarnationFor(c),B=JI(I);return a(c,async()=>{if(!(await n.status())?.bots?.some(y=>y?.botId===c)){let y=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw y.code="workspace-bot-not-found",y}let Q=B&&i?await TO(i):null;if(B&&i&&!Q?.items.some(y=>y.id===B))throw J2();return await r.setAgentPreset(c,B,{incarnation:E}),x2(r,await n.status(),Q??i)})},g=(c,I)=>a(c,async()=>{let E=await r.beginRemoval(c,{clearSessions:async()=>{try{let B=await o(c);if(!B||typeof B.clearSessions!="function")throw new TypeError("bot state does not support session cleanup");await B.clearSessions()}catch(B){console.warn(`[dsh-im] ignored session cleanup failure while deleting bot ${c}:`,B?.message??B)}}});try{let B=await I();return await r.finishRemoval(E),A(B)}catch(B){let f=await Vne(n).catch(()=>null);throw Array.isArray(f?.bots)&&!f.bots.some(y=>y?.botId===c)?await r.finishRemoval(E):await r.abortRemoval(E),B}});return new Proxy(n,{get(c,I){if(I==="updateWorkspace")return t;if(I==="updateAgentPreset")return s;let E=Reflect.get(c,I,c);return typeof E!="function"?E:I==="deleteBot"?(B,...f)=>g(B,()=>E.call(c,B,...f)):I==="disconnect"?async(...B)=>{let Q=(await c.status())?.bots?.[0]?.botId;return Q?g(Q,()=>E.apply(c,B)):A(E.apply(c,B))}:(...B)=>A(E.apply(c,B))}})}var q2=Object.freeze([250,1e3,3e3,5e3,1e4,3e4]);function zne(n){if(!Array.isArray(n)||n.length===0)return[...q2];let r=n.filter(o=>Number.isFinite(o)&&o>=0);return r.length>0?r:[...q2]}var iB=class{#e;#A;#r;#t;#n;#o;#l;#s=null;#I=null;#a=0;#i=!1;#c=!1;#g;#p;constructor({controller:r,harness:o,logger:i=console,retryDelaysMs:e,healthyIntervalMs:a=15e3,setTimeoutImpl:A=setTimeout,clearTimeoutImpl:t=clearTimeout}){if(!r||typeof r.initialize!="function"||typeof r.status!="function")throw new TypeError("ConnectionSupervisor requires a controller");if(!o||typeof o.ensureRunning!="function")throw new TypeError("ConnectionSupervisor requires a Harness client");this.#e=r,this.#A=o,this.#r=i,this.#t=zne(e),this.#n=Number.isFinite(a)&&a>=0?a:15e3,this.#o=A,this.#l=t,this.#g=new Promise(s=>{this.#p=s})}get ready(){return this.#g}start(){return this.#c||this.#i?this:(this.#c=!0,this.#h(0),this)}async close(){this.#i||(this.#i=!0,this.#s!==null&&this.#l(this.#s),this.#s=null,await this.#I?.catch(()=>{}),this.#p?.(null),this.#p=null)}#h(r){this.#i||(this.#s=this.#o(()=>{this.#s=null,this.#C()},r),this.#s?.unref?.())}async#C(){if(this.#i||this.#I)return;let r=this.#E();this.#I=r;try{await r}finally{this.#I===r&&(this.#I=null)}}async#E(){try{if(await this.#A.ensureRunning(),this.#i)return;let r=await this.#e.initialize();if(this.#i)return;this.#p?.(r),this.#p=null;let{configured:o,connected:i}=r.totals;if(io.invoke({namespace:"commands",method:"execute",args:{agentId:i,line:e},signal:a.signal})}}import{randomUUID as Wne}from"node:crypto";function Zne(n){if(typeof n?.get!="function")return;let r;try{r=n.get("agents")}catch{return}if(r!=null){if(typeof r.get!="function")throw new TypeError('dsh-im requires a callable AgentRegistry when ctx.get("agents") is present');return r}}function Xne(n,r,o){if(n?.status!=="running")return!1;let i=n?.session?.events;if(!Array.isArray(i))return!1;let e=null,a=!1;for(let A of i){if(A?.type==="turn/start"){e=A.data?.turn??null,a=!1;continue}if(A?.type==="turn/end"&&A.data?.turn===e){e=null,a=!1;continue}e===r&&A?.type==="user/message"&&A.data?.source?.rpcId===o&&(a=!0)}return e===r&&a}function V2(n){if(!n||typeof n!="object"||Object.isFrozen(n))return n;for(let r of Object.values(n))V2(r);return Object.freeze(n)}function $ne(n){return V2({id:Wne(),role:"user",content:[{type:"text",text:n}],source:{kind:"user"}})}function ese(n){let r=new Error("Session is busy with an active turn or maintenance task",{cause:n});return r.code="agent-busy",r}function Ase(n){return({sessionId:r,expectedTurn:o,promptRpcId:i,action:e,text:a})=>{let A=n.get(r);if(A){if(!Xne(A,o,i))return!1;if(e==="stop")return A.cancel({kind:"user"},{keepInbox:!0}),!0;if(e==="steer")return typeof a!="string"||!a.trim()?!1:(A.inject($ne(a)),!0);throw new TypeError(`Unsupported Harness control action: ${String(e)}`)}}}function tse(n){return({sessionId:r,operation:o})=>{if(typeof o!="function")throw new TypeError("maintenance operation is required");let i=n.get(r);if(!i)return o();try{return i.runMaintenance(e=>{if(n.get(r)!==i){let a=new Error("Session agent changed before maintenance started");throw a.code="agent-unavailable",a}return o(e)})}catch(e){throw ese(e)}}}function ua(n,r={}){let{controlExecutor:o,sessionMaintenanceExecutor:i}=r;if(o!==void 0&&typeof o!="function")throw new TypeError("controlExecutor must be a function");if(i!==void 0&&typeof i!="function")throw new TypeError("sessionMaintenanceExecutor must be a function");let e=o&&i?void 0:Zne(n);return{controlExecutor:o??(e?Ase(e):void 0),sessionMaintenanceExecutor:i??(e?tse(e):void 0)}}function ise(n,r){if(r!==void 0)return new URL(r);let o=n?.port;if(!Number.isInteger(o)||o<1||o>65535)throw new Error("dsh-dingtalk requires an initialized DSH webServer port");return new URL(`http://127.0.0.1:${o}`)}function ose(n){let r=gc(n.dshHome??process.env.DSH_HOME??zE(ase(),".dsh")),o=gc(n.dataDir??zE(r,"integrations","dsh-dingtalk"));return{root:o,config:gc(n.configPath??zE(o,"config.json")),bots:gc(n.botsDir??zE(o,"bots")),workspaces:gc(n.workspacesPath??zE(o,"workspaces.json"))}}async function kO(n,r={},o={}){if(!n?.credentials)throw new TypeError("dsh-dingtalk requires ctx.credentials");if(!n?.webServer)throw new TypeError("dsh-dingtalk requires ctx.webServer");let i=o.ConfigStore??xu,e=o.DeviceAuth??Ju,a=o.StateStore??aB,A=o.HarnessClient??tB,t=o.Controller??HE,s=o.Runtime??jE,g=o.createConnectionSupervisor??RO,c=typeof n.logger=="function"?n.logger("dsh-dingtalk"):n.logger??console,I=()=>pa(n),E=ose(r),B=await new i(E.config).load(),f=gc(r.workspace??process.cwd()),Q=o.WorkspaceStore??Fr,y=o.workspaces??await new Q(E.workspaces,{defaultWorkspace:f}).load(),m=typeof B.list=="function",T=m?B.list():[];m&&await y.reconcile(T.map(G=>G.botId)),await Promise.all(T.map(G=>y.ensure(G.botId,{defaultAgentPreset:r.agentPreset})));let _=typeof B.remove=="function"?Ea(B,{workspaces:y}):B,P=o.deviceAuth??new e({baseUrl:r.registrationBaseUrl}),Y=new Map,j=G=>gc(E.bots,G,"state.json"),K=async G=>{let te=Y.get(G);return te||(te=await new a(j(G)).load(),Y.set(G,te)),te},q=da(n,o.commandExecutor),{controlExecutor:V,sessionMaintenanceExecutor:H}=ua(n,{controlExecutor:o.controlExecutor,sessionMaintenanceExecutor:o.sessionMaintenanceExecutor}),v=new A({baseUrl:ise(n.webServer,r.harnessBaseUrl),workspace:f,autostart:!1,dshBin:r.dshBin??"dsh",...q?{commandExecutor:q}:{},...V?{controlExecutor:V}:{},...H?{sessionMaintenanceExecutor:H}:{}}),Z=new t({deviceAuth:P,credentials:n.credentials,configStore:_,logger:c,createRuntime:async({botId:G,config:te,clientSecret:Be})=>{let Ce=await K(G);await y.ensure(G,{defaultAgentPreset:r.agentPreset});let ke=Ca(v,{botId:G,workspaces:y,state:Ce,agentPresetCatalog:I});return new s({config:te,clientSecret:Be,harness:ke.harness,state:ke.state,replyTimeoutMs:r.replyTimeoutMs??6e5,maxMessageChars:r.maxMessageChars??4e3,connectTimeoutMs:r.connectTimeoutMs??15e3,logger:{error:(...Ee)=>c.error?.(`[${G}]`,...Ee),warn:(...Ee)=>c.warn?.(`[${G}]`,...Ee),info:(...Ee)=>c.info?.(`[${G}]`,...Ee),debug:(...Ee)=>c.debug?.(`[${G}]`,...Ee)}})},deleteState:async({botId:G})=>{let te=Y.get(G);if(Y.delete(G),te&&typeof te.remove=="function")await te.remove();else try{await rse(j(G))}catch(Be){if(Be?.code!=="ENOENT")throw Be}}}),U=ha(Z,{workspaces:y,stateFor:K,agentPresetCatalog:I}),M=g({controller:U,harness:v,logger:c,retryDelaysMs:r.retryDelaysMs,healthyIntervalMs:r.healthyIntervalMs}).start();return{controller:U,ready:M.ready,async close(){await M.close(),await U.close(),v.stopManagedProcess()}}}import cse from"qrcode";var nse=new Set(["loopback","trusted-host"]);function Er(n){if(n===void 0)return"loopback";if(nse.has(n))return n;throw new TypeError('dsh-im rpcAuthority must be "loopback" or "trusted-host"')}import{isAbsolute as sse}from"node:path";var za="bot.workspace.set";function Ba(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)&&Object.keys(n).every(r=>["botId","workspace"].includes(r))&&typeof n.botId=="string"&&/^[A-Za-z0-9_-]{1,128}$/.test(n.botId)&&typeof n.workspace=="string"&&n.workspace.length<=4096&&sse(n.workspace.trim())}function fa(n){return["workspace-not-absolute","workspace-not-found","workspace-not-directory","workspace-bot-not-found","agent-preset-invalid","agent-preset-unavailable"].includes(n?.code)?{code:n.code,message:n.message}:null}var Wa="bot.preset.set";function gse(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function Qa(n){return gse(n)&&Object.keys(n).every(r=>["botId","agentPreset"].includes(r))&&typeof n.botId=="string"&&/^[A-Za-z0-9_-]{1,128}$/.test(n.botId)&&(n.agentPreset===null||typeof n.agentPreset=="string"&&yO.test(n.agentPreset))}var W2="/dingtalk",zt=Object.freeze({status:"connection.status",beginProvisioning:"provision.begin",pollProvisioning:"provision.poll",cancelProvisioning:"provision.cancel",bindCredentials:"bot.bind-credentials",reconnectBot:"bot.reconnect",deleteBot:"bot.delete",setWorkspace:za,setAgentPreset:Wa,approveSender:"bot.sender.approve",revokeSender:"bot.sender.revoke"}),Z2=Object.freeze(Object.values(zt)),Ise=new Set(["clientSecret","client_secret","deviceCode","device_code","secretRef","staffId","senderStaffId","verificationUrl","verificationUri","userCode"]);function PO(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function qs(n,r){return PO(n)&&Object.keys(n).every(o=>r.includes(o))}function cc(n){return typeof n=="string"&&/^[A-Za-z0-9_-]{1,128}$/.test(n)}function z2(n,r){return typeof n=="string"&&n.trim().length>0&&n.length<=r}function lse(n,r){return PO(r)?n===zt.status?qs(r,[])?null:"connection.status does not accept fields.":n===zt.beginProvisioning?qs(r,["locale"])&&(r.locale===void 0||r.locale==="zh-CN")?null:"provision.begin received unsupported fields.":[zt.pollProvisioning,zt.cancelProvisioning].includes(n)?qs(r,["attemptId"])&&cc(r.attemptId)?null:`${n} requires an attemptId.`:n===zt.bindCredentials?qs(r,["clientId","clientSecret"])&&z2(r.clientId,256)&&z2(r.clientSecret,1024)?null:"bot.bind-credentials requires Client ID and Client Secret.":n===zt.reconnectBot?qs(r,["botId","sendTest"])&&cc(r.botId)&&(r.sendTest===void 0||r.sendTest===!0)?null:"bot.reconnect requires a botId and optional sendTest=true.":n===zt.deleteBot?qs(r,["botId","confirm"])&&cc(r.botId)&&r.confirm===!0?null:"bot.delete requires a botId and confirm=true.":n===zt.setWorkspace?Ba(r)?null:"\u8BF7\u8F93\u5165\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84\u3002":n===zt.setAgentPreset?Qa(r)?null:"\u8BF7\u9009\u62E9 Agent Preset\u3002":n===zt.approveSender?qs(r,["botId","requestId","confirm"])&&cc(r.botId)&&cc(r.requestId)&&r.confirm===!0?null:"bot.sender.approve requires botId, requestId, and confirm=true.":n===zt.revokeSender?qs(r,["botId","senderKey","confirm"])&&cc(r.botId)&&cc(r.senderKey)&&r.confirm===!0?null:"bot.sender.revoke requires botId, senderKey, and confirm=true.":"Unknown DingTalk endpoint.":"Payload must be an object."}function oB(n){return{ok:!1,error:{code:"bad-request",message:n}}}function WE(){return{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}}}function pse(){return{ok:!1,error:{code:"dingtalk-operation-failed",message:"\u9489\u9489\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"}}}function WI(n){if(Array.isArray(n))return n.map(WI);if(!PO(n))return n;let r={};for(let[o,i]of Object.entries(n))Ise.has(o)||(r[o]=WI(i));return r}async function Ese(n){return cse.toDataURL(n,{type:"image/png",errorCorrectionLevel:"M",margin:2,width:320})}async function vO(n,r){return!n||typeof n.verificationUrl!="string"?WI(n):WI({...n,qrCodeDataUrl:await r(n.verificationUrl)})}async function Vs(n,r){let o=structuredClone(n);return o?.provisioning&&(o.provisioning=await vO(o.provisioning,r)),WI(o)}function Cse(n){for(let r of["status","startProvisioning","registrationStatus","cancelProvisioning","bindCredentials","reconnectBot","deleteBot","approveSender","revokeSender"])if(typeof n?.[r]!="function")throw new TypeError(`A complete DingTalk controller is required (${r})`)}function X2(n,{encodeQr:r=Ese}={}){Cse(n);let o=new Map,i=e=>{let a=o.get(e);return a||(o.size>=16&&o.delete(o.keys().next().value),a=Promise.resolve().then(()=>r(e)),o.set(e,a)),a};return async(e,a,A)=>{if(A?.aborted)return WE();if(!Z2.includes(e))return oB("Unknown DingTalk endpoint.");let t=lse(e,a);if(t)return oB(t);try{let s;if(e===zt.status)s=await Vs(await n.status(),i);else if(e===zt.beginProvisioning){let g=await n.startProvisioning({signal:A});if(A?.aborted)return await n.cancelProvisioning(g.attemptId),WE();s=await vO(g,i)}else if(e===zt.pollProvisioning){let g=await n.registrationStatus(a.attemptId);if(!g)return oB("The provisioning attempt no longer exists.");s=await vO(g,i)}else if(e===zt.cancelProvisioning){if(s=await n.cancelProvisioning(a.attemptId),!s)return oB("The provisioning attempt no longer exists.");s=WI(s)}else if(e===zt.bindCredentials)s=await Vs(await n.bindCredentials(a),i);else if(e===zt.reconnectBot){let g=await n.reconnectBot(a.botId);if(A?.aborted)return WE();let c;if(a.sendTest===!0)if(!g?.bots?.some(E=>E?.botId===a.botId&&E?.connected===!0)||typeof n.sendConnectionTest!="function")c=qt(tr("\u9489\u9489\u673A\u5668\u4EBA"));else try{await n.sendConnectionTest(a.botId),c=qt()}catch(E){c=qt(E)}s=await Vs({...g,...c?{testMessage:c}:{}},i)}else if(e===zt.deleteBot)s=await Vs(await n.deleteBot(a.botId),i);else if(e===zt.setWorkspace){if(typeof n.updateWorkspace!="function")throw new Error("Workspace update is unavailable");s=await Vs(await n.updateWorkspace(a.botId,a.workspace),i)}else if(e===zt.setAgentPreset){if(typeof n.updateAgentPreset!="function")throw new Error("Agent preset update is unavailable");s=await Vs(await n.updateAgentPreset(a.botId,a.agentPreset),i)}else e===zt.approveSender?s=await Vs(await n.approveSender(a.botId,a.requestId),i):s=await Vs(await n.revokeSender(a.botId,a.senderKey),i);return A?.aborted?WE():{ok:!0,value:s}}catch(s){let g=fa(s);return A?.aborted?WE():g?{ok:!1,error:g}:pse()}}}function nB(n,r,o,i){if(!n?.connection?.rpc||typeof n.connection.rpc.handle!="function")throw new TypeError("DSH Host Connection RPC is required");return n.connection.rpc.handle(W2,X2(r,o),{authority:Er(i)})}async function $2(n,r={}){if(r?.controller)return nB(n,r.controller,r.rpcOptions,r.rpcAuthority);let o=await kO(n,r,r.internals),i=nB(n,o.controller,r.rpcOptions,r.rpcAuthority);return n.effect(()=>async()=>{await o.close()},"dsh-dingtalk: close bot connections"),i}import{createHash as hse}from"node:crypto";import{mkdir as dse,readFile as use,rename as Bse,unlink as fse,writeFile as Qse}from"node:fs/promises";import{dirname as yse}from"node:path";var GO=Object.freeze({version:1,bots:Object.freeze([])});function Zn(n){return typeof n=="string"&&n.trim()?n.trim():null}function eU(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ZE(n,{botPrefix:r,tokenRefPrefix:o}){let i=Zn(n);if(!i)throw new TypeError("platformId is required");let e=hse("sha256").update(i).digest("hex").slice(0,24);return{botId:`${r}_${e}`,tokenRef:`${o}_${e.toUpperCase()}`}}function sB(n,r){let o=Zn(n)??"";return o.length<=10?o?`${o.slice(0,3)}\u2022\u2022\u2022`:r:`${o.slice(0,6)}\u2022\u2022\u2022\u2022${o.slice(-4)}`}var ZI=class{#e;#A;#r;#t;#n;#o;#l;#s=GO;#I=Promise.resolve();constructor(r,{channel:o,botPrefix:i,tokenRefPrefix:e,normalizeBotExtension:a=()=>({})}){if(typeof a!="function")throw new TypeError("normalizeBotExtension must be a function");this.#e=r,this.#A=o,this.#r=i,this.#t=e,this.#n=a,this.#o=new RegExp(`^${eU(i)}_[a-f0-9]{24}$`),this.#l=new RegExp(`^${eU(e)}_[A-F0-9]{24}$`)}async load(){try{let r=this.#i(JSON.parse(await use(this.#e,"utf8")));if(!r)throw new Error(`dsh-im ${this.#A} config contains invalid bot data`);this.#s=r}catch(r){if(r?.code!=="ENOENT")throw r;this.#s=GO}return this}list(){return structuredClone(this.#s.bots)}get(r){let o=this.#s.bots.find(i=>i.botId===r);return o?structuredClone(o):null}getByPlatformId(r){let o=this.#s.bots.find(i=>i.platformId===r);return o?structuredClone(o):null}async save(r){let o=this.#a(r);if(!o)throw new Error(`Refusing to persist incomplete ${this.#A} bot data`);return this.#c(i=>{let e=i.find(t=>t.platformId===o.platformId&&t.botId!==o.botId),a=i.find(t=>t.tokenRef===o.tokenRef&&t.botId!==o.botId);if(e||a)throw new Error(`Duplicate ${this.#A} bot identity`);let A=i.findIndex(t=>t.botId===o.botId);return A===-1?i.push(o):i[A]=o,structuredClone(o)})}async remove(r){if(!this.#o.test(r))throw new TypeError(`Invalid ${this.#A} bot id`);return this.#c(o=>{let i=o.findIndex(a=>a.botId===r);if(i===-1)return null;let[e]=o.splice(i,1);return structuredClone(e)})}async clear(){let r=this.#I.then(async()=>{try{await fse(this.#e)}catch(o){if(o?.code!=="ENOENT")throw o}this.#s=GO});this.#I=r.then(()=>{},()=>{}),await r}#a(r){if(!r||typeof r!="object")return null;let o=Zn(r.platformId),i=Zn(r.botId),e=Zn(r.tokenRef),a=Zn(r.name);if(!o||!i||!e||!a||!this.#o.test(i)||!this.#l.test(e))return null;let A=ZE(o,{botPrefix:this.#r,tokenRefPrefix:this.#t});if(A.botId!==i||A.tokenRef!==e)return null;let t=this.#n(r);return!t||typeof t!="object"||Array.isArray(t)?null:Object.freeze({botId:i,platformId:o,tokenRef:e,name:a,username:Zn(r.username),createdAt:Zn(r.createdAt)??new Date().toISOString(),connectedAt:Zn(r.connectedAt),...t})}#i(r){if(!r||r.version!==1||!Array.isArray(r.bots))return null;let o=r.bots.map(A=>this.#a(A));if(o.some(A=>A===null))return null;let i=new Set,e=new Set,a=new Set;for(let A of o){if(i.has(A.botId)||e.has(A.platformId)||a.has(A.tokenRef))return null;i.add(A.botId),e.add(A.platformId),a.add(A.tokenRef)}return Object.freeze({version:1,bots:Object.freeze(o)})}async#c(r){let o,i=this.#I.then(async()=>{let e=[...this.#s.bots];o=r(e);let a=Object.freeze({version:1,bots:Object.freeze(e)});await this.#g(a),this.#s=a});return this.#I=i.then(()=>{},()=>{}),await i,o}async#g(r){await dse(yse(this.#e),{recursive:!0,mode:448});let o=`${this.#e}.tmp`;await Qse(o,`${JSON.stringify(r,null,2)} +`,{encoding:"utf8",mode:384}),await Bse(o,this.#e)}};var AU=Object.freeze({botPrefix:"discord",tokenRefPrefix:"DSH_DISCORD_BOT_TOKEN"});function tU(n){return ZE(n,AU)}function rU(n){return sB(n,"Discord\u673A\u5668\u4EBA")}var gB=class extends ZI{constructor(r){super(r,{channel:"Discord",...AU})}};function XE(n){return typeof n=="string"&&n.trim()?n.trim():null}function $E(n,r){return Object.freeze({code:n,message:r})}var XI=class{#e;#A;#r;#t;#n;#o;#l;#s;#I;#a=new Map;#i=new Map;#c=new Map;#g=0;#p=!1;constructor({descriptor:r,credentials:o,configStore:i,inspectToken:e,deriveIdentity:a,maskPlatformId:A,createRuntime:t,deleteState:s=async()=>{},logger:g=console}){if(!r?.key||!r?.label||!r?.connectionLabel)throw new TypeError("TokenBotController requires a channel descriptor");if(!o||typeof o.resolve!="function"||typeof o.set!="function"||typeof o.unset!="function")throw new TypeError(`${r.label} requires the DSH credential provider`);if(!i||typeof i.list!="function"||typeof i.save!="function"||typeof i.remove!="function")throw new TypeError(`${r.label} requires a config store`);if(typeof e!="function"||typeof a!="function"||typeof A!="function"||typeof t!="function")throw new TypeError(`${r.label} controller dependencies are incomplete`);this.#e=r,this.#A=o,this.#r=i,this.#t=e,this.#n=a,this.#o=A,this.#l=t,this.#s=s,this.#I=g}async initialize(){if(this.#p)return this.status();for(let r of this.#r.list())await this.#B(r.botId,async()=>{if(this.#p||this.#a.get(r.botId)?.status?.ready)return;let o=await this.#E(r.tokenRef);if(!o){this.#i.set(r.botId,$E("missing-token",`${this.#e.label}\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u63A5\u5165\u3002`));return}try{await this.#h(r,o),this.#i.delete(r.botId)}catch(i){this.#i.set(r.botId,$E("connection-failed",`${this.#e.label}\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002`)),this.#I.warn?.(`[dsh-im:${this.#e.key}] bot ${r.botId} failed to initialize:`,i)}finally{this.#u()}});return this.status()}async bindCredentials({token:r}={}){if(this.#p)throw new Error(`${this.#e.label} controller is closed`);let o=XE(r);if(!o)throw new TypeError(`${this.#e.label} Bot Token is required`);let i=await this.#t(o),e=XE(i?.platformId),a=XE(i?.name);if(!e||!a)throw new Error(`${this.#e.label} returned an invalid bot identity`);let A=this.#n(e);return await this.#B(A.botId,async()=>{if(this.#p)throw new Error(`${this.#e.label} controller is closed`);let t=this.#r.getByPlatformId(e),s=await this.#A.resolve(A.tokenRef).catch(()=>{}),g={botId:A.botId,platformId:e,tokenRef:A.tokenRef,name:a,username:XE(i.username),createdAt:t?.createdAt??new Date().toISOString(),connectedAt:new Date().toISOString()};await this.#A.set(A.tokenRef,o);try{await this.#r.save(g)}catch(c){throw await this.#d(A.tokenRef,s),c}try{await this.#h(g,o),this.#i.delete(A.botId)}catch(c){this.#i.set(A.botId,$E("connection-failed",`${this.#e.label}\u673A\u5668\u4EBA\u5DF2\u63A5\u5165\uFF0C\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002`)),this.#I.warn?.(`[dsh-im:${this.#e.key}] bot ${A.botId} credential connection failed:`,c)}this.#u()}),this.status()}async reconnectBot(r){let o=this.#r.get(r);if(!o)throw new Error(`Unknown ${this.#e.label} bot`);return await this.#B(r,async()=>{let i=await this.#E(o.tokenRef);if(!i)throw new Error(`${this.#e.label} bot token is missing`);try{await this.#h(o,i),this.#i.delete(r)}catch(e){throw this.#i.set(r,$E("connection-failed",`${this.#e.label}\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002`)),e}finally{this.#u()}}),this.status()}async updateBotConfig(r,o){if(this.#p)throw new Error(`${this.#e.label} controller is closed`);if(typeof o!="function")throw new TypeError("Bot config update must be a function");return await this.#B(r,async()=>{if(this.#p)throw new Error(`${this.#e.label} controller is closed`);let i=this.#r.get(r);if(!i)throw new Error(`Unknown ${this.#e.label} bot`);let e=await this.#E(i.tokenRef);if(!e)throw new Error(`${this.#e.label} bot token is missing`);if(this.#p)throw new Error(`${this.#e.label} controller is closed`);let a=o(i),A=await this.#r.save(a);try{await this.#h(A,e),this.#i.delete(r)}catch(t){throw this.#i.set(r,$E("connection-failed",`${this.#e.label}\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002`)),t}finally{this.#u()}}),this.status()}async sendConnectionTest(r){let o=this.#r.get(r);if(!o)throw new Error(`Unknown ${this.#e.label} bot`);return this.#B(r,async()=>{let i=this.#a.get(r);if(!i?.status?.ready||typeof i.sendConnectionTest!="function"){let a=new Error(`${this.#e.label}\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5`);throw a.code="test-target-unavailable",a}let e=`${o.name}\uFF08${this.#o(o.platformId)}\uFF09`;return await i.sendConnectionTest(ga(e,`${this.#e.label}\u673A\u5668\u4EBA`)),{sent:!0}})}async deleteBot(r){let o=this.#r.get(r);if(!o)throw new Error(`Unknown ${this.#e.label} bot`);return await this.#B(r,async()=>{let i=await this.#A.resolve(o.tokenRef).catch(()=>{});await this.#C(r);try{await this.#A.unset(o.tokenRef),await this.#r.remove(r)}catch(e){throw i?.value&&(await this.#A.set(o.tokenRef,i.value).catch(()=>{}),await this.#h(o,i.value).catch(()=>{})),new Error(`Unable to remove the ${this.#e.label} bot safely.`,{cause:e})}await this.#s({botId:r,config:o}).catch(e=>{this.#I.warn?.(`[dsh-im:${this.#e.key}] bot ${r} state cleanup failed:`,e)}),this.#i.delete(r),this.#u()}),this.status()}status(){let r=this.#r.list().map(i=>{let e=this.#a.get(i.botId)?.status??null,a=e?.ready===!0&&e.connectionState==="connected"&&e.harnessReachable===!0,A=a?"connected":e?.connectionState==="connecting"?"connecting":this.#i.has(i.botId)||e?.connectionState==="failed"?"error":"offline";return{botId:i.botId,state:A,connected:a,configured:!0,bot:{name:i.name,username:i.username,idMasked:this.#o(i.platformId)},health:{status:a?"healthy":A==="error"?"error":"offline",summary:a?`${this.#e.label}${this.#e.connectionLabel}\u8FD0\u884C\u6B63\u5E38`:A==="error"?`${this.#e.label}\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5`:`${this.#e.label}\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF`,lastCheckedAt:e?.lastCheckedAt??null,lastConnectedAt:e?.lastConnectedAt??null},stats:{messagesReceived:e?.messagesReceived??0,messagesReplied:e?.messagesReplied??0},error:structuredClone(this.#i.get(i.botId)??null)}}),o=r.filter(i=>i.connected).length;return{schemaVersion:1,revision:this.#g,state:r.length===0?"disconnected":o===r.length?"connected":o>0?"degraded":"offline",bots:r,totals:{configured:r.length,connected:o}}}async close(){this.#p||(this.#p=!0,await Promise.allSettled([...this.#c.values()]),await Promise.allSettled([...this.#a.keys()].map(r=>this.#C(r))))}async#h(r,o){if(this.#p)throw new Error(`${this.#e.label} controller is closed`);if(await this.#C(r.botId),this.#p)throw new Error(`${this.#e.label} controller is closed`);let i=await this.#l({botId:r.botId,config:r,token:o});if(!i||typeof i.start!="function"||typeof i.stop!="function")throw new TypeError(`createRuntime returned an invalid ${this.#e.label} runtime`);this.#a.set(r.botId,i);try{await i.start()}catch(e){throw await i.stop().catch(()=>{}),this.#a.delete(r.botId),e}}async#C(r){let o=this.#a.get(r);this.#a.delete(r),await o?.stop().catch(i=>{this.#I.warn?.(`[dsh-im:${this.#e.key}] bot ${r} failed to stop cleanly:`,i)})}async#E(r){let o=await this.#A.resolve(r).catch(()=>{});return XE(o?.value)}async#d(r,o){o?.value?await this.#A.set(r,o.value).catch(()=>{}):await this.#A.unset(r).catch(()=>{})}#B(r,o){let a=(this.#c.get(r)??Promise.resolve()).catch(()=>{}).then(o).finally(()=>{this.#c.get(r)===a&&this.#c.delete(r)});return this.#c.set(r,a),a}#u(){this.#g+=1}};var mse="https://discord.com/api/v10/";function eC(n){return typeof n=="string"&&n.trim()?n.trim():null}function Sse(n,r){let o=AbortSignal.timeout(r);return n?AbortSignal.any([n,o]):o}function Dse(n,r){return new Promise((o,i)=>{if(r?.aborted){i(r.reason??new DOMException("Aborted","AbortError"));return}let e=setTimeout(o,n);e?.unref?.(),r?.addEventListener("abort",()=>{clearTimeout(e),i(r.reason??new DOMException("Aborted","AbortError"))},{once:!0})})}function $I(n,r){let o=eC(n);if(!o||!/^\d{5,30}$/.test(o))throw new TypeError(`Invalid Discord ${r}`);return o}function wse(n){return typeof n=="string"&&/^[A-Za-z0-9_-]{20,}\.[A-Za-z0-9_-]{4,}\.[A-Za-z0-9_-]{20,}$/.test(n.trim())}var AC=class{#e;#A;#r;constructor({token:r,fetchImpl:o=fetch,baseUrl:i=mse}){if(!wse(r))throw new TypeError("Discord Bot Token is invalid");if(typeof o!="function")throw new TypeError("DiscordApi requires fetch");this.#e=r.trim(),this.#A=o,this.#r=new URL(i)}getCurrentUser(r={}){return this.#t("users/@me",{...r,method:"GET"})}getGatewayBot(r={}){return this.#t("gateway/bot",{...r,method:"GET"})}createMessage({channelId:r,content:o,replyToMessageId:i,signal:e}){return this.#t(`channels/${$I(r,"channel id")}/messages`,{method:"POST",signal:e,body:{content:o,allowed_mentions:{parse:[],replied_user:!1},...i?{message_reference:{message_id:$I(i,"message id"),channel_id:$I(r,"channel id"),fail_if_not_exists:!1}}:{}}})}editMessage({channelId:r,messageId:o,content:i,signal:e}){return this.#t(`channels/${$I(r,"channel id")}/messages/${$I(o,"message id")}`,{method:"PATCH",signal:e,body:{content:i,allowed_mentions:{parse:[],replied_user:!1}}})}sendTyping({channelId:r,signal:o}){return this.#t(`channels/${$I(r,"channel id")}/typing`,{method:"POST",signal:o,expectBody:!1})}async#t(r,{method:o,body:i,signal:e,timeoutMs:a=15e3,expectBody:A=!0,retry:t=!0}){let s;try{s=await this.#A(new URL(r,this.#r),{method:o,headers:{authorization:`Bot ${this.#e}`,"content-type":"application/json","user-agent":"DeepSeek-Harness-dsh-im (https://github.com/xmanrui/dsh-im, 1.0.2)"},...i===void 0?{}:{body:JSON.stringify(i)},signal:Sse(e,a),redirect:"error"})}catch(c){throw c?.name==="AbortError"||c?.name==="TimeoutError"?c:new Error(`Discord ${o} transport failed`)}let g=null;if(A||s.status===429||!s.ok)try{g=await s.json()}catch{if(A)throw new Error(`Discord ${o} returned invalid JSON`)}if(s.status===429&&t){let c=Math.min(1e4,Math.max(50,Number(g?.retry_after)*1e3||1e3));return await Dse(c,e),this.#t(r,{method:o,body:i,signal:e,timeoutMs:a,expectBody:A,retry:!1})}if(!s.ok){let c=new Error(eC(g?.message)??`Discord API failed with HTTP ${s.status}`);throw c.code=`discord-${s.status}`,c}return A?g:null}};async function aU(n,r={}){let i=await new AC({token:n,...r}).getCurrentUser();if(!i?.id||i?.bot!==!0)throw new Error("Discord token does not belong to a bot");return{platformId:String(i.id),name:eC(i.global_name)??eC(i.username)??"Discord\u673A\u5668\u4EBA",username:eC(i.username)}}var iU="\u8FD9\u4E2A\u95EE\u9898\u5DF2\u5728\u5176\u4ED6\u5BA2\u6237\u7AEF\u5904\u7406\uFF0C\u65E0\u9700\u518D\u6B21\u56DE\u7B54\u3002";function di(n){return typeof n=="string"?n.trim():""}function Ose(n,r,o){return r.actor===o&&(n.kind!=="group"||n.addressed===!0)&&!Ir(n)&&!!di(n.content)}function ui(){return{messagesReceived:0,messagesReplied:0,messagesRejected:0,lastMessageAt:null,lastReplyAt:null,lastRejectedAt:null,lastError:null}}var rn=class{#e;#A;#r;#t;#n;#o;#l;#s;#I=new Map;#a=new Map;#i=new Map;#c=new Set;#g=new Set;#p=new Set;#h;constructor({descriptor:r,bot:o,harness:i,state:e,status:a=ui(),logger:A=console,replyTimeoutMs:t=6e5,signal:s}){if(!r?.key||!r?.label)throw new TypeError("A channel descriptor is required");if(!o||typeof o.sendText!="function")throw new TypeError("A bot client is required");if(!i||!e)throw new TypeError("Harness client and state store are required");this.#e=r,this.#A=o,this.#r=i,this.#t=e,this.#n=a,this.#o=A,this.#l=t,this.#s=s,this.#h=new ja({label:r.key,logger:A})}get status(){return structuredClone(this.#n)}accept(r){if(this.#s?.aborted)return Promise.resolve();let o=di(r?.conversationId),i=r?.kind==="group"?"group":"direct",e={...r,kind:i,conversationId:o},a=di(e.messageId),A=di(e.senderId);if(!a||!A||!o||e.senderIsBot===!0||this.#t.hasSeen(a)||this.#c.has(a))return Promise.resolve();this.#c.add(a),e.kind==="direct"&&Pi(this.#t,e.connectionTestTarget??e.replyTarget);let t=`${i}:${o}`,s=this.#a.get(t),g=di(e.content),c=pi(g)?Hi:Ei(g)?Yi:Ci(g)?xi:null;if(c&&(e.kind!=="group"||e.addressed===!0)){let E;return E=this.#E(e,a,t,c).finally(()=>{this.#c.delete(a),this.#p.delete(E)}),this.#p.add(E),E}let I=this.#h.claimReply({key:t,actor:A,messageId:a,text:Ir(e)?"":e.content,addressed:e.kind!=="group"||e.addressed===!0,hasPendingQuestion:!!s,questionCompletion:s?.submitting||s?.claimedReplyMessageId?s.queue:null,isQuestionPending:()=>this.#a.has(t),send:E=>this.#A.sendText(e.replyTarget,E)});if(I){let E;return E=I.process(async()=>this.#t.hasSeen(a)?!1:(await this.#t.markSeen(a),this.#n.messagesReceived+=1,this.#n.lastMessageAt=new Date().toISOString(),!0)).finally(()=>{this.#c.delete(a),this.#g.delete(E)}),this.#g.add(E),E}if(s&&s.actor!==A)return this.#C(e,a,A,t);if(s?.submitting||s?.claimedReplyMessageId)return this.#C(e,a,A,t);if(s){Ose(e,s,A)&&(s.claimedReplyMessageId=a);let B=(s.queue??Promise.resolve()).catch(()=>{}).then(()=>this.#B(e,a,A,t,s)).finally(()=>{this.#c.delete(a),s.claimedReplyMessageId===a&&(s.claimedReplyMessageId=null),s.queue===B&&(s.queue=null)});return s.queue=B,B}return this.#C(e,a,A,t)}#C(r,o,i,e,{releaseMessageId:a=!0,alreadyRecorded:A=!1}={}){let s=(this.#I.get(e)??Promise.resolve()).catch(()=>{}).then(()=>this.#d(r,o,i,e,{alreadyRecorded:A})).finally(()=>{a&&this.#c.delete(o),this.#I.get(e)===s&&this.#I.delete(e)});return this.#I.set(e,s),s}async waitForIdle(){await Promise.allSettled([...this.#I.values(),...[...this.#a.values()].flatMap(r=>r.queue?[r.queue]:[]),...this.#g,...this.#p])}async#E(r,o,i,e){if(this.#t.hasSeen(o))return;await this.#t.markSeen(o),this.#n.messagesReceived+=1,this.#n.lastMessageAt=new Date().toISOString();let a=r.replyTarget;try{let A=await e(di(r.content),this.#r,this.#t,i,{signal:this.#s,hasImages:Ir(r),pendingInteraction:this.#a.has(i)||this.#h.hasPending(i),control:{owner:this,key:i}});A?.stopped&&await Promise.allSettled([this.#R(i),this.#h.closeRoute(i)]);for(let t of A?.messages??[A?.message])t&&await this.#A.sendText(a,t);this.#n.lastError=null}catch(A){if(A?.code==="turn-stopped"||this.#s?.aborted)return;this.#n.lastError=A?.message??String(A),this.#o.error?.(`[dsh-im:${this.#e.key}] failed to process a command:`,A),await this.#A.sendText(a,"\u6D88\u606F\u5904\u7406\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002").catch(()=>{})}}sendConnectionTest(r){return Ys({state:this.#t,text:r,channelLabel:`${this.#e.label}\u673A\u5668\u4EBA`,send:(o,i)=>this.#A.sendText(o,i)})}async#d(r,o,i,e,{alreadyRecorded:a=!1}={}){if(!a){if(this.#t.hasSeen(o))return;await this.#t.markSeen(o),this.#n.messagesReceived+=1,this.#n.lastMessageAt=new Date().toISOString()}let A=r.replyTarget,t=di(r.content),s=null;try{if(this.#s?.throwIfAborted(),r.kind==="group"&&r.addressed!==!0){this.#n.messagesRejected+=1,this.#n.lastRejectedAt=new Date().toISOString();return}let g=Ir(r);if(!t&&!g){await this.#A.sendText(A,"\u76EE\u524D\u652F\u6301\u6587\u5B57\u548C\u56FE\u7247\u6D88\u606F\u3002");return}let c=t.toLowerCase();if(!g&&c==="/help"){await this.#A.sendText(A,[`${this.#e.label}\u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002`,"","\u76F4\u63A5\u53D1\u9001\u6587\u5B57\u6216\u56FE\u7247\u5373\u53EF\u7EE7\u7EED\u5F53\u524D\u4F1A\u8BDD\u3002","/new \u5F00\u542F\u4E00\u4E2A\u5168\u65B0\u4F1A\u8BDD","/compact \u538B\u7F29\u5F53\u524D\u4F1A\u8BDD\u7684\u8F83\u65E9\u4E0A\u4E0B\u6587","/workspace \u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84 \u5207\u6362\u5DE5\u4F5C\u533A","/workspacelist \u5217\u51FA\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84","/sessionlist [\u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84] \u5217\u51FA\u4F1A\u8BDD ID \u548C\u6807\u9898","/session Session ID \u6216\u5F53\u524D\u5DE5\u4F5C\u533A\u5E8F\u53F7 \u5C06\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u5230\u6307\u5B9A\u4F1A\u8BDD","/models \u6309\u5E8F\u53F7\u5217\u51FA\u6240\u6709\u53EF\u7528\u6A21\u578B","/model [\u5E8F\u53F7\u6216\u5B8C\u6574\u6A21\u578BID] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B","\u793A\u4F8B\uFF1A\u5148\u53D1 /models\uFF0C\u518D\u53D1 /model 2","/presetlist \u6309\u5E8F\u53F7\u5217\u51FA\u53EF\u7528 Agent Preset","/preset [\u5E8F\u53F7\u6216\u5B8C\u6574ID] \u67E5\u770B\u6216\u8BBE\u7F6E\u5F53\u524D\u673A\u5668\u4EBA Agent Preset","\u7EAF\u6570\u5B57 ID\uFF1A/preset id:","/preset --default \u8DDF\u968F Host \u9ED8\u8BA4","/stop \u505C\u6B62\u5F53\u524D\u4EFB\u52A1","/steer \u8865\u5145\u6307\u4EE4 \u7EA0\u504F\u5F53\u524D\u4EFB\u52A1","/status \u68C0\u67E5\u8FDE\u63A5\u72B6\u6001","/help \u663E\u793A\u672C\u5E2E\u52A9"].join(` `));return}if(!g&&c==="/status"){await this.#r.ensureRunning({signal:this.#s}),await this.#A.sendText(A,`${this.#e.label}\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002`);return}let I=g?null:await Ki(t,this.#r,e);if(I){for(let y of I.messages??[I.message])await this.#A.sendText(A,y);return}if(!g&&c==="/new"){await this.#t.clearSession(e),await this.#A.sendText(A,"\u5DF2\u5F00\u542F\u65B0\u4F1A\u8BDD\u3002\u8BF7\u53D1\u9001\u4F60\u7684\u95EE\u9898\u3002");return}let E=g?null:await Ui(t,this.#r,this.#t,e,{signal:this.#s});if(E){await this.#A.sendText(A,E.message);return}await this.#A.sendTyping?.(A).catch(y=>{this.#o.warn?.(`[dsh-im:${this.#e.key}] typing indicator failed:`,y)});let B=!1;if(typeof this.#A.openStream=="function")try{s=await this.#A.openStream(A)}catch(y){this.#o.warn?.(`[dsh-im:${this.#e.key}] unable to start a streamed reply; using text:`,y)}let f=g?await Fi(r,{signal:this.#s}):void 0,{answer:Q}=await qa({harness:this.#r,state:this.#t,key:e,text:t,content:f,createOptions:this.#s?{signal:this.#s}:void 0,existsOptions:this.#s?{signal:this.#s}:void 0,askOptions:{timeoutMs:this.#l,signal:this.#s,control:{owner:this,key:e},onUpdate:s?async y=>{let m=y.type==="text"?y.text:y.type==="tool"?`\u6B63\u5728\u4F7F\u7528${y.name}\u2026`:y.text;m&&await s.update(m)}:void 0,onInteraction:y=>this.#u(y,{key:e,actor:i,target:A,requiresMention:r.kind==="group"}),onInteractionResolved:y=>this.#Q(y)}});if(s)try{await s.finish(Q),B=!0}catch(y){s.cancel?.(),this.#o.warn?.(`[dsh-im:${this.#e.key}] streamed reply finalization failed; using text:`,y)}B||await this.#A.sendText(A,Q),this.#n.messagesReplied+=1,this.#n.lastReplyAt=new Date().toISOString(),this.#n.lastError=null}catch(g){if(g?.code==="turn-stopped"){if(s)try{await s.finish("\u5DF2\u505C\u6B62\u3002")}catch{s.cancel?.()}return}if(s?.cancel?.(),this.#s?.aborted)return;this.#n.lastError=g?.message??String(g);let c=Li(g);if(c){try{await this.#A.sendText(A,c)}catch(I){this.#o.error?.(`[dsh-im:${this.#e.key}] failed to send the image error reply:`,I)}return}this.#o.error?.(`[dsh-im:${this.#e.key}] failed to process a message:`,g);try{await this.#A.sendText(A,"\u6D88\u606F\u5904\u7406\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}catch(I){this.#o.error?.(`[dsh-im:${this.#e.key}] failed to send the safe error reply:`,I)}}finally{await Promise.allSettled([this.#R(e),this.#h.closeRoute(e)])}}async#B(r,o,i,e,a){if(this.#s?.aborted)return;let A=this.#a.get(e),t=a.claimedReplyMessageId===o;if(!A||A!==a||A.submitting)return t&&(!A||A!==a)?this.#f(r,o):this.#C(r,o,i,e,{releaseMessageId:!1});if(this.#t.hasSeen(o))return;if(await this.#t.markSeen(o),this.#n.messagesReceived+=1,this.#n.lastMessageAt=new Date().toISOString(),r.kind==="group"&&r.addressed!==!0){this.#n.messagesRejected+=1,this.#n.lastRejectedAt=new Date().toISOString();return}let s=r.replyTarget,g=di(r.content);if(!g||Ir(r)){try{await this.#A.sendText(s,"\u8BF7\u7528\u6587\u5B57\u56DE\u7B54\u5F53\u524D\u95EE\u9898\u3002")}catch(E){this.#o.error?.(`[dsh-im:${this.#e.key}] failed to reject a non-text interaction reply:`,E)}return}let c=this.#a.get(e);if(!c||c!==a||c.submitting)return t&&(!c||c!==a)?this.#f(r,o,{alreadyRecorded:!0}):this.#C(r,o,i,e,{releaseMessageId:!1,alreadyRecorded:!0});if(c.target=s,c.needsPresentation){let E=c.presentationTask!==null;try{await this.#m(c)}catch(f){this.#n.lastError=`${this.#e.label}\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002`,this.#o.error?.(`[dsh-im:${this.#e.key}] failed to retry an interaction question:`,f),c.interaction.reconnect?.();return}let B=this.#a.get(e);if(!B||B!==a||B.submitting)return t&&(!B||B!==a)?this.#f(r,o,{alreadyRecorded:!0}):this.#C(r,o,i,e,{releaseMessageId:!1,alreadyRecorded:!0});if(!E)return}let I=c.questions[c.index];if(I){if(c.answers.push(xa(I,g)),c.index+=1,c.indexthis.#A.sendText(e,c)});if(r?.kind!=="question")return;let A=r?.payload?.questions,t=di(r?.interactionId)||di(r?.rpcId);if(!di(r?.rpcId)||!t||!di(r?.sessionId)||!Array.isArray(A)||A.length===0||A.some(c=>!Ka(c))){this.#o.warn?.(`[dsh-im:${this.#e.key}] ignored an invalid Harness question interaction`);return}if(r.recovered===!0){await this.#w(r,`${this.#e.label} safely cancelled an interaction left by an earlier client.`);try{await this.#A.sendText(e,"\u68C0\u6D4B\u5230\u8FD9\u4E2A Session \u4E2D\u9057\u7559\u7684\u5F85\u56DE\u7B54\u95EE\u9898\uFF0C\u5DF2\u5B89\u5168\u53D6\u6D88\u5E76\u7EE7\u7EED\u5904\u7406\u4F60\u521A\u624D\u7684\u6D88\u606F\u3002")}catch(c){this.#o.error?.(`[dsh-im:${this.#e.key}] failed to send an interaction recovery notice:`,c)}return}let s=this.#a.get(o);if(s?.interactionId===t){s.interaction=r,s.needsPresentation&&await this.#m(s);return}if(this.#i.has(t))return;if(s){this.#o.warn?.(`[dsh-im:${this.#e.key}] cancelled a second pending Harness question`),await this.#w(r,`${this.#e.label} is already handling another user interaction.`);return}let g={kind:"question",interactionId:t,sessionId:r.sessionId,interaction:r,actor:i,requiresMention:a,questions:A,answers:[],index:0,target:e,queue:null,claimedReplyMessageId:null,submitting:!1,needsPresentation:!0,presentationTask:null};this.#a.set(o,g),this.#i.set(t,o),await this.#m(g)}async#Q(r){if(r?.kind==="approval"){await this.#h.handleResolved(r);return}let o=di(r?.interactionId);if(r?.kind!=="question"||!o)return;let i=this.#i.get(o);i&&this.#D(i,o)}#m(r){if(r.presentationTask)return r.presentationTask;let o=r.questions[r.index];if(!o)return Promise.resolve();let i=(async()=>{await this.#A.sendText(r.target,Ya(o,r.index,r.questions.length,{requiresMention:r.requiresMention})),r.needsPresentation=!1})();return r.presentationTask=i,i.then(()=>{r.presentationTask===i&&(r.presentationTask=null)},()=>{r.presentationTask===i&&(r.presentationTask=null)}),i}async#f(r,o,{alreadyRecorded:i=!1}={}){if(!i){if(this.#t.hasSeen(o))return;await this.#t.markSeen(o),this.#n.messagesReceived+=1,this.#n.lastMessageAt=new Date().toISOString()}try{await this.#A.sendText(r.replyTarget,iU)}catch(e){this.#o.error?.(`[dsh-im:${this.#e.key}] failed to send an expired interaction notice:`,e)}}#y(r,o){let i=this.#a.get(r);return!i||o!==void 0&&i.interactionId!==o?null:(this.#a.delete(r),this.#i.delete(i.interactionId),i)}#D(r,o){return this.#y(r,o)!==null}async#w(r,o){try{await r.respond({ok:!1,error:{code:"cancelled",message:o,details:{}}},{signal:AbortSignal.timeout(5e3)})}catch(i){if(i?.code!=="interaction-not-pending")throw i}}async#R(r){let o=this.#y(r);if(!(!o||o.kind!=="question"))try{await this.#w(o.interaction,`The ${this.#e.label} interaction ended before the user answered.`)}catch(i){this.#o.warn?.(`[dsh-im:${this.#e.key}] failed to cancel a pending Harness interaction:`,i)}}};var FO=Object.freeze({key:"discord",label:"Discord",connectionLabel:" Gateway \u957F\u8FDE\u63A5"}),cB=class extends rn{constructor(r){super({descriptor:FO,...r})}};var tC=class extends XI{constructor(r){super({...r,descriptor:FO,inspectToken:r.inspectToken??aU,deriveIdentity:tU,maskPlatformId:rU})}};var IB=class extends rr{constructor(r){super({...r,rpcIdPrefix:"discord",logPrefix:"dsh-discord"})}};function ji(n,r){let o=typeof n=="string"?n.trim():"";if(!o)return[];let i=[],e=o;for(;e.length>r;){let a=e.lastIndexOf(` -`,r);a{I||g!==null||c||!s||(g=setTimeout(()=>{g=null;let f=s;s=null;let Q=ji(f,r)[0]??n;c=Promise.resolve(Q===E?void 0:e(t,Q)).then(()=>{E=Q}).catch(y=>A.warn?.("[dsh-im] streamed message update failed:",y)).finally(()=>{c=null,B()})},o),g?.unref?.())};return{async start(){return t=await i(n),this},update(f){I||typeof f!="string"||!f.trim()||(s=f,B())},async finish(f){if(I)throw new Error("Message stream is already closed");I=!0,g!==null&&clearTimeout(g),g=null,s=null,await c?.catch(()=>{});let Q=ji(f,r),y=Q[0]??"\u5904\u7406\u5B8C\u6210\u3002";y!==E&&await e(t,y),E=y;for(let m of Q.slice(1))await a(m)},cancel(){I=!0,s=null,g!==null&&clearTimeout(g),g=null}}}var Dse=4609,oU=Object.freeze([1e3,3e3,5e3,1e4,3e4]),wse=new Set(["image/jpeg","image/png","image/webp","image/gif"]),Ose=new Map([[".jpg","image/jpeg"],[".jpeg","image/jpeg"],[".png","image/png"],[".webp","image/webp"],[".gif","image/gif"]]),bse=Object.freeze(["cdn.discordapp.com"]);function Mse(n){let r=new URL(n);if(r.protocol!=="wss:")throw new Error("Discord returned an insecure Gateway URL");return r.searchParams.set("v","10"),r.searchParams.set("encoding","json"),r.href}function LO(n,r,o){if(typeof n.addEventListener=="function")n.addEventListener(r,o);else if(typeof n.on=="function")n.on(r,o);else throw new TypeError("Discord WebSocket does not support events")}function _se(n){return typeof n=="string"?n:typeof n?.data=="string"?n.data:Buffer.isBuffer(n)?n.toString("utf8"):Buffer.isBuffer(n?.data)?n.data.toString("utf8"):null}function Nse(n){if(n===4004){let o=new Error("Discord Bot Token \u65E0\u6548\uFF0C\u8BF7\u91CD\u65B0\u586B\u5199\u3002");return o.code="discord-401",o}if(n===4013||n===4014){let o=new Error("Discord Gateway Intents \u914D\u7F6E\u4E0D\u6B63\u786E\uFF0C\u8BF7\u68C0\u67E5 Developer Portal \u7684 Bot \u8BBE\u7F6E\u3002");return o.code="discord-intents",o}let r=new Error(`Discord Gateway closed (${n||"unknown"})`);return r.code="discord-gateway-closed",r}function Tse(n,r){return typeof n!="string"?"":n.replace(new RegExp(`<@!?${r}>`,"g"),"").trim()}function Rse(n){let r=typeof n?.content_type=="string"?n.content_type.split(";",1)[0].trim().toLowerCase():"";if(wse.has(r))return r;let o=typeof n?.filename=="string"?n.filename.toLowerCase():"";for(let[i,e]of Ose)if(o.endsWith(i))return e;return null}function kse(n){return Number.isSafeInteger(n)&&n>=0?n:void 0}function vse(n,r){let o=Rse(n);return!o||typeof n?.url!="string"?null:{name:typeof n.filename=="string"?n.filename:void 0,mediaType:o,size:kse(n.size),load:i=>Gi(n.url,{...i,fetchImpl:r,allowedHosts:bse})}}function Pse(n,r,{fetchImpl:o=fetch}={}){if(!n?.id||!n?.channel_id||!n?.author?.id)return null;let i=!n.guild_id,e=i||n.mentions?.some(a=>String(a?.id)===String(r));return{messageId:String(n.id),senderId:String(n.author.id),senderIsBot:n.author.bot===!0,kind:i?"direct":"group",conversationId:String(n.channel_id),content:Tse(n.content??"",r),images:Array.isArray(n.attachments)?n.attachments.map(a=>vse(a,o)).filter(Boolean):[],addressed:e,replyTarget:{channelId:String(n.channel_id),replyToMessageId:String(n.id)},connectionTestTarget:{channelId:String(n.channel_id)}}}var UO=class{#e;#A;constructor({api:r,signal:o}){this.#e=r,this.#A=o}async sendText(r,o){let i=ji(o,1900),e=null;for(let[a,A]of i.entries())e=await this.#e.createMessage({channelId:r.channelId,content:A,replyToMessageId:a===0?r.replyToMessageId:void 0,signal:this.#A});return e}sendTyping(r){return this.#e.sendTyping({channelId:r.channelId,signal:this.#A})}async openStream(r){return lB({limit:1900,create:async i=>(await this.#e.createMessage({channelId:r.channelId,content:i,replyToMessageId:r.replyToMessageId,signal:this.#A})).id,edit:(i,e)=>this.#e.editMessage({channelId:r.channelId,messageId:i,content:e,signal:this.#A}),sendRemainder:i=>this.#e.createMessage({channelId:r.channelId,content:i,signal:this.#A})}).start()}};function Gse(){return{startedAt:null,ready:!1,connectionState:"idle",harnessReachable:!1,lastCheckedAt:null,lastConnectedAt:null,lastError:null,...ui()}}var rC=class{#e;#A;#r;#t;#n;#o;#l;#s;#I;#a;#i=Gse();#c=null;#g=null;#p=null;#h=null;#C=null;#E=null;#d=null;#B=null;#u=null;#Q=!0;#m=null;#f=0;#y=0;#D=!0;#w=null;constructor({config:r,token:o,harness:i,state:e,logger:a=console,replyTimeoutMs:A=6e5,connectTimeoutMs:t=2e4,createApi:s=I=>new AC(I),createWebSocket:g=I=>new WebSocket(I),random:c=Math.random}){if(!r||!o||!i||!e)throw new TypeError("DiscordRuntime requires config, token, Harness, and state");if(typeof g!="function")throw new TypeError("DiscordRuntime requires WebSocket");this.#e=r,this.#A=o,this.#r=i,this.#t=e,this.#n=a,this.#o=A,this.#l=t,this.#s=s,this.#I=g,this.#a=c}get status(){return structuredClone(this.#i)}async sendConnectionTest(r){if(!this.#i.ready||!this.#g){let o=new Error("Discord bot is not connected");throw o.code="test-target-unavailable",o}return this.#g.sendConnectionTest(r)}async start(){return this.#i.ready&&this.#h?this.status:this.#w?this.#w:(this.#w=this.#R().finally(()=>{this.#w=null}),this.#w)}async#R(){await this.stop(),this.#D=!1,this.#d=null,this.#E=null,this.#B=null,this.#f=0,this.#i.startedAt=new Date().toISOString(),this.#i.connectionState="connecting",this.#i.lastError=null,await this.#r.ensureRunning(),this.#i.harnessReachable=!0;let r=new AbortController;this.#p=r;let o=this.#s({token:this.#A});this.#c=o;try{let[i,e]=await Promise.all([o.getCurrentUser({signal:r.signal}),o.getGatewayBot({signal:r.signal})]);if(String(i?.id??"")!==this.#e.platformId||i?.bot!==!0)throw new Error("Discord token identity does not match the saved bot");this.#C=e?.url;let a=new UO({api:o,signal:r.signal});this.#g=new cB({bot:a,harness:this.#r,state:this.#t,status:this.#i,logger:this.#n,replyTimeoutMs:this.#o,signal:r.signal});let A;try{await Promise.race([this.#M(!1),new Promise((t,s)=>{A=setTimeout(()=>s(new Error("Discord Gateway did not become ready in time")),this.#l)})])}finally{clearTimeout(A)}return this.status}catch(i){throw this.#i.ready=!1,this.#i.connectionState="failed",this.#i.lastError=i?.message??String(i),await this.stop(),i}}#M(r){if(this.#D)return Promise.reject(new Error("Discord runtime is stopped"));let o=++this.#y,i=Mse(r&&this.#E?this.#E:this.#C),e=this.#I(i);this.#h=e;let a=!1;return new Promise((A,t)=>{let s=()=>{if(a||o!==this.#y)return;a=!0,this.#f=0;let g=Date.now();this.#i.ready=!0,this.#i.connectionState="connected",this.#i.lastCheckedAt=g,this.#i.lastConnectedAt=g,this.#i.lastError=null,A()};LO(e,"message",g=>{if(o!==this.#y||this.#D)return;let c=_se(g);if(!c)return;let I;try{I=JSON.parse(c)}catch{this.#n.warn?.("[dsh-im:discord] ignored malformed Gateway JSON");return}if(Number.isSafeInteger(I.s)&&(this.#B=I.s),I.op===10){this.#O(I.d?.heartbeat_interval,e,o),r&&this.#d?this.#T(e,{op:6,d:{token:this.#A,session_id:this.#d,seq:this.#B}}):this.#T(e,{op:2,d:{token:this.#A,intents:Dse,properties:{os:process.platform,browser:"dsh-im",device:"dsh-im"}}});return}if(I.op===11){this.#Q=!0,this.#i.lastCheckedAt=Date.now();return}if(I.op===1){this.#b(e);return}if(I.op===7){e.close(4e3,"Reconnect requested");return}if(I.op===9){I.d!==!0&&(this.#d=null,this.#E=null,this.#B=null),e.close(4e3,"Invalid session");return}if(I.op===0){if(I.t==="READY")this.#d=I.d?.session_id??null,this.#E=I.d?.resume_gateway_url??null,s();else if(I.t==="RESUMED")s();else if(I.t==="MESSAGE_CREATE"){let E=Pse(I.d,this.#e.platformId),B=this.#g;E&&B&&B.accept(E).catch(f=>{o!==this.#y||this.#D||this.#n.error?.(`[dsh-im:discord] bot ${this.#e.botId} message handling failed:`,f)})}}}),LO(e,"close",(g={})=>{if(o!==this.#y)return;if(this.#_(),this.#h===e&&(this.#h=null),this.#D){a||t(new DOMException("Stopped","AbortError"));return}let c=Nse(Number(g.code)||0);if(this.#i.ready=!1,this.#i.connectionState="connecting",this.#i.lastError=c.message,a||(a=!0,t(c)),c.code==="discord-401"||c.code==="discord-intents"){this.#i.connectionState="failed";return}this.#P()}),LO(e,"error",()=>{o!==this.#y||this.#D||(this.#i.lastError="Discord Gateway WebSocket error")})})}#T(r,o){r.readyState===1&&r.send(JSON.stringify(o))}#O(r,o,i){if(this.#_(),!Number.isFinite(r)||r<1e3){o.close(4e3,"Invalid heartbeat interval");return}this.#Q=!0;let e=a=>{this.#u=setTimeout(()=>{if(!(this.#D||i!==this.#y||this.#h!==o)){if(!this.#Q){o.close(4e3,"Heartbeat was not acknowledged");return}this.#b(o),e(r)}},a),this.#u?.unref?.()};e(Math.floor(r*this.#a()))}#b(r){this.#Q=!1,this.#T(r,{op:1,d:this.#B})}#_(){this.#u!==null&&clearTimeout(this.#u),this.#u=null,this.#Q=!0}#P(){if(this.#D||this.#m!==null)return;let r=oU[Math.min(this.#f,oU.length-1)];this.#f+=1,this.#m=setTimeout(()=>{this.#m=null,this.#M(!!this.#d).catch(o=>{this.#D||(this.#n.warn?.("[dsh-im:discord] Gateway reconnect failed:",o),this.#P())})},r),this.#m?.unref?.()}async stop(){this.#D=!0,this.#y+=1,this.#p?.abort(),this.#p=null,this.#m!==null&&clearTimeout(this.#m),this.#m=null,this.#_();let r=this.#h,o=this.#g;this.#h=null,this.#g=null,this.#c=null;try{r&&r.readyState<2&&r.close(1e3,"Plugin stopped")}catch(i){this.#n.warn?.(`[dsh-im:discord] bot ${this.#e.botId} failed to close Gateway:`,i)}return await Promise.race([o?.waitForIdle()??Promise.resolve(),new Promise(i=>setTimeout(i,2e3))]),this.#i.ready=!1,this.#i.connectionState="idle",this.status}};import{mkdir as Fse,readFile as Lse,rename as Use,unlink as Hse,writeFile as Kse}from"node:fs/promises";import{dirname as Yse}from"node:path";var pB=Object.freeze({version:1,sessions:{},seenMessageIds:[],cursor:null});function xse(n){if(!n||typeof n!="object")return structuredClone(pB);let r={};if(n.sessions&&typeof n.sessions=="object"&&!Array.isArray(n.sessions))for(let[o,i]of Object.entries(n.sessions))typeof o=="string"&&o&&typeof i=="string"&&i&&(r[o]=i);return{version:1,sessions:r,seenMessageIds:Array.isArray(n.seenMessageIds)?n.seenMessageIds.filter(o=>typeof o=="string"&&o).slice(-1e3):[],cursor:Number.isSafeInteger(n.cursor)&&n.cursor>=0?n.cursor:null}}var an=class{#e;#A=structuredClone(pB);#r=Promise.resolve();constructor(r){this.#e=r}async load(){try{this.#A=xse(JSON.parse(await Lse(this.#e,"utf8")))}catch(r){if(r?.code!=="ENOENT")throw r;this.#A=structuredClone(pB),await this.#t()}return this}sessionFor(r){return this.#A.sessions[r]??null}async setSession(r,o){this.#A.sessions[r]=o,await this.#t()}async clearSession(r){delete this.#A.sessions[r],await this.#t()}async clearSessions(){this.#A.sessions={},await this.#t()}hasSeen(r){return this.#A.seenMessageIds.includes(r)}async markSeen(r){this.hasSeen(r)||(this.#A.seenMessageIds.push(r),this.#A.seenMessageIds.length>1e3&&this.#A.seenMessageIds.splice(0,this.#A.seenMessageIds.length-1e3),await this.#t())}cursor(){return this.#A.cursor}async setCursor(r){if(!Number.isSafeInteger(r)||r<0)throw new TypeError("Invalid update cursor");this.#A.cursor=r,await this.#t()}snapshot(){return structuredClone(this.#A)}async remove(){try{await Hse(this.#e)}catch(r){if(r?.code!=="ENOENT")throw r}this.#A=structuredClone(pB)}async#t(){let r=`${JSON.stringify(this.#A,null,2)} -`,o=this.#r.then(async()=>{await Fse(Yse(this.#e),{recursive:!0,mode:448});let i=`${this.#e}.tmp`;await Kse(i,r,{encoding:"utf8",mode:384}),await Use(i,this.#e)});this.#r=o.then(()=>{},()=>{}),await o}};var EB=class extends an{};import{unlink as Jse}from"node:fs/promises";import{homedir as qse}from"node:os";import{join as aC,resolve as Ic}from"node:path";var nU=Object.freeze([250,1e3,3e3,5e3,1e4,3e4]);function jse(n){if(!Array.isArray(n)||n.length===0)return[...nU];let r=n.filter(o=>Number.isFinite(o)&&o>=0);return r.length>0?r:[...nU]}var HO=class{#e;#A;#r;#t;#n;#o;#l;#s;#I=null;#a=null;#i=0;#c=!1;#g=!1;#p;#h;constructor({channel:r,controller:o,harness:i,logger:e=console,retryDelaysMs:a,healthyIntervalMs:A=15e3,setTimeoutImpl:t=setTimeout,clearTimeoutImpl:s=clearTimeout}){if(!r)throw new TypeError("TokenConnectionSupervisor requires a channel");if(!o||typeof o.initialize!="function"||typeof o.status!="function")throw new TypeError("TokenConnectionSupervisor requires a controller");if(!i||typeof i.ensureRunning!="function")throw new TypeError("TokenConnectionSupervisor requires a Harness client");this.#e=r,this.#A=o,this.#r=i,this.#t=e,this.#n=jse(a),this.#o=Number.isFinite(A)&&A>=0?A:15e3,this.#l=t,this.#s=s,this.#p=new Promise(g=>{this.#h=g})}get ready(){return this.#p}start(){return this.#g||this.#c?this:(this.#g=!0,this.#C(0),this)}async close(){this.#c||(this.#c=!0,this.#I!==null&&this.#s(this.#I),this.#I=null,await this.#a?.catch(()=>{}),this.#h?.(null),this.#h=null)}#C(r){this.#c||(this.#I=this.#l(()=>{this.#I=null,this.#E()},r),this.#I?.unref?.())}async#E(){if(this.#c||this.#a)return;let r=this.#d();this.#a=r;try{await r}finally{this.#a===r&&(this.#a=null)}}async#d(){try{if(await this.#r.ensureRunning(),this.#c)return;let r=await this.#A.initialize();if(this.#c)return;this.#h?.(r),this.#h=null;let{configured:o,connected:i}=r.totals;if(i65535)throw new Error("dsh-im token channel requires an initialized DSH webServer port");return new URL(`http://127.0.0.1:${o}`)}function KO(n,r){let o=Ic(n.dshHome??process.env.DSH_HOME??aC(qse(),".dsh")),i=Ic(n.dataDir??aC(o,"integrations",`dsh-${r}`));return{config:Ic(n.configPath??aC(i,"config.json")),bots:Ic(n.botsDir??aC(i,"bots")),workspaces:Ic(n.workspacesPath??aC(i,"workspaces.json"))}}async function CB(n,r,o,i){let{channel:e,ConfigStore:a,StateStore:A,HarnessClient:t,Controller:s,Runtime:g,runtimeOptions:c}=i;if(!n?.credentials)throw new TypeError(`dsh-im ${e} requires ctx.credentials`);if(!n?.webServer)throw new TypeError(`dsh-im ${e} requires ctx.webServer`);let I=o.ConfigStore??a,E=o.StateStore??A,B=o.HarnessClient??t,f=o.Controller??s,Q=o.Runtime??g,y=typeof c=="function"?c(r):{};if(!y||typeof y!="object"||Array.isArray(y))throw new TypeError(`dsh-im ${e} runtimeOptions must return an object`);let m=o.createConnectionSupervisor??el,T=typeof n.logger=="function"?n.logger(`dsh-im:${e}`):n.logger??console,_=()=>pa(n),P=KO(r,e),Y=await new I(P.config).load(),j=Ic(r.workspace??process.cwd()),K=o.WorkspaceStore??Fr,q=o.workspaces??await new K(P.workspaces,{defaultWorkspace:j}).load(),V=Y.list();await q.reconcile(V.map(me=>me.botId)),await Promise.all(V.map(me=>q.ensure(me.botId,{defaultAgentPreset:r.agentPreset})));let H=typeof Y.remove=="function"?Ea(Y,{workspaces:q}):Y,v=new Map,Z=me=>Ic(P.bots,me,"state.json"),U=async me=>{let _e=v.get(me);return _e||(_e=await new E(Z(me)).load(),v.set(me,_e)),_e},M=da(n,o.commandExecutor),{controlExecutor:G,sessionMaintenanceExecutor:te}=ua(n,{controlExecutor:o.controlExecutor,sessionMaintenanceExecutor:o.sessionMaintenanceExecutor}),Be=new B({baseUrl:iC(n.webServer,r.harnessBaseUrl),workspace:j,autostart:!1,dshBin:r.dshBin??"dsh",...M?{commandExecutor:M}:{},...G?{controlExecutor:G}:{},...te?{sessionMaintenanceExecutor:te}:{}}),Ce=new f({credentials:n.credentials,configStore:H,logger:T,...o.inspectToken?{inspectToken:o.inspectToken}:{},createRuntime:async({botId:me,config:_e,token:Ve})=>{let oA=await U(me);await q.ensure(me,{defaultAgentPreset:r.agentPreset});let tA=Ca(Be,{botId:me,workspaces:q,state:oA,agentPresetCatalog:_});return new Q({...y,config:_e,token:Ve,harness:tA.harness,state:tA.state,replyTimeoutMs:r.replyTimeoutMs??6e5,connectTimeoutMs:r.connectTimeoutMs??2e4,logger:{error:(...Pe)=>T.error?.(`[${me}]`,...Pe),warn:(...Pe)=>T.warn?.(`[${me}]`,...Pe),info:(...Pe)=>T.info?.(`[${me}]`,...Pe),debug:(...Pe)=>T.debug?.(`[${me}]`,...Pe)}})},deleteState:async({botId:me})=>{let _e=v.get(me);if(v.delete(me),_e&&typeof _e.remove=="function")await _e.remove();else try{await Jse(Z(me))}catch(Ve){if(Ve?.code!=="ENOENT")throw Ve}}}),ke=ha(Ce,{workspaces:q,stateFor:U,agentPresetCatalog:_}),Ee=m({channel:e,controller:ke,harness:Be,logger:T,retryDelaysMs:r.retryDelaysMs,healthyIntervalMs:r.healthyIntervalMs}).start();return{controller:ke,ready:Ee.ready,async close(){await Ee.close(),await ke.close(),Be.stopManagedProcess()}}}function YO(n,r={},o={}){return CB(n,r,o,{channel:"discord",ConfigStore:gB,StateStore:EB,HarnessClient:IB,Controller:tC,Runtime:rC})}var ya=Object.freeze({status:"connection.status",bindCredentials:"bot.bind-credentials",reconnectBot:"bot.reconnect",deleteBot:"bot.delete",setWorkspace:za,setAgentPreset:Wa}),Vse=Object.freeze(Object.values(ya)),zse=new Set(["token","botToken","tokenRef","platformId","secret","secretRef"]);function jO(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function hB(n,r){return jO(n)&&Object.keys(n).every(o=>r.includes(o))}function sU(n){return typeof n=="string"&&/^[A-Za-z0-9_-]{1,128}$/.test(n)}function Wse(n){return typeof n=="string"&&n.trim().length>=20&&n.length<=4096}function Zse(n,r){return jO(r)?n===ya.status?hB(r,[])?null:"connection.status does not accept fields.":n===ya.bindCredentials?hB(r,["token"])&&Wse(r.token)?null:"bot.bind-credentials requires a Bot Token.":n===ya.reconnectBot?hB(r,["botId","sendTest"])&&sU(r.botId)&&(r.sendTest===void 0||typeof r.sendTest=="boolean")?null:"bot.reconnect requires a botId.":n===ya.deleteBot?hB(r,["botId","confirm"])&&sU(r.botId)&&r.confirm===!0?null:"bot.delete requires a botId and confirm=true.":n===ya.setWorkspace?Ba(r)?null:"\u8BF7\u8F93\u5165\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84\u3002":n===ya.setAgentPreset?Qa(r)?null:"\u8BF7\u9009\u62E9 Agent Preset\u3002":"Unknown bot endpoint.":"Payload must be an object."}function xO(n){if(Array.isArray(n))return n.map(xO);if(!jO(n))return n;let r={};for(let[o,i]of Object.entries(n))zse.has(o)||(r[o]=xO(i));return r}function Xse(n,r){let o=fa(r);return o||(r?.code==="webhook-configured"?{code:"webhook-configured",message:r.message}:r?.code==="telegram-401"||r?.code==="discord-401"?{code:"invalid-token",message:`${n} Bot Token \u65E0\u6548\uFF0C\u8BF7\u91CD\u65B0\u586B\u5199\u3002`}:r?.code==="discord-intents"?{code:"discord-intents",message:r.message}:{code:`${n.toLowerCase()}-operation-failed`,message:`${n} \u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002`})}function dB(n,{channel:r}){for(let o of["status","bindCredentials","reconnectBot","deleteBot"])if(typeof n?.[o]!="function")throw new TypeError(`A complete ${r} controller is required (${o})`);return async(o,i,e)=>{if(e?.aborted)return{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}};if(!Vse.includes(o))return{ok:!1,error:{code:"bad-request",message:`Unknown ${r} endpoint.`}};let a=Zse(o,i);if(a)return{ok:!1,error:{code:"bad-request",message:a}};try{let A;if(o===ya.status)A=await n.status();else if(o===ya.bindCredentials)A=await n.bindCredentials(i);else if(o===ya.reconnectBot){if(A=await n.reconnectBot(i.botId),e?.aborted)return{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}};if(i.sendTest===!0){let t=null;try{if(A?.bots?.find(s=>s?.botId===i.botId)?.connected!==!0){let s=new Error("Bot is not connected");throw s.code="test-target-unavailable",s}if(typeof n.sendConnectionTest!="function"){let s=new Error("Connection test is unavailable");throw s.code="test-target-unavailable",s}await n.sendConnectionTest(i.botId)}catch(s){t=s}A={...A,testMessage:qt(t)}}}else if(o===ya.setWorkspace){if(typeof n.updateWorkspace!="function")throw new Error("Workspace update is unavailable");A=await n.updateWorkspace(i.botId,i.workspace)}else if(o===ya.setAgentPreset){if(typeof n.updateAgentPreset!="function")throw new Error("Agent preset update is unavailable");A=await n.updateAgentPreset(i.botId,i.agentPreset)}else A=await n.deleteBot(i.botId);return e?.aborted?{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}}:{ok:!0,value:xO(A)}}catch(A){return e?.aborted?{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}}:{ok:!1,error:Xse(r,A)}}}}function gU(n,r,{channel:o,rpcChannel:i,authority:e}){if(!n?.connection?.rpc||typeof n.connection.rpc.handle!="function")throw new TypeError("DSH Host Connection RPC is required");return n.connection.rpc.handle(i,dB(r,{channel:o}),{authority:Er(e)})}var cU="/discord",IU=ya,$se=Object.freeze(Object.values(IU));function uB(n,r,o){return gU(n,r,{channel:"Discord",rpcChannel:cU,authority:o})}async function lU(n,r={}){if(r?.controller)return uB(n,r.controller,r.rpcAuthority);let o=await YO(n,r,r.internals??{}),i=uB(n,o.controller,r.rpcAuthority);return n.effect(()=>async()=>o.close(),"dsh-im: close Discord bot connections"),i}import{homedir as Qge}from"node:os";import{join as zO,resolve as WO}from"node:path";import{mkdir as ege,readFile as Age,rename as tge,unlink as rge,writeFile as age}from"node:fs/promises";import{dirname as ige,isAbsolute as oge}from"node:path";var Al="office-harness.v1",pU="/office",tl=Object.freeze({status:"connection.status",configure:"connector.configure",reconnect:"connector.reconnect",test:"connector.test",remove:"connector.remove"}),bo=Object.freeze({stream:"/api/harness/connector/stream",heartbeat:"/api/harness/connector/heartbeat",job:"/api/harness/connector/jobs/:id",accept:"/api/harness/connector/jobs/:id/accept",renew:"/api/harness/connector/jobs/:id/renew",progress:"/api/harness/connector/jobs/:id/progress",approval:"/api/harness/connector/jobs/:id/approval",result:"/api/harness/connector/jobs/:id/result",fail:"/api/harness/connector/jobs/:id/fail"});function oC(n){let r=new URL(typeof n=="string"?n.trim():""),o=r.protocol==="http:"&&["localhost","127.0.0.1","[::1]"].includes(r.hostname);if(r.protocol!=="https:"&&!o)throw new TypeError("AI Office URL must use HTTPS (HTTP is allowed only for loopback testing)");if(r.username||r.password||r.search||r.hash)throw new TypeError("AI Office URL must be a bare origin");return r.pathname="/",r}function BB(n){let r=oC(n);return Object.fromEntries(Object.entries(bo).map(([o,i])=>[o,new URL(i,r).toString()]))}var nge=/^[a-z][a-z0-9-]{1,63}$/,sge=/^[a-z0-9][a-z0-9_-]{2,63}$/i;function rl(n){return typeof n=="string"&&n.trim()?n.trim():null}function EU(n,{kind:r}){if(!n||typeof n!="object"||Array.isArray(n))return null;let o={};for(let[i,e]of Object.entries(n)){let a=rl(i),A=rl(e);if(!a||!nge.test(a)||!A||r==="workspace"&&!oge(A)||r==="preset"&&A.length>8e3)return null;o[a]=A}return Object.freeze(o)}function fB(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let r;try{r=oC(n.baseUrl).origin}catch{return null}let o=rl(n.deviceId),i=rl(n.deviceTokenRef),e=EU(n.workspaces??{},{kind:"workspace"}),a=EU(n.instructionPresets??{},{kind:"preset"}),A=Number(n.maxConcurrency??1),t=Number(n.heartbeatSeconds??30);return!o||!sge.test(o)||!i||!/^DSH_OFFICE_DEVICE_TOKEN_[A-F0-9]{24}$/.test(i)||!e||!a||!Number.isInteger(A)||A<1||A>4||!Number.isInteger(t)||t<10||t>300?null:Object.freeze({version:1,protocolVersion:Al,baseUrl:r,deviceId:o,deviceTokenRef:i,maxConcurrency:A,heartbeatSeconds:t,workspaces:e,instructionPresets:a,createdAt:rl(n.createdAt)??new Date().toISOString(),updatedAt:rl(n.updatedAt)??new Date().toISOString()})}var QB=class{#e;#A=null;#r=Promise.resolve();constructor(r){this.#e=r}async load(){try{let r=fB(JSON.parse(await Age(this.#e,"utf8")));if(!r)throw new Error("dsh-im AI Office config is invalid");this.#A=r}catch(r){if(r?.code!=="ENOENT")throw r;this.#A=null}return this}get(){return this.#A?structuredClone(this.#A):null}async save(r){let o=fB(r);if(!o)throw new Error("Refusing to persist invalid AI Office configuration");let i=this.#r.then(async()=>{await ege(ige(this.#e),{recursive:!0,mode:448});let e=`${this.#e}.tmp`;await age(e,`${JSON.stringify(o,null,2)} -`,{mode:384}),await tge(e,this.#e),this.#A=o});return this.#r=i.then(()=>{},()=>{}),await i,this.get()}async clear(){let r=this.#r.then(async()=>{try{await rge(this.#e)}catch(o){if(o?.code!=="ENOENT")throw o}this.#A=null});this.#r=r.then(()=>{},()=>{}),await r}};import{createHash as Bge}from"node:crypto";import{setTimeout as dge}from"node:timers/promises";function JO(n,r){let o=new Error(`AI Office ${n} failed: HTTP ${r.status}`);return o.code=r.status===401?"invalid-device-token":r.status===404?"office-hook-unavailable":r.status===409?"office-job-conflict":"office-transport-failed",o}function al(n,r="office-transport-failed",o){let i=new Error(n,o===void 0?void 0:{cause:o});return i.code=r,i}function qO(n,r){return r?.aborted||n?.name==="AbortError"}function gge(n){let r="message",o,i=[];for(let a of n.split(/\r?\n/))a.startsWith("event:")?r=a.slice(6).trim()||"message":a.startsWith("id:")?o=a.slice(3).trim()||void 0:a.startsWith("data:")&&i.push(a.slice(5).trimStart());if(i.length===0)return null;let e;try{e=JSON.parse(i.join(` +`,r);a{I||g!==null||c||!s||(g=setTimeout(()=>{g=null;let f=s;s=null;let Q=ji(f,r)[0]??n;c=Promise.resolve(Q===E?void 0:e(t,Q)).then(()=>{E=Q}).catch(y=>A.warn?.("[dsh-im] streamed message update failed:",y)).finally(()=>{c=null,B()})},o),g?.unref?.())};return{async start(){return t=await i(n),this},update(f){I||typeof f!="string"||!f.trim()||(s=f,B())},async finish(f){if(I)throw new Error("Message stream is already closed");I=!0,g!==null&&clearTimeout(g),g=null,s=null,await c?.catch(()=>{});let Q=ji(f,r),y=Q[0]??"\u5904\u7406\u5B8C\u6210\u3002";y!==E&&await e(t,y),E=y;for(let m of Q.slice(1))await a(m)},cancel(){I=!0,s=null,g!==null&&clearTimeout(g),g=null}}}var bse=4609,oU=Object.freeze([1e3,3e3,5e3,1e4,3e4]),Mse=new Set(["image/jpeg","image/png","image/webp","image/gif"]),_se=new Map([[".jpg","image/jpeg"],[".jpeg","image/jpeg"],[".png","image/png"],[".webp","image/webp"],[".gif","image/gif"]]),Nse=Object.freeze(["cdn.discordapp.com"]);function Tse(n){let r=new URL(n);if(r.protocol!=="wss:")throw new Error("Discord returned an insecure Gateway URL");return r.searchParams.set("v","10"),r.searchParams.set("encoding","json"),r.href}function LO(n,r,o){if(typeof n.addEventListener=="function")n.addEventListener(r,o);else if(typeof n.on=="function")n.on(r,o);else throw new TypeError("Discord WebSocket does not support events")}function Rse(n){return typeof n=="string"?n:typeof n?.data=="string"?n.data:Buffer.isBuffer(n)?n.toString("utf8"):Buffer.isBuffer(n?.data)?n.data.toString("utf8"):null}function kse(n){if(n===4004){let o=new Error("Discord Bot Token \u65E0\u6548\uFF0C\u8BF7\u91CD\u65B0\u586B\u5199\u3002");return o.code="discord-401",o}if(n===4013||n===4014){let o=new Error("Discord Gateway Intents \u914D\u7F6E\u4E0D\u6B63\u786E\uFF0C\u8BF7\u68C0\u67E5 Developer Portal \u7684 Bot \u8BBE\u7F6E\u3002");return o.code="discord-intents",o}let r=new Error(`Discord Gateway closed (${n||"unknown"})`);return r.code="discord-gateway-closed",r}function vse(n,r){return typeof n!="string"?"":n.replace(new RegExp(`<@!?${r}>`,"g"),"").trim()}function Pse(n){let r=typeof n?.content_type=="string"?n.content_type.split(";",1)[0].trim().toLowerCase():"";if(Mse.has(r))return r;let o=typeof n?.filename=="string"?n.filename.toLowerCase():"";for(let[i,e]of _se)if(o.endsWith(i))return e;return null}function Gse(n){return Number.isSafeInteger(n)&&n>=0?n:void 0}function Fse(n,r){let o=Pse(n);return!o||typeof n?.url!="string"?null:{name:typeof n.filename=="string"?n.filename:void 0,mediaType:o,size:Gse(n.size),load:i=>Gi(n.url,{...i,fetchImpl:r,allowedHosts:Nse})}}function Lse(n,r,{fetchImpl:o=fetch}={}){if(!n?.id||!n?.channel_id||!n?.author?.id)return null;let i=!n.guild_id,e=i||n.mentions?.some(a=>String(a?.id)===String(r));return{messageId:String(n.id),senderId:String(n.author.id),senderIsBot:n.author.bot===!0,kind:i?"direct":"group",conversationId:String(n.channel_id),content:vse(n.content??"",r),images:Array.isArray(n.attachments)?n.attachments.map(a=>Fse(a,o)).filter(Boolean):[],addressed:e,replyTarget:{channelId:String(n.channel_id),replyToMessageId:String(n.id)},connectionTestTarget:{channelId:String(n.channel_id)}}}var UO=class{#e;#A;constructor({api:r,signal:o}){this.#e=r,this.#A=o}async sendText(r,o){let i=ji(o,1900),e=null;for(let[a,A]of i.entries())e=await this.#e.createMessage({channelId:r.channelId,content:A,replyToMessageId:a===0?r.replyToMessageId:void 0,signal:this.#A});return e}sendTyping(r){return this.#e.sendTyping({channelId:r.channelId,signal:this.#A})}async openStream(r){return lB({limit:1900,create:async i=>(await this.#e.createMessage({channelId:r.channelId,content:i,replyToMessageId:r.replyToMessageId,signal:this.#A})).id,edit:(i,e)=>this.#e.editMessage({channelId:r.channelId,messageId:i,content:e,signal:this.#A}),sendRemainder:i=>this.#e.createMessage({channelId:r.channelId,content:i,signal:this.#A})}).start()}};function Use(){return{startedAt:null,ready:!1,connectionState:"idle",harnessReachable:!1,lastCheckedAt:null,lastConnectedAt:null,lastError:null,...ui()}}var rC=class{#e;#A;#r;#t;#n;#o;#l;#s;#I;#a;#i=Use();#c=null;#g=null;#p=null;#h=null;#C=null;#E=null;#d=null;#B=null;#u=null;#Q=!0;#m=null;#f=0;#y=0;#D=!0;#w=null;constructor({config:r,token:o,harness:i,state:e,logger:a=console,replyTimeoutMs:A=6e5,connectTimeoutMs:t=2e4,createApi:s=I=>new AC(I),createWebSocket:g=I=>new WebSocket(I),random:c=Math.random}){if(!r||!o||!i||!e)throw new TypeError("DiscordRuntime requires config, token, Harness, and state");if(typeof g!="function")throw new TypeError("DiscordRuntime requires WebSocket");this.#e=r,this.#A=o,this.#r=i,this.#t=e,this.#n=a,this.#o=A,this.#l=t,this.#s=s,this.#I=g,this.#a=c}get status(){return structuredClone(this.#i)}async sendConnectionTest(r){if(!this.#i.ready||!this.#g){let o=new Error("Discord bot is not connected");throw o.code="test-target-unavailable",o}return this.#g.sendConnectionTest(r)}async start(){return this.#i.ready&&this.#h?this.status:this.#w?this.#w:(this.#w=this.#R().finally(()=>{this.#w=null}),this.#w)}async#R(){await this.stop(),this.#D=!1,this.#d=null,this.#E=null,this.#B=null,this.#f=0,this.#i.startedAt=new Date().toISOString(),this.#i.connectionState="connecting",this.#i.lastError=null,await this.#r.ensureRunning(),this.#i.harnessReachable=!0;let r=new AbortController;this.#p=r;let o=this.#s({token:this.#A});this.#c=o;try{let[i,e]=await Promise.all([o.getCurrentUser({signal:r.signal}),o.getGatewayBot({signal:r.signal})]);if(String(i?.id??"")!==this.#e.platformId||i?.bot!==!0)throw new Error("Discord token identity does not match the saved bot");this.#C=e?.url;let a=new UO({api:o,signal:r.signal});this.#g=new cB({bot:a,harness:this.#r,state:this.#t,status:this.#i,logger:this.#n,replyTimeoutMs:this.#o,signal:r.signal});let A;try{await Promise.race([this.#M(!1),new Promise((t,s)=>{A=setTimeout(()=>s(new Error("Discord Gateway did not become ready in time")),this.#l)})])}finally{clearTimeout(A)}return this.status}catch(i){throw this.#i.ready=!1,this.#i.connectionState="failed",this.#i.lastError=i?.message??String(i),await this.stop(),i}}#M(r){if(this.#D)return Promise.reject(new Error("Discord runtime is stopped"));let o=++this.#y,i=Tse(r&&this.#E?this.#E:this.#C),e=this.#I(i);this.#h=e;let a=!1;return new Promise((A,t)=>{let s=()=>{if(a||o!==this.#y)return;a=!0,this.#f=0;let g=Date.now();this.#i.ready=!0,this.#i.connectionState="connected",this.#i.lastCheckedAt=g,this.#i.lastConnectedAt=g,this.#i.lastError=null,A()};LO(e,"message",g=>{if(o!==this.#y||this.#D)return;let c=Rse(g);if(!c)return;let I;try{I=JSON.parse(c)}catch{this.#n.warn?.("[dsh-im:discord] ignored malformed Gateway JSON");return}if(Number.isSafeInteger(I.s)&&(this.#B=I.s),I.op===10){this.#O(I.d?.heartbeat_interval,e,o),r&&this.#d?this.#T(e,{op:6,d:{token:this.#A,session_id:this.#d,seq:this.#B}}):this.#T(e,{op:2,d:{token:this.#A,intents:bse,properties:{os:process.platform,browser:"dsh-im",device:"dsh-im"}}});return}if(I.op===11){this.#Q=!0,this.#i.lastCheckedAt=Date.now();return}if(I.op===1){this.#b(e);return}if(I.op===7){e.close(4e3,"Reconnect requested");return}if(I.op===9){I.d!==!0&&(this.#d=null,this.#E=null,this.#B=null),e.close(4e3,"Invalid session");return}if(I.op===0){if(I.t==="READY")this.#d=I.d?.session_id??null,this.#E=I.d?.resume_gateway_url??null,s();else if(I.t==="RESUMED")s();else if(I.t==="MESSAGE_CREATE"){let E=Lse(I.d,this.#e.platformId),B=this.#g;E&&B&&B.accept(E).catch(f=>{o!==this.#y||this.#D||this.#n.error?.(`[dsh-im:discord] bot ${this.#e.botId} message handling failed:`,f)})}}}),LO(e,"close",(g={})=>{if(o!==this.#y)return;if(this.#_(),this.#h===e&&(this.#h=null),this.#D){a||t(new DOMException("Stopped","AbortError"));return}let c=kse(Number(g.code)||0);if(this.#i.ready=!1,this.#i.connectionState="connecting",this.#i.lastError=c.message,a||(a=!0,t(c)),c.code==="discord-401"||c.code==="discord-intents"){this.#i.connectionState="failed";return}this.#P()}),LO(e,"error",()=>{o!==this.#y||this.#D||(this.#i.lastError="Discord Gateway WebSocket error")})})}#T(r,o){r.readyState===1&&r.send(JSON.stringify(o))}#O(r,o,i){if(this.#_(),!Number.isFinite(r)||r<1e3){o.close(4e3,"Invalid heartbeat interval");return}this.#Q=!0;let e=a=>{this.#u=setTimeout(()=>{if(!(this.#D||i!==this.#y||this.#h!==o)){if(!this.#Q){o.close(4e3,"Heartbeat was not acknowledged");return}this.#b(o),e(r)}},a),this.#u?.unref?.()};e(Math.floor(r*this.#a()))}#b(r){this.#Q=!1,this.#T(r,{op:1,d:this.#B})}#_(){this.#u!==null&&clearTimeout(this.#u),this.#u=null,this.#Q=!0}#P(){if(this.#D||this.#m!==null)return;let r=oU[Math.min(this.#f,oU.length-1)];this.#f+=1,this.#m=setTimeout(()=>{this.#m=null,this.#M(!!this.#d).catch(o=>{this.#D||(this.#n.warn?.("[dsh-im:discord] Gateway reconnect failed:",o),this.#P())})},r),this.#m?.unref?.()}async stop(){this.#D=!0,this.#y+=1,this.#p?.abort(),this.#p=null,this.#m!==null&&clearTimeout(this.#m),this.#m=null,this.#_();let r=this.#h,o=this.#g;this.#h=null,this.#g=null,this.#c=null;try{r&&r.readyState<2&&r.close(1e3,"Plugin stopped")}catch(i){this.#n.warn?.(`[dsh-im:discord] bot ${this.#e.botId} failed to close Gateway:`,i)}return await Promise.race([o?.waitForIdle()??Promise.resolve(),new Promise(i=>setTimeout(i,2e3))]),this.#i.ready=!1,this.#i.connectionState="idle",this.status}};import{mkdir as Hse,readFile as Kse,rename as Yse,unlink as xse,writeFile as jse}from"node:fs/promises";import{dirname as Jse}from"node:path";var pB=Object.freeze({version:1,sessions:{},seenMessageIds:[],cursor:null});function qse(n){if(!n||typeof n!="object")return structuredClone(pB);let r={};if(n.sessions&&typeof n.sessions=="object"&&!Array.isArray(n.sessions))for(let[o,i]of Object.entries(n.sessions))typeof o=="string"&&o&&typeof i=="string"&&i&&(r[o]=i);return{version:1,sessions:r,seenMessageIds:Array.isArray(n.seenMessageIds)?n.seenMessageIds.filter(o=>typeof o=="string"&&o).slice(-1e3):[],cursor:Number.isSafeInteger(n.cursor)&&n.cursor>=0?n.cursor:null}}var an=class{#e;#A=structuredClone(pB);#r=Promise.resolve();constructor(r){this.#e=r}async load(){try{this.#A=qse(JSON.parse(await Kse(this.#e,"utf8")))}catch(r){if(r?.code!=="ENOENT")throw r;this.#A=structuredClone(pB),await this.#t()}return this}sessionFor(r){return this.#A.sessions[r]??null}async setSession(r,o){this.#A.sessions[r]=o,await this.#t()}async clearSession(r){delete this.#A.sessions[r],await this.#t()}async clearSessions(){this.#A.sessions={},await this.#t()}hasSeen(r){return this.#A.seenMessageIds.includes(r)}async markSeen(r){this.hasSeen(r)||(this.#A.seenMessageIds.push(r),this.#A.seenMessageIds.length>1e3&&this.#A.seenMessageIds.splice(0,this.#A.seenMessageIds.length-1e3),await this.#t())}cursor(){return this.#A.cursor}async setCursor(r){if(!Number.isSafeInteger(r)||r<0)throw new TypeError("Invalid update cursor");this.#A.cursor=r,await this.#t()}snapshot(){return structuredClone(this.#A)}async remove(){try{await xse(this.#e)}catch(r){if(r?.code!=="ENOENT")throw r}this.#A=structuredClone(pB)}async#t(){let r=`${JSON.stringify(this.#A,null,2)} +`,o=this.#r.then(async()=>{await Hse(Jse(this.#e),{recursive:!0,mode:448});let i=`${this.#e}.tmp`;await jse(i,r,{encoding:"utf8",mode:384}),await Yse(i,this.#e)});this.#r=o.then(()=>{},()=>{}),await o}};var EB=class extends an{};import{unlink as zse}from"node:fs/promises";import{homedir as Wse}from"node:os";import{join as aC,resolve as Ic}from"node:path";var nU=Object.freeze([250,1e3,3e3,5e3,1e4,3e4]);function Vse(n){if(!Array.isArray(n)||n.length===0)return[...nU];let r=n.filter(o=>Number.isFinite(o)&&o>=0);return r.length>0?r:[...nU]}var HO=class{#e;#A;#r;#t;#n;#o;#l;#s;#I=null;#a=null;#i=0;#c=!1;#g=!1;#p;#h;constructor({channel:r,controller:o,harness:i,logger:e=console,retryDelaysMs:a,healthyIntervalMs:A=15e3,setTimeoutImpl:t=setTimeout,clearTimeoutImpl:s=clearTimeout}){if(!r)throw new TypeError("TokenConnectionSupervisor requires a channel");if(!o||typeof o.initialize!="function"||typeof o.status!="function")throw new TypeError("TokenConnectionSupervisor requires a controller");if(!i||typeof i.ensureRunning!="function")throw new TypeError("TokenConnectionSupervisor requires a Harness client");this.#e=r,this.#A=o,this.#r=i,this.#t=e,this.#n=Vse(a),this.#o=Number.isFinite(A)&&A>=0?A:15e3,this.#l=t,this.#s=s,this.#p=new Promise(g=>{this.#h=g})}get ready(){return this.#p}start(){return this.#g||this.#c?this:(this.#g=!0,this.#C(0),this)}async close(){this.#c||(this.#c=!0,this.#I!==null&&this.#s(this.#I),this.#I=null,await this.#a?.catch(()=>{}),this.#h?.(null),this.#h=null)}#C(r){this.#c||(this.#I=this.#l(()=>{this.#I=null,this.#E()},r),this.#I?.unref?.())}async#E(){if(this.#c||this.#a)return;let r=this.#d();this.#a=r;try{await r}finally{this.#a===r&&(this.#a=null)}}async#d(){try{if(await this.#r.ensureRunning(),this.#c)return;let r=await this.#A.initialize();if(this.#c)return;this.#h?.(r),this.#h=null;let{configured:o,connected:i}=r.totals;if(i65535)throw new Error("dsh-im token channel requires an initialized DSH webServer port");return new URL(`http://127.0.0.1:${o}`)}function KO(n,r){let o=Ic(n.dshHome??process.env.DSH_HOME??aC(Wse(),".dsh")),i=Ic(n.dataDir??aC(o,"integrations",`dsh-${r}`));return{config:Ic(n.configPath??aC(i,"config.json")),bots:Ic(n.botsDir??aC(i,"bots")),workspaces:Ic(n.workspacesPath??aC(i,"workspaces.json"))}}async function CB(n,r,o,i){let{channel:e,ConfigStore:a,StateStore:A,HarnessClient:t,Controller:s,Runtime:g,runtimeOptions:c}=i;if(!n?.credentials)throw new TypeError(`dsh-im ${e} requires ctx.credentials`);if(!n?.webServer)throw new TypeError(`dsh-im ${e} requires ctx.webServer`);let I=o.ConfigStore??a,E=o.StateStore??A,B=o.HarnessClient??t,f=o.Controller??s,Q=o.Runtime??g,y=typeof c=="function"?c(r):{};if(!y||typeof y!="object"||Array.isArray(y))throw new TypeError(`dsh-im ${e} runtimeOptions must return an object`);let m=o.createConnectionSupervisor??el,T=typeof n.logger=="function"?n.logger(`dsh-im:${e}`):n.logger??console,_=()=>pa(n),P=KO(r,e),Y=await new I(P.config).load(),j=Ic(r.workspace??process.cwd()),K=o.WorkspaceStore??Fr,q=o.workspaces??await new K(P.workspaces,{defaultWorkspace:j}).load(),V=Y.list();await q.reconcile(V.map(me=>me.botId)),await Promise.all(V.map(me=>q.ensure(me.botId,{defaultAgentPreset:r.agentPreset})));let H=typeof Y.remove=="function"?Ea(Y,{workspaces:q}):Y,v=new Map,Z=me=>Ic(P.bots,me,"state.json"),U=async me=>{let _e=v.get(me);return _e||(_e=await new E(Z(me)).load(),v.set(me,_e)),_e},M=da(n,o.commandExecutor),{controlExecutor:G,sessionMaintenanceExecutor:te}=ua(n,{controlExecutor:o.controlExecutor,sessionMaintenanceExecutor:o.sessionMaintenanceExecutor}),Be=new B({baseUrl:iC(n.webServer,r.harnessBaseUrl),workspace:j,autostart:!1,dshBin:r.dshBin??"dsh",...M?{commandExecutor:M}:{},...G?{controlExecutor:G}:{},...te?{sessionMaintenanceExecutor:te}:{}}),Ce=new f({credentials:n.credentials,configStore:H,logger:T,...o.inspectToken?{inspectToken:o.inspectToken}:{},createRuntime:async({botId:me,config:_e,token:Ve})=>{let oA=await U(me);await q.ensure(me,{defaultAgentPreset:r.agentPreset});let tA=Ca(Be,{botId:me,workspaces:q,state:oA,agentPresetCatalog:_});return new Q({...y,config:_e,token:Ve,harness:tA.harness,state:tA.state,replyTimeoutMs:r.replyTimeoutMs??6e5,connectTimeoutMs:r.connectTimeoutMs??2e4,logger:{error:(...Pe)=>T.error?.(`[${me}]`,...Pe),warn:(...Pe)=>T.warn?.(`[${me}]`,...Pe),info:(...Pe)=>T.info?.(`[${me}]`,...Pe),debug:(...Pe)=>T.debug?.(`[${me}]`,...Pe)}})},deleteState:async({botId:me})=>{let _e=v.get(me);if(v.delete(me),_e&&typeof _e.remove=="function")await _e.remove();else try{await zse(Z(me))}catch(Ve){if(Ve?.code!=="ENOENT")throw Ve}}}),ke=ha(Ce,{workspaces:q,stateFor:U,agentPresetCatalog:_}),Ee=m({channel:e,controller:ke,harness:Be,logger:T,retryDelaysMs:r.retryDelaysMs,healthyIntervalMs:r.healthyIntervalMs}).start();return{controller:ke,ready:Ee.ready,async close(){await Ee.close(),await ke.close(),Be.stopManagedProcess()}}}function YO(n,r={},o={}){return CB(n,r,o,{channel:"discord",ConfigStore:gB,StateStore:EB,HarnessClient:IB,Controller:tC,Runtime:rC})}var ya=Object.freeze({status:"connection.status",bindCredentials:"bot.bind-credentials",reconnectBot:"bot.reconnect",deleteBot:"bot.delete",setWorkspace:za,setAgentPreset:Wa}),Zse=Object.freeze(Object.values(ya)),Xse=new Set(["token","botToken","tokenRef","platformId","secret","secretRef"]);function jO(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function hB(n,r){return jO(n)&&Object.keys(n).every(o=>r.includes(o))}function sU(n){return typeof n=="string"&&/^[A-Za-z0-9_-]{1,128}$/.test(n)}function $se(n){return typeof n=="string"&&n.trim().length>=20&&n.length<=4096}function ege(n,r){return jO(r)?n===ya.status?hB(r,[])?null:"connection.status does not accept fields.":n===ya.bindCredentials?hB(r,["token"])&&$se(r.token)?null:"bot.bind-credentials requires a Bot Token.":n===ya.reconnectBot?hB(r,["botId","sendTest"])&&sU(r.botId)&&(r.sendTest===void 0||typeof r.sendTest=="boolean")?null:"bot.reconnect requires a botId.":n===ya.deleteBot?hB(r,["botId","confirm"])&&sU(r.botId)&&r.confirm===!0?null:"bot.delete requires a botId and confirm=true.":n===ya.setWorkspace?Ba(r)?null:"\u8BF7\u8F93\u5165\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84\u3002":n===ya.setAgentPreset?Qa(r)?null:"\u8BF7\u9009\u62E9 Agent Preset\u3002":"Unknown bot endpoint.":"Payload must be an object."}function xO(n){if(Array.isArray(n))return n.map(xO);if(!jO(n))return n;let r={};for(let[o,i]of Object.entries(n))Xse.has(o)||(r[o]=xO(i));return r}function Age(n,r){let o=fa(r);return o||(r?.code==="webhook-configured"?{code:"webhook-configured",message:r.message}:r?.code==="telegram-401"||r?.code==="discord-401"?{code:"invalid-token",message:`${n} Bot Token \u65E0\u6548\uFF0C\u8BF7\u91CD\u65B0\u586B\u5199\u3002`}:r?.code==="discord-intents"?{code:"discord-intents",message:r.message}:{code:`${n.toLowerCase()}-operation-failed`,message:`${n} \u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002`})}function dB(n,{channel:r}){for(let o of["status","bindCredentials","reconnectBot","deleteBot"])if(typeof n?.[o]!="function")throw new TypeError(`A complete ${r} controller is required (${o})`);return async(o,i,e)=>{if(e?.aborted)return{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}};if(!Zse.includes(o))return{ok:!1,error:{code:"bad-request",message:`Unknown ${r} endpoint.`}};let a=ege(o,i);if(a)return{ok:!1,error:{code:"bad-request",message:a}};try{let A;if(o===ya.status)A=await n.status();else if(o===ya.bindCredentials)A=await n.bindCredentials(i);else if(o===ya.reconnectBot){if(A=await n.reconnectBot(i.botId),e?.aborted)return{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}};if(i.sendTest===!0){let t=null;try{if(A?.bots?.find(s=>s?.botId===i.botId)?.connected!==!0){let s=new Error("Bot is not connected");throw s.code="test-target-unavailable",s}if(typeof n.sendConnectionTest!="function"){let s=new Error("Connection test is unavailable");throw s.code="test-target-unavailable",s}await n.sendConnectionTest(i.botId)}catch(s){t=s}A={...A,testMessage:qt(t)}}}else if(o===ya.setWorkspace){if(typeof n.updateWorkspace!="function")throw new Error("Workspace update is unavailable");A=await n.updateWorkspace(i.botId,i.workspace)}else if(o===ya.setAgentPreset){if(typeof n.updateAgentPreset!="function")throw new Error("Agent preset update is unavailable");A=await n.updateAgentPreset(i.botId,i.agentPreset)}else A=await n.deleteBot(i.botId);return e?.aborted?{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}}:{ok:!0,value:xO(A)}}catch(A){return e?.aborted?{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}}:{ok:!1,error:Age(r,A)}}}}function gU(n,r,{channel:o,rpcChannel:i,authority:e}){if(!n?.connection?.rpc||typeof n.connection.rpc.handle!="function")throw new TypeError("DSH Host Connection RPC is required");return n.connection.rpc.handle(i,dB(r,{channel:o}),{authority:Er(e)})}var cU="/discord",IU=ya,tge=Object.freeze(Object.values(IU));function uB(n,r,o){return gU(n,r,{channel:"Discord",rpcChannel:cU,authority:o})}async function lU(n,r={}){if(r?.controller)return uB(n,r.controller,r.rpcAuthority);let o=await YO(n,r,r.internals??{}),i=uB(n,o.controller,r.rpcAuthority);return n.effect(()=>async()=>o.close(),"dsh-im: close Discord bot connections"),i}import{homedir as Sge}from"node:os";import{join as zO,resolve as WO}from"node:path";import{mkdir as rge,readFile as age,rename as ige,unlink as oge,writeFile as nge}from"node:fs/promises";import{dirname as sge,isAbsolute as gge}from"node:path";var Al="office-harness.v1",pU="/office",tl=Object.freeze({status:"connection.status",configure:"connector.configure",reconnect:"connector.reconnect",test:"connector.test",remove:"connector.remove"}),bo=Object.freeze({stream:"/api/harness/connector/stream",heartbeat:"/api/harness/connector/heartbeat",job:"/api/harness/connector/jobs/:id",accept:"/api/harness/connector/jobs/:id/accept",renew:"/api/harness/connector/jobs/:id/renew",progress:"/api/harness/connector/jobs/:id/progress",approval:"/api/harness/connector/jobs/:id/approval",result:"/api/harness/connector/jobs/:id/result",fail:"/api/harness/connector/jobs/:id/fail"});function oC(n){let r=new URL(typeof n=="string"?n.trim():""),o=r.protocol==="http:"&&["localhost","127.0.0.1","[::1]"].includes(r.hostname);if(r.protocol!=="https:"&&!o)throw new TypeError("AI Office URL must use HTTPS (HTTP is allowed only for loopback testing)");if(r.username||r.password||r.search||r.hash)throw new TypeError("AI Office URL must be a bare origin");return r.pathname="/",r}function BB(n){let r=oC(n);return Object.fromEntries(Object.entries(bo).map(([o,i])=>[o,new URL(i,r).toString()]))}var cge=/^[a-z][a-z0-9-]{1,63}$/,Ige=/^[a-z0-9][a-z0-9_-]{2,63}$/i;function rl(n){return typeof n=="string"&&n.trim()?n.trim():null}function EU(n,{kind:r}){if(!n||typeof n!="object"||Array.isArray(n))return null;let o={};for(let[i,e]of Object.entries(n)){let a=rl(i),A=rl(e);if(!a||!cge.test(a)||!A||r==="workspace"&&!gge(A)||r==="preset"&&A.length>8e3)return null;o[a]=A}return Object.freeze(o)}function fB(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let r;try{r=oC(n.baseUrl).origin}catch{return null}let o=rl(n.deviceId),i=rl(n.deviceTokenRef),e=EU(n.workspaces??{},{kind:"workspace"}),a=EU(n.instructionPresets??{},{kind:"preset"}),A=Number(n.maxConcurrency??1),t=Number(n.heartbeatSeconds??30);return!o||!Ige.test(o)||!i||!/^DSH_OFFICE_DEVICE_TOKEN_[A-F0-9]{24}$/.test(i)||!e||!a||!Number.isInteger(A)||A<1||A>4||!Number.isInteger(t)||t<10||t>300?null:Object.freeze({version:1,protocolVersion:Al,baseUrl:r,deviceId:o,deviceTokenRef:i,maxConcurrency:A,heartbeatSeconds:t,workspaces:e,instructionPresets:a,createdAt:rl(n.createdAt)??new Date().toISOString(),updatedAt:rl(n.updatedAt)??new Date().toISOString()})}var QB=class{#e;#A=null;#r=Promise.resolve();constructor(r){this.#e=r}async load(){try{let r=fB(JSON.parse(await age(this.#e,"utf8")));if(!r)throw new Error("dsh-im AI Office config is invalid");this.#A=r}catch(r){if(r?.code!=="ENOENT")throw r;this.#A=null}return this}get(){return this.#A?structuredClone(this.#A):null}async save(r){let o=fB(r);if(!o)throw new Error("Refusing to persist invalid AI Office configuration");let i=this.#r.then(async()=>{await rge(sge(this.#e),{recursive:!0,mode:448});let e=`${this.#e}.tmp`;await nge(e,`${JSON.stringify(o,null,2)} +`,{mode:384}),await ige(e,this.#e),this.#A=o});return this.#r=i.then(()=>{},()=>{}),await i,this.get()}async clear(){let r=this.#r.then(async()=>{try{await oge(this.#e)}catch(o){if(o?.code!=="ENOENT")throw o}this.#A=null});this.#r=r.then(()=>{},()=>{}),await r}};import{createHash as yge}from"node:crypto";import{setTimeout as fge}from"node:timers/promises";function JO(n,r){let o=new Error(`AI Office ${n} failed: HTTP ${r.status}`);return o.code=r.status===401?"invalid-device-token":r.status===404?"office-hook-unavailable":r.status===409?"office-job-conflict":"office-transport-failed",o}function al(n,r="office-transport-failed",o){let i=new Error(n,o===void 0?void 0:{cause:o});return i.code=r,i}function qO(n,r){return r?.aborted||n?.name==="AbortError"}function lge(n){let r="message",o,i=[];for(let a of n.split(/\r?\n/))a.startsWith("event:")?r=a.slice(6).trim()||"message":a.startsWith("id:")?o=a.slice(3).trim()||void 0:a.startsWith("data:")&&i.push(a.slice(5).trimStart());if(i.length===0)return null;let e;try{e=JSON.parse(i.join(` `))}catch{throw new Error("AI Office SSE returned invalid JSON")}return{id:o,type:typeof e?.type=="string"?e.type:r,data:e}}var yB=class{#e;#A;#r;#t;constructor({baseUrl:r,deviceId:o,token:i,fetchImpl:e=fetch}){this.#e=r,this.#A=o,this.#r=i,this.#t=e}hooks(){return BB(this.#e)}#n(r={}){return{authorization:`Bearer ${this.#r}`,"x-harness-device-id":this.#A,...r}}async heartbeat(r,{signal:o}={}){let i;try{i=await this.#t(new URL(bo.heartbeat,this.#e),{method:"POST",headers:this.#n({accept:"application/json","content-type":"application/json"}),body:JSON.stringify(r),signal:o,redirect:"error"})}catch(a){throw qO(a,o)?a:al("AI Office heartbeat request could not be completed",void 0,a)}if(!i.ok)throw JO("heartbeat",i);let e;try{e=await i.json()}catch(a){throw al("AI Office heartbeat returned invalid JSON","office-protocol-mismatch",a)}if(!e||typeof e!="object"||e.ok!==!0||e.protocolVersion!==Al)throw al("AI Office heartbeat protocol does not match","office-protocol-mismatch");return e}async#o(r,{method:o="POST",body:i,leaseToken:e,signal:a}={}){let A=this.#n({accept:"application/json"});i!==void 0&&(A["content-type"]="application/json"),e&&(A["x-harness-lease-token"]=e);let t;try{t=await this.#t(new URL(r,this.#e),{method:o,headers:A,...i===void 0?{}:{body:JSON.stringify(i)},signal:a,redirect:"error",cache:"no-store"})}catch(s){throw qO(s,a)?s:al("AI Office Job request could not be completed",void 0,s)}if(!t.ok)throw JO("Job request",t);try{return await t.json()}catch(s){throw al("AI Office Job returned invalid JSON","office-protocol-mismatch",s)}}async getJob(r,o={}){return this.#o(bo.job.replace(":id",r),{...o,method:"GET"})}async acceptJob(r,o={}){return this.#o(bo.accept.replace(":id",r),o)}async renewJob(r,o,i={}){return this.#o(bo.renew.replace(":id",r),{...i,leaseToken:o})}async progressJob(r,o,i,e={}){return this.#o(bo.progress.replace(":id",r),{...e,leaseToken:o,body:i})}async requestApproval(r,o,i,e={}){return this.#o(bo.approval.replace(":id",r),{...e,leaseToken:o,body:i})}async completeJob(r,o,i,e={}){return this.#o(bo.result.replace(":id",r),{...e,leaseToken:o,body:i})}async failJob(r,o,i,e={}){return this.#o(bo.fail.replace(":id",r),{...e,leaseToken:o,body:i})}async stream({signal:r,lastEventId:o,onOpen:i,onEvent:e}){let a=this.#n({accept:"text/event-stream"});o&&(a["last-event-id"]=o);let A;try{A=await this.#t(new URL(bo.stream,this.#e),{method:"GET",headers:a,signal:r,redirect:"error",cache:"no-store"})}catch(c){throw qO(c,r)?c:al("AI Office SSE request could not be completed",void 0,c)}if(!A.ok)throw JO("stream",A);if(!A.headers.get("content-type")?.toLowerCase().includes("text/event-stream"))throw new Error("AI Office stream did not return text/event-stream");if(!A.body)throw new Error("AI Office stream returned no body");i?.();let t=A.body.getReader(),s=new TextDecoder,g="";for(;;){let{value:c,done:I}=await t.read();if(I)break;g=`${g}${s.decode(c,{stream:!0})}`.replaceAll(`\r `,` `);let E;for(;(E=g.indexOf(` -`))!==-1;){let B=g.slice(0,E);g=g.slice(E+2);let f=gge(B);f&&await e?.(f)}}throw new Error("AI Office SSE stream ended")}};import{setTimeout as cge}from"node:timers/promises";var CU=/^job-[a-f0-9]{32}$/,Ige=3e4,lge=2048;function il(){return new DOMException("Office Job was cancelled","AbortError")}function ma(n,r=8e3){return typeof n=="string"?n.trim().slice(0,r):""}function pge(n){return n?.code==="office-job-alias-invalid"?n.message:n?.code==="turn-stopped"?"\u672C\u673A Harness \u5DF2\u505C\u6B62\u8FD9\u6B21\u6267\u884C\u3002":n?.code==="office-job-conflict"?"Office Job \u5DF2\u88AB\u9886\u53D6\u3001\u53D6\u6D88\u6216\u7ED3\u675F\u3002":"\u672C\u673A Harness \u672A\u80FD\u5B8C\u6210\u4EFB\u52A1\uFF1B\u8BF7\u68C0\u67E5 Harness \u4F1A\u8BDD\u540E\u91CD\u8BD5\u3002"}function Ege(n,r){return["# AI Office Handoff","","\u4F60\u6B63\u5728\u672C\u673A DeepSeek Harness \u4E2D\u7EE7\u7EED\u4E00\u4E2A\u6765\u81EA AI Office \u7684\u4EFB\u52A1\u3002","\u53EA\u5728\u5F53\u524D Workspace \u5185\u884C\u52A8\u3002\u5B8C\u6210\u540E\u5FC5\u987B\u8FD4\u56DE\uFF1A\u7ED3\u679C\u6458\u8981\u3001\u6539\u52A8\u6587\u4EF6\u3001\u9A8C\u8BC1\u8BC1\u636E\u3001\u672A\u89E3\u51B3\u98CE\u9669\u3002","","## \u672C\u673A Instruction Preset",r,"",...ma(n.instruction)?["## \u672C\u8F6E\u8865\u5145\u6307\u4EE4",ma(n.instruction),""]:[],"## Office \u65F6\u95F4\u7EBF",ma(n.markdown,2e5)].join(` -`)}function Cge(n){let r=ma(n?.interactionId||n?.rpcId,180);if(!r||typeof n?.respond!="function")return null;if(n.kind==="approval"){let i=EO(n.payload,{toolCall:n.toolCall,maxArgumentsLength:1e4});return i?{id:r,kind:"approval",title:`\u6279\u51C6 ${ma(n.payload?.toolName,120)||"Harness \u5DE5\u5177"}`,prompt:i,toolName:ma(n.payload?.toolName,120)}:null}if(n.kind!=="question")return null;let o=n.payload?.questions;return!Array.isArray(o)||o.length===0||o.some(i=>!Ka(i))?null:{id:r,kind:"question",title:o.length>1?`Harness \u9700\u8981 ${o.length} \u9879\u8865\u5145\u4FE1\u606F`:ma(o[0].header||o[0].question,160),prompt:o.map((i,e)=>Ya(i,e,o.length)).join(` +`))!==-1;){let B=g.slice(0,E);g=g.slice(E+2);let f=lge(B);f&&await e?.(f)}}throw new Error("AI Office SSE stream ended")}};import{setTimeout as pge}from"node:timers/promises";var CU=/^job-[a-f0-9]{32}$/,Ege=3e4,Cge=2048;function il(){return new DOMException("Office Job was cancelled","AbortError")}function ma(n,r=8e3){return typeof n=="string"?n.trim().slice(0,r):""}function hge(n){return n?.code==="office-job-alias-invalid"?n.message:n?.code==="turn-stopped"?"\u672C\u673A Harness \u5DF2\u505C\u6B62\u8FD9\u6B21\u6267\u884C\u3002":n?.code==="office-job-conflict"?"Office Job \u5DF2\u88AB\u9886\u53D6\u3001\u53D6\u6D88\u6216\u7ED3\u675F\u3002":"\u672C\u673A Harness \u672A\u80FD\u5B8C\u6210\u4EFB\u52A1\uFF1B\u8BF7\u68C0\u67E5 Harness \u4F1A\u8BDD\u540E\u91CD\u8BD5\u3002"}function dge(n,r){return["# AI Office Handoff","","\u4F60\u6B63\u5728\u672C\u673A DeepSeek Harness \u4E2D\u7EE7\u7EED\u4E00\u4E2A\u6765\u81EA AI Office \u7684\u4EFB\u52A1\u3002","\u53EA\u5728\u5F53\u524D Workspace \u5185\u884C\u52A8\u3002\u5B8C\u6210\u540E\u5FC5\u987B\u8FD4\u56DE\uFF1A\u7ED3\u679C\u6458\u8981\u3001\u6539\u52A8\u6587\u4EF6\u3001\u9A8C\u8BC1\u8BC1\u636E\u3001\u672A\u89E3\u51B3\u98CE\u9669\u3002","","## \u672C\u673A Instruction Preset",r,"",...ma(n.instruction)?["## \u672C\u8F6E\u8865\u5145\u6307\u4EE4",ma(n.instruction),""]:[],"## Office \u65F6\u95F4\u7EBF",ma(n.markdown,2e5)].join(` +`)}function uge(n){let r=ma(n?.interactionId||n?.rpcId,180);if(!r||typeof n?.respond!="function")return null;if(n.kind==="approval"){let i=EO(n.payload,{toolCall:n.toolCall,maxArgumentsLength:1e4});return i?{id:r,kind:"approval",title:`\u6279\u51C6 ${ma(n.payload?.toolName,120)||"Harness \u5DE5\u5177"}`,prompt:i,toolName:ma(n.payload?.toolName,120)}:null}if(n.kind!=="question")return null;let o=n.payload?.questions;return!Array.isArray(o)||o.length===0||o.some(i=>!Ka(i))?null:{id:r,kind:"question",title:o.length>1?`Harness \u9700\u8981 ${o.length} \u9879\u8865\u5145\u4FE1\u606F`:ma(o[0].header||o[0].question,160),prompt:o.map((i,e)=>Ya(i,e,o.length)).join(` --- -`),questions:o}}function hge(n,r){return new Promise((o,i)=>{if(n.controller.signal.aborted)return i(n.controller.signal.reason??il());let e=()=>{n.approvals.delete(r),i(n.controller.signal.reason??il())};n.controller.signal.addEventListener("abort",e,{once:!0}),n.approvals.set(r,{resolve(a){n.controller.signal.removeEventListener("abort",e),n.approvals.delete(r),o(a)}})})}var mB=class{#e;#A;#r;#t;#n;#o=new Map;#l=new Set;#s=new Set;#I=!1;#a={running:0,completed:0,failed:0,lastJobId:null,lastJobAt:null};constructor({config:r,transport:o,createHarness:i,logger:e=console,sleepImpl:a=cge}){if(!r||!o||typeof i!="function")throw new TypeError("OfficeJobExecutor requires config, transport, and createHarness");this.#e=r,this.#A=o,this.#r=i,this.#t=e,this.#n=a}get status(){return structuredClone(this.#a)}offer(r){return this.#I||!CU.test(r)||this.#o.has(r)||this.#l.has(r)||this.#s.has(r)?!1:(this.#l.add(r),this.#i(),!0)}handleEvent(r){let o=ma(r?.data?.jobId,80);if(!CU.test(o))return!1;if(r.type==="job.available")return this.offer(o);if(r.type==="job.cancel")return this.cancel(o);if(r.type==="approval.reply"){let i=this.#o.get(o),e=ma(r.data?.approvalId,180),a=i?.approvals.get(e);return a?(a.resolve({decision:r.data?.decision==="approved"?"approved":"rejected",answer:ma(r.data?.answer)}),!0):!1}return!1}cancel(r){this.#l.delete(r);let o=this.#o.get(r);return o?(o.cancelled=!0,o.controller.abort(il()),o.sessionId&&o.harness&&o.harness.rpc("session.cancel",{sessionId:o.sessionId,keepInbox:!0},1e4).catch(()=>{}),!0):!1}async close(){this.#I=!0,this.#l.clear();for(let r of this.#o.values())r.controller.abort(il());await Promise.allSettled([...this.#o.values()].map(r=>r.task))}#i(){for(;!this.#I&&this.#o.size0;){let r=this.#l.values().next().value;this.#l.delete(r);let o={controller:new AbortController,approvals:new Map,harness:null,sessionId:null,leaseToken:null,cancelled:!1,lastProgressAt:0,lastProgress:"",task:null};o.task=this.#c(r,o).finally(()=>{this.#o.delete(r),this.#a.running=this.#o.size,this.#i()}),this.#o.set(r,o),this.#a.running=this.#o.size,o.task.catch(i=>this.#t.warn?.("[dsh-im:office] Job task ended:",i.message))}}async#c(r,o){let i=o.controller.signal,e=null;try{let A=(await this.#A.getJob(r,{signal:i}))?.job;if(!A||A.id!==r)throw new Error("Office returned an invalid Job payload");let t=await this.#A.acceptJob(r,{signal:i});if(!ma(t?.leaseToken,200))throw new Error("Office returned an invalid Job lease");o.leaseToken=t.leaseToken,e=this.#g(r,o);let s=this.#e.workspaces[A.workspaceAlias],g=this.#e.instructionPresets[A.instructionPreset];if(!s||!g){let I=new Error("Office Job \u5F15\u7528\u4E86\u672C\u673A\u672A\u914D\u7F6E\u7684 Workspace/Preset alias\u3002");throw I.code="office-job-alias-invalid",I}o.harness=this.#r({workspace:s}),await this.#h(r,o,{kind:"status",message:`\u5DF2\u9886\u53D6 Job\uFF0C\u51C6\u5907 Workspace alias\uFF1A${A.workspaceAlias}`},!0),o.sessionId=await o.harness.createSession({signal:i,workspace:s}),await this.#h(r,o,{kind:"status",message:"Harness Session \u5DF2\u521B\u5EFA\u3002",sessionId:o.sessionId},!0);let c=await o.harness.ask(o.sessionId,Ege(A,g),{timeoutMs:30*6e4,signal:i,onUpdate:I=>this.#p(r,o,I),onInteraction:I=>this.#C(r,o,I),onInteractionResolved:I=>{let E=ma(I?.interactionId,180);o.approvals.get(E)?.resolve({decision:"rejected",answer:""})}});if(i.aborted)throw i.reason??il();await this.#A.completeJob(r,o.leaseToken,{resultMarkdown:c,sessionId:o.sessionId},{signal:i}),this.#a.completed+=1,this.#E(r)}catch(a){if(!o.cancelled&&o.leaseToken&&(await this.#A.failJob(r,o.leaseToken,{error:pge(a),...o.sessionId?{sessionId:o.sessionId}:{}}).catch(()=>{}),this.#a.failed+=1),a?.code==="office-job-conflict"||a?.code==="office-hook-unavailable"){this.#E(r);return}!o.cancelled&&!i.aborted&&this.#t.warn?.(`[dsh-im:office] Job ${r} failed:`,a.message)}finally{o.controller.abort(il()),await e?.catch(()=>{}),this.#a.lastJobId=r,this.#a.lastJobAt=new Date().toISOString()}}async#g(r,o){for(;!o.controller.signal.aborted;){try{await this.#n(Ige,void 0,{signal:o.controller.signal})}catch{return}try{await this.#A.renewJob(r,o.leaseToken,{signal:o.controller.signal})}catch(i){if(o.controller.signal.aborted)return;o.cancelled=!0,o.controller.abort(i),o.sessionId&&o.harness&&o.harness.rpc("session.cancel",{sessionId:o.sessionId,keepInbox:!0},1e4).catch(()=>{});return}try{let e=(await this.#A.getJob(r,{signal:o.controller.signal}))?.job?.approval;e&&(e.status==="approved"||e.status==="rejected")&&o.approvals.get(e.id)?.resolve({decision:e.status,answer:ma(e.answer)})}catch(i){if(o.controller.signal.aborted)return;this.#t.warn?.(`[dsh-im:office] Job ${r} approval poll failed; will retry after the next renewal:`,i.message)}}}async#p(r,o,i){let e=i?.type==="tool"?`\u6B63\u5728\u4F7F\u7528 ${ma(i.name,160)||"Harness \u5DE5\u5177"}\u2026`:ma(i?.text,4e3);if(!e)return;let a=`${i.type}:${e}`;if(a===o.lastProgress)return;let A=Date.now();i.type==="text"&&A-o.lastProgressAt<1e3||(o.lastProgress=a,o.lastProgressAt=A,await this.#h(r,o,{kind:i.type==="tool"?"tool":i.type==="text"?"text":"status",message:e,...o.sessionId?{sessionId:o.sessionId}:{}}))}#h(r,o,i,e=!1){let a=this.#A.progressJob(r,o.leaseToken,i,{signal:o.controller.signal});return e?a:a.catch(A=>{this.#t.debug?.("[dsh-im:office] ignored a progress delivery failure:",A.message)})}async#C(r,o,i){let e=Cge(i);if(!e){i?.kind==="approval"&&typeof i.respond=="function"&&await i.respond({ok:!0,value:{sessionId:i.sessionId,approvalId:i.payload?.approvalId,outcome:"rejected"}});return}let a=hge(o,e.id);try{await this.#A.requestApproval(r,o.leaseToken,e,{signal:o.controller.signal});let A=await a;if(e.kind==="approval"){await i.respond({ok:!0,value:{sessionId:i.sessionId,approvalId:i.payload.approvalId,outcome:A.decision==="approved"?"allowed-once":"rejected"}});return}if(A.decision!=="approved"){await i.respond({ok:!1,error:{code:"cancelled",message:"The AI Office user rejected this question.",details:{}}});return}let t=ma(A.answer).split(/\r?\n/);await i.respond({ok:!0,value:{sessionId:i.sessionId,answer:{answers:e.questions.map((s,g)=>xa(s,t[g]||t[0]||""))}}})}catch(A){throw o.approvals.delete(e.id),A}}#E(r){this.#s.add(r),!(this.#s.size<=lge)&&this.#s.delete(this.#s.values().next().value)}};var hU=Object.freeze([1e3,3e3,1e4,3e4]);function uge(n){let r=typeof n?.code=="string"?n.code:"office-connection-failed";return{code:r,message:{"invalid-device-token":"AI Office \u62D2\u7EDD\u4E86 Device Token\u3002","office-hook-unavailable":"AI Office Connector Hook \u5C1A\u672A\u5C31\u7EEA\u3002","office-protocol-mismatch":"AI Office Connector \u534F\u8BAE\u7248\u672C\u4E0D\u517C\u5BB9\u3002","office-transport-failed":"\u672C\u673A\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE AI Office\u3002"}[r]??"AI Office \u8FDE\u63A5\u5DF2\u4E2D\u65AD\u3002"}}var ol=class{#e;#A;#r;#t;#n;#o=null;#l=null;#s;#I;constructor({config:r,token:o,logger:i=console,transport:e,createHarness:a,jobExecutor:A,sleepImpl:t=dge}){this.#e=r,this.#A=o,this.#r=i,this.#n=t,this.#t=e??new yB({baseUrl:r.baseUrl,deviceId:r.deviceId,token:o}),this.#s={state:"idle",connected:!1,startedAt:null,lastHeartbeatAt:null,lastEventAt:null,lastEventId:null,lastEventType:null,reconnects:0,jobsOffered:0,error:null},this.#I=A??(a?new mB({config:r,transport:this.#t,createHarness:a,logger:i}):null)}get status(){return structuredClone({...this.#s,...this.#I?{jobs:this.#I.status}:{}})}capabilities(){return{protocolVersion:Al,deviceId:this.#e.deviceId,workspaces:Object.keys(this.#e.workspaces),instructionPresets:Object.keys(this.#e.instructionPresets),maxConcurrency:this.#e.maxConcurrency}}async testConnection(r){return await this.#t.heartbeat({...this.capabilities(),probe:!0},{signal:r}),{ok:!0}}start(){return this.#l?this.status:(this.#o=new AbortController,this.#s.startedAt=new Date().toISOString(),this.#s.state="connecting",this.#l=this.#a(this.#o.signal).finally(()=>{this.#l=null}),this.#l.catch(r=>{this.#o?.signal.aborted||this.#r.error?.("[dsh-im:office] connector stopped:",r)}),this.status)}async#a(r){let o=0;for(;!r.aborted;){let i=new AbortController,e=AbortSignal.any([r,i.signal]);try{let a=await this.#t.heartbeat(this.capabilities(),{signal:e});this.#c(a?.jobs),this.#s.lastHeartbeatAt=new Date().toISOString();let A=!1,t=this.#i(e,()=>{A&&!e.aborted&&(o=0)}),s=this.#t.stream({signal:e,lastEventId:this.#s.lastEventId,onOpen:()=>{this.#s.connected=!0,this.#s.state="connected",this.#s.error=null,A=!0},onEvent:async g=>{this.#s.lastEventAt=new Date().toISOString(),this.#s.lastEventId=g.id??this.#s.lastEventId,this.#s.lastEventType=g.type,g.type==="job.available"&&(this.#s.jobsOffered+=1),this.#I?.handleEvent(g)}});await Promise.race([s,t])}catch(a){if(r.aborted)break;i.abort(),this.#s.connected=!1,this.#s.state="reconnecting",this.#s.error=uge(a),this.#s.reconnects+=1;let A=hU[Math.min(o,hU.length-1)];o+=1;try{await this.#n(A,void 0,{signal:r})}catch{break}}finally{i.abort()}}this.#s.connected=!1,this.#s.state="idle"}async#i(r,o){for(;!r.aborted;){await this.#n(this.#e.heartbeatSeconds*1e3,void 0,{signal:r});let i=await this.#t.heartbeat(this.capabilities(),{signal:r});this.#c(i?.jobs),this.#s.lastHeartbeatAt=new Date().toISOString(),o?.()}}#c(r){if(Array.isArray(r))for(let o of r)typeof o?.id=="string"&&this.#I?.offer(o.id)&&(this.#s.jobsOffered+=1)}async stop(){let r=this.#l;return this.#o?.abort(),this.#o=null,r&&await r.catch(()=>{}),await this.#I?.close(),this.#s.connected=!1,this.#s.state="idle",this.status}};function VO(n){return typeof n=="string"&&n.trim()?n.trim():null}function fge(n,r){return`DSH_OFFICE_DEVICE_TOKEN_${Bge("sha256").update(`${n} -${r}`).digest("hex").slice(0,24).toUpperCase()}`}var SB=class{#e;#A;#r;#t;#n=null;#o=Promise.resolve();constructor({credentials:r,configStore:o,logger:i=console,createRuntime:e}){if(!r?.resolve||!r?.set||!r?.unset)throw new TypeError("AI Office requires the Harness credential provider");if(!o?.get||!o?.save||!o?.clear)throw new TypeError("AI Office requires a config store");this.#e=r,this.#A=o,this.#r=i,this.#t=e??(a=>new ol(a))}async initialize(){let r=this.#A.get();if(r){let o=await this.#e.resolve(r.deviceTokenRef).catch(()=>{});o?.value&&await this.#s(r,o.value)}return this.status()}async configure(r={}){return this.#a(async()=>{let o=this.#A.get(),i=VO(r.baseUrl),e=VO(r.deviceId);if(!i||!e)throw new TypeError("Office URL and Device ID are required");let a=oC(i).origin,A=fge(a,e),t=VO(r.deviceToken),s=await this.#e.resolve(A).catch(()=>{}),g=t??s?.value;if(!g||g.length<32)throw new TypeError("Device Token must contain at least 32 characters");let c=new Date().toISOString(),I=fB({version:1,baseUrl:a,deviceId:e,deviceTokenRef:A,maxConcurrency:r.maxConcurrency,heartbeatSeconds:r.heartbeatSeconds,workspaces:r.workspaces,instructionPresets:r.instructionPresets,createdAt:o?.createdAt??c,updatedAt:c});if(!I)throw new TypeError("AI Office connector configuration is invalid");await this.#e.set(A,g);try{await this.#A.save(I)}catch(E){throw s?.value?await this.#e.set(A,s.value).catch(()=>{}):await this.#e.unset(A).catch(()=>{}),E}return o?.deviceTokenRef&&o.deviceTokenRef!==A&&await this.#e.unset(o.deviceTokenRef).catch(()=>{}),await this.#s(I,g),this.status()})}async reconnect(){return this.#a(async()=>{let r=this.#A.get();if(!r)throw new Error("AI Office connector is not configured");return await this.#s(r),this.status()})}async test(){let r=this.#A.get();if(!r)throw new Error("AI Office connector is not configured");let o=await this.#l(r),i=this.#t({config:r,token:o,logger:this.#r});try{await i.testConnection(AbortSignal.timeout(1e4))}finally{await i.stop().catch(()=>{})}return{tested:!0,snapshot:await this.status()}}async remove(){return this.#a(async()=>{let r=this.#A.get();return await this.#I(),r?.deviceTokenRef&&await this.#e.unset(r.deviceTokenRef).catch(()=>{}),await this.#A.clear(),this.status()})}async status(){let r=this.#A.get();if(!r)return{schemaVersion:1,configured:!1,connected:!1,state:"unconfigured"};let o=await this.#e.resolve(r.deviceTokenRef).catch(()=>{}),i=this.#n?.status??null;return{schemaVersion:1,configured:!0,connected:i?.connected===!0,state:i?.state??(o?.value?"idle":"missing-token"),config:{protocolVersion:r.protocolVersion,baseUrl:r.baseUrl,deviceId:r.deviceId,maxConcurrency:r.maxConcurrency,heartbeatSeconds:r.heartbeatSeconds,workspaces:r.workspaces,instructionPresets:r.instructionPresets,hooks:BB(r.baseUrl)},health:i,tokenConfigured:!!o?.value}}async close(){await this.#o.catch(()=>{}),await this.#I()}async#l(r){let o=await this.#e.resolve(r.deviceTokenRef).catch(()=>{});if(!o?.value)throw new Error("AI Office Device Token is missing");return o.value}async#s(r,o){await this.#I();let i=o??await this.#l(r),e=this.#t({config:r,token:i,logger:this.#r});this.#n=e,e.start()}async#I(){let r=this.#n;this.#n=null,r&&await r.stop()}#a(r){let o=this.#o.then(r,r);return this.#o=o.then(()=>{},()=>{}),o}};function yge(n={}){let r=WO(n.dshHome??process.env.DSH_HOME??zO(Qge(),".dsh")),o=WO(n.dataDir??zO(r,"integrations","dsh-office"));return{root:o,config:WO(n.configPath??zO(o,"config.json"))}}async function dU(n,r={},o={}){let i=o.ConfigStore??QB,e=o.Controller??SB,a=o.Runtime??ol,A=o.HarnessClient??rr,t=yge(r),s=await new i(t.config).load(),g=typeof n.logger=="function"?n.logger("dsh-im:office"):n.logger??console,c=iC(n.webServer,r.harnessBaseUrl),I=o.createHarness??(({workspace:B})=>new A({baseUrl:c,workspace:B,autostart:!1,dshBin:r.dshBin??"dsh",rpcIdPrefix:"office",logPrefix:"dsh-im:office"})),E=new e({credentials:n.credentials,configStore:s,logger:g,createRuntime:B=>new a({...B,createHarness:I,...o.transport?{transport:o.transport}:{}})});return await E.initialize(),{controller:E,close:()=>E.close(),paths:t}}function ZO(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function nC(n,r){return ZO(n)&&Object.keys(n).every(o=>r.includes(o))}function mge(n){return nC(n,["baseUrl","deviceId","deviceToken","maxConcurrency","heartbeatSeconds","workspaces","instructionPresets"])&&typeof n.baseUrl=="string"&&typeof n.deviceId=="string"&&(n.deviceToken===void 0||typeof n.deviceToken=="string")&&ZO(n.workspaces)&&ZO(n.instructionPresets)}function Sge(n){for(let r of["status","configure","reconnect","test","remove"])if(typeof n?.[r]!="function")throw new TypeError(`AI Office controller requires ${r}()`);return async(r,o,i)=>{if(i?.aborted)return{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}};try{let e;if(r===tl.status&&nC(o,[]))e=await n.status();else if(r===tl.configure&&mge(o))e=await n.configure(o);else if(r===tl.reconnect&&nC(o,[]))e=await n.reconnect();else if(r===tl.test&&nC(o,[]))e=await n.test();else if(r===tl.remove&&nC(o,["confirm"])&&o.confirm===!0)e=await n.remove();else return{ok:!1,error:{code:"bad-request",message:"Invalid AI Office connector request."}};return{ok:!0,value:e}}catch(e){let a=e?.code==="invalid-device-token"?"invalid-device-token":e?.code==="office-hook-unavailable"?"office-hook-unavailable":"office-operation-failed",A=a==="invalid-device-token"?"AI Office Device Token \u65E0\u6548\u3002":a==="office-hook-unavailable"?"AI Office Hook \u5C1A\u672A\u4E0A\u7EBF\u6216\u5730\u5740\u4E0D\u6B63\u786E\u3002":e instanceof TypeError?e.message:"AI Office \u8FDE\u63A5\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002";return{ok:!1,error:{code:a,message:A}}}}}function XO(n,r,o){return n.connection.rpc.handle(pU,Sge(r),{authority:Er(o)})}async function uU(n,r={}){if(r.controller)return XO(n,r.controller,r.rpcAuthority);let o=await dU(n,r,r.internals??{}),i=XO(n,o.controller,r.rpcAuthority);return n.effect(()=>async()=>o.close(),"dsh-im: close AI Office connector"),i}var Dge=new Set(["starting","qr_ready","polling","slow_down","domain_switched"]);function wge(n){let r=n?.client_id??n?.appId,o=n?.client_secret??n?.appSecret;if(typeof r!="string"||r.length===0||typeof o!="string"||o.length===0)throw new TypeError("Feishu registration returned invalid credentials");return{appId:r,appSecret:o,userInfo:n?.user_info??n?.userInfo}}async function Oge(n){return typeof n.status!="function"?{}:await n.status()}function bge(n){return n?.connected===!0?!0:n?.ready===!0&&n?.feishuLongConnectionState==="connected"&&n?.harnessReachable===!0}var DB=class{#e;#A;#r;#t;#n=!1;#o=null;constructor({createProvisioningManager:r,credentialStore:o,connectionManager:i,registrationOptions:e={}}={}){if(typeof r!="function")throw new TypeError("createProvisioningManager is required");if(!o||typeof o.save!="function"||typeof o.clear!="function")throw new TypeError("credentialStore.save/clear are required");if(!i||typeof i.connect!="function"||typeof i.disconnect!="function")throw new TypeError("connectionManager.connect/disconnect are required");if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError("registrationOptions must be an object");if(this.#e=o,this.#A=i,this.#r=structuredClone(e),this.#t=r({onCredentials:a=>this.#l(a)}),!this.#t||typeof this.#t.start!="function"||typeof this.#t.status!="function"||typeof this.#t.cancel!="function")throw new TypeError("The provisioning manager must implement start/status/cancel")}async startRegistration(){return this.#o=null,await this.#t.start(structuredClone(this.#r)),this.status()}async cancelRegistration(){return await this.#t.cancel(),this.status()}async disconnect(){await this.#t.cancel(),await this.#A.disconnect();try{await this.#e.clear(),this.#n=!1,this.#o=null}catch{this.#o={code:"credential_removal_failed",message:"Unable to remove the Feishu credentials."}}return this.status()}async status(){let r=await this.#t.status(),o=await Oge(this.#A),i=bge(o),e=this.#n;if(typeof this.#e.configured=="function")try{e=await this.#e.configured()}catch{e=this.#n}let a="unconfigured";return i?a="connected":Dge.has(r?.state)?a="registering":r?.state==="saving"?a="connecting":this.#o||r?.state==="error"?a="error":e&&(a="disconnected"),{phase:a,connected:i,configured:e,registration:r,connection:o,error:this.#o??r?.error??null}}async close(){await this.#t.cancel(),await this.#A.disconnect()}async#l(r){let o=wge(r);try{await this.#e.save(o),this.#n=!0,await this.#A.connect(o),this.#o=null}catch{throw this.#o={code:"connection_failed",message:"The bot was created, but its connection could not be started."},new Error("Unable to activate the Feishu connection.")}}};function $O(n){return new DB(n)}import{homedir as ODe}from"node:os";import{join as Zl,resolve as lg}from"node:path";import{unlink as bDe}from"node:fs/promises";var zT={};Qr(zT,{AESCipher:()=>Bh,AccessTokenError:()=>ql,Aily:()=>DT,AppType:()=>En,CAppTicket:()=>uh,CTenantAccessToken:()=>ph,CardActionHandler:()=>QT,Client:()=>sQ,ClientAssertionError:()=>Da,DefaultCache:()=>iQ,Domain:()=>Cn,EventDispatcher:()=>cQ,LarkChannel:()=>hQ,LarkChannelError:()=>St,LoggerLevel:()=>mi,LoggerProxy:()=>cg,WSClient:()=>lQ,adaptDefault:()=>uye,adaptExpress:()=>Bye,adaptKoa:()=>fye,adaptKoaRouter:()=>Qye,createLarkChannel:()=>iSe,defaultHttpInstance:()=>Vl,defaultLogger:()=>Is,generateChallenge:()=>Qh,internalCache:()=>fh,messageCard:()=>mye,normalize:()=>iq,normalizeBotAdded:()=>rq,normalizeCardAction:()=>tq,normalizeComment:()=>aq,normalizeReaction:()=>FT,registerApp:()=>kye,withAll:()=>lye,withHelpDeskCredential:()=>Eye,withTenantKey:()=>pye,withTenantToken:()=>Cye,withUserAccessToken:()=>hye});function sC(n,r){return function(){return n.apply(r,arguments)}}var{toString:Mge}=Object.prototype,{getPrototypeOf:nl}=Object,{iterator:cC,toStringTag:QU}=Symbol,OB=(({hasOwnProperty:n})=>(r,o)=>n.call(r,o))(Object.prototype),gC=(n,r)=>{let o=n,i=[];for(;o!=null&&o!==Object.prototype;){if(i.indexOf(o)!==-1)return!1;if(i.push(o),OB(o,r))return!0;o=nl(o)}return!1},_ge=(n,r)=>n!=null&&gC(n,r)?n[r]:void 0,Ab=(n=>r=>{let o=Mge.call(r);return n[o]||(n[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),Ji=n=>(n=n.toLowerCase(),r=>Ab(r)===n),bB=n=>r=>typeof r===n,{isArray:pc}=Array,Ec=bB("undefined");function sl(n){return n!==null&&!Ec(n)&&n.constructor!==null&&!Ec(n.constructor)&&Za(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}var yU=Ji("ArrayBuffer");function Nge(n){let r;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?r=ArrayBuffer.isView(n):r=n&&n.buffer&&yU(n.buffer),r}var Tge=bB("string"),Za=bB("function"),mU=bB("number"),gl=n=>n!==null&&typeof n=="object",Rge=n=>n===!0||n===!1,wB=n=>{if(!gl(n))return!1;let r=nl(n);return(r===null||r===Object.prototype||nl(r)===null)&&!gC(n,QU)&&!gC(n,cC)},kge=n=>{if(!gl(n)||sl(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},vge=Ji("Date"),Pge=Ji("File"),Gge=n=>!!(n&&typeof n.uri<"u"),Fge=n=>n&&typeof n.getParts<"u",Lge=Ji("Blob"),Uge=Ji("FileList"),Hge=Ji("Set"),Kge=n=>gl(n)&&Za(n.pipe);function Yge(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}var BU=Yge(),fU=typeof BU.FormData<"u"?BU.FormData:void 0,xge=n=>{if(!n)return!1;if(fU&&n instanceof fU)return!0;let r=nl(n);if(!r||r===Object.prototype||!Za(n.append))return!1;let o=Ab(n);return o==="formdata"||o==="object"&&Za(n.toString)&&n.toString()==="[object FormData]"},jge=Ji("URLSearchParams"),[Jge,qge,Vge,zge]=["ReadableStream","Request","Response","Headers"].map(Ji),Wge=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function IC(n,r,{allOwnKeys:o=!1}={}){if(n===null||typeof n>"u")return;let i,e;if(typeof n!="object"&&(n=[n]),pc(n))for(i=0,e=n.length;i0;)if(e=o[i],r===e.toLowerCase())return e;return null}var lc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,DU=n=>!Ec(n)&&n!==lc;function eb(...n){let{caseless:r,skipUndefined:o}=DU(this)&&this||{},i={},e=(a,A)=>{if(A==="__proto__"||A==="constructor"||A==="prototype")return;let t=r&&typeof A=="string"&&SU(i,A)||A,s=OB(i,t)?i[t]:void 0;wB(s)&&wB(a)?i[t]=eb(s,a):wB(a)?i[t]=eb({},a):pc(a)?i[t]=a.slice():(!o||!Ec(a))&&(i[t]=a)};for(let a=0,A=n.length;a(IC(r,(e,a)=>{o&&Za(e)?Object.defineProperty(n,a,{__proto__:null,value:sC(e,o),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,a,{__proto__:null,value:e,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),n),Xge=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),$ge=(n,r,o,i)=>{n.prototype=Object.create(r.prototype,i),Object.defineProperty(n.prototype,"constructor",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{__proto__:null,value:r.prototype}),o&&Object.assign(n.prototype,o)},ece=(n,r,o,i)=>{let e,a,A,t={};if(r=r||{},n==null)return r;do{for(e=Object.getOwnPropertyNames(n),a=e.length;a-- >0;)A=e[a],(!i||i(A,n,r))&&!t[A]&&(r[A]=n[A],t[A]=!0);n=o!==!1&&nl(n)}while(n&&(!o||o(n,r))&&n!==Object.prototype);return r},Ace=(n,r,o)=>{n=String(n),(o===void 0||o>n.length)&&(o=n.length),o-=r.length;let i=n.indexOf(r,o);return i!==-1&&i===o},tce=n=>{if(!n)return null;if(pc(n))return n;let r=n.length;if(!mU(r))return null;let o=new Array(r);for(;r-- >0;)o[r]=n[r];return o},rce=(n=>r=>n&&r instanceof n)(typeof Uint8Array<"u"&&nl(Uint8Array)),ace=(n,r)=>{let i=(n&&n[cC]).call(n),e;for(;(e=i.next())&&!e.done;){let a=e.value;r.call(n,a[0],a[1])}},ice=(n,r)=>{let o,i=[];for(;(o=n.exec(r))!==null;)i.push(o);return i},oce=Ji("HTMLFormElement"),nce=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,i,e){return i.toUpperCase()+e}),{propertyIsEnumerable:sce}=Object.prototype,gce=Ji("RegExp"),wU=(n,r)=>{let o=Object.getOwnPropertyDescriptors(n),i={};IC(o,(e,a)=>{let A;(A=r(e,a,n))!==!1&&(i[a]=A||e)}),Object.defineProperties(n,i)},cce=n=>{wU(n,(r,o)=>{if(Za(n)&&["arguments","caller","callee"].includes(o))return!1;let i=n[o];if(Za(i)){if(r.enumerable=!1,"writable"in r){r.writable=!1;return}r.set||(r.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},Ice=(n,r)=>{let o={},i=e=>{e.forEach(a=>{o[a]=!0})};return pc(n)?i(n):i(String(n).split(r)),o},lce=()=>{},pce=(n,r)=>n!=null&&Number.isFinite(n=+n)?n:r;function Ece(n){return!!(n&&Za(n.append)&&n[QU]==="FormData"&&n[cC])}var Cce=n=>{let r=new WeakSet,o=i=>{if(gl(i)){if(r.has(i))return;if(sl(i))return i;if(!("toJSON"in i)){r.add(i);let e;if(Hge(i)){e=[];for(let a of i){let A=o(a);!Ec(A)&&e.push(A)}}else e=pc(i)?[]:{},IC(i,(a,A)=>{let t=o(a);!Ec(t)&&(e[A]=t)});return r.delete(i),e}}return i};return o(n)},hce=Ji("AsyncFunction"),dce=n=>n&&(gl(n)||Za(n))&&Za(n.then)&&Za(n.catch),OU=((n,r)=>n?setImmediate:r?((o,i)=>(lc.addEventListener("message",({source:e,data:a})=>{e===lc&&a===o&&i.length&&i.shift()()},!1),e=>{i.push(e),lc.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",Za(lc.postMessage)),uce=typeof queueMicrotask<"u"?queueMicrotask.bind(lc):typeof process<"u"&&process.nextTick||OU,bU=n=>n!=null&&Za(n[cC]),Bce=n=>n!=null&&gC(n,cC)&&bU(n),J={isArray:pc,isArrayBuffer:yU,isBuffer:sl,isFormData:xge,isArrayBufferView:Nge,isString:Tge,isNumber:mU,isBoolean:Rge,isObject:gl,isPlainObject:wB,isEmptyObject:kge,isReadableStream:Jge,isRequest:qge,isResponse:Vge,isHeaders:zge,isUndefined:Ec,isDate:vge,isFile:Pge,isReactNativeBlob:Gge,isReactNative:Fge,isBlob:Lge,isRegExp:gce,isFunction:Za,isStream:Kge,isURLSearchParams:jge,isTypedArray:rce,isFileList:Uge,forEach:IC,merge:eb,extend:Zge,trim:Wge,stripBOM:Xge,inherits:$ge,toFlatObject:ece,kindOf:Ab,kindOfTest:Ji,endsWith:Ace,toArray:tce,forEachEntry:ace,matchAll:ice,isHTMLForm:oce,hasOwnProperty:OB,hasOwnProp:OB,hasOwnInPrototypeChain:gC,getSafeProp:_ge,reduceDescriptors:wU,freezeMethods:cce,toObjectSet:Ice,toCamelCase:nce,noop:lce,toFiniteNumber:pce,findKey:SU,global:lc,isContextDefined:DU,isSpecCompliantForm:Ece,toJSONObject:Cce,isAsyncFn:hce,isThenable:dce,setImmediate:OU,asap:uce,isIterable:bU,isSafeIterable:Bce};var fce=J.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),MU=n=>{let r={},o,i,e;return n&&n.split(` -`).forEach(function(A){e=A.indexOf(":"),o=A.substring(0,e).trim().toLowerCase(),i=A.substring(e+1).trim();let t=J.hasOwnProp(r,o);!o||t&&J.hasOwnProp(fce,o)||(o==="set-cookie"?t?r[o].push(i):r[o]=[i]:r[o]=t?r[o]+", "+i:i)}),r};function Qce(n){let r=0,o=n.length;for(;rr;){let i=n.charCodeAt(o-1);if(i!==9&&i!==32)break;o-=1}return r===0&&o===n.length?n:n.slice(r,o)}var yce=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),mce=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function tb(n,r){return J.isArray(n)?n.map(o=>tb(o,r)):Qce(String(n).replace(r,""))}var _U=n=>tb(n,yce),Sce=n=>tb(n,mce);function cl(n){let r=Object.create(null);return J.forEach(n.toJSON(),(o,i)=>{r[i]=Sce(o)}),r}var NU=Symbol("internals");function lC(n){return n&&String(n).trim().toLowerCase()}function MB(n){return n===!1||n==null?n:J.isArray(n)?n.map(MB):_U(String(n))}function Dce(n){let r=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,i;for(;i=o.exec(n);)r[i[1]]=i[2];return r}var wce=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function rb(n){let r=0,o=n.length;for(;rr;){let i=n.charCodeAt(o-1);if(i!==9&&i!==32)break;o-=1}return r===0&&o===n.length?n:n.slice(r,o)}function Oce(n){let r=n.length-1;if(r<1||n.charCodeAt(0)!==34||n.charCodeAt(r)!==34)return n;let o="";for(let i=1;i=r))return n;o+=n[i]}return o}function bce(n){let r=Object.create(null),o=String(n),i=0,e=!1,a=!1;function A(t){let s=rb(o.slice(i,t)),g=s.indexOf("=");if(g<1)return;let c=rb(s.slice(0,g));if(!wce.test(c))return;let I=c.toLowerCase();if(I==="__proto__"||I==="constructor"||I==="prototype")return;let E=rb(s.slice(g+1));r[I]=Oce(E)}for(let t=0;t/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function ab(n,r,o,i,e){if(J.isFunction(i))return i.call(this,r,o);if(e&&(r=o),!!J.isString(r)){if(J.isString(i))return r.indexOf(i)!==-1;if(J.isRegExp(i))return i.test(r)}}function _ce(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(r,o,i)=>o.toUpperCase()+i)}function Nce(n,r){let o=J.toCamelCase(" "+r);["get","set","has"].forEach(i=>{Object.defineProperty(n,i+o,{__proto__:null,value:function(e,a,A){return this[i].call(this,r,e,a,A)},configurable:!0})})}var Il=class{constructor(r){r&&this.set(r)}set(r,o,i){let e=this;function a(t,s,g){let c=lC(s);if(!c)return;let I=J.findKey(e,c);(!I||e[I]===void 0||g===!0||g===void 0&&e[I]!==!1)&&(e[I||s]=MB(t))}let A=(t,s)=>J.forEach(t,(g,c)=>a(g,c,s));if(J.isPlainObject(r)||r instanceof this.constructor)A(r,o);else if(J.isString(r)&&(r=r.trim())&&!Mce(r))A(MU(r),o);else if(J.isObject(r)&&J.isSafeIterable(r)){let t=Object.create(null),s,g;for(let c of r){if(!J.isArray(c))throw new TypeError("Object iterator must return a key-value pair");g=c[0],J.hasOwnProp(t,g)?(s=t[g],t[g]=J.isArray(s)?[...s,c[1]]:[s,c[1]]):t[g]=c[1]}A(t,o)}else r!=null&&a(o,r,i);return this}get(r,o){if(r=lC(r),r){let i=J.findKey(this,r);if(i){let e=this[i];if(!o)return e;if(o===!0)return Dce(e);if(J.isFunction(o))return o.call(this,e,i);if(J.isRegExp(o))return o.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(r,o){if(r=lC(r),r){let i=J.findKey(this,r);return!!(i&&this[i]!==void 0&&(!o||ab(this,this[i],i,o)))}return!1}delete(r,o){let i=this,e=!1;function a(A){if(A=lC(A),A){let t=J.findKey(i,A);t&&(!o||ab(i,i[t],t,o))&&(delete i[t],e=!0)}}return J.isArray(r)?r.forEach(a):a(r),e}clear(r){let o=Object.keys(this),i=o.length,e=!1;for(;i--;){let a=o[i];(!r||ab(this,this[a],a,r,!0))&&(delete this[a],e=!0)}return e}normalize(r){let o=this,i={};return J.forEach(this,(e,a)=>{let A=J.findKey(i,a);if(A){o[A]=MB(e),delete o[a];return}let t=r?_ce(a):String(a).trim();t!==a&&delete o[a],o[t]=MB(e),i[t]=!0}),this}concat(...r){return this.constructor.concat(this,...r)}toJSON(r){let o=Object.create(null);return J.forEach(this,(i,e)=>{i!=null&&i!==!1&&(o[e]=r&&J.isArray(i)?i.join(", "):i)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([r,o])=>r+": "+o).join(` -`)}getSetCookie(){let r=this.get("set-cookie");return J.isArray(r)?r:r==null||r===!1?[]:[r]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(r){return r instanceof this?r:new this(r)}static parseParameters(r){return bce(r)}static concat(r,...o){let i=new this(r);return o.forEach(e=>i.set(e)),i}static accessor(r){let i=(this[NU]=this[NU]={accessors:{}}).accessors,e=this.prototype;function a(A){let t=lC(A);i[t]||(Nce(e,A),i[t]=!0)}return J.isArray(r)?r.forEach(a):a(r),this}};Il.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);J.reduceDescriptors(Il.prototype,({value:n},r)=>{let o=r[0].toUpperCase()+r.slice(1);return{get:()=>n,set(i){this[o]=i}}});J.freezeMethods(Il);var Mt=Il;var pC="[REDACTED ****]";function Tce(n){if(J.hasOwnProp(n,"toJSON"))return!0;let r=Object.getPrototypeOf(n);for(;r&&r!==Object.prototype;){if(J.hasOwnProp(r,"toJSON"))return!0;r=Object.getPrototypeOf(r)}return!1}function Rce(n,r){let o=new Set(r.map(a=>String(a).toLowerCase())),i=[],e=a=>{if(a===null||typeof a!="object"||J.isBuffer(a))return a;if(i.indexOf(a)!==-1)return;a instanceof Mt&&(a=a.toJSON()),i.push(a);let A;if(J.isArray(a))A=[],a.forEach((t,s)=>{let g=e(t);J.isUndefined(g)||(A[s]=g)});else{if(!J.isPlainObject(a)&&Tce(a))return i.pop(),a;A=Object.create(null);for(let[t,s]of Object.entries(a)){let g=o.has(t.toLowerCase())?pC:e(s);J.isUndefined(g)||(A[t]=g)}}return i.pop(),A};return e(n)}function TU(n){try{return String(n)}catch{return""}}function kce(n){return n.errors.map(o=>{try{return o&&o.message?TU(o.message):TU(o)}catch{return""}}).filter(Boolean).join("; ")||n.name||"AggregateError"}var Xr=class n extends Error{static from(r,o,i,e,a,A){let t=r.message;!t&&J.isArray(r.errors)&&r.errors.length&&(t=kce(r));let s=new n(t,o||r.code,i,e,a);return Object.defineProperty(s,"cause",{__proto__:null,value:r,writable:!0,enumerable:!1,configurable:!0}),s.name=r.name,r.status!=null&&s.status==null&&(s.status=r.status),A&&Object.assign(s,A),s}constructor(r,o,i,e,a){super(r),Object.defineProperty(this,"message",{__proto__:null,value:r,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,o&&(this.code=o),i&&(this.config=i),e&&(this.request=e),a&&(this.response=a,this.status=a.status)}toJSON(){let r=this.config,o=r&&J.hasOwnProp(r,"redact")?r.redact:void 0,i=J.isArray(o)&&o.length>0?Rce(r,o):J.toJSONObject(r);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:i,code:this.code,status:this.status}}};Xr.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Xr.ERR_BAD_OPTION="ERR_BAD_OPTION";Xr.ECONNABORTED="ECONNABORTED";Xr.ETIMEDOUT="ETIMEDOUT";Xr.ECONNREFUSED="ECONNREFUSED";Xr.ERR_NETWORK="ERR_NETWORK";Xr.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Xr.ERR_DEPRECATED="ERR_DEPRECATED";Xr.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Xr.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Xr.ERR_CANCELED="ERR_CANCELED";Xr.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Xr.ERR_INVALID_URL="ERR_INVALID_URL";Xr.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";var Se=Xr;var kK=Je(RK(),1),LB=kK.default;var UB={isBufferAvailable(){return typeof Buffer<"u"},from(n){return Buffer.from(n)}};var bb=100;function Ob(n){return J.isPlainObject(n)||J.isArray(n)}function vK(n){return J.endsWith(n,"[]")?n.slice(0,-2):n}function wb(n,r,o){return n?n.concat(r).map(function(e,a){return e=vK(e),!o&&a?"["+e+"]":e}).join(o?".":""):r}function Ble(n){return J.isArray(n)&&!n.some(Ob)}var fle=J.toFlatObject(J,{},null,function(r){return/^is[A-Z]/.test(r)});function Qle(n,r,o){if(!J.isObject(n))throw new TypeError("target must be an object");r=r||new(LB||FormData),o=J.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(T,_){return!J.isUndefined(_[T])});let i=o.metaTokens,e=o.visitor||f,a=o.dots,A=o.indexes,t=o.Blob||typeof Blob<"u"&&Blob,s=o.maxDepth===void 0?bb:o.maxDepth,g=t&&J.isSpecCompliantForm(r),c=[];if(!J.isFunction(e))throw new TypeError("visitor must be a function");function I(m){if(m===null)return"";if(J.isDate(m))return m.toISOString();if(J.isBoolean(m))return m.toString();if(!g&&J.isBlob(m))throw new Se("Blob is not supported. Use a Buffer instead.");if(J.isArrayBuffer(m)||J.isTypedArray(m)){if(g&&typeof t=="function")return new t([m]);if(UB&&UB.isBufferAvailable())return UB.from(m);throw new Se("Blob is not supported. Use a Buffer instead.",Se.ERR_NOT_SUPPORT)}return m}function E(m){if(m>s)throw new Se("Object is too deeply nested ("+m+" levels). Max depth: "+s,Se.ERR_FORM_DATA_DEPTH_EXCEEDED)}function B(m,T){if(s===1/0)return JSON.stringify(m);let _=[];return JSON.stringify(m,function(Y,j){if(!J.isObject(j))return j;for(;_.length&&_[_.length-1]!==this;)_.pop();return _.push(j),E(T+_.length-1),j})}function f(m,T,_){let P=m;if(J.isReactNative(r)&&J.isReactNativeBlob(m))return r.append(wb(_,T,a),I(m)),!1;if(m&&!_&&typeof m=="object"){if(J.endsWith(T,"{}"))T=i?T:T.slice(0,-2),m=B(m,1);else if(J.isArray(m)&&Ble(m)||(J.isFileList(m)||J.endsWith(T,"[]"))&&(P=J.toArray(m)))return T=vK(T),P.forEach(function(j,K){!(J.isUndefined(j)||j===null)&&r.append(A===!0?wb([T],K,a):A===null?T:T+"[]",I(j))}),!1}return Ob(m)?!0:(r.append(wb(_,T,a),I(m)),!1)}let Q=Object.assign(fle,{defaultVisitor:f,convertValue:I,isVisitable:Ob});function y(m,T,_=0){if(!J.isUndefined(m)){if(E(_),c.indexOf(m)!==-1)throw new Error("Circular reference detected in "+T.join("."));c.push(m),J.forEach(m,function(Y,j){(!(J.isUndefined(Y)||Y===null)&&e.call(r,Y,J.isString(j)?j.trim():j,T,Q))===!0&&y(Y,T?T.concat(j):[j],_+1)}),c.pop()}}if(!J.isObject(n))throw new TypeError("data must be an object");return y(n),r}var Zs=Qle;function PK(n){let r={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(i){return r[i]})}function GK(n,r){this._pairs=[],n&&Zs(n,this,r)}var FK=GK.prototype;FK.append=function(r,o){this._pairs.push([r,o])};FK.toString=function(r){let o=r?i=>r.call(this,i,PK):PK;return this._pairs.map(function(e){return o(e[0])+"="+o(e[1])},"").join("&")};var LK=GK;function yle(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function hc(n,r,o){if(!r)return n;n=n||"";let i=J.isFunction(o)?{serialize:o}:o,e=J.getSafeProp(i,"encode")||yle,a=J.getSafeProp(i,"serialize"),A;if(a?A=a(r,i):A=J.isURLSearchParams(r)?r.toString():new LK(r,i).toString(e),A){let t=n.indexOf("#");t!==-1&&(n=n.slice(0,t)),n+=(n.indexOf("?")===-1?"?":"&")+A}return n}var Mb=class{constructor(){this.handlers=[]}use(r,o,i){return this.handlers.push({fulfilled:r,rejected:o,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(r){this.handlers[r]&&(this.handlers[r]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(r){J.forEach(this.handlers,function(i){i!==null&&r(i)})}},_b=Mb;var Xs={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0};import Sle from"crypto";import mle from"url";var UK=mle.URLSearchParams;var Nb="abcdefghijklmnopqrstuvwxyz",HK="0123456789",KK={DIGIT:HK,ALPHA:Nb,ALPHA_DIGIT:Nb+Nb.toUpperCase()+HK},Dle=(n=16,r=KK.ALPHA_DIGIT)=>{let o="",{length:i}=r,e=new Uint32Array(n);Sle.randomFillSync(e);for(let a=0;aRb,hasStandardBrowserEnv:()=>wle,hasStandardBrowserWebWorkerEnv:()=>Ole,navigator:()=>Tb,origin:()=>ble});var Rb=typeof window<"u"&&typeof document<"u",Tb=typeof navigator=="object"&&navigator||void 0,wle=Rb&&(!Tb||["ReactNative","NativeScript","NS"].indexOf(Tb.product)<0),Ole=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ble=Rb&&window.location.href||"http://localhost";var It={...kb,...YK};function vb(n,r){return Zs(n,new It.classes.URLSearchParams,{visitor:function(o,i,e,a){return It.isNode&&J.isBuffer(o)?(this.append(i,o.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...r})}var xK=bb;function jK(n){if(n>xK)throw new Se("FormData field is too deeply nested ("+n+" levels). Max depth: "+xK,Se.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Mle(n){let r=[],o=/[^.[\]]+|\[([^.[\]]*)]/g,i;for(;(i=o.exec(n))!==null;)jK(r.length),r.push(i[0]==="[]"?"":i[1]||i[0]);return r}function _le(n){let r={},o=Object.keys(n),i,e=o.length,a;for(i=0;i=o.length;return A=!A&&J.isArray(e)?e.length:A,s?(J.hasOwnProp(e,A)?e[A]=J.isArray(e[A])?e[A].concat(i):[e[A],i]:e[A]=i,!t):((!J.hasOwnProp(e,A)||!J.isObject(e[A]))&&(e[A]=[]),r(o,i,e[A],a)&&J.isArray(e[A])&&(e[A]=_le(e[A])),!t)}if(J.isFormData(n)&&J.isFunction(n.entries)){let o={};return J.forEachEntry(n,(i,e)=>{r(Mle(i),e,o,0)}),o}return null}var HB=Nle;var hl=(n,r)=>n!=null&&J.hasOwnProp(n,r)?n[r]:void 0;function Tle(n,r,o){if(J.isString(n))try{return(r||JSON.parse)(n),J.trim(n)}catch(i){if(i.name!=="SyntaxError")throw i}return(o||JSON.stringify)(n)}var Pb={transitional:Xs,adapter:["xhr","http","fetch"],transformRequest:[function(r,o){let i=o.getContentType()||"",e=i.indexOf("application/json")>-1,a=J.isObject(r);if(a&&J.isHTMLForm(r)&&(r=new FormData(r)),J.isFormData(r))return e?JSON.stringify(HB(r)):r;if(J.isArrayBuffer(r)||J.isBuffer(r)||J.isStream(r)||J.isFile(r)||J.isBlob(r)||J.isReadableStream(r))return r;if(J.isArrayBufferView(r))return r.buffer;if(J.isURLSearchParams(r))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),r.toString();let t;if(a){let s=hl(this,"formSerializer");if(i.indexOf("application/x-www-form-urlencoded")>-1)return vb(r,s).toString();if((t=J.isFileList(r))||i.indexOf("multipart/form-data")>-1){let g=hl(this,"env"),c=g&&g.FormData;return Zs(t?{"files[]":r}:r,c&&new c,s)}}return a||e?(o.setContentType("application/json",!1),Tle(r)):r}],transformResponse:[function(r){let o=hl(this,"transitional")||Pb.transitional,i=o&&o.forcedJSONParsing,e=hl(this,"responseType"),a=e==="json";if(J.isResponse(r)||J.isReadableStream(r))return r;if(r&&J.isString(r)&&(i&&!e||a)){let t=!(o&&o.silentJSONParsing)&&a;try{return JSON.parse(r,hl(this,"parseReviver"))}catch(s){if(t)throw s.name==="SyntaxError"?Se.from(s,Se.ERR_BAD_RESPONSE,this,null,hl(this,"response")):s}}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:It.classes.FormData,Blob:It.classes.Blob},validateStatus:function(r){return r>=200&&r<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};J.forEach(["delete","get","head","post","put","patch","query"],n=>{Pb.headers[n]={}});var dl=Pb;function BC(n,r){let o=this||dl,i=r||o,e=Mt.from(i.headers),a=i.data;return J.forEach(n,function(t){a=t.call(o,a,e.normalize(),r?r.status:void 0)}),e.normalize(),a}function fC(n){return!!(n&&n.__CANCEL__)}var Gb=class extends Se{constructor(r,o,i){super(r??"canceled",Se.ERR_CANCELED,o,i),this.name="CanceledError",this.__CANCEL__=!0}},Bi=Gb;function on(n,r,o){let i=o.config.validateStatus;!o.status||!i||i(o.status)?n(o):r(new Se("Request failed with status code "+o.status,o.status>=400&&o.status<500?Se.ERR_BAD_REQUEST:Se.ERR_BAD_RESPONSE,o.config,o.request,o))}function Fb(n){return typeof n!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function Lb(n,r){if(!r)return n;let o=n.length;for(;o>0&&n.charCodeAt(o-1)===47;)o--;return n.slice(0,o)+"/"+r.replace(/^\/+/,"")}var Rle=/^https?:(?!\/\/)/i,kle=/[\t\n\r]/g;function vle(n){let r=0;for(;r`${o}${i}${pC}`)}function Fle(n){let r=n.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${pC}@`),o=r.indexOf("#"),e=(o===-1?r:r.slice(0,o)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${pC}`);return o===-1?e:`${e}#${Gle(r.slice(o+1))}`}function JK(n,r){if(typeof n=="string"){let o=Ple(n);if(Rle.test(o))throw new Se(`Invalid URL ${JSON.stringify(Fle(o))}: missing "//" after protocol`,Se.ERR_INVALID_URL,r)}}function dc(n,r,o,i){JK(r,i);let e=!Fb(r);return n&&(e||o===!1)?(JK(n,i),Lb(n,r)):r}var Lle={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function Ule(n){try{return new URL(n)}catch{return null}}function qK(n){var r=(typeof n=="string"?Ule(n):n)||{},o=r.protocol,i=r.host,e=r.port;if(typeof i!="string"||!i||typeof o!="string"||(o=o.split(":",1)[0],i=i.replace(/:\d*$/,""),e=parseInt(e)||Lle[o]||0,!Hle(i,e)))return"";var a=Ub(o+"_proxy")||Ub("all_proxy");return a&&a.indexOf("://")===-1&&(a=o+"://"+a),a}function Hle(n,r){var o=Ub("no_proxy").toLowerCase();return o?o==="*"?!1:o.split(/[,\s]/).every(function(i){if(!i)return!0;var e=i.match(/^(.+):(\d+)$/),a=e?e[1]:i,A=e?parseInt(e[2]):0;return A&&A!==r?!0:/^[.*]/.test(a)?(a.charAt(0)==="*"&&(a=a.slice(1)),!n.endsWith(a)):n!==a}):!0}function Ub(n){return process.env[n.toLowerCase()]||process.env[n.toUpperCase()]||""}var fM=Je(Wb(),1),xY=Je(CY(),1);import KY from"http";import YY from"https";import hEe from"http2";import dEe from"util";import{resolve as TY}from"path";import qi from"zlib";var Xn="1.19.0";function MC(n){let r=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return r&&r[1]||""}var Hpe=/^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;function gM(n,r,o){let i=o&&o.Blob||It.classes.Blob,e=MC(n);if(r===void 0&&i&&(r=!0),e==="data"){n=e.length?n.slice(e.length+1):n;let a=Hpe.exec(n);if(!a)throw new Se("Invalid URL",Se.ERR_INVALID_URL);let A=a[1],t=a[2],s=a[3]?"base64":"utf8",g=a[4],c="";A?c=t?A+t:A:t&&(c="text/plain"+t);let I=s==="base64"?Buffer.from(g,"base64"):Buffer.from(decodeURIComponent(g),s);if(r){if(!i)throw new Se("Blob is not supported",Se.ERR_NOT_SUPPORT);return new i([I],{type:c})}return I}throw new Se("Unsupported protocol "+e,Se.ERR_NOT_SUPPORT)}import _o from"stream";var Kpe=["content-type","content-length"];function _C(n,r,o){if(o!=="content-only"){n.set(r);return}Object.entries(r||{}).forEach(([i,e])=>{Kpe.includes(i.toLowerCase())&&n.set(i,e)})}import Ype from"stream";var cM=Symbol("internals"),IM=class extends Ype.Transform{constructor(r){r=J.toFlatObject(r,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(i,e)=>!J.isUndefined(e[i])),super({readableHighWaterMark:r.chunkSize});let o=this[cM]={timeWindow:r.timeWindow,chunkSize:r.chunkSize,maxRate:r.maxRate,minChunkSize:r.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",i=>{i==="progress"&&(o.isCaptured||(o.isCaptured=!0))})}_read(r){let o=this[cM];return o.onReadCallback&&o.onReadCallback(),super._read(r)}_transform(r,o,i){let e=this[cM],a=e.maxRate,A=this.readableHighWaterMark,t=e.timeWindow,s=1e3/t,g=a/s,c=e.minChunkSize!==!1?Math.max(e.minChunkSize,g*.01):0,I=(B,f)=>{let Q=Buffer.byteLength(B);e.bytesSeen+=Q,e.bytes+=Q,e.isCaptured&&this.emit("progress",e.bytesSeen),this.push(B)?process.nextTick(f):e.onReadCallback=()=>{e.onReadCallback=null,process.nextTick(f)}},E=(B,f)=>{let Q=Buffer.byteLength(B),y=null,m=A,T,_=0;if(a){let P=Date.now();(!e.ts||(_=P-e.ts)>=t)&&(e.ts=P,T=g-e.bytes,e.bytes=T<0?-T:0,_=0),T=g-e.bytes}if(a){if(T<=0)return setTimeout(()=>{f(null,B)},t-_);Tm&&Q-m>c&&(y=B.subarray(m),B=B.subarray(0,m)),I(B,y?()=>{process.nextTick(f,null,y)}:f)};E(r,function B(f,Q){if(f)return i(f);Q?E(Q,B):i(null)})}},lM=IM;import{EventEmitter as uEe}from"events";import jpe from"util";import{Readable as Jpe}from"stream";var{asyncIterator:hY}=Symbol,xpe=async function*(n){n.stream?yield*n.stream():n.arrayBuffer?yield await n.arrayBuffer():n[hY]?yield*n[hY]():yield n},qB=xpe;var qpe=It.ALPHABET.ALPHA_DIGIT+"-_",NC=typeof TextEncoder=="function"?new TextEncoder:new jpe.TextEncoder,yc=`\r -`,Vpe=NC.encode(yc),zpe=2,pM=class{constructor(r,o){let{escapeName:i}=this.constructor,e=J.isString(o),a=`Content-Disposition: form-data; name="${i(r)}"${!e&&o.name?`; filename="${i(o.name)}"`:""}${yc}`;if(e)o=NC.encode(String(o).replace(/\r?\n|\r\n?/g,yc));else{let A=String(o.type||"application/octet-stream").replace(/[\r\n]/g,"");a+=`Content-Type: ${A}${yc}`}this.headers=NC.encode(a+yc),this.contentLength=e?o.byteLength:o.size,this.size=this.headers.byteLength+this.contentLength+zpe,this.name=r,this.value=o}async*encode(){yield this.headers;let{value:r}=this;J.isTypedArray(r)?yield r:yield*qB(r),yield Vpe}static escapeName(r){return String(r).replace(/[\r\n"]/g,o=>({"\r":"%0D","\n":"%0A",'"':"%22"})[o])}},Wpe=(n,r,o)=>{let{tag:i="form-data-boundary",size:e=25,boundary:a=i+"-"+It.generateString(e,qpe)}=o||{};if(!J.isFormData(n))throw new TypeError("FormData instance required");if(a.length<1||a.length>70)throw new Error("boundary must be 1-70 characters long");let A=NC.encode("--"+a+yc),t=NC.encode("--"+a+"--"+yc),s=t.byteLength,g=Array.from(n.entries()).map(([I,E])=>{let B=new pM(I,E);return s+=B.size,B});s+=A.byteLength*g.length,s=J.toFiniteNumber(s);let c={"Content-Type":`multipart/form-data; boundary=${a}`};return Number.isFinite(s)&&(c["Content-Length"]=s),r&&r(c),Jpe.from((async function*(){for(let I of g)yield A,yield*I.encode();yield t})())},dY=Wpe;import Zpe from"stream";var EM=class extends Zpe.Transform{__transform(r,o,i){this.push(r),i()}_transform(r,o,i){if(r.length!==0&&(this._transform=this.__transform,r[0]!==120)){let e=Buffer.alloc(2);e[0]=120,e[1]=156,this.push(e,o)}this.__transform(r,o,i)}},uY=EM;import Xpe from"http2";import $pe from"util";var CM=class{constructor(){this.sessions=Object.create(null)}getSession(r,o){o=Object.assign({sessionTimeout:1e3},o);let i=this.sessions[r];if(i){let I=i.length;for(let E=0;E{if(a)return;a=!0,A&&(clearTimeout(A),A=null);let I=i,E=I.length,B=E;for(;B--;)if(I[B][0]===e){E===1?delete this.sessions[r]:I.splice(B,1),e.closed||e.close();return}},s=e.request,{sessionTimeout:g}=o;if(g!=null){let I=0;e.request=function(){let E=s.apply(this,arguments);return I++,A&&(clearTimeout(A),A=null),E.once("close",()=>{--I||(A=setTimeout(()=>{A=null,t()},g))}),E}}e.once("close",t);let c=[e,o];return i?i.push(c):i=this.sessions[r]=[c],e}},BY=CM;var eEe=(n,r)=>J.isAsyncFn(n)?function(...o){let i=o.pop();n.apply(this,o).then(e=>{try{r?i(null,...r(e)):i(null,e)}catch(a){i(a)}},i)}:n,fY=eEe;var AEe=new Set(["localhost","0.0.0.0"]),mY=n=>{let r=n.split(".");return r.length!==4||r[0]!=="127"?!1:r.every(o=>/^\d+$/.test(o)&&Number(o)>=0&&Number(o)<=255)},hM=n=>{if(/^0[xX][0-9a-fA-F]+$/.test(n)){let r=parseInt(n.slice(2),16);return Number.isFinite(r)?r:null}if(n.length>1&&/^0[0-7]+$/.test(n)){let r=parseInt(n,8);return Number.isFinite(r)?r:null}if(n.length>1&&/^0[0-9]+$/.test(n))return null;if(/^[0-9]+$/.test(n)){let r=parseInt(n,10);return Number.isFinite(r)?r:null}return null},tEe=n=>{if(typeof n!="string"||!n||n.indexOf(":")!==-1)return n;let r=n;if(r.charAt(0)==="["&&r.charAt(r.length-1)==="]"&&(r=r.slice(1,-1)),r=r.replace(/\.+$/,""),!/^[0-9.xXa-fA-F]+$/.test(r))return n;let o=r.split(".");if(o.some(c=>c===""))return n;if(o.length===4){let c=o.map(hM);return c.some(I=>I===null||I<0||I>255)?n:c.join(".")}if(o.length>4||o.length===1)return n;let i=o.slice(0,-1),e=o[o.length-1],a=4-i.length,A=hM(e);if(A===null)return n;let t=(1<<8*a)-1;if(A<0||A>t)return n;let s=new Array(a).fill(0);for(let c=a-1,I=A;c>=0;c--,I>>=8)s[c]=I&255;let g=i.map(hM);return g.some(c=>c===null||c<0||c>255)?n:[...g,...s].join(".")},dM=n=>/^0{1,4}$/.test(n),rEe=n=>{if(n==="::")return!0;let r=n.indexOf("::");if(r!==-1){if(r!==n.lastIndexOf("::"))return!1;let i=n.slice(0,r),e=n.slice(r+2),a=i?i.split(":"):[],A=e?e.split(":"):[];return a.length+A.length<8&&a.every(dM)&&A.every(dM)}let o=n.split(":");return o.length===8&&o.every(dM)},aEe=n=>{if(n==="::1")return!0;let r=n.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if(r)return mY(r[1]);let o=n.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);if(o){let e=parseInt(o[1],16);return e>=32512&&e<=32767}let i=n.split(":");if(i.length===8){for(let e=0;e<7;e++)if(!/^0+$/.test(i[e]))return!1;return/^0*1$/.test(i[7])}return!1},QY=n=>n?AEe.has(n)||mY(n)||rEe(n)?!0:aEe(n):!1,iEe={http:80,https:443,ws:80,wss:443,ftp:21},oEe=n=>{let r=n,o=0;if(r.charAt(0)==="["){let a=r.indexOf("]");if(a!==-1){let A=r.slice(1,a),t=r.slice(a+1);return t.charAt(0)===":"&&/^\d+$/.test(t.slice(1))&&(o=Number.parseInt(t.slice(1),10)),[A,o]}}let i=r.indexOf(":"),e=r.lastIndexOf(":");return i!==-1&&i===e&&/^\d+$/.test(r.slice(e+1))&&(o=Number.parseInt(r.slice(e+1),10),r=r.slice(0,e)),[r,o]},nEe=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,sEe=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i,gEe=n=>{if(typeof n!="string"||n.indexOf(":")===-1)return n;let r=n.match(nEe);if(r)return r[1];let o=n.match(sEe);if(o){let i=parseInt(o[1],16),e=parseInt(o[2],16);return`${i>>8}.${i&255}.${e>>8}.${e&255}`}return n},yY=n=>{if(!n)return n;n.charAt(0)==="["&&n.charAt(n.length-1)==="]"&&(n=n.slice(1,-1));let r=n.replace(/\.+$/,""),o=tEe(r);return o!==r?o:gEe(r)};function uM(n){let r;try{r=new URL(n)}catch{return!1}let o=(process.env.no_proxy||process.env.NO_PROXY||"").toLowerCase();if(!o)return!1;if(o==="*")return!0;let i=Number.parseInt(r.port,10)||iEe[r.protocol.split(":",1)[0]]||0,e=yY(r.hostname.toLowerCase());return o.split(/[\s,]+/).some(a=>{if(!a)return!1;if(a==="*")return!0;let[A,t]=oEe(a);return A=yY(A),!A||t&&t!==i?!1:(A.charAt(0)==="*"&&(A=A.slice(1)),A.charAt(0)==="."?e.endsWith(A):e===A||QY(e)&&QY(A))})}function cEe(n,r){n=n||10;let o=new Array(n),i=new Array(n),e=0,a=0,A;return r=r!==void 0?r:1e3,function(s){let g=Date.now(),c=i[a];A||(A=g),o[e]=s,i[e]=g;let I=a,E=0;for(;I!==e;)E+=o[I++],I=I%n;if(e=(e+1)%n,e===a&&(a=(a+1)%n),g-A{o=c,e=null,a&&(clearTimeout(a),a=null),n(...g)};return[(...g)=>{let c=Date.now(),I=c-o;I>=i?A(g,c):(e=g,a||(a=setTimeout(()=>{a=null,A(e)},i-I)))},()=>e&&A(e)]}var DY=IEe;var $n=(n,r,o=3)=>{let i=0,e=SY(50,250);return DY(a=>{if(!a||typeof a.loaded!="number")return;let A=a.loaded,t=a.lengthComputable?a.total:void 0,s=Math.max(0,t!=null?Math.min(A,t):A),g=Math.max(0,s-i),c=e(g);i=Math.max(i,s);let I={loaded:s,total:t,progress:t?s/t:void 0,bytes:g,rate:c||void 0,estimated:c&&t?(t-s)/c:void 0,event:a,lengthComputable:t!=null,[r?"download":"upload"]:!0};n(I)},o)},yl=(n,r)=>{let o=n!=null;return[i=>r[0]({lengthComputable:o,total:n,loaded:i}),r[1]]},ml=(n,r=J.asap)=>(...o)=>r(()=>n(...o));var wY=n=>n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102,bY=(n,r,o)=>r+2n<=57?n-48:(n&223)-55,lEe=n=>n>=65&&n<=90||n>=97&&n<=122||n>=48&&n<=57||n===43||n===47||n===45||n===95,pEe=n=>n===9||n===10||n===12||n===13||n===32,EEe=n=>{let r=Math.floor(n/4),o=n%4;return r*3+(o===2?1:o===3?2:0)},MY=n=>{let r=n.length,o=0;return r>0&&n.charCodeAt(r-1)===61&&(o++,r>1&&n.charCodeAt(r-2)===61&&o++),Math.floor((r-o)*3/4)},CEe=n=>{let r=n.length,o=0,i=0,e=!1;for(let a=0;a0){e=!0;continue}o++}}return e||i>2||i>0&&(o+i)%4!==0||o%4===1?MY(n):EEe(o)},_Y=(n,r)=>{if(!n||typeof n!="string"||!n.startsWith("data:"))return 0;let o=n.indexOf(",");if(o<0)return 0;let i=n.slice(5,o),e=n.slice(o+1);if(/;base64/i.test(i))return r(e);let A=0;for(let t=0,s=e.length;t=55296&&g<=56319&&t+1=56320&&c<=57343?(A+=4,t++):A+=3}else A+=3}return A};function BM(n){let r=typeof n=="string"?n.indexOf("#"):-1;return _Y(r===-1?n:n.slice(0,r),CEe)}function NY(n){return _Y(n,MY)}var RY={flush:qi.constants.Z_SYNC_FLUSH,finishFlush:qi.constants.Z_SYNC_FLUSH},BEe={flush:qi.constants.BROTLI_OPERATION_FLUSH,finishFlush:qi.constants.BROTLI_OPERATION_FLUSH},fEe={flush:qi.constants.ZSTD_e_flush,finishFlush:qi.constants.ZSTD_e_flush},jY=J.isFunction(qi.createBrotliDecompress),JY=J.isFunction(qi.createZstdDecompress),qY="gzip, compress, deflate"+(jY?", br":""),QEe=qY+(JY?", zstd":""),kY=typeof process<"u"&&process.nextTick?process.nextTick.bind(process):J.asap,{http:yEe,https:mEe}=xY.default,QM=/https:?/,vY=Symbol("axios.http.socketListener"),VB=Symbol("axios.http.currentReq"),VY=Symbol("axios.http.installedTunnel"),SEe=new Map,PY=new WeakMap,GY={22:21,24:5};function DEe(n=process.versions&&process.versions.node){if(!n)return!1;let[r,o]=n.split(".").map(i=>Number(i));return!Number.isInteger(r)||!Number.isInteger(o)?!1:r>24?!0:GY[r]!=null&&o>=GY[r]}function wEe(n,r=process.versions&&process.versions.node){if(!DEe(r))return!1;let o=n&&n.options;return!!(o&&J.hasOwnProp(o,"proxyEnv")&&o.proxyEnv!=null)}function OEe(n,r,o){return QM.test(n.protocol)?o||YY.globalAgent:r||KY.globalAgent}function bEe(n,r){let o=n.protocol+"//"+n.hostname+":"+(n.port||"")+"#"+(n.auth||""),i=r?PY.get(r)||PY.set(r,new Map).get(r):SEe,e=i.get(o);if(e)return e;let a=r&&r.options?{...r.options,...n}:n;if(e=new fM.default(a),r&&r.options){let A={...r.options},t=e.callback;e.callback=function(g,c){return t.call(this,g,{...A,...c})}}return e[VY]=!0,i.set(o,e),e}var FY=It.protocols.map(n=>n+":"),LY=n=>{if(!J.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},UY=(n,[r,o])=>(n.on("end",o).on("error",o),r),MEe=new BY;function _Ee(n,r,o){n.beforeRedirects.proxy&&n.beforeRedirects.proxy(n),n.beforeRedirects.auth&&n.beforeRedirects.auth(n),n.beforeRedirects.sensitiveHeaders&&n.beforeRedirects.sensitiveHeaders(n,o),n.beforeRedirects.config&&n.beforeRedirects.config(n,r,o)}function NEe(n,r){n&&Object.keys(n).forEach(o=>{r.has(o.toLowerCase())&&delete n[o]})}function TEe(n,r){if(!r)return!1;try{return new URL(r.url).origin===new URL(n.href).origin}catch{return!1}}function zY(n,r,o,i,e,a){let A=r,t=OEe(n,a,e);if(!A&&A!==!1&&!wEe(t)){let s=qK(o);s&&(uM(o)||(A=new URL(s)))}if(i&&n.headers)for(let s of Object.keys(n.headers))s.toLowerCase()==="proxy-authorization"&&delete n.headers[s];if(i&&n.agent&&n.agent[VY]&&(n.agent=void 0),A){let s=A instanceof URL,g=f=>s||J.hasOwnProp(A,f)?A[f]:void 0,c=g("username"),I=g("password"),E=J.hasOwnProp(A,"auth")?A.auth:void 0;if(c&&(E=(c||"")+":"+(I||"")),E){let f=typeof E=="object",Q=f&&J.hasOwnProp(E,"username")?E.username:void 0,y=f&&J.hasOwnProp(E,"password")?E.password:void 0;if(!!(Q||y))E=(Q||"")+":"+(y||"");else if(f)throw new Se("Invalid proxy authorization",Se.ERR_BAD_OPTION,{proxy:A})}if(QM.test(n.protocol)){if(!(e instanceof fM.default)){let f=g("hostname")||g("host"),Q=g("port"),y=g("protocol"),m=y?y.includes(":")?y:`${y}:`:"http:",T=f&&f.includes(":")&&!f.startsWith("[")?`[${f}]`:f,_=new URL(`${m}//${T}${Q?":"+Q:""}`),P={protocol:_.protocol,hostname:_.hostname.replace(/^\[|\]$/g,""),port:_.port,auth:E&&typeof E=="string"?E:void 0};_.protocol==="https:"&&(P.ALPNProtocols=["http/1.1"]);let Y=bEe(P,e);n.agent=Y,n.agents&&(n.agents.https=Y)}}else{if(E){let m=Buffer.from(E,"utf8").toString("base64");n.headers["Proxy-Authorization"]="Basic "+m}let f=!1;for(let m of Object.keys(n.headers))if(m.toLowerCase()==="host"){f=!0;break}f||(n.headers.host=n.hostname+(n.port?":"+n.port:""));let Q=g("hostname")||g("host");n.hostname=Q,n.host=Q,n.port=g("port"),n.path=o;let y=g("protocol");y&&(n.protocol=y.includes(":")?y:`${y}:`)}}n.beforeRedirects.proxy=function(g){zY(g,r,g.href,!0,e,a)}}var REe=typeof process<"u"&&J.kindOf(process)==="process",kEe=n=>new Promise((r,o)=>{let i,e,a=(s,g)=>{e||(e=!0,i&&i(s,g))},A=s=>{a(s),r(s)},t=s=>{a(s,!0),o(s)};n(A,t,s=>i=s).catch(t)}),vEe=({address:n,family:r})=>{if(!J.isString(n))throw TypeError("address must be a string");return{address:n,family:r||(n.indexOf(".")<0?6:4)}},HY=(n,r)=>vEe(J.isObject(n)?n:{address:n,family:r}),PEe={request(n,r){let o=n.protocol+"//"+n.hostname+":"+(n.port||(n.protocol==="https:"?443:80)),{http2Options:i,headers:e}=n,a=MEe.getSession(o,i),{HTTP2_HEADER_SCHEME:A,HTTP2_HEADER_METHOD:t,HTTP2_HEADER_PATH:s,HTTP2_HEADER_STATUS:g}=hEe.constants,c={[A]:n.protocol.replace(":",""),[t]:n.method,[s]:n.path};J.forEach(e,(E,B)=>{B.charAt(0)!==":"&&(c[B]=E)});let I=a.request(c);return I.once("response",E=>{let B=I;E=Object.assign({},E);let f=E[g];delete E[g],B.headers=E,B.statusCode=+f,r(B)}),I}},WY=REe&&function(r){return kEe(async function(i,e,a){let A=pe=>J.getSafeProp(r,pe),t=A("transitional")||Xs,s=A("data"),g=A("lookup"),c=A("family"),I=A("httpVersion");I===void 0&&(I=1);let E=A("http2Options"),B=A("httpAgent"),f=A("httpsAgent"),Q=A("proxy"),y=A("responseType"),m=A("responseEncoding"),T=A("socketPath"),_=A("method").toUpperCase(),P=A("maxRedirects"),Y=A("maxBodyLength"),j=A("maxContentLength"),K=A("decompress"),q,V=!1,H,v;if(I=+I,Number.isNaN(I))throw TypeError(`Invalid protocol version: '${r.httpVersion}' is not a number`);if(I!==1&&I!==2)throw TypeError(`Unsupported protocol version '${I}'`);let Z=I===2;if(g){let pe=fY(g,Me=>J.isArray(Me)?Me:[Me]);g=(Me,Ge,OA)=>{pe(Me,Ge,(Le,bA,$A)=>{if(Le)return OA(Le);let mA=J.isArray(bA)?bA.map(nt=>HY(nt)):[HY(bA,$A)];Ge.all?OA(Le,mA):OA(Le,mA[0].address,mA[0].family)})}}let U=new uEe;function M(pe){try{U.emit("abort",!pe||pe.type?new Bi(null,r,H):pe)}catch{}}function G(){v&&(clearTimeout(v),v=null)}function te(){let pe=A("timeout"),Me=pe?"timeout of "+pe+"ms exceeded":"timeout exceeded",Ge=A("timeoutErrorMessage");return Ge&&(Me=Ge),new Se(Me,t.clarifyTimeoutError?Se.ETIMEDOUT:Se.ECONNABORTED,r,H)}U.once("abort",e);let Be=()=>{G(),r.cancelToken&&r.cancelToken.unsubscribe(M),r.signal&&r.signal.removeEventListener("abort",M),U.removeAllListeners()};(r.cancelToken||r.signal)&&(r.cancelToken&&r.cancelToken.subscribe(M),r.signal&&(r.signal.aborted?M():r.signal.addEventListener("abort",M))),a((pe,Me)=>{if(q=!0,G(),Me){V=!0,Be();return}let{data:Ge}=pe;if(Ge instanceof _o.Readable||Ge instanceof _o.Duplex){let OA=_o.finished(Ge,()=>{OA(),Be()})}else Be()});let Ce=dc(A("baseURL"),A("url"),A("allowAbsoluteUrls"),r),ke=T?"http://localhost":It.hasBrowserEnv?It.origin:void 0,Ee=new URL(Ce,ke),me=Ee.protocol||FY[0];if(me==="data:"){if(j>-1){let Me=String(A("url")||Ce||"");if(NY(Me)>j)return e(new Se("maxContentLength size of "+j+" exceeded",Se.ERR_BAD_RESPONSE,r))}let pe;if(_!=="GET")return on(i,e,{status:405,statusText:"method not allowed",headers:{},config:r});try{pe=gM(A("url"),y==="blob",{Blob:r.env&&r.env.Blob})}catch(Me){throw Se.from(Me,Se.ERR_BAD_REQUEST,r)}return y==="text"?(pe=pe.toString(m),(!m||m==="utf8")&&(pe=J.stripBOM(pe))):y==="stream"&&(pe=_o.Readable.from(pe)),on(i,e,{data:pe,status:200,statusText:"OK",headers:new Mt,config:r})}if(FY.indexOf(me)===-1)return e(new Se("Unsupported protocol "+me,Se.ERR_BAD_REQUEST,r));let _e=Mt.from(r.headers).normalize();_e.set("User-Agent","axios/"+Xn,!1);let{onUploadProgress:Ve,onDownloadProgress:oA}=r,tA=r.maxRate,Pe,gA;if(J.isSpecCompliantForm(s)){let pe=_e.getContentType(/boundary=([-_\w\d]{10,70})/i);s=dY(s,Me=>{_e.set(Me)},{tag:`axios-${Xn}-boundary`,boundary:pe&&pe[1]||void 0})}else if(J.isFormData(s)&&J.isFunction(s.getHeaders)&&s.getHeaders!==Object.prototype.getHeaders){if(_C(_e,s.getHeaders(),A("formDataHeaderPolicy")),!_e.hasContentLength())try{let pe=await dEe.promisify(s.getLength).call(s);Number.isFinite(pe)&&pe>=0&&_e.setContentLength(pe)}catch{}}else if(J.isBlob(s)||J.isFile(s))s.size&&_e.setContentType(s.type||"application/octet-stream"),_e.setContentLength(s.size||0),s=_o.Readable.from(qB(s));else if(s&&!J.isStream(s)){if(!Buffer.isBuffer(s))if(J.isArrayBuffer(s))s=Buffer.from(new Uint8Array(s));else if(J.isString(s))s=Buffer.from(s,"utf-8");else return e(new Se("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",Se.ERR_BAD_REQUEST,r));if(_e.setContentLength(s.length,!1),Y>-1&&s.length>Y)return e(new Se("Request body larger than maxBodyLength limit",Se.ERR_BAD_REQUEST,r))}let Qe=J.toFiniteNumber(_e.getContentLength());J.isArray(tA)?(Pe=tA[0],gA=tA[1]):Pe=gA=tA,s&&(Ve||Pe)&&(J.isStream(s)||(s=_o.Readable.from(s,{objectMode:!1})),s=_o.pipeline([s,new lM({maxRate:J.toFiniteNumber(Pe)})],J.noop),Ve&&s.on("progress",UY(s,yl(Qe,$n(ml(Ve,kY),!1,3)))));let he,ze=A("auth");if(ze){let pe=J.getSafeProp(ze,"username")||"",Me=J.getSafeProp(ze,"password")||"";he=pe+":"+Me}if(!he&&(Ee.username||Ee.password)){let pe=LY(Ee.username),Me=LY(Ee.password);he=pe+":"+Me}he&&_e.delete("authorization");let Ke;try{Ke=hc(Ee.pathname+Ee.search,A("params"),A("paramsSerializer")).replace(/^\?/,"")}catch(pe){return e(Se.from(pe,Se.ERR_BAD_REQUEST,r,null,null,{url:A("url"),exists:!0}))}_e.set("Accept-Encoding",J.hasOwnProp(t,"advertiseZstdAcceptEncoding")&&t.advertiseZstdAcceptEncoding===!0?QEe:qY,!1);let De=Object.assign(Object.create(null),{path:Ke,method:_,headers:cl(_e),agents:{http:B,https:f},auth:he,protocol:me,family:c,beforeRedirect:_Ee,beforeRedirects:Object.create(null),http2Options:E});if(!J.isUndefined(g)&&(De.lookup=g),T){if(typeof T!="string")return e(new Se("socketPath must be a string",Se.ERR_BAD_OPTION_VALUE,r));let pe=A("allowedSocketPaths");if(pe!=null){let Me=Array.isArray(pe)?pe:[pe],Ge=TY(T);if(!Me.some(Le=>typeof Le=="string"&&TY(Le)===Ge))return e(new Se(`socketPath "${T}" is not permitted by allowedSocketPaths`,Se.ERR_BAD_OPTION_VALUE,r))}De.socketPath=T}else De.hostname=Ee.hostname.startsWith("[")?Ee.hostname.slice(1,-1):Ee.hostname,De.port=Ee.port,zY(De,Q,me+"//"+Ee.hostname+(Ee.port?":"+Ee.port:"")+De.path,!1,f,B);let EA,pA=!1,AA=!1,qe=QM.test(De.protocol);if(De.agent==null&&(De.agent=qe?f:B),Z)EA=PEe;else{let pe=A("transport");if(pe)EA=pe;else if(P===0)EA=qe?YY:KY,pA=!0;else{AA=!0,De.sensitiveHeaders=[],P&&(De.maxRedirects=P);let Me=A("beforeRedirect");if(Me&&(De.beforeRedirects.config=Me),he){let OA=Ee.origin,Le=he;De.beforeRedirects.auth=function($A){try{new URL($A.href).origin===OA&&($A.auth=Le)}catch{}}}let Ge=A("sensitiveHeaders");if(Ge!=null){if(!J.isArray(Ge))return e(new Se("sensitiveHeaders must be an array of strings",Se.ERR_BAD_OPTION_VALUE,r));let OA=new Set;for(let Le of Ge){if(!J.isString(Le))return e(new Se("sensitiveHeaders must be an array of strings",Se.ERR_BAD_OPTION_VALUE,r));OA.add(Le.toLowerCase())}OA.size&&(De.sensitiveHeaders=Array.from(OA),De.beforeRedirects.sensitiveHeaders=function(bA,$A){TEe(bA,$A)||NEe(bA.headers,OA)})}EA=qe?mEe:yEe}}Y>-1?De.maxBodyLength=Y:De.maxBodyLength=1/0,De.insecureHTTPParser=!!A("insecureHTTPParser"),H=EA.request(De,function(Me){if(G(),H.destroyed)return;let Ge=[Me],OA=J.toFiniteNumber(Me.headers["content-length"]);if(oA||gA){let mA=new lM({maxRate:J.toFiniteNumber(gA)});oA&&mA.on("progress",UY(mA,yl(OA,$n(ml(oA,kY),!0,3)))),Ge.push(mA)}let Le=Me,bA=Me.req||H;if(K!==!1&&Me.headers["content-encoding"])switch((_==="HEAD"||Me.statusCode===204)&&delete Me.headers["content-encoding"],(Me.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":Ge.push(qi.createUnzip(RY)),delete Me.headers["content-encoding"];break;case"deflate":Ge.push(new uY),Ge.push(qi.createUnzip(RY)),delete Me.headers["content-encoding"];break;case"br":jY&&(Ge.push(qi.createBrotliDecompress(BEe)),delete Me.headers["content-encoding"]);break;case"zstd":JY&&(Ge.push(qi.createZstdDecompress(fEe)),delete Me.headers["content-encoding"]);break}Le=Ge.length>1?_o.pipeline(Ge,J.noop):Ge[0];let $A={status:Me.statusCode,statusText:Me.statusMessage,headers:new Mt(Me.headers),config:r,request:bA};if(y==="stream"){if(j>-1){let mA=j,nt=Le;async function*Ar(){let GA=0;for await(let se of nt){if(GA+=se.length,GA>mA)throw new Se("maxContentLength size of "+mA+" exceeded",Se.ERR_BAD_RESPONSE,r,bA);yield se}}Le=_o.Readable.from(Ar(),{objectMode:!1})}$A.data=Le,on(i,e,$A)}else{let mA=[],nt=0;Le.on("data",function(GA){mA.push(GA),nt+=GA.length,j>-1&&nt>j&&(V=!0,Le.destroy(),M(new Se("maxContentLength size of "+j+" exceeded",Se.ERR_BAD_RESPONSE,r,bA)))}),Le.on("aborted",function(){if(V)return;let GA=new Se("stream has been aborted",Se.ERR_BAD_RESPONSE,r,bA,$A);Le.destroy(GA),e(GA)}),Le.on("error",function(GA){V||e(Se.from(GA,null,r,bA,$A))}),Le.on("end",function(){try{let GA=mA.length===1?mA[0]:Buffer.concat(mA);y!=="arraybuffer"&&(GA=GA.toString(m),(!m||m==="utf8")&&(GA=J.stripBOM(GA))),$A.data=GA}catch(GA){return e(Se.from(GA,null,r,$A.request,$A))}on(i,e,$A)})}U.once("abort",mA=>{Le.destroyed||(Le.emit("error",mA),Le.destroy())})}),U.once("abort",pe=>{H.close?H.close():H.destroy(pe)}),H.on("error",function(Me){e(Se.from(Me,null,r,H))});let wA=new Set;if(H.on("socket",function(Me){typeof Me.setKeepAlive=="function"&&Me.setKeepAlive(!0,1e3*60),Me[vY]||(Me.on("error",function(OA){let Le=Me[VB];Le&&!Le.destroyed&&Le.destroy(OA)}),Me[vY]=!0),Me[VB]=H,wA.add(Me)}),H.once("close",function(){G();for(let Me of wA)Me[VB]===H&&(Me[VB]=null);wA.clear()}),A("timeout")){let pe=parseInt(A("timeout"),10);if(Number.isNaN(pe)){M(new Se("error trying to parse `config.timeout` to int",Se.ERR_BAD_OPTION_VALUE,r,H));return}let Me=function(){q||M(te())};pA&&pe>0&&(v=setTimeout(Me,pe)),H.setTimeout(pe,Me)}else H.setTimeout(0);if(J.isStream(s)){let pe=!1,Me=!1;s.on("end",()=>{pe=!0}),s.once("error",OA=>{Me=!0,H.destroy(OA)}),s.on("close",()=>{!pe&&!Me&&M(new Bi("Request stream has been aborted",r,H))});let Ge=s;if(Y>-1&&!AA){let OA=Y,Le=0;Ge=_o.pipeline([s,new _o.Transform({transform(bA,$A,mA){if(Le+=bA.length,Le>OA)return mA(new Se("Request body larger than maxBodyLength limit",Se.ERR_BAD_REQUEST,r,H));mA(null,bA)}})],J.noop),Ge.on("error",bA=>{H.destroyed||H.destroy(bA)})}Ge.pipe(H)}else s&&H.write(s),H.end()})};var ZY=It.hasStandardBrowserEnv?((n,r)=>o=>(o=new URL(o,It.origin),n.protocol===o.protocol&&n.host===o.host&&(r||n.port===o.port)))(new URL(It.origin),It.navigator&&/(msie|trident)/i.test(It.navigator.userAgent)):()=>!0;var XY=It.hasStandardBrowserEnv?{write(n,r,o,i,e,a,A){if(typeof document>"u")return;let t=[`${n}=${encodeURIComponent(r)}`];J.isNumber(o)&&t.push(`expires=${new Date(o).toUTCString()}`),J.isString(i)&&t.push(`path=${i}`),J.isString(e)&&t.push(`domain=${e}`),a===!0&&t.push("secure"),J.isString(A)&&t.push(`SameSite=${A}`),document.cookie=t.join("; ")},read(n){if(typeof document>"u")return null;let r=document.cookie.split(";");for(let o=0;on instanceof Mt?{...n}:n,GEe=n=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(n).concat(Object.getOwnPropertySymbols(n).filter(r=>Object.getOwnPropertyDescriptor(n,r).enumerable)):Object.keys(n);function No(n,r){n=n||{},r=r||{};let o=Object.create(null);Object.defineProperty(o,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function i(c,I,E,B){return J.isPlainObject(c)&&J.isPlainObject(I)?J.merge.call({caseless:B},c,I):J.isPlainObject(I)?J.merge({},I):J.isArray(I)?I.slice():I}function e(c,I,E,B){if(J.isUndefined(I)){if(!J.isUndefined(c))return i(void 0,c,E,B)}else return i(c,I,E,B)}function a(c,I){if(!J.isUndefined(I))return i(void 0,I)}function A(c,I){if(J.isUndefined(I)){if(!J.isUndefined(c))return i(void 0,c)}else return i(void 0,I)}function t(c){let I=J.hasOwnProp(r,"transitional")?r.transitional:void 0;if(!J.isUndefined(I))if(J.isPlainObject(I)){if(J.hasOwnProp(I,c))return I[c]}else return;let E=J.hasOwnProp(n,"transitional")?n.transitional:void 0;if(J.isPlainObject(E)&&J.hasOwnProp(E,c))return E[c]}function s(c,I,E){if(J.hasOwnProp(r,E))return i(c,I);if(J.hasOwnProp(n,E))return i(void 0,c)}let g={url:a,method:a,data:a,baseURL:A,transformRequest:A,transformResponse:A,paramsSerializer:A,timeout:A,timeoutMessage:A,withCredentials:A,withXSRFToken:A,adapter:A,responseType:A,xsrfCookieName:A,xsrfHeaderName:A,onUploadProgress:A,onDownloadProgress:A,decompress:A,maxContentLength:A,maxBodyLength:A,beforeRedirect:A,transport:A,httpAgent:A,httpsAgent:A,cancelToken:A,socketPath:A,allowedSocketPaths:A,responseEncoding:A,validateStatus:s,headers:(c,I,E)=>e($Y(c),$Y(I),E,!0)};return J.forEach(GEe({...n,...r}),function(I){if(I==="__proto__"||I==="constructor"||I==="prototype")return;let E=J.hasOwnProp(g,I)?g[I]:e,B=J.hasOwnProp(n,I)?n[I]:void 0,f=J.hasOwnProp(r,I)?r[I]:void 0,Q=E(B,f,I);J.isUndefined(Q)&&E!==s||(o[I]=Q)}),J.hasOwnProp(r,"validateStatus")&&J.isUndefined(r.validateStatus)&&t("validateStatusUndefinedResolves")===!1&&(J.hasOwnProp(n,"validateStatus")?o.validateStatus=i(void 0,n.validateStatus):delete o.validateStatus),o}var FEe=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(r,o)=>String.fromCharCode(parseInt(o,16)));function LEe(n){let r=No({},n),o=E=>J.hasOwnProp(r,E)?r[E]:void 0,i=o("data"),e=o("withXSRFToken"),a=o("xsrfHeaderName"),A=o("xsrfCookieName"),t=o("headers"),s=o("auth"),g=o("baseURL"),c=o("allowAbsoluteUrls"),I=o("url");if(r.headers=t=Mt.from(t),r.url=hc(dc(g,I,c,r),o("params"),o("paramsSerializer")),s){let E=J.getSafeProp(s,"username")||"",B=J.getSafeProp(s,"password")||"";try{t.set("Authorization","Basic "+btoa(E+":"+(B?FEe(B):"")))}catch(f){throw Se.from(f,Se.ERR_BAD_OPTION_VALUE,n)}}if(J.isFormData(i)&&(It.hasStandardBrowserEnv||It.hasStandardBrowserWebWorkerEnv||J.isReactNative(i)?t.setContentType(void 0):J.isFunction(i.getHeaders)&&_C(t,i.getHeaders(),o("formDataHeaderPolicy"))),It.hasStandardBrowserEnv&&(J.isFunction(e)&&(e=e(r)),e===!0||e==null&&ZY(r.url))){let B=a&&A&&XY.read(A);B&&t.set(a,B)}return r}var zB=LEe;var UEe=typeof XMLHttpRequest<"u",ex=UEe&&function(n){return new Promise(function(o,i){let e=zB(n),a=e.data,A=Mt.from(e.headers).normalize(),{responseType:t,onUploadProgress:s,onDownloadProgress:g}=e,c,I,E,B,f;function Q(){B&&B(),f&&f(),e.cancelToken&&e.cancelToken.unsubscribe(c),e.signal&&e.signal.removeEventListener("abort",c)}let y=new XMLHttpRequest;y.open(e.method.toUpperCase(),e.url,!0),y.timeout=e.timeout;function m(){if(!y)return;let _=Mt.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),Y={data:!t||t==="text"||t==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:_,config:n,request:y};on(function(K){o(K),Q()},function(K){i(K),Q()},Y),y=null}"onloadend"in y?y.onloadend=m:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.startsWith("file:"))||setTimeout(m)},y.onabort=function(){y&&(i(new Se("Request aborted",Se.ECONNABORTED,n,y)),Q(),y=null)},y.onerror=function(P){let Y=P&&P.message?P.message:"Network Error",j=new Se(Y,Se.ERR_NETWORK,n,y);j.event=P||null,i(j),Q(),y=null},y.ontimeout=function(){let P=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",Y=e.transitional||Xs;e.timeoutErrorMessage&&(P=e.timeoutErrorMessage),i(new Se(P,Y.clarifyTimeoutError?Se.ETIMEDOUT:Se.ECONNABORTED,n,y)),Q(),y=null},a===void 0&&A.setContentType(null),"setRequestHeader"in y&&J.forEach(cl(A),function(P,Y){y.setRequestHeader(Y,P)}),J.isUndefined(e.withCredentials)||(y.withCredentials=!!e.withCredentials),t&&t!=="json"&&(y.responseType=e.responseType),g&&([E,f]=$n(g,!0),y.addEventListener("progress",E)),s&&y.upload&&([I,B]=$n(s),y.upload.addEventListener("progress",I),y.upload.addEventListener("loadend",B)),(e.cancelToken||e.signal)&&(c=_=>{y&&(i(!_||_.type?new Bi(null,n,y):_),y.abort(),Q(),y=null)},e.cancelToken&&e.cancelToken.subscribe(c),e.signal&&(e.signal.aborted?c():e.signal.addEventListener("abort",c)));let T=MC(e.url);if(T&&!It.protocols.includes(T)){i(new Se("Unsupported protocol "+T+":",Se.ERR_BAD_REQUEST,n)),Q();return}y.send(a||null)})};var HEe=(n,r)=>{if(n=n?n.filter(Boolean):[],!r&&!n.length)return;let o=new AbortController,i=!1,e=function(s){if(!i){i=!0,A();let g=s instanceof Error?s:this.reason;o.abort(g instanceof Se?g:new Bi(g instanceof Error?g.message:g))}},a=r&&setTimeout(()=>{a=null,e(new Se(`timeout of ${r}ms exceeded`,Se.ETIMEDOUT))},r),A=()=>{n&&(a&&clearTimeout(a),a=null,n.forEach(s=>{s.unsubscribe?s.unsubscribe(e):s.removeEventListener("abort",e)}),n=null)};n.forEach(s=>{if(!i){if(s.aborted){e.call(s);return}s.addEventListener("abort",e,{once:!0})}});let{signal:t}=o;return t.unsubscribe=()=>J.asap(A),t},Ax=HEe;var KEe=function*(n,r){let o=n.byteLength;if(!r||o{let e=YEe(n,r),a=0,A,t=s=>{A||(A=!0,i&&i(s))};return new ReadableStream({async pull(s){try{let{done:g,value:c}=await e.next();if(g){t(),s.close();return}let I=c.byteLength;if(o){let E=a+=I;o(E)}s.enqueue(new Uint8Array(c))}catch(g){throw t(g),g}},cancel(s){return t(s),e.return()}},{highWaterMark:2})};var tx=64*1024,{isFunction:WB}=J,jEe=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(r,o)=>String.fromCharCode(parseInt(o,16))),rx=n=>{if(!J.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},ax=(n,...r)=>{try{return!!n(...r)}catch{return!1}},JEe=n=>{let r=n.indexOf("://"),o=n;return r!==-1&&(o=o.slice(r+3)),o.includes("@")||o.includes(":")},qEe=n=>{let r=J.global!==void 0&&J.global!==null?J.global:globalThis,{ReadableStream:o,TextEncoder:i}=r;n=J.merge.call({skipUndefined:!0},{Request:r.Request,Response:r.Response},n);let{fetch:e,Request:a,Response:A}=n,t=e?WB(e):typeof fetch=="function",s=WB(a),g=WB(A);if(!t)return!1;let c=t&&WB(o),I=t&&(typeof i=="function"?(m=>T=>m.encode(T))(new i):async m=>new Uint8Array(await new a(m).arrayBuffer())),E=s&&c&&ax(()=>{let m=!1,T=new a(It.origin,{body:new o,method:"POST",get duplex(){return m=!0,"half"}}),_=T.headers.has("Content-Type");return T.body!=null&&T.body.cancel(),m&&!_}),B=g&&c&&ax(()=>J.isReadableStream(new A("").body)),f={stream:B&&(m=>m.body)};t&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!f[m]&&(f[m]=(T,_)=>{let P=T&&T[m];if(P)return P.call(T);throw new Se(`Response type '${m}' is not supported`,Se.ERR_NOT_SUPPORT,_)})});let Q=async m=>{if(m==null)return 0;if(J.isBlob(m))return m.size;if(J.isSpecCompliantForm(m))return(await new a(It.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(J.isArrayBufferView(m)||J.isArrayBuffer(m))return m.byteLength;if(J.isURLSearchParams(m)&&(m=m+""),J.isString(m))return(await I(m)).byteLength},y=async(m,T)=>{let _=J.toFiniteNumber(m.getContentLength());return _??Q(T)};return async m=>{let{url:T,method:_,data:P,signal:Y,cancelToken:j,timeout:K,onDownloadProgress:q,onUploadProgress:V,responseType:H,headers:v,withCredentials:Z="same-origin",fetchOptions:U,maxContentLength:M,maxBodyLength:G}=zB(m),te=J.isNumber(M)&&M>-1,Be=J.isNumber(G)&&G>-1,Ce=Pe=>J.hasOwnProp(m,Pe)?m[Pe]:void 0,ke=e||fetch;H=H?(H+"").toLowerCase():"text";let Ee=Ax([Y,j&&j.toAbortSignal()],K),me=null,_e=Ee&&Ee.unsubscribe&&(()=>{Ee.unsubscribe()}),Ve,oA=null,tA=()=>new Se("Request body larger than maxBodyLength limit",Se.ERR_BAD_REQUEST,m,me);try{let Pe,gA=Ce("auth");if(gA){let qe=J.getSafeProp(gA,"username")||"",wA=J.getSafeProp(gA,"password")||"";Pe={username:qe,password:wA}}if(JEe(T)){let qe=new URL(T,It.origin);if(!Pe&&(qe.username||qe.password)){let wA=rx(qe.username),pe=rx(qe.password);Pe={username:wA,password:pe}}(qe.username||qe.password)&&(qe.username="",qe.password="",T=qe.href)}if(Pe&&(v.delete("authorization"),v.set("Authorization","Basic "+btoa(jEe((Pe.username||"")+":"+(Pe.password||""))))),te&&typeof T=="string"&&T.startsWith("data:")&&BM(T)>M)throw new Se("maxContentLength size of "+M+" exceeded",Se.ERR_BAD_RESPONSE,m,me);if(Be&&_!=="get"&&_!=="head"){let qe=await Q(P);if(typeof qe=="number"&&isFinite(qe)&&(Ve=qe,qe>G))throw tA()}let Qe=Be&&(J.isReadableStream(P)||J.isStream(P)),he=(qe,wA,pe)=>yM(qe,tx,Me=>{if(Be&&Me>G)throw oA=tA();wA&&wA(Me)},pe);if(E&&_!=="get"&&_!=="head"&&(V||Qe)){if(Ve=Ve??await y(v,P),Ve!==0||Qe){let qe=new a(T,{method:"POST",body:P,duplex:"half"}),wA;if(J.isFormData(P)&&(wA=qe.headers.get("content-type"))&&v.setContentType(wA),qe.body){let[pe,Me]=V&&yl(Ve,$n(ml(V)))||[];P=he(qe.body,pe,Me)}}}else if(Qe&&!s&&c&&_!=="get"&&_!=="head")P=he(P);else if(Qe&&s&&!E&&_!=="get"&&_!=="head")throw new Se("Stream request bodies are not supported by the current fetch implementation",Se.ERR_NOT_SUPPORT,m,me);J.isString(Z)||(Z=Z?"include":"omit");let ze=s&&"credentials"in a.prototype;if(J.isFormData(P)){let qe=v.getContentType();qe&&/^multipart\/form-data/i.test(qe)&&!/boundary=/i.test(qe)&&v.delete("content-type")}v.set("User-Agent","axios/"+Xn,!1);let Ke={...U,signal:Ee,method:_.toUpperCase(),headers:cl(v.normalize()),body:P,duplex:"half",credentials:ze?Z:void 0};me=s&&new a(T,Ke);let De=await(s?ke(me,U):ke(T,Ke)),EA=Mt.from(De.headers);if(te){let qe=J.toFiniteNumber(EA.getContentLength());if(qe!=null&&qe>M)throw new Se("maxContentLength size of "+M+" exceeded",Se.ERR_BAD_RESPONSE,m,me)}let pA=B&&(H==="stream"||H==="response");if(B&&De.body&&(q||te||pA&&_e)){let qe={};["status","statusText","headers"].forEach(Le=>{qe[Le]=De[Le]});let wA=J.toFiniteNumber(EA.getContentLength()),[pe,Me]=q&&yl(wA,$n(ml(q),!0))||[],Ge=0,OA=Le=>{if(te&&(Ge=Le,Ge>M))throw new Se("maxContentLength size of "+M+" exceeded",Se.ERR_BAD_RESPONSE,m,me);pe&&pe(Le)};De=new A(yM(De.body,tx,OA,()=>{Me&&Me(),_e&&_e()}),qe)}H=H||"text";let AA=await f[J.findKey(f,H)||"text"](De,m);if(te&&!B&&!pA){let qe;if(AA!=null&&(typeof AA.byteLength=="number"?qe=AA.byteLength:typeof AA.size=="number"?qe=AA.size:typeof AA=="string"&&(qe=typeof i=="function"?new i().encode(AA).byteLength:AA.length)),typeof qe=="number"&&qe>M)throw new Se("maxContentLength size of "+M+" exceeded",Se.ERR_BAD_RESPONSE,m,me)}return!pA&&_e&&_e(),await new Promise((qe,wA)=>{on(qe,wA,{data:AA,headers:Mt.from(De.headers),status:De.status,statusText:De.statusText,config:m,request:me})})}catch(Pe){if(_e&&_e(),Ee&&Ee.aborted&&Ee.reason instanceof Se){let gA=Ee.reason;throw gA.config=m,me&&(gA.request=me),Pe!==gA&&Object.defineProperty(gA,"cause",{__proto__:null,value:Pe,writable:!0,enumerable:!1,configurable:!0}),gA}if(oA)throw me&&!oA.request&&(oA.request=me),oA;if(Pe instanceof Se)throw me&&!Pe.request&&(Pe.request=me),Pe;if(Pe&&Pe.name==="TypeError"&&/Load failed|fetch/i.test(Pe.message)){let gA=new Se("Network Error",Se.ERR_NETWORK,m,me,Pe&&Pe.response);throw Object.defineProperty(gA,"cause",{__proto__:null,value:Pe.cause||Pe,writable:!0,enumerable:!1,configurable:!0}),gA}throw Se.from(Pe,Pe&&Pe.code,m,me,Pe&&Pe.response)}}},VEe=new Map,mM=n=>{let r=n&&n.env||{},{fetch:o,Request:i,Response:e}=r,a=[i,e,o],A=a.length,t=A,s,g,c=VEe;for(;t--;)s=a[t],g=c.get(s),g===void 0&&c.set(s,g=t?new Map:qEe(r)),c=g;return g},vWe=mM();var SM={http:WY,xhr:ex,fetch:{get:mM}};J.forEach(SM,(n,r)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:r})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:r})}});var ix=n=>`- ${n}`,WEe=n=>J.isFunction(n)||n===null||n===!1;function ZEe(n,r){n=J.isArray(n)?n:[n];let{length:o}=n,i,e,a={};for(let A=0;A`adapter ${s} `+(g===!1?"is not supported by the environment":"is not available in the build")),t=o?A.length>1?`since : +`),questions:o}}function Bge(n,r){return new Promise((o,i)=>{if(n.controller.signal.aborted)return i(n.controller.signal.reason??il());let e=()=>{n.approvals.delete(r),i(n.controller.signal.reason??il())};n.controller.signal.addEventListener("abort",e,{once:!0}),n.approvals.set(r,{resolve(a){n.controller.signal.removeEventListener("abort",e),n.approvals.delete(r),o(a)}})})}var mB=class{#e;#A;#r;#t;#n;#o=new Map;#l=new Set;#s=new Set;#I=!1;#a={running:0,completed:0,failed:0,lastJobId:null,lastJobAt:null};constructor({config:r,transport:o,createHarness:i,logger:e=console,sleepImpl:a=pge}){if(!r||!o||typeof i!="function")throw new TypeError("OfficeJobExecutor requires config, transport, and createHarness");this.#e=r,this.#A=o,this.#r=i,this.#t=e,this.#n=a}get status(){return structuredClone(this.#a)}offer(r){return this.#I||!CU.test(r)||this.#o.has(r)||this.#l.has(r)||this.#s.has(r)?!1:(this.#l.add(r),this.#i(),!0)}handleEvent(r){let o=ma(r?.data?.jobId,80);if(!CU.test(o))return!1;if(r.type==="job.available")return this.offer(o);if(r.type==="job.cancel")return this.cancel(o);if(r.type==="approval.reply"){let i=this.#o.get(o),e=ma(r.data?.approvalId,180),a=i?.approvals.get(e);return a?(a.resolve({decision:r.data?.decision==="approved"?"approved":"rejected",answer:ma(r.data?.answer)}),!0):!1}return!1}cancel(r){this.#l.delete(r);let o=this.#o.get(r);return o?(o.cancelled=!0,o.controller.abort(il()),o.sessionId&&o.harness&&o.harness.rpc("session.cancel",{sessionId:o.sessionId,keepInbox:!0},1e4).catch(()=>{}),!0):!1}async close(){this.#I=!0,this.#l.clear();for(let r of this.#o.values())r.controller.abort(il());await Promise.allSettled([...this.#o.values()].map(r=>r.task))}#i(){for(;!this.#I&&this.#o.size0;){let r=this.#l.values().next().value;this.#l.delete(r);let o={controller:new AbortController,approvals:new Map,harness:null,sessionId:null,leaseToken:null,cancelled:!1,lastProgressAt:0,lastProgress:"",task:null};o.task=this.#c(r,o).finally(()=>{this.#o.delete(r),this.#a.running=this.#o.size,this.#i()}),this.#o.set(r,o),this.#a.running=this.#o.size,o.task.catch(i=>this.#t.warn?.("[dsh-im:office] Job task ended:",i.message))}}async#c(r,o){let i=o.controller.signal,e=null;try{let A=(await this.#A.getJob(r,{signal:i}))?.job;if(!A||A.id!==r)throw new Error("Office returned an invalid Job payload");let t=await this.#A.acceptJob(r,{signal:i});if(!ma(t?.leaseToken,200))throw new Error("Office returned an invalid Job lease");o.leaseToken=t.leaseToken,e=this.#g(r,o);let s=this.#e.workspaces[A.workspaceAlias],g=this.#e.instructionPresets[A.instructionPreset];if(!s||!g){let I=new Error("Office Job \u5F15\u7528\u4E86\u672C\u673A\u672A\u914D\u7F6E\u7684 Workspace/Preset alias\u3002");throw I.code="office-job-alias-invalid",I}o.harness=this.#r({workspace:s}),await this.#h(r,o,{kind:"status",message:`\u5DF2\u9886\u53D6 Job\uFF0C\u51C6\u5907 Workspace alias\uFF1A${A.workspaceAlias}`},!0),o.sessionId=await o.harness.createSession({signal:i,workspace:s}),await this.#h(r,o,{kind:"status",message:"Harness Session \u5DF2\u521B\u5EFA\u3002",sessionId:o.sessionId},!0);let c=await o.harness.ask(o.sessionId,dge(A,g),{timeoutMs:30*6e4,signal:i,onUpdate:I=>this.#p(r,o,I),onInteraction:I=>this.#C(r,o,I),onInteractionResolved:I=>{let E=ma(I?.interactionId,180);o.approvals.get(E)?.resolve({decision:"rejected",answer:""})}});if(i.aborted)throw i.reason??il();await this.#A.completeJob(r,o.leaseToken,{resultMarkdown:c,sessionId:o.sessionId},{signal:i}),this.#a.completed+=1,this.#E(r)}catch(a){if(!o.cancelled&&o.leaseToken&&(await this.#A.failJob(r,o.leaseToken,{error:hge(a),...o.sessionId?{sessionId:o.sessionId}:{}}).catch(()=>{}),this.#a.failed+=1),a?.code==="office-job-conflict"||a?.code==="office-hook-unavailable"){this.#E(r);return}!o.cancelled&&!i.aborted&&this.#t.warn?.(`[dsh-im:office] Job ${r} failed:`,a.message)}finally{o.controller.abort(il()),await e?.catch(()=>{}),this.#a.lastJobId=r,this.#a.lastJobAt=new Date().toISOString()}}async#g(r,o){for(;!o.controller.signal.aborted;){try{await this.#n(Ege,void 0,{signal:o.controller.signal})}catch{return}try{await this.#A.renewJob(r,o.leaseToken,{signal:o.controller.signal})}catch(i){if(o.controller.signal.aborted)return;o.cancelled=!0,o.controller.abort(i),o.sessionId&&o.harness&&o.harness.rpc("session.cancel",{sessionId:o.sessionId,keepInbox:!0},1e4).catch(()=>{});return}try{let e=(await this.#A.getJob(r,{signal:o.controller.signal}))?.job?.approval;e&&(e.status==="approved"||e.status==="rejected")&&o.approvals.get(e.id)?.resolve({decision:e.status,answer:ma(e.answer)})}catch(i){if(o.controller.signal.aborted)return;this.#t.warn?.(`[dsh-im:office] Job ${r} approval poll failed; will retry after the next renewal:`,i.message)}}}async#p(r,o,i){let e=i?.type==="tool"?`\u6B63\u5728\u4F7F\u7528 ${ma(i.name,160)||"Harness \u5DE5\u5177"}\u2026`:ma(i?.text,4e3);if(!e)return;let a=`${i.type}:${e}`;if(a===o.lastProgress)return;let A=Date.now();i.type==="text"&&A-o.lastProgressAt<1e3||(o.lastProgress=a,o.lastProgressAt=A,await this.#h(r,o,{kind:i.type==="tool"?"tool":i.type==="text"?"text":"status",message:e,...o.sessionId?{sessionId:o.sessionId}:{}}))}#h(r,o,i,e=!1){let a=this.#A.progressJob(r,o.leaseToken,i,{signal:o.controller.signal});return e?a:a.catch(A=>{this.#t.debug?.("[dsh-im:office] ignored a progress delivery failure:",A.message)})}async#C(r,o,i){let e=uge(i);if(!e){i?.kind==="approval"&&typeof i.respond=="function"&&await i.respond({ok:!0,value:{sessionId:i.sessionId,approvalId:i.payload?.approvalId,outcome:"rejected"}});return}let a=Bge(o,e.id);try{await this.#A.requestApproval(r,o.leaseToken,e,{signal:o.controller.signal});let A=await a;if(e.kind==="approval"){await i.respond({ok:!0,value:{sessionId:i.sessionId,approvalId:i.payload.approvalId,outcome:A.decision==="approved"?"allowed-once":"rejected"}});return}if(A.decision!=="approved"){await i.respond({ok:!1,error:{code:"cancelled",message:"The AI Office user rejected this question.",details:{}}});return}let t=ma(A.answer).split(/\r?\n/);await i.respond({ok:!0,value:{sessionId:i.sessionId,answer:{answers:e.questions.map((s,g)=>xa(s,t[g]||t[0]||""))}}})}catch(A){throw o.approvals.delete(e.id),A}}#E(r){this.#s.add(r),!(this.#s.size<=Cge)&&this.#s.delete(this.#s.values().next().value)}};var hU=Object.freeze([1e3,3e3,1e4,3e4]);function Qge(n){let r=typeof n?.code=="string"?n.code:"office-connection-failed";return{code:r,message:{"invalid-device-token":"AI Office \u62D2\u7EDD\u4E86 Device Token\u3002","office-hook-unavailable":"AI Office Connector Hook \u5C1A\u672A\u5C31\u7EEA\u3002","office-protocol-mismatch":"AI Office Connector \u534F\u8BAE\u7248\u672C\u4E0D\u517C\u5BB9\u3002","office-transport-failed":"\u672C\u673A\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE AI Office\u3002"}[r]??"AI Office \u8FDE\u63A5\u5DF2\u4E2D\u65AD\u3002"}}var ol=class{#e;#A;#r;#t;#n;#o=null;#l=null;#s;#I;constructor({config:r,token:o,logger:i=console,transport:e,createHarness:a,jobExecutor:A,sleepImpl:t=fge}){this.#e=r,this.#A=o,this.#r=i,this.#n=t,this.#t=e??new yB({baseUrl:r.baseUrl,deviceId:r.deviceId,token:o}),this.#s={state:"idle",connected:!1,startedAt:null,lastHeartbeatAt:null,lastEventAt:null,lastEventId:null,lastEventType:null,reconnects:0,jobsOffered:0,error:null},this.#I=A??(a?new mB({config:r,transport:this.#t,createHarness:a,logger:i}):null)}get status(){return structuredClone({...this.#s,...this.#I?{jobs:this.#I.status}:{}})}capabilities(){return{protocolVersion:Al,deviceId:this.#e.deviceId,workspaces:Object.keys(this.#e.workspaces),instructionPresets:Object.keys(this.#e.instructionPresets),maxConcurrency:this.#e.maxConcurrency}}async testConnection(r){return await this.#t.heartbeat({...this.capabilities(),probe:!0},{signal:r}),{ok:!0}}start(){return this.#l?this.status:(this.#o=new AbortController,this.#s.startedAt=new Date().toISOString(),this.#s.state="connecting",this.#l=this.#a(this.#o.signal).finally(()=>{this.#l=null}),this.#l.catch(r=>{this.#o?.signal.aborted||this.#r.error?.("[dsh-im:office] connector stopped:",r)}),this.status)}async#a(r){let o=0;for(;!r.aborted;){let i=new AbortController,e=AbortSignal.any([r,i.signal]);try{let a=await this.#t.heartbeat(this.capabilities(),{signal:e});this.#c(a?.jobs),this.#s.lastHeartbeatAt=new Date().toISOString();let A=!1,t=this.#i(e,()=>{A&&!e.aborted&&(o=0)}),s=this.#t.stream({signal:e,lastEventId:this.#s.lastEventId,onOpen:()=>{this.#s.connected=!0,this.#s.state="connected",this.#s.error=null,A=!0},onEvent:async g=>{this.#s.lastEventAt=new Date().toISOString(),this.#s.lastEventId=g.id??this.#s.lastEventId,this.#s.lastEventType=g.type,g.type==="job.available"&&(this.#s.jobsOffered+=1),this.#I?.handleEvent(g)}});await Promise.race([s,t])}catch(a){if(r.aborted)break;i.abort(),this.#s.connected=!1,this.#s.state="reconnecting",this.#s.error=Qge(a),this.#s.reconnects+=1;let A=hU[Math.min(o,hU.length-1)];o+=1;try{await this.#n(A,void 0,{signal:r})}catch{break}}finally{i.abort()}}this.#s.connected=!1,this.#s.state="idle"}async#i(r,o){for(;!r.aborted;){await this.#n(this.#e.heartbeatSeconds*1e3,void 0,{signal:r});let i=await this.#t.heartbeat(this.capabilities(),{signal:r});this.#c(i?.jobs),this.#s.lastHeartbeatAt=new Date().toISOString(),o?.()}}#c(r){if(Array.isArray(r))for(let o of r)typeof o?.id=="string"&&this.#I?.offer(o.id)&&(this.#s.jobsOffered+=1)}async stop(){let r=this.#l;return this.#o?.abort(),this.#o=null,r&&await r.catch(()=>{}),await this.#I?.close(),this.#s.connected=!1,this.#s.state="idle",this.status}};function VO(n){return typeof n=="string"&&n.trim()?n.trim():null}function mge(n,r){return`DSH_OFFICE_DEVICE_TOKEN_${yge("sha256").update(`${n} +${r}`).digest("hex").slice(0,24).toUpperCase()}`}var SB=class{#e;#A;#r;#t;#n=null;#o=Promise.resolve();constructor({credentials:r,configStore:o,logger:i=console,createRuntime:e}){if(!r?.resolve||!r?.set||!r?.unset)throw new TypeError("AI Office requires the Harness credential provider");if(!o?.get||!o?.save||!o?.clear)throw new TypeError("AI Office requires a config store");this.#e=r,this.#A=o,this.#r=i,this.#t=e??(a=>new ol(a))}async initialize(){let r=this.#A.get();if(r){let o=await this.#e.resolve(r.deviceTokenRef).catch(()=>{});o?.value&&await this.#s(r,o.value)}return this.status()}async configure(r={}){return this.#a(async()=>{let o=this.#A.get(),i=VO(r.baseUrl),e=VO(r.deviceId);if(!i||!e)throw new TypeError("Office URL and Device ID are required");let a=oC(i).origin,A=mge(a,e),t=VO(r.deviceToken),s=await this.#e.resolve(A).catch(()=>{}),g=t??s?.value;if(!g||g.length<32)throw new TypeError("Device Token must contain at least 32 characters");let c=new Date().toISOString(),I=fB({version:1,baseUrl:a,deviceId:e,deviceTokenRef:A,maxConcurrency:r.maxConcurrency,heartbeatSeconds:r.heartbeatSeconds,workspaces:r.workspaces,instructionPresets:r.instructionPresets,createdAt:o?.createdAt??c,updatedAt:c});if(!I)throw new TypeError("AI Office connector configuration is invalid");await this.#e.set(A,g);try{await this.#A.save(I)}catch(E){throw s?.value?await this.#e.set(A,s.value).catch(()=>{}):await this.#e.unset(A).catch(()=>{}),E}return o?.deviceTokenRef&&o.deviceTokenRef!==A&&await this.#e.unset(o.deviceTokenRef).catch(()=>{}),await this.#s(I,g),this.status()})}async reconnect(){return this.#a(async()=>{let r=this.#A.get();if(!r)throw new Error("AI Office connector is not configured");return await this.#s(r),this.status()})}async test(){let r=this.#A.get();if(!r)throw new Error("AI Office connector is not configured");let o=await this.#l(r),i=this.#t({config:r,token:o,logger:this.#r});try{await i.testConnection(AbortSignal.timeout(1e4))}finally{await i.stop().catch(()=>{})}return{tested:!0,snapshot:await this.status()}}async remove(){return this.#a(async()=>{let r=this.#A.get();return await this.#I(),r?.deviceTokenRef&&await this.#e.unset(r.deviceTokenRef).catch(()=>{}),await this.#A.clear(),this.status()})}async status(){let r=this.#A.get();if(!r)return{schemaVersion:1,configured:!1,connected:!1,state:"unconfigured"};let o=await this.#e.resolve(r.deviceTokenRef).catch(()=>{}),i=this.#n?.status??null;return{schemaVersion:1,configured:!0,connected:i?.connected===!0,state:i?.state??(o?.value?"idle":"missing-token"),config:{protocolVersion:r.protocolVersion,baseUrl:r.baseUrl,deviceId:r.deviceId,maxConcurrency:r.maxConcurrency,heartbeatSeconds:r.heartbeatSeconds,workspaces:r.workspaces,instructionPresets:r.instructionPresets,hooks:BB(r.baseUrl)},health:i,tokenConfigured:!!o?.value}}async close(){await this.#o.catch(()=>{}),await this.#I()}async#l(r){let o=await this.#e.resolve(r.deviceTokenRef).catch(()=>{});if(!o?.value)throw new Error("AI Office Device Token is missing");return o.value}async#s(r,o){await this.#I();let i=o??await this.#l(r),e=this.#t({config:r,token:i,logger:this.#r});this.#n=e,e.start()}async#I(){let r=this.#n;this.#n=null,r&&await r.stop()}#a(r){let o=this.#o.then(r,r);return this.#o=o.then(()=>{},()=>{}),o}};function Dge(n={}){let r=WO(n.dshHome??process.env.DSH_HOME??zO(Sge(),".dsh")),o=WO(n.dataDir??zO(r,"integrations","dsh-office"));return{root:o,config:WO(n.configPath??zO(o,"config.json"))}}async function dU(n,r={},o={}){let i=o.ConfigStore??QB,e=o.Controller??SB,a=o.Runtime??ol,A=o.HarnessClient??rr,t=Dge(r),s=await new i(t.config).load(),g=typeof n.logger=="function"?n.logger("dsh-im:office"):n.logger??console,c=iC(n.webServer,r.harnessBaseUrl),I=o.createHarness??(({workspace:B})=>new A({baseUrl:c,workspace:B,autostart:!1,dshBin:r.dshBin??"dsh",rpcIdPrefix:"office",logPrefix:"dsh-im:office"})),E=new e({credentials:n.credentials,configStore:s,logger:g,createRuntime:B=>new a({...B,createHarness:I,...o.transport?{transport:o.transport}:{}})});return await E.initialize(),{controller:E,close:()=>E.close(),paths:t}}function ZO(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function nC(n,r){return ZO(n)&&Object.keys(n).every(o=>r.includes(o))}function wge(n){return nC(n,["baseUrl","deviceId","deviceToken","maxConcurrency","heartbeatSeconds","workspaces","instructionPresets"])&&typeof n.baseUrl=="string"&&typeof n.deviceId=="string"&&(n.deviceToken===void 0||typeof n.deviceToken=="string")&&ZO(n.workspaces)&&ZO(n.instructionPresets)}function Oge(n){for(let r of["status","configure","reconnect","test","remove"])if(typeof n?.[r]!="function")throw new TypeError(`AI Office controller requires ${r}()`);return async(r,o,i)=>{if(i?.aborted)return{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}};try{let e;if(r===tl.status&&nC(o,[]))e=await n.status();else if(r===tl.configure&&wge(o))e=await n.configure(o);else if(r===tl.reconnect&&nC(o,[]))e=await n.reconnect();else if(r===tl.test&&nC(o,[]))e=await n.test();else if(r===tl.remove&&nC(o,["confirm"])&&o.confirm===!0)e=await n.remove();else return{ok:!1,error:{code:"bad-request",message:"Invalid AI Office connector request."}};return{ok:!0,value:e}}catch(e){let a=e?.code==="invalid-device-token"?"invalid-device-token":e?.code==="office-hook-unavailable"?"office-hook-unavailable":"office-operation-failed",A=a==="invalid-device-token"?"AI Office Device Token \u65E0\u6548\u3002":a==="office-hook-unavailable"?"AI Office Hook \u5C1A\u672A\u4E0A\u7EBF\u6216\u5730\u5740\u4E0D\u6B63\u786E\u3002":e instanceof TypeError?e.message:"AI Office \u8FDE\u63A5\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002";return{ok:!1,error:{code:a,message:A}}}}}function XO(n,r,o){return n.connection.rpc.handle(pU,Oge(r),{authority:Er(o)})}async function uU(n,r={}){if(r.controller)return XO(n,r.controller,r.rpcAuthority);let o=await dU(n,r,r.internals??{}),i=XO(n,o.controller,r.rpcAuthority);return n.effect(()=>async()=>o.close(),"dsh-im: close AI Office connector"),i}var bge=new Set(["starting","qr_ready","polling","slow_down","domain_switched"]);function Mge(n){let r=n?.client_id??n?.appId,o=n?.client_secret??n?.appSecret;if(typeof r!="string"||r.length===0||typeof o!="string"||o.length===0)throw new TypeError("Feishu registration returned invalid credentials");return{appId:r,appSecret:o,userInfo:n?.user_info??n?.userInfo}}async function _ge(n){return typeof n.status!="function"?{}:await n.status()}function Nge(n){return n?.connected===!0?!0:n?.ready===!0&&n?.feishuLongConnectionState==="connected"&&n?.harnessReachable===!0}var DB=class{#e;#A;#r;#t;#n=!1;#o=null;constructor({createProvisioningManager:r,credentialStore:o,connectionManager:i,registrationOptions:e={}}={}){if(typeof r!="function")throw new TypeError("createProvisioningManager is required");if(!o||typeof o.save!="function"||typeof o.clear!="function")throw new TypeError("credentialStore.save/clear are required");if(!i||typeof i.connect!="function"||typeof i.disconnect!="function")throw new TypeError("connectionManager.connect/disconnect are required");if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError("registrationOptions must be an object");if(this.#e=o,this.#A=i,this.#r=structuredClone(e),this.#t=r({onCredentials:a=>this.#l(a)}),!this.#t||typeof this.#t.start!="function"||typeof this.#t.status!="function"||typeof this.#t.cancel!="function")throw new TypeError("The provisioning manager must implement start/status/cancel")}async startRegistration(){return this.#o=null,await this.#t.start(structuredClone(this.#r)),this.status()}async cancelRegistration(){return await this.#t.cancel(),this.status()}async disconnect(){await this.#t.cancel(),await this.#A.disconnect();try{await this.#e.clear(),this.#n=!1,this.#o=null}catch{this.#o={code:"credential_removal_failed",message:"Unable to remove the Feishu credentials."}}return this.status()}async status(){let r=await this.#t.status(),o=await _ge(this.#A),i=Nge(o),e=this.#n;if(typeof this.#e.configured=="function")try{e=await this.#e.configured()}catch{e=this.#n}let a="unconfigured";return i?a="connected":bge.has(r?.state)?a="registering":r?.state==="saving"?a="connecting":this.#o||r?.state==="error"?a="error":e&&(a="disconnected"),{phase:a,connected:i,configured:e,registration:r,connection:o,error:this.#o??r?.error??null}}async close(){await this.#t.cancel(),await this.#A.disconnect()}async#l(r){let o=Mge(r);try{await this.#e.save(o),this.#n=!0,await this.#A.connect(o),this.#o=null}catch{throw this.#o={code:"connection_failed",message:"The bot was created, but its connection could not be started."},new Error("Unable to activate the Feishu connection.")}}};function $O(n){return new DB(n)}import{homedir as _De}from"node:os";import{join as Zl,resolve as lg}from"node:path";import{unlink as NDe}from"node:fs/promises";var zT={};Qr(zT,{AESCipher:()=>Bh,AccessTokenError:()=>ql,Aily:()=>DT,AppType:()=>En,CAppTicket:()=>uh,CTenantAccessToken:()=>ph,CardActionHandler:()=>QT,Client:()=>sQ,ClientAssertionError:()=>Da,DefaultCache:()=>iQ,Domain:()=>Cn,EventDispatcher:()=>cQ,LarkChannel:()=>hQ,LarkChannelError:()=>St,LoggerLevel:()=>mi,LoggerProxy:()=>cg,WSClient:()=>lQ,adaptDefault:()=>Qye,adaptExpress:()=>yye,adaptKoa:()=>mye,adaptKoaRouter:()=>Sye,createLarkChannel:()=>sSe,defaultHttpInstance:()=>Vl,defaultLogger:()=>Is,generateChallenge:()=>Qh,internalCache:()=>fh,messageCard:()=>wye,normalize:()=>iq,normalizeBotAdded:()=>rq,normalizeCardAction:()=>tq,normalizeComment:()=>aq,normalizeReaction:()=>FT,registerApp:()=>Gye,withAll:()=>Cye,withHelpDeskCredential:()=>dye,withTenantKey:()=>hye,withTenantToken:()=>uye,withUserAccessToken:()=>Bye});function sC(n,r){return function(){return n.apply(r,arguments)}}var{toString:Tge}=Object.prototype,{getPrototypeOf:nl}=Object,{iterator:cC,toStringTag:QU}=Symbol,OB=(({hasOwnProperty:n})=>(r,o)=>n.call(r,o))(Object.prototype),gC=(n,r)=>{let o=n,i=[];for(;o!=null&&o!==Object.prototype;){if(i.indexOf(o)!==-1)return!1;if(i.push(o),OB(o,r))return!0;o=nl(o)}return!1},Rge=(n,r)=>n!=null&&gC(n,r)?n[r]:void 0,Ab=(n=>r=>{let o=Tge.call(r);return n[o]||(n[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),Ji=n=>(n=n.toLowerCase(),r=>Ab(r)===n),bB=n=>r=>typeof r===n,{isArray:pc}=Array,Ec=bB("undefined");function sl(n){return n!==null&&!Ec(n)&&n.constructor!==null&&!Ec(n.constructor)&&Za(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}var yU=Ji("ArrayBuffer");function kge(n){let r;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?r=ArrayBuffer.isView(n):r=n&&n.buffer&&yU(n.buffer),r}var vge=bB("string"),Za=bB("function"),mU=bB("number"),gl=n=>n!==null&&typeof n=="object",Pge=n=>n===!0||n===!1,wB=n=>{if(!gl(n))return!1;let r=nl(n);return(r===null||r===Object.prototype||nl(r)===null)&&!gC(n,QU)&&!gC(n,cC)},Gge=n=>{if(!gl(n)||sl(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},Fge=Ji("Date"),Lge=Ji("File"),Uge=n=>!!(n&&typeof n.uri<"u"),Hge=n=>n&&typeof n.getParts<"u",Kge=Ji("Blob"),Yge=Ji("FileList"),xge=Ji("Set"),jge=n=>gl(n)&&Za(n.pipe);function Jge(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}var BU=Jge(),fU=typeof BU.FormData<"u"?BU.FormData:void 0,qge=n=>{if(!n)return!1;if(fU&&n instanceof fU)return!0;let r=nl(n);if(!r||r===Object.prototype||!Za(n.append))return!1;let o=Ab(n);return o==="formdata"||o==="object"&&Za(n.toString)&&n.toString()==="[object FormData]"},Vge=Ji("URLSearchParams"),[zge,Wge,Zge,Xge]=["ReadableStream","Request","Response","Headers"].map(Ji),$ge=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function IC(n,r,{allOwnKeys:o=!1}={}){if(n===null||typeof n>"u")return;let i,e;if(typeof n!="object"&&(n=[n]),pc(n))for(i=0,e=n.length;i0;)if(e=o[i],r===e.toLowerCase())return e;return null}var lc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,DU=n=>!Ec(n)&&n!==lc;function eb(...n){let{caseless:r,skipUndefined:o}=DU(this)&&this||{},i={},e=(a,A)=>{if(A==="__proto__"||A==="constructor"||A==="prototype")return;let t=r&&typeof A=="string"&&SU(i,A)||A,s=OB(i,t)?i[t]:void 0;wB(s)&&wB(a)?i[t]=eb(s,a):wB(a)?i[t]=eb({},a):pc(a)?i[t]=a.slice():(!o||!Ec(a))&&(i[t]=a)};for(let a=0,A=n.length;a(IC(r,(e,a)=>{o&&Za(e)?Object.defineProperty(n,a,{__proto__:null,value:sC(e,o),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,a,{__proto__:null,value:e,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),n),Ace=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),tce=(n,r,o,i)=>{n.prototype=Object.create(r.prototype,i),Object.defineProperty(n.prototype,"constructor",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{__proto__:null,value:r.prototype}),o&&Object.assign(n.prototype,o)},rce=(n,r,o,i)=>{let e,a,A,t={};if(r=r||{},n==null)return r;do{for(e=Object.getOwnPropertyNames(n),a=e.length;a-- >0;)A=e[a],(!i||i(A,n,r))&&!t[A]&&(r[A]=n[A],t[A]=!0);n=o!==!1&&nl(n)}while(n&&(!o||o(n,r))&&n!==Object.prototype);return r},ace=(n,r,o)=>{n=String(n),(o===void 0||o>n.length)&&(o=n.length),o-=r.length;let i=n.indexOf(r,o);return i!==-1&&i===o},ice=n=>{if(!n)return null;if(pc(n))return n;let r=n.length;if(!mU(r))return null;let o=new Array(r);for(;r-- >0;)o[r]=n[r];return o},oce=(n=>r=>n&&r instanceof n)(typeof Uint8Array<"u"&&nl(Uint8Array)),nce=(n,r)=>{let i=(n&&n[cC]).call(n),e;for(;(e=i.next())&&!e.done;){let a=e.value;r.call(n,a[0],a[1])}},sce=(n,r)=>{let o,i=[];for(;(o=n.exec(r))!==null;)i.push(o);return i},gce=Ji("HTMLFormElement"),cce=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,i,e){return i.toUpperCase()+e}),{propertyIsEnumerable:Ice}=Object.prototype,lce=Ji("RegExp"),wU=(n,r)=>{let o=Object.getOwnPropertyDescriptors(n),i={};IC(o,(e,a)=>{let A;(A=r(e,a,n))!==!1&&(i[a]=A||e)}),Object.defineProperties(n,i)},pce=n=>{wU(n,(r,o)=>{if(Za(n)&&["arguments","caller","callee"].includes(o))return!1;let i=n[o];if(Za(i)){if(r.enumerable=!1,"writable"in r){r.writable=!1;return}r.set||(r.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},Ece=(n,r)=>{let o={},i=e=>{e.forEach(a=>{o[a]=!0})};return pc(n)?i(n):i(String(n).split(r)),o},Cce=()=>{},hce=(n,r)=>n!=null&&Number.isFinite(n=+n)?n:r;function dce(n){return!!(n&&Za(n.append)&&n[QU]==="FormData"&&n[cC])}var uce=n=>{let r=new WeakSet,o=i=>{if(gl(i)){if(r.has(i))return;if(sl(i))return i;if(!("toJSON"in i)){r.add(i);let e;if(xge(i)){e=[];for(let a of i){let A=o(a);!Ec(A)&&e.push(A)}}else e=pc(i)?[]:{},IC(i,(a,A)=>{let t=o(a);!Ec(t)&&(e[A]=t)});return r.delete(i),e}}return i};return o(n)},Bce=Ji("AsyncFunction"),fce=n=>n&&(gl(n)||Za(n))&&Za(n.then)&&Za(n.catch),OU=((n,r)=>n?setImmediate:r?((o,i)=>(lc.addEventListener("message",({source:e,data:a})=>{e===lc&&a===o&&i.length&&i.shift()()},!1),e=>{i.push(e),lc.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",Za(lc.postMessage)),Qce=typeof queueMicrotask<"u"?queueMicrotask.bind(lc):typeof process<"u"&&process.nextTick||OU,bU=n=>n!=null&&Za(n[cC]),yce=n=>n!=null&&gC(n,cC)&&bU(n),J={isArray:pc,isArrayBuffer:yU,isBuffer:sl,isFormData:qge,isArrayBufferView:kge,isString:vge,isNumber:mU,isBoolean:Pge,isObject:gl,isPlainObject:wB,isEmptyObject:Gge,isReadableStream:zge,isRequest:Wge,isResponse:Zge,isHeaders:Xge,isUndefined:Ec,isDate:Fge,isFile:Lge,isReactNativeBlob:Uge,isReactNative:Hge,isBlob:Kge,isRegExp:lce,isFunction:Za,isStream:jge,isURLSearchParams:Vge,isTypedArray:oce,isFileList:Yge,forEach:IC,merge:eb,extend:ece,trim:$ge,stripBOM:Ace,inherits:tce,toFlatObject:rce,kindOf:Ab,kindOfTest:Ji,endsWith:ace,toArray:ice,forEachEntry:nce,matchAll:sce,isHTMLForm:gce,hasOwnProperty:OB,hasOwnProp:OB,hasOwnInPrototypeChain:gC,getSafeProp:Rge,reduceDescriptors:wU,freezeMethods:pce,toObjectSet:Ece,toCamelCase:cce,noop:Cce,toFiniteNumber:hce,findKey:SU,global:lc,isContextDefined:DU,isSpecCompliantForm:dce,toJSONObject:uce,isAsyncFn:Bce,isThenable:fce,setImmediate:OU,asap:Qce,isIterable:bU,isSafeIterable:yce};var mce=J.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),MU=n=>{let r={},o,i,e;return n&&n.split(` +`).forEach(function(A){e=A.indexOf(":"),o=A.substring(0,e).trim().toLowerCase(),i=A.substring(e+1).trim();let t=J.hasOwnProp(r,o);!o||t&&J.hasOwnProp(mce,o)||(o==="set-cookie"?t?r[o].push(i):r[o]=[i]:r[o]=t?r[o]+", "+i:i)}),r};function Sce(n){let r=0,o=n.length;for(;rr;){let i=n.charCodeAt(o-1);if(i!==9&&i!==32)break;o-=1}return r===0&&o===n.length?n:n.slice(r,o)}var Dce=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),wce=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function tb(n,r){return J.isArray(n)?n.map(o=>tb(o,r)):Sce(String(n).replace(r,""))}var _U=n=>tb(n,Dce),Oce=n=>tb(n,wce);function cl(n){let r=Object.create(null);return J.forEach(n.toJSON(),(o,i)=>{r[i]=Oce(o)}),r}var NU=Symbol("internals");function lC(n){return n&&String(n).trim().toLowerCase()}function MB(n){return n===!1||n==null?n:J.isArray(n)?n.map(MB):_U(String(n))}function bce(n){let r=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,i;for(;i=o.exec(n);)r[i[1]]=i[2];return r}var Mce=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function rb(n){let r=0,o=n.length;for(;rr;){let i=n.charCodeAt(o-1);if(i!==9&&i!==32)break;o-=1}return r===0&&o===n.length?n:n.slice(r,o)}function _ce(n){let r=n.length-1;if(r<1||n.charCodeAt(0)!==34||n.charCodeAt(r)!==34)return n;let o="";for(let i=1;i=r))return n;o+=n[i]}return o}function Nce(n){let r=Object.create(null),o=String(n),i=0,e=!1,a=!1;function A(t){let s=rb(o.slice(i,t)),g=s.indexOf("=");if(g<1)return;let c=rb(s.slice(0,g));if(!Mce.test(c))return;let I=c.toLowerCase();if(I==="__proto__"||I==="constructor"||I==="prototype")return;let E=rb(s.slice(g+1));r[I]=_ce(E)}for(let t=0;t/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function ab(n,r,o,i,e){if(J.isFunction(i))return i.call(this,r,o);if(e&&(r=o),!!J.isString(r)){if(J.isString(i))return r.indexOf(i)!==-1;if(J.isRegExp(i))return i.test(r)}}function Rce(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(r,o,i)=>o.toUpperCase()+i)}function kce(n,r){let o=J.toCamelCase(" "+r);["get","set","has"].forEach(i=>{Object.defineProperty(n,i+o,{__proto__:null,value:function(e,a,A){return this[i].call(this,r,e,a,A)},configurable:!0})})}var Il=class{constructor(r){r&&this.set(r)}set(r,o,i){let e=this;function a(t,s,g){let c=lC(s);if(!c)return;let I=J.findKey(e,c);(!I||e[I]===void 0||g===!0||g===void 0&&e[I]!==!1)&&(e[I||s]=MB(t))}let A=(t,s)=>J.forEach(t,(g,c)=>a(g,c,s));if(J.isPlainObject(r)||r instanceof this.constructor)A(r,o);else if(J.isString(r)&&(r=r.trim())&&!Tce(r))A(MU(r),o);else if(J.isObject(r)&&J.isSafeIterable(r)){let t=Object.create(null),s,g;for(let c of r){if(!J.isArray(c))throw new TypeError("Object iterator must return a key-value pair");g=c[0],J.hasOwnProp(t,g)?(s=t[g],t[g]=J.isArray(s)?[...s,c[1]]:[s,c[1]]):t[g]=c[1]}A(t,o)}else r!=null&&a(o,r,i);return this}get(r,o){if(r=lC(r),r){let i=J.findKey(this,r);if(i){let e=this[i];if(!o)return e;if(o===!0)return bce(e);if(J.isFunction(o))return o.call(this,e,i);if(J.isRegExp(o))return o.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(r,o){if(r=lC(r),r){let i=J.findKey(this,r);return!!(i&&this[i]!==void 0&&(!o||ab(this,this[i],i,o)))}return!1}delete(r,o){let i=this,e=!1;function a(A){if(A=lC(A),A){let t=J.findKey(i,A);t&&(!o||ab(i,i[t],t,o))&&(delete i[t],e=!0)}}return J.isArray(r)?r.forEach(a):a(r),e}clear(r){let o=Object.keys(this),i=o.length,e=!1;for(;i--;){let a=o[i];(!r||ab(this,this[a],a,r,!0))&&(delete this[a],e=!0)}return e}normalize(r){let o=this,i={};return J.forEach(this,(e,a)=>{let A=J.findKey(i,a);if(A){o[A]=MB(e),delete o[a];return}let t=r?Rce(a):String(a).trim();t!==a&&delete o[a],o[t]=MB(e),i[t]=!0}),this}concat(...r){return this.constructor.concat(this,...r)}toJSON(r){let o=Object.create(null);return J.forEach(this,(i,e)=>{i!=null&&i!==!1&&(o[e]=r&&J.isArray(i)?i.join(", "):i)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([r,o])=>r+": "+o).join(` +`)}getSetCookie(){let r=this.get("set-cookie");return J.isArray(r)?r:r==null||r===!1?[]:[r]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(r){return r instanceof this?r:new this(r)}static parseParameters(r){return Nce(r)}static concat(r,...o){let i=new this(r);return o.forEach(e=>i.set(e)),i}static accessor(r){let i=(this[NU]=this[NU]={accessors:{}}).accessors,e=this.prototype;function a(A){let t=lC(A);i[t]||(kce(e,A),i[t]=!0)}return J.isArray(r)?r.forEach(a):a(r),this}};Il.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);J.reduceDescriptors(Il.prototype,({value:n},r)=>{let o=r[0].toUpperCase()+r.slice(1);return{get:()=>n,set(i){this[o]=i}}});J.freezeMethods(Il);var Mt=Il;var pC="[REDACTED ****]";function vce(n){if(J.hasOwnProp(n,"toJSON"))return!0;let r=Object.getPrototypeOf(n);for(;r&&r!==Object.prototype;){if(J.hasOwnProp(r,"toJSON"))return!0;r=Object.getPrototypeOf(r)}return!1}function Pce(n,r){let o=new Set(r.map(a=>String(a).toLowerCase())),i=[],e=a=>{if(a===null||typeof a!="object"||J.isBuffer(a))return a;if(i.indexOf(a)!==-1)return;a instanceof Mt&&(a=a.toJSON()),i.push(a);let A;if(J.isArray(a))A=[],a.forEach((t,s)=>{let g=e(t);J.isUndefined(g)||(A[s]=g)});else{if(!J.isPlainObject(a)&&vce(a))return i.pop(),a;A=Object.create(null);for(let[t,s]of Object.entries(a)){let g=o.has(t.toLowerCase())?pC:e(s);J.isUndefined(g)||(A[t]=g)}}return i.pop(),A};return e(n)}function TU(n){try{return String(n)}catch{return""}}function Gce(n){return n.errors.map(o=>{try{return o&&o.message?TU(o.message):TU(o)}catch{return""}}).filter(Boolean).join("; ")||n.name||"AggregateError"}var Xr=class n extends Error{static from(r,o,i,e,a,A){let t=r.message;!t&&J.isArray(r.errors)&&r.errors.length&&(t=Gce(r));let s=new n(t,o||r.code,i,e,a);return Object.defineProperty(s,"cause",{__proto__:null,value:r,writable:!0,enumerable:!1,configurable:!0}),s.name=r.name,r.status!=null&&s.status==null&&(s.status=r.status),A&&Object.assign(s,A),s}constructor(r,o,i,e,a){super(r),Object.defineProperty(this,"message",{__proto__:null,value:r,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,o&&(this.code=o),i&&(this.config=i),e&&(this.request=e),a&&(this.response=a,this.status=a.status)}toJSON(){let r=this.config,o=r&&J.hasOwnProp(r,"redact")?r.redact:void 0,i=J.isArray(o)&&o.length>0?Pce(r,o):J.toJSONObject(r);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:i,code:this.code,status:this.status}}};Xr.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Xr.ERR_BAD_OPTION="ERR_BAD_OPTION";Xr.ECONNABORTED="ECONNABORTED";Xr.ETIMEDOUT="ETIMEDOUT";Xr.ECONNREFUSED="ECONNREFUSED";Xr.ERR_NETWORK="ERR_NETWORK";Xr.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Xr.ERR_DEPRECATED="ERR_DEPRECATED";Xr.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Xr.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Xr.ERR_CANCELED="ERR_CANCELED";Xr.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Xr.ERR_INVALID_URL="ERR_INVALID_URL";Xr.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";var Se=Xr;var kK=Je(RK(),1),LB=kK.default;var UB={isBufferAvailable(){return typeof Buffer<"u"},from(n){return Buffer.from(n)}};var bb=100;function Ob(n){return J.isPlainObject(n)||J.isArray(n)}function vK(n){return J.endsWith(n,"[]")?n.slice(0,-2):n}function wb(n,r,o){return n?n.concat(r).map(function(e,a){return e=vK(e),!o&&a?"["+e+"]":e}).join(o?".":""):r}function yle(n){return J.isArray(n)&&!n.some(Ob)}var mle=J.toFlatObject(J,{},null,function(r){return/^is[A-Z]/.test(r)});function Sle(n,r,o){if(!J.isObject(n))throw new TypeError("target must be an object");r=r||new(LB||FormData),o=J.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(T,_){return!J.isUndefined(_[T])});let i=o.metaTokens,e=o.visitor||f,a=o.dots,A=o.indexes,t=o.Blob||typeof Blob<"u"&&Blob,s=o.maxDepth===void 0?bb:o.maxDepth,g=t&&J.isSpecCompliantForm(r),c=[];if(!J.isFunction(e))throw new TypeError("visitor must be a function");function I(m){if(m===null)return"";if(J.isDate(m))return m.toISOString();if(J.isBoolean(m))return m.toString();if(!g&&J.isBlob(m))throw new Se("Blob is not supported. Use a Buffer instead.");if(J.isArrayBuffer(m)||J.isTypedArray(m)){if(g&&typeof t=="function")return new t([m]);if(UB&&UB.isBufferAvailable())return UB.from(m);throw new Se("Blob is not supported. Use a Buffer instead.",Se.ERR_NOT_SUPPORT)}return m}function E(m){if(m>s)throw new Se("Object is too deeply nested ("+m+" levels). Max depth: "+s,Se.ERR_FORM_DATA_DEPTH_EXCEEDED)}function B(m,T){if(s===1/0)return JSON.stringify(m);let _=[];return JSON.stringify(m,function(Y,j){if(!J.isObject(j))return j;for(;_.length&&_[_.length-1]!==this;)_.pop();return _.push(j),E(T+_.length-1),j})}function f(m,T,_){let P=m;if(J.isReactNative(r)&&J.isReactNativeBlob(m))return r.append(wb(_,T,a),I(m)),!1;if(m&&!_&&typeof m=="object"){if(J.endsWith(T,"{}"))T=i?T:T.slice(0,-2),m=B(m,1);else if(J.isArray(m)&&yle(m)||(J.isFileList(m)||J.endsWith(T,"[]"))&&(P=J.toArray(m)))return T=vK(T),P.forEach(function(j,K){!(J.isUndefined(j)||j===null)&&r.append(A===!0?wb([T],K,a):A===null?T:T+"[]",I(j))}),!1}return Ob(m)?!0:(r.append(wb(_,T,a),I(m)),!1)}let Q=Object.assign(mle,{defaultVisitor:f,convertValue:I,isVisitable:Ob});function y(m,T,_=0){if(!J.isUndefined(m)){if(E(_),c.indexOf(m)!==-1)throw new Error("Circular reference detected in "+T.join("."));c.push(m),J.forEach(m,function(Y,j){(!(J.isUndefined(Y)||Y===null)&&e.call(r,Y,J.isString(j)?j.trim():j,T,Q))===!0&&y(Y,T?T.concat(j):[j],_+1)}),c.pop()}}if(!J.isObject(n))throw new TypeError("data must be an object");return y(n),r}var Zs=Sle;function PK(n){let r={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(i){return r[i]})}function GK(n,r){this._pairs=[],n&&Zs(n,this,r)}var FK=GK.prototype;FK.append=function(r,o){this._pairs.push([r,o])};FK.toString=function(r){let o=r?i=>r.call(this,i,PK):PK;return this._pairs.map(function(e){return o(e[0])+"="+o(e[1])},"").join("&")};var LK=GK;function Dle(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function hc(n,r,o){if(!r)return n;n=n||"";let i=J.isFunction(o)?{serialize:o}:o,e=J.getSafeProp(i,"encode")||Dle,a=J.getSafeProp(i,"serialize"),A;if(a?A=a(r,i):A=J.isURLSearchParams(r)?r.toString():new LK(r,i).toString(e),A){let t=n.indexOf("#");t!==-1&&(n=n.slice(0,t)),n+=(n.indexOf("?")===-1?"?":"&")+A}return n}var Mb=class{constructor(){this.handlers=[]}use(r,o,i){return this.handlers.push({fulfilled:r,rejected:o,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(r){this.handlers[r]&&(this.handlers[r]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(r){J.forEach(this.handlers,function(i){i!==null&&r(i)})}},_b=Mb;var Xs={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0};import Ole from"crypto";import wle from"url";var UK=wle.URLSearchParams;var Nb="abcdefghijklmnopqrstuvwxyz",HK="0123456789",KK={DIGIT:HK,ALPHA:Nb,ALPHA_DIGIT:Nb+Nb.toUpperCase()+HK},ble=(n=16,r=KK.ALPHA_DIGIT)=>{let o="",{length:i}=r,e=new Uint32Array(n);Ole.randomFillSync(e);for(let a=0;aRb,hasStandardBrowserEnv:()=>Mle,hasStandardBrowserWebWorkerEnv:()=>_le,navigator:()=>Tb,origin:()=>Nle});var Rb=typeof window<"u"&&typeof document<"u",Tb=typeof navigator=="object"&&navigator||void 0,Mle=Rb&&(!Tb||["ReactNative","NativeScript","NS"].indexOf(Tb.product)<0),_le=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Nle=Rb&&window.location.href||"http://localhost";var It={...kb,...YK};function vb(n,r){return Zs(n,new It.classes.URLSearchParams,{visitor:function(o,i,e,a){return It.isNode&&J.isBuffer(o)?(this.append(i,o.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...r})}var xK=bb;function jK(n){if(n>xK)throw new Se("FormData field is too deeply nested ("+n+" levels). Max depth: "+xK,Se.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Tle(n){let r=[],o=/[^.[\]]+|\[([^.[\]]*)]/g,i;for(;(i=o.exec(n))!==null;)jK(r.length),r.push(i[0]==="[]"?"":i[1]||i[0]);return r}function Rle(n){let r={},o=Object.keys(n),i,e=o.length,a;for(i=0;i=o.length;return A=!A&&J.isArray(e)?e.length:A,s?(J.hasOwnProp(e,A)?e[A]=J.isArray(e[A])?e[A].concat(i):[e[A],i]:e[A]=i,!t):((!J.hasOwnProp(e,A)||!J.isObject(e[A]))&&(e[A]=[]),r(o,i,e[A],a)&&J.isArray(e[A])&&(e[A]=Rle(e[A])),!t)}if(J.isFormData(n)&&J.isFunction(n.entries)){let o={};return J.forEachEntry(n,(i,e)=>{r(Tle(i),e,o,0)}),o}return null}var HB=kle;var hl=(n,r)=>n!=null&&J.hasOwnProp(n,r)?n[r]:void 0;function vle(n,r,o){if(J.isString(n))try{return(r||JSON.parse)(n),J.trim(n)}catch(i){if(i.name!=="SyntaxError")throw i}return(o||JSON.stringify)(n)}var Pb={transitional:Xs,adapter:["xhr","http","fetch"],transformRequest:[function(r,o){let i=o.getContentType()||"",e=i.indexOf("application/json")>-1,a=J.isObject(r);if(a&&J.isHTMLForm(r)&&(r=new FormData(r)),J.isFormData(r))return e?JSON.stringify(HB(r)):r;if(J.isArrayBuffer(r)||J.isBuffer(r)||J.isStream(r)||J.isFile(r)||J.isBlob(r)||J.isReadableStream(r))return r;if(J.isArrayBufferView(r))return r.buffer;if(J.isURLSearchParams(r))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),r.toString();let t;if(a){let s=hl(this,"formSerializer");if(i.indexOf("application/x-www-form-urlencoded")>-1)return vb(r,s).toString();if((t=J.isFileList(r))||i.indexOf("multipart/form-data")>-1){let g=hl(this,"env"),c=g&&g.FormData;return Zs(t?{"files[]":r}:r,c&&new c,s)}}return a||e?(o.setContentType("application/json",!1),vle(r)):r}],transformResponse:[function(r){let o=hl(this,"transitional")||Pb.transitional,i=o&&o.forcedJSONParsing,e=hl(this,"responseType"),a=e==="json";if(J.isResponse(r)||J.isReadableStream(r))return r;if(r&&J.isString(r)&&(i&&!e||a)){let t=!(o&&o.silentJSONParsing)&&a;try{return JSON.parse(r,hl(this,"parseReviver"))}catch(s){if(t)throw s.name==="SyntaxError"?Se.from(s,Se.ERR_BAD_RESPONSE,this,null,hl(this,"response")):s}}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:It.classes.FormData,Blob:It.classes.Blob},validateStatus:function(r){return r>=200&&r<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};J.forEach(["delete","get","head","post","put","patch","query"],n=>{Pb.headers[n]={}});var dl=Pb;function BC(n,r){let o=this||dl,i=r||o,e=Mt.from(i.headers),a=i.data;return J.forEach(n,function(t){a=t.call(o,a,e.normalize(),r?r.status:void 0)}),e.normalize(),a}function fC(n){return!!(n&&n.__CANCEL__)}var Gb=class extends Se{constructor(r,o,i){super(r??"canceled",Se.ERR_CANCELED,o,i),this.name="CanceledError",this.__CANCEL__=!0}},Bi=Gb;function on(n,r,o){let i=o.config.validateStatus;!o.status||!i||i(o.status)?n(o):r(new Se("Request failed with status code "+o.status,o.status>=400&&o.status<500?Se.ERR_BAD_REQUEST:Se.ERR_BAD_RESPONSE,o.config,o.request,o))}function Fb(n){return typeof n!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function Lb(n,r){if(!r)return n;let o=n.length;for(;o>0&&n.charCodeAt(o-1)===47;)o--;return n.slice(0,o)+"/"+r.replace(/^\/+/,"")}var Ple=/^https?:(?!\/\/)/i,Gle=/[\t\n\r]/g;function Fle(n){let r=0;for(;r`${o}${i}${pC}`)}function Hle(n){let r=n.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${pC}@`),o=r.indexOf("#"),e=(o===-1?r:r.slice(0,o)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${pC}`);return o===-1?e:`${e}#${Ule(r.slice(o+1))}`}function JK(n,r){if(typeof n=="string"){let o=Lle(n);if(Ple.test(o))throw new Se(`Invalid URL ${JSON.stringify(Hle(o))}: missing "//" after protocol`,Se.ERR_INVALID_URL,r)}}function dc(n,r,o,i){JK(r,i);let e=!Fb(r);return n&&(e||o===!1)?(JK(n,i),Lb(n,r)):r}var Kle={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function Yle(n){try{return new URL(n)}catch{return null}}function qK(n){var r=(typeof n=="string"?Yle(n):n)||{},o=r.protocol,i=r.host,e=r.port;if(typeof i!="string"||!i||typeof o!="string"||(o=o.split(":",1)[0],i=i.replace(/:\d*$/,""),e=parseInt(e)||Kle[o]||0,!xle(i,e)))return"";var a=Ub(o+"_proxy")||Ub("all_proxy");return a&&a.indexOf("://")===-1&&(a=o+"://"+a),a}function xle(n,r){var o=Ub("no_proxy").toLowerCase();return o?o==="*"?!1:o.split(/[,\s]/).every(function(i){if(!i)return!0;var e=i.match(/^(.+):(\d+)$/),a=e?e[1]:i,A=e?parseInt(e[2]):0;return A&&A!==r?!0:/^[.*]/.test(a)?(a.charAt(0)==="*"&&(a=a.slice(1)),!n.endsWith(a)):n!==a}):!0}function Ub(n){return process.env[n.toLowerCase()]||process.env[n.toUpperCase()]||""}var fM=Je(Wb(),1),xY=Je(CY(),1);import KY from"http";import YY from"https";import BEe from"http2";import fEe from"util";import{resolve as TY}from"path";import qi from"zlib";var Xn="1.19.0";function MC(n){let r=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return r&&r[1]||""}var xpe=/^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;function gM(n,r,o){let i=o&&o.Blob||It.classes.Blob,e=MC(n);if(r===void 0&&i&&(r=!0),e==="data"){n=e.length?n.slice(e.length+1):n;let a=xpe.exec(n);if(!a)throw new Se("Invalid URL",Se.ERR_INVALID_URL);let A=a[1],t=a[2],s=a[3]?"base64":"utf8",g=a[4],c="";A?c=t?A+t:A:t&&(c="text/plain"+t);let I=s==="base64"?Buffer.from(g,"base64"):Buffer.from(decodeURIComponent(g),s);if(r){if(!i)throw new Se("Blob is not supported",Se.ERR_NOT_SUPPORT);return new i([I],{type:c})}return I}throw new Se("Unsupported protocol "+e,Se.ERR_NOT_SUPPORT)}import _o from"stream";var jpe=["content-type","content-length"];function _C(n,r,o){if(o!=="content-only"){n.set(r);return}Object.entries(r||{}).forEach(([i,e])=>{jpe.includes(i.toLowerCase())&&n.set(i,e)})}import Jpe from"stream";var cM=Symbol("internals"),IM=class extends Jpe.Transform{constructor(r){r=J.toFlatObject(r,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(i,e)=>!J.isUndefined(e[i])),super({readableHighWaterMark:r.chunkSize});let o=this[cM]={timeWindow:r.timeWindow,chunkSize:r.chunkSize,maxRate:r.maxRate,minChunkSize:r.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",i=>{i==="progress"&&(o.isCaptured||(o.isCaptured=!0))})}_read(r){let o=this[cM];return o.onReadCallback&&o.onReadCallback(),super._read(r)}_transform(r,o,i){let e=this[cM],a=e.maxRate,A=this.readableHighWaterMark,t=e.timeWindow,s=1e3/t,g=a/s,c=e.minChunkSize!==!1?Math.max(e.minChunkSize,g*.01):0,I=(B,f)=>{let Q=Buffer.byteLength(B);e.bytesSeen+=Q,e.bytes+=Q,e.isCaptured&&this.emit("progress",e.bytesSeen),this.push(B)?process.nextTick(f):e.onReadCallback=()=>{e.onReadCallback=null,process.nextTick(f)}},E=(B,f)=>{let Q=Buffer.byteLength(B),y=null,m=A,T,_=0;if(a){let P=Date.now();(!e.ts||(_=P-e.ts)>=t)&&(e.ts=P,T=g-e.bytes,e.bytes=T<0?-T:0,_=0),T=g-e.bytes}if(a){if(T<=0)return setTimeout(()=>{f(null,B)},t-_);Tm&&Q-m>c&&(y=B.subarray(m),B=B.subarray(0,m)),I(B,y?()=>{process.nextTick(f,null,y)}:f)};E(r,function B(f,Q){if(f)return i(f);Q?E(Q,B):i(null)})}},lM=IM;import{EventEmitter as QEe}from"events";import Vpe from"util";import{Readable as zpe}from"stream";var{asyncIterator:hY}=Symbol,qpe=async function*(n){n.stream?yield*n.stream():n.arrayBuffer?yield await n.arrayBuffer():n[hY]?yield*n[hY]():yield n},qB=qpe;var Wpe=It.ALPHABET.ALPHA_DIGIT+"-_",NC=typeof TextEncoder=="function"?new TextEncoder:new Vpe.TextEncoder,yc=`\r +`,Zpe=NC.encode(yc),Xpe=2,pM=class{constructor(r,o){let{escapeName:i}=this.constructor,e=J.isString(o),a=`Content-Disposition: form-data; name="${i(r)}"${!e&&o.name?`; filename="${i(o.name)}"`:""}${yc}`;if(e)o=NC.encode(String(o).replace(/\r?\n|\r\n?/g,yc));else{let A=String(o.type||"application/octet-stream").replace(/[\r\n]/g,"");a+=`Content-Type: ${A}${yc}`}this.headers=NC.encode(a+yc),this.contentLength=e?o.byteLength:o.size,this.size=this.headers.byteLength+this.contentLength+Xpe,this.name=r,this.value=o}async*encode(){yield this.headers;let{value:r}=this;J.isTypedArray(r)?yield r:yield*qB(r),yield Zpe}static escapeName(r){return String(r).replace(/[\r\n"]/g,o=>({"\r":"%0D","\n":"%0A",'"':"%22"})[o])}},$pe=(n,r,o)=>{let{tag:i="form-data-boundary",size:e=25,boundary:a=i+"-"+It.generateString(e,Wpe)}=o||{};if(!J.isFormData(n))throw new TypeError("FormData instance required");if(a.length<1||a.length>70)throw new Error("boundary must be 1-70 characters long");let A=NC.encode("--"+a+yc),t=NC.encode("--"+a+"--"+yc),s=t.byteLength,g=Array.from(n.entries()).map(([I,E])=>{let B=new pM(I,E);return s+=B.size,B});s+=A.byteLength*g.length,s=J.toFiniteNumber(s);let c={"Content-Type":`multipart/form-data; boundary=${a}`};return Number.isFinite(s)&&(c["Content-Length"]=s),r&&r(c),zpe.from((async function*(){for(let I of g)yield A,yield*I.encode();yield t})())},dY=$pe;import eEe from"stream";var EM=class extends eEe.Transform{__transform(r,o,i){this.push(r),i()}_transform(r,o,i){if(r.length!==0&&(this._transform=this.__transform,r[0]!==120)){let e=Buffer.alloc(2);e[0]=120,e[1]=156,this.push(e,o)}this.__transform(r,o,i)}},uY=EM;import AEe from"http2";import tEe from"util";var CM=class{constructor(){this.sessions=Object.create(null)}getSession(r,o){o=Object.assign({sessionTimeout:1e3},o);let i=this.sessions[r];if(i){let I=i.length;for(let E=0;E{if(a)return;a=!0,A&&(clearTimeout(A),A=null);let I=i,E=I.length,B=E;for(;B--;)if(I[B][0]===e){E===1?delete this.sessions[r]:I.splice(B,1),e.closed||e.close();return}},s=e.request,{sessionTimeout:g}=o;if(g!=null){let I=0;e.request=function(){let E=s.apply(this,arguments);return I++,A&&(clearTimeout(A),A=null),E.once("close",()=>{--I||(A=setTimeout(()=>{A=null,t()},g))}),E}}e.once("close",t);let c=[e,o];return i?i.push(c):i=this.sessions[r]=[c],e}},BY=CM;var rEe=(n,r)=>J.isAsyncFn(n)?function(...o){let i=o.pop();n.apply(this,o).then(e=>{try{r?i(null,...r(e)):i(null,e)}catch(a){i(a)}},i)}:n,fY=rEe;var aEe=new Set(["localhost","0.0.0.0"]),mY=n=>{let r=n.split(".");return r.length!==4||r[0]!=="127"?!1:r.every(o=>/^\d+$/.test(o)&&Number(o)>=0&&Number(o)<=255)},hM=n=>{if(/^0[xX][0-9a-fA-F]+$/.test(n)){let r=parseInt(n.slice(2),16);return Number.isFinite(r)?r:null}if(n.length>1&&/^0[0-7]+$/.test(n)){let r=parseInt(n,8);return Number.isFinite(r)?r:null}if(n.length>1&&/^0[0-9]+$/.test(n))return null;if(/^[0-9]+$/.test(n)){let r=parseInt(n,10);return Number.isFinite(r)?r:null}return null},iEe=n=>{if(typeof n!="string"||!n||n.indexOf(":")!==-1)return n;let r=n;if(r.charAt(0)==="["&&r.charAt(r.length-1)==="]"&&(r=r.slice(1,-1)),r=r.replace(/\.+$/,""),!/^[0-9.xXa-fA-F]+$/.test(r))return n;let o=r.split(".");if(o.some(c=>c===""))return n;if(o.length===4){let c=o.map(hM);return c.some(I=>I===null||I<0||I>255)?n:c.join(".")}if(o.length>4||o.length===1)return n;let i=o.slice(0,-1),e=o[o.length-1],a=4-i.length,A=hM(e);if(A===null)return n;let t=(1<<8*a)-1;if(A<0||A>t)return n;let s=new Array(a).fill(0);for(let c=a-1,I=A;c>=0;c--,I>>=8)s[c]=I&255;let g=i.map(hM);return g.some(c=>c===null||c<0||c>255)?n:[...g,...s].join(".")},dM=n=>/^0{1,4}$/.test(n),oEe=n=>{if(n==="::")return!0;let r=n.indexOf("::");if(r!==-1){if(r!==n.lastIndexOf("::"))return!1;let i=n.slice(0,r),e=n.slice(r+2),a=i?i.split(":"):[],A=e?e.split(":"):[];return a.length+A.length<8&&a.every(dM)&&A.every(dM)}let o=n.split(":");return o.length===8&&o.every(dM)},nEe=n=>{if(n==="::1")return!0;let r=n.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if(r)return mY(r[1]);let o=n.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);if(o){let e=parseInt(o[1],16);return e>=32512&&e<=32767}let i=n.split(":");if(i.length===8){for(let e=0;e<7;e++)if(!/^0+$/.test(i[e]))return!1;return/^0*1$/.test(i[7])}return!1},QY=n=>n?aEe.has(n)||mY(n)||oEe(n)?!0:nEe(n):!1,sEe={http:80,https:443,ws:80,wss:443,ftp:21},gEe=n=>{let r=n,o=0;if(r.charAt(0)==="["){let a=r.indexOf("]");if(a!==-1){let A=r.slice(1,a),t=r.slice(a+1);return t.charAt(0)===":"&&/^\d+$/.test(t.slice(1))&&(o=Number.parseInt(t.slice(1),10)),[A,o]}}let i=r.indexOf(":"),e=r.lastIndexOf(":");return i!==-1&&i===e&&/^\d+$/.test(r.slice(e+1))&&(o=Number.parseInt(r.slice(e+1),10),r=r.slice(0,e)),[r,o]},cEe=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,IEe=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i,lEe=n=>{if(typeof n!="string"||n.indexOf(":")===-1)return n;let r=n.match(cEe);if(r)return r[1];let o=n.match(IEe);if(o){let i=parseInt(o[1],16),e=parseInt(o[2],16);return`${i>>8}.${i&255}.${e>>8}.${e&255}`}return n},yY=n=>{if(!n)return n;n.charAt(0)==="["&&n.charAt(n.length-1)==="]"&&(n=n.slice(1,-1));let r=n.replace(/\.+$/,""),o=iEe(r);return o!==r?o:lEe(r)};function uM(n){let r;try{r=new URL(n)}catch{return!1}let o=(process.env.no_proxy||process.env.NO_PROXY||"").toLowerCase();if(!o)return!1;if(o==="*")return!0;let i=Number.parseInt(r.port,10)||sEe[r.protocol.split(":",1)[0]]||0,e=yY(r.hostname.toLowerCase());return o.split(/[\s,]+/).some(a=>{if(!a)return!1;if(a==="*")return!0;let[A,t]=gEe(a);return A=yY(A),!A||t&&t!==i?!1:(A.charAt(0)==="*"&&(A=A.slice(1)),A.charAt(0)==="."?e.endsWith(A):e===A||QY(e)&&QY(A))})}function pEe(n,r){n=n||10;let o=new Array(n),i=new Array(n),e=0,a=0,A;return r=r!==void 0?r:1e3,function(s){let g=Date.now(),c=i[a];A||(A=g),o[e]=s,i[e]=g;let I=a,E=0;for(;I!==e;)E+=o[I++],I=I%n;if(e=(e+1)%n,e===a&&(a=(a+1)%n),g-A{o=c,e=null,a&&(clearTimeout(a),a=null),n(...g)};return[(...g)=>{let c=Date.now(),I=c-o;I>=i?A(g,c):(e=g,a||(a=setTimeout(()=>{a=null,A(e)},i-I)))},()=>e&&A(e)]}var DY=EEe;var $n=(n,r,o=3)=>{let i=0,e=SY(50,250);return DY(a=>{if(!a||typeof a.loaded!="number")return;let A=a.loaded,t=a.lengthComputable?a.total:void 0,s=Math.max(0,t!=null?Math.min(A,t):A),g=Math.max(0,s-i),c=e(g);i=Math.max(i,s);let I={loaded:s,total:t,progress:t?s/t:void 0,bytes:g,rate:c||void 0,estimated:c&&t?(t-s)/c:void 0,event:a,lengthComputable:t!=null,[r?"download":"upload"]:!0};n(I)},o)},yl=(n,r)=>{let o=n!=null;return[i=>r[0]({lengthComputable:o,total:n,loaded:i}),r[1]]},ml=(n,r=J.asap)=>(...o)=>r(()=>n(...o));var wY=n=>n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102,bY=(n,r,o)=>r+2n<=57?n-48:(n&223)-55,CEe=n=>n>=65&&n<=90||n>=97&&n<=122||n>=48&&n<=57||n===43||n===47||n===45||n===95,hEe=n=>n===9||n===10||n===12||n===13||n===32,dEe=n=>{let r=Math.floor(n/4),o=n%4;return r*3+(o===2?1:o===3?2:0)},MY=n=>{let r=n.length,o=0;return r>0&&n.charCodeAt(r-1)===61&&(o++,r>1&&n.charCodeAt(r-2)===61&&o++),Math.floor((r-o)*3/4)},uEe=n=>{let r=n.length,o=0,i=0,e=!1;for(let a=0;a0){e=!0;continue}o++}}return e||i>2||i>0&&(o+i)%4!==0||o%4===1?MY(n):dEe(o)},_Y=(n,r)=>{if(!n||typeof n!="string"||!n.startsWith("data:"))return 0;let o=n.indexOf(",");if(o<0)return 0;let i=n.slice(5,o),e=n.slice(o+1);if(/;base64/i.test(i))return r(e);let A=0;for(let t=0,s=e.length;t=55296&&g<=56319&&t+1=56320&&c<=57343?(A+=4,t++):A+=3}else A+=3}return A};function BM(n){let r=typeof n=="string"?n.indexOf("#"):-1;return _Y(r===-1?n:n.slice(0,r),uEe)}function NY(n){return _Y(n,MY)}var RY={flush:qi.constants.Z_SYNC_FLUSH,finishFlush:qi.constants.Z_SYNC_FLUSH},yEe={flush:qi.constants.BROTLI_OPERATION_FLUSH,finishFlush:qi.constants.BROTLI_OPERATION_FLUSH},mEe={flush:qi.constants.ZSTD_e_flush,finishFlush:qi.constants.ZSTD_e_flush},jY=J.isFunction(qi.createBrotliDecompress),JY=J.isFunction(qi.createZstdDecompress),qY="gzip, compress, deflate"+(jY?", br":""),SEe=qY+(JY?", zstd":""),kY=typeof process<"u"&&process.nextTick?process.nextTick.bind(process):J.asap,{http:DEe,https:wEe}=xY.default,QM=/https:?/,vY=Symbol("axios.http.socketListener"),VB=Symbol("axios.http.currentReq"),VY=Symbol("axios.http.installedTunnel"),OEe=new Map,PY=new WeakMap,GY={22:21,24:5};function bEe(n=process.versions&&process.versions.node){if(!n)return!1;let[r,o]=n.split(".").map(i=>Number(i));return!Number.isInteger(r)||!Number.isInteger(o)?!1:r>24?!0:GY[r]!=null&&o>=GY[r]}function MEe(n,r=process.versions&&process.versions.node){if(!bEe(r))return!1;let o=n&&n.options;return!!(o&&J.hasOwnProp(o,"proxyEnv")&&o.proxyEnv!=null)}function _Ee(n,r,o){return QM.test(n.protocol)?o||YY.globalAgent:r||KY.globalAgent}function NEe(n,r){let o=n.protocol+"//"+n.hostname+":"+(n.port||"")+"#"+(n.auth||""),i=r?PY.get(r)||PY.set(r,new Map).get(r):OEe,e=i.get(o);if(e)return e;let a=r&&r.options?{...r.options,...n}:n;if(e=new fM.default(a),r&&r.options){let A={...r.options},t=e.callback;e.callback=function(g,c){return t.call(this,g,{...A,...c})}}return e[VY]=!0,i.set(o,e),e}var FY=It.protocols.map(n=>n+":"),LY=n=>{if(!J.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},UY=(n,[r,o])=>(n.on("end",o).on("error",o),r),TEe=new BY;function REe(n,r,o){n.beforeRedirects.proxy&&n.beforeRedirects.proxy(n),n.beforeRedirects.auth&&n.beforeRedirects.auth(n),n.beforeRedirects.sensitiveHeaders&&n.beforeRedirects.sensitiveHeaders(n,o),n.beforeRedirects.config&&n.beforeRedirects.config(n,r,o)}function kEe(n,r){n&&Object.keys(n).forEach(o=>{r.has(o.toLowerCase())&&delete n[o]})}function vEe(n,r){if(!r)return!1;try{return new URL(r.url).origin===new URL(n.href).origin}catch{return!1}}function zY(n,r,o,i,e,a){let A=r,t=_Ee(n,a,e);if(!A&&A!==!1&&!MEe(t)){let s=qK(o);s&&(uM(o)||(A=new URL(s)))}if(i&&n.headers)for(let s of Object.keys(n.headers))s.toLowerCase()==="proxy-authorization"&&delete n.headers[s];if(i&&n.agent&&n.agent[VY]&&(n.agent=void 0),A){let s=A instanceof URL,g=f=>s||J.hasOwnProp(A,f)?A[f]:void 0,c=g("username"),I=g("password"),E=J.hasOwnProp(A,"auth")?A.auth:void 0;if(c&&(E=(c||"")+":"+(I||"")),E){let f=typeof E=="object",Q=f&&J.hasOwnProp(E,"username")?E.username:void 0,y=f&&J.hasOwnProp(E,"password")?E.password:void 0;if(!!(Q||y))E=(Q||"")+":"+(y||"");else if(f)throw new Se("Invalid proxy authorization",Se.ERR_BAD_OPTION,{proxy:A})}if(QM.test(n.protocol)){if(!(e instanceof fM.default)){let f=g("hostname")||g("host"),Q=g("port"),y=g("protocol"),m=y?y.includes(":")?y:`${y}:`:"http:",T=f&&f.includes(":")&&!f.startsWith("[")?`[${f}]`:f,_=new URL(`${m}//${T}${Q?":"+Q:""}`),P={protocol:_.protocol,hostname:_.hostname.replace(/^\[|\]$/g,""),port:_.port,auth:E&&typeof E=="string"?E:void 0};_.protocol==="https:"&&(P.ALPNProtocols=["http/1.1"]);let Y=NEe(P,e);n.agent=Y,n.agents&&(n.agents.https=Y)}}else{if(E){let m=Buffer.from(E,"utf8").toString("base64");n.headers["Proxy-Authorization"]="Basic "+m}let f=!1;for(let m of Object.keys(n.headers))if(m.toLowerCase()==="host"){f=!0;break}f||(n.headers.host=n.hostname+(n.port?":"+n.port:""));let Q=g("hostname")||g("host");n.hostname=Q,n.host=Q,n.port=g("port"),n.path=o;let y=g("protocol");y&&(n.protocol=y.includes(":")?y:`${y}:`)}}n.beforeRedirects.proxy=function(g){zY(g,r,g.href,!0,e,a)}}var PEe=typeof process<"u"&&J.kindOf(process)==="process",GEe=n=>new Promise((r,o)=>{let i,e,a=(s,g)=>{e||(e=!0,i&&i(s,g))},A=s=>{a(s),r(s)},t=s=>{a(s,!0),o(s)};n(A,t,s=>i=s).catch(t)}),FEe=({address:n,family:r})=>{if(!J.isString(n))throw TypeError("address must be a string");return{address:n,family:r||(n.indexOf(".")<0?6:4)}},HY=(n,r)=>FEe(J.isObject(n)?n:{address:n,family:r}),LEe={request(n,r){let o=n.protocol+"//"+n.hostname+":"+(n.port||(n.protocol==="https:"?443:80)),{http2Options:i,headers:e}=n,a=TEe.getSession(o,i),{HTTP2_HEADER_SCHEME:A,HTTP2_HEADER_METHOD:t,HTTP2_HEADER_PATH:s,HTTP2_HEADER_STATUS:g}=BEe.constants,c={[A]:n.protocol.replace(":",""),[t]:n.method,[s]:n.path};J.forEach(e,(E,B)=>{B.charAt(0)!==":"&&(c[B]=E)});let I=a.request(c);return I.once("response",E=>{let B=I;E=Object.assign({},E);let f=E[g];delete E[g],B.headers=E,B.statusCode=+f,r(B)}),I}},WY=PEe&&function(r){return GEe(async function(i,e,a){let A=pe=>J.getSafeProp(r,pe),t=A("transitional")||Xs,s=A("data"),g=A("lookup"),c=A("family"),I=A("httpVersion");I===void 0&&(I=1);let E=A("http2Options"),B=A("httpAgent"),f=A("httpsAgent"),Q=A("proxy"),y=A("responseType"),m=A("responseEncoding"),T=A("socketPath"),_=A("method").toUpperCase(),P=A("maxRedirects"),Y=A("maxBodyLength"),j=A("maxContentLength"),K=A("decompress"),q,V=!1,H,v;if(I=+I,Number.isNaN(I))throw TypeError(`Invalid protocol version: '${r.httpVersion}' is not a number`);if(I!==1&&I!==2)throw TypeError(`Unsupported protocol version '${I}'`);let Z=I===2;if(g){let pe=fY(g,Me=>J.isArray(Me)?Me:[Me]);g=(Me,Ge,OA)=>{pe(Me,Ge,(Le,bA,$A)=>{if(Le)return OA(Le);let mA=J.isArray(bA)?bA.map(nt=>HY(nt)):[HY(bA,$A)];Ge.all?OA(Le,mA):OA(Le,mA[0].address,mA[0].family)})}}let U=new QEe;function M(pe){try{U.emit("abort",!pe||pe.type?new Bi(null,r,H):pe)}catch{}}function G(){v&&(clearTimeout(v),v=null)}function te(){let pe=A("timeout"),Me=pe?"timeout of "+pe+"ms exceeded":"timeout exceeded",Ge=A("timeoutErrorMessage");return Ge&&(Me=Ge),new Se(Me,t.clarifyTimeoutError?Se.ETIMEDOUT:Se.ECONNABORTED,r,H)}U.once("abort",e);let Be=()=>{G(),r.cancelToken&&r.cancelToken.unsubscribe(M),r.signal&&r.signal.removeEventListener("abort",M),U.removeAllListeners()};(r.cancelToken||r.signal)&&(r.cancelToken&&r.cancelToken.subscribe(M),r.signal&&(r.signal.aborted?M():r.signal.addEventListener("abort",M))),a((pe,Me)=>{if(q=!0,G(),Me){V=!0,Be();return}let{data:Ge}=pe;if(Ge instanceof _o.Readable||Ge instanceof _o.Duplex){let OA=_o.finished(Ge,()=>{OA(),Be()})}else Be()});let Ce=dc(A("baseURL"),A("url"),A("allowAbsoluteUrls"),r),ke=T?"http://localhost":It.hasBrowserEnv?It.origin:void 0,Ee=new URL(Ce,ke),me=Ee.protocol||FY[0];if(me==="data:"){if(j>-1){let Me=String(A("url")||Ce||"");if(NY(Me)>j)return e(new Se("maxContentLength size of "+j+" exceeded",Se.ERR_BAD_RESPONSE,r))}let pe;if(_!=="GET")return on(i,e,{status:405,statusText:"method not allowed",headers:{},config:r});try{pe=gM(A("url"),y==="blob",{Blob:r.env&&r.env.Blob})}catch(Me){throw Se.from(Me,Se.ERR_BAD_REQUEST,r)}return y==="text"?(pe=pe.toString(m),(!m||m==="utf8")&&(pe=J.stripBOM(pe))):y==="stream"&&(pe=_o.Readable.from(pe)),on(i,e,{data:pe,status:200,statusText:"OK",headers:new Mt,config:r})}if(FY.indexOf(me)===-1)return e(new Se("Unsupported protocol "+me,Se.ERR_BAD_REQUEST,r));let _e=Mt.from(r.headers).normalize();_e.set("User-Agent","axios/"+Xn,!1);let{onUploadProgress:Ve,onDownloadProgress:oA}=r,tA=r.maxRate,Pe,gA;if(J.isSpecCompliantForm(s)){let pe=_e.getContentType(/boundary=([-_\w\d]{10,70})/i);s=dY(s,Me=>{_e.set(Me)},{tag:`axios-${Xn}-boundary`,boundary:pe&&pe[1]||void 0})}else if(J.isFormData(s)&&J.isFunction(s.getHeaders)&&s.getHeaders!==Object.prototype.getHeaders){if(_C(_e,s.getHeaders(),A("formDataHeaderPolicy")),!_e.hasContentLength())try{let pe=await fEe.promisify(s.getLength).call(s);Number.isFinite(pe)&&pe>=0&&_e.setContentLength(pe)}catch{}}else if(J.isBlob(s)||J.isFile(s))s.size&&_e.setContentType(s.type||"application/octet-stream"),_e.setContentLength(s.size||0),s=_o.Readable.from(qB(s));else if(s&&!J.isStream(s)){if(!Buffer.isBuffer(s))if(J.isArrayBuffer(s))s=Buffer.from(new Uint8Array(s));else if(J.isString(s))s=Buffer.from(s,"utf-8");else return e(new Se("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",Se.ERR_BAD_REQUEST,r));if(_e.setContentLength(s.length,!1),Y>-1&&s.length>Y)return e(new Se("Request body larger than maxBodyLength limit",Se.ERR_BAD_REQUEST,r))}let Qe=J.toFiniteNumber(_e.getContentLength());J.isArray(tA)?(Pe=tA[0],gA=tA[1]):Pe=gA=tA,s&&(Ve||Pe)&&(J.isStream(s)||(s=_o.Readable.from(s,{objectMode:!1})),s=_o.pipeline([s,new lM({maxRate:J.toFiniteNumber(Pe)})],J.noop),Ve&&s.on("progress",UY(s,yl(Qe,$n(ml(Ve,kY),!1,3)))));let he,ze=A("auth");if(ze){let pe=J.getSafeProp(ze,"username")||"",Me=J.getSafeProp(ze,"password")||"";he=pe+":"+Me}if(!he&&(Ee.username||Ee.password)){let pe=LY(Ee.username),Me=LY(Ee.password);he=pe+":"+Me}he&&_e.delete("authorization");let Ke;try{Ke=hc(Ee.pathname+Ee.search,A("params"),A("paramsSerializer")).replace(/^\?/,"")}catch(pe){return e(Se.from(pe,Se.ERR_BAD_REQUEST,r,null,null,{url:A("url"),exists:!0}))}_e.set("Accept-Encoding",J.hasOwnProp(t,"advertiseZstdAcceptEncoding")&&t.advertiseZstdAcceptEncoding===!0?SEe:qY,!1);let De=Object.assign(Object.create(null),{path:Ke,method:_,headers:cl(_e),agents:{http:B,https:f},auth:he,protocol:me,family:c,beforeRedirect:REe,beforeRedirects:Object.create(null),http2Options:E});if(!J.isUndefined(g)&&(De.lookup=g),T){if(typeof T!="string")return e(new Se("socketPath must be a string",Se.ERR_BAD_OPTION_VALUE,r));let pe=A("allowedSocketPaths");if(pe!=null){let Me=Array.isArray(pe)?pe:[pe],Ge=TY(T);if(!Me.some(Le=>typeof Le=="string"&&TY(Le)===Ge))return e(new Se(`socketPath "${T}" is not permitted by allowedSocketPaths`,Se.ERR_BAD_OPTION_VALUE,r))}De.socketPath=T}else De.hostname=Ee.hostname.startsWith("[")?Ee.hostname.slice(1,-1):Ee.hostname,De.port=Ee.port,zY(De,Q,me+"//"+Ee.hostname+(Ee.port?":"+Ee.port:"")+De.path,!1,f,B);let EA,pA=!1,AA=!1,qe=QM.test(De.protocol);if(De.agent==null&&(De.agent=qe?f:B),Z)EA=LEe;else{let pe=A("transport");if(pe)EA=pe;else if(P===0)EA=qe?YY:KY,pA=!0;else{AA=!0,De.sensitiveHeaders=[],P&&(De.maxRedirects=P);let Me=A("beforeRedirect");if(Me&&(De.beforeRedirects.config=Me),he){let OA=Ee.origin,Le=he;De.beforeRedirects.auth=function($A){try{new URL($A.href).origin===OA&&($A.auth=Le)}catch{}}}let Ge=A("sensitiveHeaders");if(Ge!=null){if(!J.isArray(Ge))return e(new Se("sensitiveHeaders must be an array of strings",Se.ERR_BAD_OPTION_VALUE,r));let OA=new Set;for(let Le of Ge){if(!J.isString(Le))return e(new Se("sensitiveHeaders must be an array of strings",Se.ERR_BAD_OPTION_VALUE,r));OA.add(Le.toLowerCase())}OA.size&&(De.sensitiveHeaders=Array.from(OA),De.beforeRedirects.sensitiveHeaders=function(bA,$A){vEe(bA,$A)||kEe(bA.headers,OA)})}EA=qe?wEe:DEe}}Y>-1?De.maxBodyLength=Y:De.maxBodyLength=1/0,De.insecureHTTPParser=!!A("insecureHTTPParser"),H=EA.request(De,function(Me){if(G(),H.destroyed)return;let Ge=[Me],OA=J.toFiniteNumber(Me.headers["content-length"]);if(oA||gA){let mA=new lM({maxRate:J.toFiniteNumber(gA)});oA&&mA.on("progress",UY(mA,yl(OA,$n(ml(oA,kY),!0,3)))),Ge.push(mA)}let Le=Me,bA=Me.req||H;if(K!==!1&&Me.headers["content-encoding"])switch((_==="HEAD"||Me.statusCode===204)&&delete Me.headers["content-encoding"],(Me.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":Ge.push(qi.createUnzip(RY)),delete Me.headers["content-encoding"];break;case"deflate":Ge.push(new uY),Ge.push(qi.createUnzip(RY)),delete Me.headers["content-encoding"];break;case"br":jY&&(Ge.push(qi.createBrotliDecompress(yEe)),delete Me.headers["content-encoding"]);break;case"zstd":JY&&(Ge.push(qi.createZstdDecompress(mEe)),delete Me.headers["content-encoding"]);break}Le=Ge.length>1?_o.pipeline(Ge,J.noop):Ge[0];let $A={status:Me.statusCode,statusText:Me.statusMessage,headers:new Mt(Me.headers),config:r,request:bA};if(y==="stream"){if(j>-1){let mA=j,nt=Le;async function*Ar(){let GA=0;for await(let se of nt){if(GA+=se.length,GA>mA)throw new Se("maxContentLength size of "+mA+" exceeded",Se.ERR_BAD_RESPONSE,r,bA);yield se}}Le=_o.Readable.from(Ar(),{objectMode:!1})}$A.data=Le,on(i,e,$A)}else{let mA=[],nt=0;Le.on("data",function(GA){mA.push(GA),nt+=GA.length,j>-1&&nt>j&&(V=!0,Le.destroy(),M(new Se("maxContentLength size of "+j+" exceeded",Se.ERR_BAD_RESPONSE,r,bA)))}),Le.on("aborted",function(){if(V)return;let GA=new Se("stream has been aborted",Se.ERR_BAD_RESPONSE,r,bA,$A);Le.destroy(GA),e(GA)}),Le.on("error",function(GA){V||e(Se.from(GA,null,r,bA,$A))}),Le.on("end",function(){try{let GA=mA.length===1?mA[0]:Buffer.concat(mA);y!=="arraybuffer"&&(GA=GA.toString(m),(!m||m==="utf8")&&(GA=J.stripBOM(GA))),$A.data=GA}catch(GA){return e(Se.from(GA,null,r,$A.request,$A))}on(i,e,$A)})}U.once("abort",mA=>{Le.destroyed||(Le.emit("error",mA),Le.destroy())})}),U.once("abort",pe=>{H.close?H.close():H.destroy(pe)}),H.on("error",function(Me){e(Se.from(Me,null,r,H))});let wA=new Set;if(H.on("socket",function(Me){typeof Me.setKeepAlive=="function"&&Me.setKeepAlive(!0,1e3*60),Me[vY]||(Me.on("error",function(OA){let Le=Me[VB];Le&&!Le.destroyed&&Le.destroy(OA)}),Me[vY]=!0),Me[VB]=H,wA.add(Me)}),H.once("close",function(){G();for(let Me of wA)Me[VB]===H&&(Me[VB]=null);wA.clear()}),A("timeout")){let pe=parseInt(A("timeout"),10);if(Number.isNaN(pe)){M(new Se("error trying to parse `config.timeout` to int",Se.ERR_BAD_OPTION_VALUE,r,H));return}let Me=function(){q||M(te())};pA&&pe>0&&(v=setTimeout(Me,pe)),H.setTimeout(pe,Me)}else H.setTimeout(0);if(J.isStream(s)){let pe=!1,Me=!1;s.on("end",()=>{pe=!0}),s.once("error",OA=>{Me=!0,H.destroy(OA)}),s.on("close",()=>{!pe&&!Me&&M(new Bi("Request stream has been aborted",r,H))});let Ge=s;if(Y>-1&&!AA){let OA=Y,Le=0;Ge=_o.pipeline([s,new _o.Transform({transform(bA,$A,mA){if(Le+=bA.length,Le>OA)return mA(new Se("Request body larger than maxBodyLength limit",Se.ERR_BAD_REQUEST,r,H));mA(null,bA)}})],J.noop),Ge.on("error",bA=>{H.destroyed||H.destroy(bA)})}Ge.pipe(H)}else s&&H.write(s),H.end()})};var ZY=It.hasStandardBrowserEnv?((n,r)=>o=>(o=new URL(o,It.origin),n.protocol===o.protocol&&n.host===o.host&&(r||n.port===o.port)))(new URL(It.origin),It.navigator&&/(msie|trident)/i.test(It.navigator.userAgent)):()=>!0;var XY=It.hasStandardBrowserEnv?{write(n,r,o,i,e,a,A){if(typeof document>"u")return;let t=[`${n}=${encodeURIComponent(r)}`];J.isNumber(o)&&t.push(`expires=${new Date(o).toUTCString()}`),J.isString(i)&&t.push(`path=${i}`),J.isString(e)&&t.push(`domain=${e}`),a===!0&&t.push("secure"),J.isString(A)&&t.push(`SameSite=${A}`),document.cookie=t.join("; ")},read(n){if(typeof document>"u")return null;let r=document.cookie.split(";");for(let o=0;on instanceof Mt?{...n}:n,UEe=n=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(n).concat(Object.getOwnPropertySymbols(n).filter(r=>Object.getOwnPropertyDescriptor(n,r).enumerable)):Object.keys(n);function No(n,r){n=n||{},r=r||{};let o=Object.create(null);Object.defineProperty(o,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function i(c,I,E,B){return J.isPlainObject(c)&&J.isPlainObject(I)?J.merge.call({caseless:B},c,I):J.isPlainObject(I)?J.merge({},I):J.isArray(I)?I.slice():I}function e(c,I,E,B){if(J.isUndefined(I)){if(!J.isUndefined(c))return i(void 0,c,E,B)}else return i(c,I,E,B)}function a(c,I){if(!J.isUndefined(I))return i(void 0,I)}function A(c,I){if(J.isUndefined(I)){if(!J.isUndefined(c))return i(void 0,c)}else return i(void 0,I)}function t(c){let I=J.hasOwnProp(r,"transitional")?r.transitional:void 0;if(!J.isUndefined(I))if(J.isPlainObject(I)){if(J.hasOwnProp(I,c))return I[c]}else return;let E=J.hasOwnProp(n,"transitional")?n.transitional:void 0;if(J.isPlainObject(E)&&J.hasOwnProp(E,c))return E[c]}function s(c,I,E){if(J.hasOwnProp(r,E))return i(c,I);if(J.hasOwnProp(n,E))return i(void 0,c)}let g={url:a,method:a,data:a,baseURL:A,transformRequest:A,transformResponse:A,paramsSerializer:A,timeout:A,timeoutMessage:A,withCredentials:A,withXSRFToken:A,adapter:A,responseType:A,xsrfCookieName:A,xsrfHeaderName:A,onUploadProgress:A,onDownloadProgress:A,decompress:A,maxContentLength:A,maxBodyLength:A,beforeRedirect:A,transport:A,httpAgent:A,httpsAgent:A,cancelToken:A,socketPath:A,allowedSocketPaths:A,responseEncoding:A,validateStatus:s,headers:(c,I,E)=>e($Y(c),$Y(I),E,!0)};return J.forEach(UEe({...n,...r}),function(I){if(I==="__proto__"||I==="constructor"||I==="prototype")return;let E=J.hasOwnProp(g,I)?g[I]:e,B=J.hasOwnProp(n,I)?n[I]:void 0,f=J.hasOwnProp(r,I)?r[I]:void 0,Q=E(B,f,I);J.isUndefined(Q)&&E!==s||(o[I]=Q)}),J.hasOwnProp(r,"validateStatus")&&J.isUndefined(r.validateStatus)&&t("validateStatusUndefinedResolves")===!1&&(J.hasOwnProp(n,"validateStatus")?o.validateStatus=i(void 0,n.validateStatus):delete o.validateStatus),o}var HEe=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(r,o)=>String.fromCharCode(parseInt(o,16)));function KEe(n){let r=No({},n),o=E=>J.hasOwnProp(r,E)?r[E]:void 0,i=o("data"),e=o("withXSRFToken"),a=o("xsrfHeaderName"),A=o("xsrfCookieName"),t=o("headers"),s=o("auth"),g=o("baseURL"),c=o("allowAbsoluteUrls"),I=o("url");if(r.headers=t=Mt.from(t),r.url=hc(dc(g,I,c,r),o("params"),o("paramsSerializer")),s){let E=J.getSafeProp(s,"username")||"",B=J.getSafeProp(s,"password")||"";try{t.set("Authorization","Basic "+btoa(E+":"+(B?HEe(B):"")))}catch(f){throw Se.from(f,Se.ERR_BAD_OPTION_VALUE,n)}}if(J.isFormData(i)&&(It.hasStandardBrowserEnv||It.hasStandardBrowserWebWorkerEnv||J.isReactNative(i)?t.setContentType(void 0):J.isFunction(i.getHeaders)&&_C(t,i.getHeaders(),o("formDataHeaderPolicy"))),It.hasStandardBrowserEnv&&(J.isFunction(e)&&(e=e(r)),e===!0||e==null&&ZY(r.url))){let B=a&&A&&XY.read(A);B&&t.set(a,B)}return r}var zB=KEe;var YEe=typeof XMLHttpRequest<"u",ex=YEe&&function(n){return new Promise(function(o,i){let e=zB(n),a=e.data,A=Mt.from(e.headers).normalize(),{responseType:t,onUploadProgress:s,onDownloadProgress:g}=e,c,I,E,B,f;function Q(){B&&B(),f&&f(),e.cancelToken&&e.cancelToken.unsubscribe(c),e.signal&&e.signal.removeEventListener("abort",c)}let y=new XMLHttpRequest;y.open(e.method.toUpperCase(),e.url,!0),y.timeout=e.timeout;function m(){if(!y)return;let _=Mt.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),Y={data:!t||t==="text"||t==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:_,config:n,request:y};on(function(K){o(K),Q()},function(K){i(K),Q()},Y),y=null}"onloadend"in y?y.onloadend=m:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.startsWith("file:"))||setTimeout(m)},y.onabort=function(){y&&(i(new Se("Request aborted",Se.ECONNABORTED,n,y)),Q(),y=null)},y.onerror=function(P){let Y=P&&P.message?P.message:"Network Error",j=new Se(Y,Se.ERR_NETWORK,n,y);j.event=P||null,i(j),Q(),y=null},y.ontimeout=function(){let P=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",Y=e.transitional||Xs;e.timeoutErrorMessage&&(P=e.timeoutErrorMessage),i(new Se(P,Y.clarifyTimeoutError?Se.ETIMEDOUT:Se.ECONNABORTED,n,y)),Q(),y=null},a===void 0&&A.setContentType(null),"setRequestHeader"in y&&J.forEach(cl(A),function(P,Y){y.setRequestHeader(Y,P)}),J.isUndefined(e.withCredentials)||(y.withCredentials=!!e.withCredentials),t&&t!=="json"&&(y.responseType=e.responseType),g&&([E,f]=$n(g,!0),y.addEventListener("progress",E)),s&&y.upload&&([I,B]=$n(s),y.upload.addEventListener("progress",I),y.upload.addEventListener("loadend",B)),(e.cancelToken||e.signal)&&(c=_=>{y&&(i(!_||_.type?new Bi(null,n,y):_),y.abort(),Q(),y=null)},e.cancelToken&&e.cancelToken.subscribe(c),e.signal&&(e.signal.aborted?c():e.signal.addEventListener("abort",c)));let T=MC(e.url);if(T&&!It.protocols.includes(T)){i(new Se("Unsupported protocol "+T+":",Se.ERR_BAD_REQUEST,n)),Q();return}y.send(a||null)})};var xEe=(n,r)=>{if(n=n?n.filter(Boolean):[],!r&&!n.length)return;let o=new AbortController,i=!1,e=function(s){if(!i){i=!0,A();let g=s instanceof Error?s:this.reason;o.abort(g instanceof Se?g:new Bi(g instanceof Error?g.message:g))}},a=r&&setTimeout(()=>{a=null,e(new Se(`timeout of ${r}ms exceeded`,Se.ETIMEDOUT))},r),A=()=>{n&&(a&&clearTimeout(a),a=null,n.forEach(s=>{s.unsubscribe?s.unsubscribe(e):s.removeEventListener("abort",e)}),n=null)};n.forEach(s=>{if(!i){if(s.aborted){e.call(s);return}s.addEventListener("abort",e,{once:!0})}});let{signal:t}=o;return t.unsubscribe=()=>J.asap(A),t},Ax=xEe;var jEe=function*(n,r){let o=n.byteLength;if(!r||o{let e=JEe(n,r),a=0,A,t=s=>{A||(A=!0,i&&i(s))};return new ReadableStream({async pull(s){try{let{done:g,value:c}=await e.next();if(g){t(),s.close();return}let I=c.byteLength;if(o){let E=a+=I;o(E)}s.enqueue(new Uint8Array(c))}catch(g){throw t(g),g}},cancel(s){return t(s),e.return()}},{highWaterMark:2})};var tx=64*1024,{isFunction:WB}=J,VEe=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(r,o)=>String.fromCharCode(parseInt(o,16))),rx=n=>{if(!J.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},ax=(n,...r)=>{try{return!!n(...r)}catch{return!1}},zEe=n=>{let r=n.indexOf("://"),o=n;return r!==-1&&(o=o.slice(r+3)),o.includes("@")||o.includes(":")},WEe=n=>{let r=J.global!==void 0&&J.global!==null?J.global:globalThis,{ReadableStream:o,TextEncoder:i}=r;n=J.merge.call({skipUndefined:!0},{Request:r.Request,Response:r.Response},n);let{fetch:e,Request:a,Response:A}=n,t=e?WB(e):typeof fetch=="function",s=WB(a),g=WB(A);if(!t)return!1;let c=t&&WB(o),I=t&&(typeof i=="function"?(m=>T=>m.encode(T))(new i):async m=>new Uint8Array(await new a(m).arrayBuffer())),E=s&&c&&ax(()=>{let m=!1,T=new a(It.origin,{body:new o,method:"POST",get duplex(){return m=!0,"half"}}),_=T.headers.has("Content-Type");return T.body!=null&&T.body.cancel(),m&&!_}),B=g&&c&&ax(()=>J.isReadableStream(new A("").body)),f={stream:B&&(m=>m.body)};t&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!f[m]&&(f[m]=(T,_)=>{let P=T&&T[m];if(P)return P.call(T);throw new Se(`Response type '${m}' is not supported`,Se.ERR_NOT_SUPPORT,_)})});let Q=async m=>{if(m==null)return 0;if(J.isBlob(m))return m.size;if(J.isSpecCompliantForm(m))return(await new a(It.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(J.isArrayBufferView(m)||J.isArrayBuffer(m))return m.byteLength;if(J.isURLSearchParams(m)&&(m=m+""),J.isString(m))return(await I(m)).byteLength},y=async(m,T)=>{let _=J.toFiniteNumber(m.getContentLength());return _??Q(T)};return async m=>{let{url:T,method:_,data:P,signal:Y,cancelToken:j,timeout:K,onDownloadProgress:q,onUploadProgress:V,responseType:H,headers:v,withCredentials:Z="same-origin",fetchOptions:U,maxContentLength:M,maxBodyLength:G}=zB(m),te=J.isNumber(M)&&M>-1,Be=J.isNumber(G)&&G>-1,Ce=Pe=>J.hasOwnProp(m,Pe)?m[Pe]:void 0,ke=e||fetch;H=H?(H+"").toLowerCase():"text";let Ee=Ax([Y,j&&j.toAbortSignal()],K),me=null,_e=Ee&&Ee.unsubscribe&&(()=>{Ee.unsubscribe()}),Ve,oA=null,tA=()=>new Se("Request body larger than maxBodyLength limit",Se.ERR_BAD_REQUEST,m,me);try{let Pe,gA=Ce("auth");if(gA){let qe=J.getSafeProp(gA,"username")||"",wA=J.getSafeProp(gA,"password")||"";Pe={username:qe,password:wA}}if(zEe(T)){let qe=new URL(T,It.origin);if(!Pe&&(qe.username||qe.password)){let wA=rx(qe.username),pe=rx(qe.password);Pe={username:wA,password:pe}}(qe.username||qe.password)&&(qe.username="",qe.password="",T=qe.href)}if(Pe&&(v.delete("authorization"),v.set("Authorization","Basic "+btoa(VEe((Pe.username||"")+":"+(Pe.password||""))))),te&&typeof T=="string"&&T.startsWith("data:")&&BM(T)>M)throw new Se("maxContentLength size of "+M+" exceeded",Se.ERR_BAD_RESPONSE,m,me);if(Be&&_!=="get"&&_!=="head"){let qe=await Q(P);if(typeof qe=="number"&&isFinite(qe)&&(Ve=qe,qe>G))throw tA()}let Qe=Be&&(J.isReadableStream(P)||J.isStream(P)),he=(qe,wA,pe)=>yM(qe,tx,Me=>{if(Be&&Me>G)throw oA=tA();wA&&wA(Me)},pe);if(E&&_!=="get"&&_!=="head"&&(V||Qe)){if(Ve=Ve??await y(v,P),Ve!==0||Qe){let qe=new a(T,{method:"POST",body:P,duplex:"half"}),wA;if(J.isFormData(P)&&(wA=qe.headers.get("content-type"))&&v.setContentType(wA),qe.body){let[pe,Me]=V&&yl(Ve,$n(ml(V)))||[];P=he(qe.body,pe,Me)}}}else if(Qe&&!s&&c&&_!=="get"&&_!=="head")P=he(P);else if(Qe&&s&&!E&&_!=="get"&&_!=="head")throw new Se("Stream request bodies are not supported by the current fetch implementation",Se.ERR_NOT_SUPPORT,m,me);J.isString(Z)||(Z=Z?"include":"omit");let ze=s&&"credentials"in a.prototype;if(J.isFormData(P)){let qe=v.getContentType();qe&&/^multipart\/form-data/i.test(qe)&&!/boundary=/i.test(qe)&&v.delete("content-type")}v.set("User-Agent","axios/"+Xn,!1);let Ke={...U,signal:Ee,method:_.toUpperCase(),headers:cl(v.normalize()),body:P,duplex:"half",credentials:ze?Z:void 0};me=s&&new a(T,Ke);let De=await(s?ke(me,U):ke(T,Ke)),EA=Mt.from(De.headers);if(te){let qe=J.toFiniteNumber(EA.getContentLength());if(qe!=null&&qe>M)throw new Se("maxContentLength size of "+M+" exceeded",Se.ERR_BAD_RESPONSE,m,me)}let pA=B&&(H==="stream"||H==="response");if(B&&De.body&&(q||te||pA&&_e)){let qe={};["status","statusText","headers"].forEach(Le=>{qe[Le]=De[Le]});let wA=J.toFiniteNumber(EA.getContentLength()),[pe,Me]=q&&yl(wA,$n(ml(q),!0))||[],Ge=0,OA=Le=>{if(te&&(Ge=Le,Ge>M))throw new Se("maxContentLength size of "+M+" exceeded",Se.ERR_BAD_RESPONSE,m,me);pe&&pe(Le)};De=new A(yM(De.body,tx,OA,()=>{Me&&Me(),_e&&_e()}),qe)}H=H||"text";let AA=await f[J.findKey(f,H)||"text"](De,m);if(te&&!B&&!pA){let qe;if(AA!=null&&(typeof AA.byteLength=="number"?qe=AA.byteLength:typeof AA.size=="number"?qe=AA.size:typeof AA=="string"&&(qe=typeof i=="function"?new i().encode(AA).byteLength:AA.length)),typeof qe=="number"&&qe>M)throw new Se("maxContentLength size of "+M+" exceeded",Se.ERR_BAD_RESPONSE,m,me)}return!pA&&_e&&_e(),await new Promise((qe,wA)=>{on(qe,wA,{data:AA,headers:Mt.from(De.headers),status:De.status,statusText:De.statusText,config:m,request:me})})}catch(Pe){if(_e&&_e(),Ee&&Ee.aborted&&Ee.reason instanceof Se){let gA=Ee.reason;throw gA.config=m,me&&(gA.request=me),Pe!==gA&&Object.defineProperty(gA,"cause",{__proto__:null,value:Pe,writable:!0,enumerable:!1,configurable:!0}),gA}if(oA)throw me&&!oA.request&&(oA.request=me),oA;if(Pe instanceof Se)throw me&&!Pe.request&&(Pe.request=me),Pe;if(Pe&&Pe.name==="TypeError"&&/Load failed|fetch/i.test(Pe.message)){let gA=new Se("Network Error",Se.ERR_NETWORK,m,me,Pe&&Pe.response);throw Object.defineProperty(gA,"cause",{__proto__:null,value:Pe.cause||Pe,writable:!0,enumerable:!1,configurable:!0}),gA}throw Se.from(Pe,Pe&&Pe.code,m,me,Pe&&Pe.response)}}},ZEe=new Map,mM=n=>{let r=n&&n.env||{},{fetch:o,Request:i,Response:e}=r,a=[i,e,o],A=a.length,t=A,s,g,c=ZEe;for(;t--;)s=a[t],g=c.get(s),g===void 0&&c.set(s,g=t?new Map:WEe(r)),c=g;return g},FWe=mM();var SM={http:WY,xhr:ex,fetch:{get:mM}};J.forEach(SM,(n,r)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:r})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:r})}});var ix=n=>`- ${n}`,$Ee=n=>J.isFunction(n)||n===null||n===!1;function eCe(n,r){n=J.isArray(n)?n:[n];let{length:o}=n,i,e,a={};for(let A=0;A`adapter ${s} `+(g===!1?"is not supported by the environment":"is not available in the build")),t=o?A.length>1?`since : `+A.map(ix).join(` -`):" "+ix(A[0]):"as no adapter specified";throw new Se("There is no suitable adapter to dispatch the request "+t,Se.ERR_NOT_SUPPORT)}return e}var ZB={getAdapter:ZEe,adapters:SM};function DM(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Bi(null,n)}function TC(n){return DM(n),n.headers=Mt.from(n.headers),n.data=BC.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),ZB.getAdapter(n.adapter||dl.adapter,n)(n).then(function(i){DM(n),n.response=i;try{i.data=BC.call(n,n.transformResponse,i)}finally{delete n.response}return i.headers=Mt.from(i.headers),i},function(i){if(!fC(i)&&(DM(n),i&&i.response)){n.response=i.response;try{i.response.data=BC.call(n,n.transformResponse,i.response)}finally{delete n.response}i.response.headers=Mt.from(i.response.headers)}return Promise.reject(i)})}var XB={};["object","boolean","number","function","string","symbol"].forEach((n,r)=>{XB[n]=function(i){return typeof i===n||"a"+(r<1?"n ":" ")+n}});var ox={};XB.transitional=function(r,o,i){function e(a,A){return"[Axios v"+Xn+"] Transitional option '"+a+"'"+A+(i?". "+i:"")}return(a,A,t)=>{if(r===!1)throw new Se(e(A," has been removed"+(o?" in "+o:"")),Se.ERR_DEPRECATED);return o&&!ox[A]&&(ox[A]=!0,console.warn(e(A," has been deprecated since v"+o+" and will be removed in the near future"))),r?r(a,A,t):!0}};XB.spelling=function(r){return(o,i)=>(console.warn(`${i} is likely a misspelling of ${r}`),!0)};function XEe(n,r,o){if(typeof n!="object"||n===null)throw new Se("options must be an object",Se.ERR_BAD_OPTION_VALUE);let i=Object.keys(n),e=i.length;for(;e-- >0;){let a=i[e],A=Object.prototype.hasOwnProperty.call(r,a)?r[a]:void 0;if(A){let t=n[a],s=t===void 0||A(t,a,n);if(s!==!0)throw new Se("option "+a+" must be "+s,Se.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new Se("Unknown option "+a,Se.ERR_BAD_OPTION)}}var RC={assertOptions:XEe,validators:XB};var Sa=RC.validators,Sl=class{constructor(r){this.defaults=r||{},this.interceptors={request:new _b,response:new _b}}async request(r,o){try{return await this._request(r,o)}catch(i){if(i instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;let a=(()=>{if(!e.stack)return"";let A=e.stack.indexOf(` +`):" "+ix(A[0]):"as no adapter specified";throw new Se("There is no suitable adapter to dispatch the request "+t,Se.ERR_NOT_SUPPORT)}return e}var ZB={getAdapter:eCe,adapters:SM};function DM(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Bi(null,n)}function TC(n){return DM(n),n.headers=Mt.from(n.headers),n.data=BC.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),ZB.getAdapter(n.adapter||dl.adapter,n)(n).then(function(i){DM(n),n.response=i;try{i.data=BC.call(n,n.transformResponse,i)}finally{delete n.response}return i.headers=Mt.from(i.headers),i},function(i){if(!fC(i)&&(DM(n),i&&i.response)){n.response=i.response;try{i.response.data=BC.call(n,n.transformResponse,i.response)}finally{delete n.response}i.response.headers=Mt.from(i.response.headers)}return Promise.reject(i)})}var XB={};["object","boolean","number","function","string","symbol"].forEach((n,r)=>{XB[n]=function(i){return typeof i===n||"a"+(r<1?"n ":" ")+n}});var ox={};XB.transitional=function(r,o,i){function e(a,A){return"[Axios v"+Xn+"] Transitional option '"+a+"'"+A+(i?". "+i:"")}return(a,A,t)=>{if(r===!1)throw new Se(e(A," has been removed"+(o?" in "+o:"")),Se.ERR_DEPRECATED);return o&&!ox[A]&&(ox[A]=!0,console.warn(e(A," has been deprecated since v"+o+" and will be removed in the near future"))),r?r(a,A,t):!0}};XB.spelling=function(r){return(o,i)=>(console.warn(`${i} is likely a misspelling of ${r}`),!0)};function ACe(n,r,o){if(typeof n!="object"||n===null)throw new Se("options must be an object",Se.ERR_BAD_OPTION_VALUE);let i=Object.keys(n),e=i.length;for(;e-- >0;){let a=i[e],A=Object.prototype.hasOwnProperty.call(r,a)?r[a]:void 0;if(A){let t=n[a],s=t===void 0||A(t,a,n);if(s!==!0)throw new Se("option "+a+" must be "+s,Se.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new Se("Unknown option "+a,Se.ERR_BAD_OPTION)}}var RC={assertOptions:ACe,validators:XB};var Sa=RC.validators,Sl=class{constructor(r){this.defaults=r||{},this.interceptors={request:new _b,response:new _b}}async request(r,o){try{return await this._request(r,o)}catch(i){if(i instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;let a=(()=>{if(!e.stack)return"";let A=e.stack.indexOf(` `);return A===-1?"":e.stack.slice(A+1)})();try{if(!i.stack)i.stack=a;else if(a){let A=a.indexOf(` `),t=A===-1?-1:a.indexOf(` `,A+1),s=t===-1?"":a.slice(t+1);String(i.stack).endsWith(s)||(i.stack+=` -`+a)}}catch{}}throw i}}_request(r,o){typeof r=="string"?(o=o||{},o.url=r):o=r||{},o=No(this.defaults,o);let{transitional:i,paramsSerializer:e,headers:a}=o;i!==void 0&&RC.assertOptions(i,{silentJSONParsing:Sa.transitional(Sa.boolean),forcedJSONParsing:Sa.transitional(Sa.boolean),clarifyTimeoutError:Sa.transitional(Sa.boolean),legacyInterceptorReqResOrdering:Sa.transitional(Sa.boolean),advertiseZstdAcceptEncoding:Sa.transitional(Sa.boolean),validateStatusUndefinedResolves:Sa.transitional(Sa.boolean)},!1),e!=null&&(J.isFunction(e)?o.paramsSerializer={serialize:e}:RC.assertOptions(e,{encode:Sa.function,serialize:Sa.function},!0)),o.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?o.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:o.allowAbsoluteUrls=!0),RC.assertOptions(o,{baseUrl:Sa.spelling("baseURL"),withXsrfToken:Sa.spelling("withXSRFToken")},!0),o.method=(o.method||this.defaults.method||"get").toLowerCase();let A=a&&J.merge(a.common,a[o.method]);a&&J.forEach(["delete","get","head","post","put","patch","query","common"],f=>{delete a[f]}),o.headers=Mt.concat(A,a);let t=[],s=!0;this.interceptors.request.forEach(function(Q){if(typeof Q.runWhen=="function"&&Q.runWhen(o)===!1)return;s=s&&Q.synchronous;let y=o.transitional||Xs;y&&y.legacyInterceptorReqResOrdering?t.unshift(Q.fulfilled,Q.rejected):t.push(Q.fulfilled,Q.rejected)});let g=[];this.interceptors.response.forEach(function(Q){g.push(Q.fulfilled,Q.rejected)});let c,I=0,E;if(!s){let f=[TC.bind(this),void 0];for(f.unshift(...t),f.push(...g),E=f.length,c=Promise.resolve(o);ITC.call(this,B)))}catch(m){c=Promise.reject(m)}break}}if(!c)try{c=TC.call(this,B)}catch(f){c=Promise.reject(f)}for(I=0,E=g.length;I{if(!i._listeners)return;let a=i._listeners.length;for(;a-- >0;)i._listeners[a](e);i._listeners=null}),this.promise.then=e=>{let a,A=new Promise(t=>{i.subscribe(t),a=t}).then(e);return A.cancel=function(){i.unsubscribe(a)},A},r(function(a,A,t){i.reason||(i.reason=new Bi(a,A,t),o(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]}unsubscribe(r){if(!this._listeners)return;let o=this._listeners.indexOf(r);o!==-1&&this._listeners.splice(o,1)}toAbortSignal(){let r=new AbortController,o=i=>{r.abort(i)};return this.subscribe(o),r.signal.unsubscribe=()=>this.unsubscribe(o),r.signal}static source(){let r;return{token:new n(function(e){r=e}),cancel:r}}},nx=wM;function OM(n){return function(o){return n.apply(null,o)}}function bM(n){return J.isObject(n)&&n.isAxiosError===!0}var MM={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(MM).forEach(([n,r])=>{MM[r]=n});var sx=MM;function gx(n){let r=new kC(n),o=sC(kC.prototype.request,r);return J.extend(o,kC.prototype,r,{allOwnKeys:!0}),J.extend(o,r,null,{allOwnKeys:!0}),o.create=function(e){return gx(No(n,e))},o}var Cr=gx(dl);Cr.Axios=kC;Cr.CanceledError=Bi;Cr.CancelToken=nx;Cr.isCancel=fC;Cr.VERSION=Xn;Cr.toFormData=Zs;Cr.AxiosError=Se;Cr.Cancel=Cr.CanceledError;Cr.all=function(r){return Promise.all(r)};Cr.spread=OM;Cr.isAxiosError=bM;Cr.mergeConfig=No;Cr.AxiosHeaders=Mt;Cr.formToJSON=n=>HB(J.isHTMLForm(n)?new FormData(n):n);Cr.getAdapter=ZB.getAdapter;Cr.HttpStatusCode=sx;Cr.default=Cr;var $B=Cr;var{Axios:T6e,AxiosError:_M,CanceledError:R6e,isCancel:k6e,CancelToken:v6e,VERSION:P6e,all:G6e,Cancel:F6e,isAxiosError:L6e,spread:U6e,toFormData:H6e,AxiosHeaders:K6e,HttpStatusCode:Y6e,formToJSON:x6e,getAdapter:j6e,mergeConfig:J6e,create:q6e}=$B;var h=Je(t1()),O=Je(a1()),b=Je(H1()),FJ=Je(h3());import ZA from"fs";import Eh from"path";import tQ from"crypto";import WQe from"querystring";var kQe=Je(Ij(),1),vQe=Je(Hf(),1),PQe=Je(Fl(),1),GQe=Je(G_(),1),FQe=Je(U_(),1),LQe=Je(J_(),1),fj=Je(jf(),1),UQe=Je(Bj(),1);var Ro=fj.default;import{gzipSync as ZQe}from"zlib";import XQe from"http";import $Qe from"https";import{promises as eye}from"dns";import{isIP as LJ}from"net";function F(n,r){var o={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&r.indexOf(i)<0&&(o[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var e=0,i=Object.getOwnPropertySymbols(n);e=n.length&&(n=void 0),{value:n&&n[i++],done:!n}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function S(n){return this instanceof S?(this.v=n,this):new S(n)}function L(n,r,o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=o.apply(n,r||[]),e,a=[];return e={},A("next"),A("throw"),A("return"),e[Symbol.asyncIterator]=function(){return this},e;function A(E){i[E]&&(e[E]=function(B){return new Promise(function(f,Q){a.push([E,B,f,Q])>1||t(E,B)})})}function t(E,B){try{s(i[E](B))}catch(f){I(a[0][3],f)}}function s(E){E.value instanceof S?Promise.resolve(E.value.v).then(g,c):I(a[0][2],E)}function g(E){t("next",E)}function c(E){t("throw",E)}function I(E,B){E(B),a.shift(),a.length&&t(a[0][0],a[0][1])}}function BJ(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n[Symbol.asyncIterator],o;return r?r.call(n):(n=typeof uJ=="function"?uJ(n):n[Symbol.iterator](),o={},i("next"),i("throw"),i("return"),o[Symbol.asyncIterator]=function(){return this},o);function i(a){o[a]=n[a]&&function(A){return new Promise(function(t,s){A=n[a](A),e(t,s,A.done,A.value)})}}function e(a,A,t,s){Promise.resolve(s).then(function(g){a({value:g,done:t})},A)}}var Xf;function Aye(){if(Xf!==void 0)return Xf;let n=[Eh.resolve(__dirname,"..","package.json"),Eh.resolve(__dirname,"..","..","package.json")];for(let r of n)try{let o=JSON.parse(ZA.readFileSync(r,"utf-8"));if(o.name==="@larksuiteoapi/node-sdk"&&typeof o.version=="string")return Xf=o.version,o.version}catch{}return Xf="unknown","unknown"}function fJ(n){return n.replace(/[^a-zA-Z0-9._-]/g,"_").slice(0,64)}function LT(n,r){let o=`oapi-node-sdk/${Aye()}`;if(n){let i=fJ(n);i&&(o+=` source/${i}`)}if(r?.extraTags)for(let i of r.extraTags){let e=fJ(i);e&&(o+=` ${e}`)}return o}var Vl=$B.create(),tye=LT();Vl.interceptors.request.use(n=>(n.headers&&!n.headers["User-Agent"]&&(n.headers["User-Agent"]=tye),n),void 0,{synchronous:!0});Vl.interceptors.response.use(n=>n.config.$return_headers?{data:n.data,headers:n.headers}:n.data);var En;(function(n){n[n.SelfBuild=0]="SelfBuild",n[n.ISV=1]="ISV"})(En||(En={}));var Cn;(function(n){n[n.Feishu=0]="Feishu",n[n.Lark=1]="Lark"})(Cn||(Cn={}));var mi;(function(n){n[n.fatal=0]="fatal",n[n.error=1]="error",n[n.warn=2]="warn",n[n.info=3]="info",n[n.debug=4]="debug",n[n.trace=5]="trace"})(mi||(mi={}));var rQ=Symbol("event-type"),aQ=Symbol("tenant-key"),uh=Symbol("app-ticket"),ph=Symbol("tenant-access-token"),UJ=Symbol("with-helpdesk-authorization"),HJ=Symbol("with-user-access-token"),rye=Symbol("user-access-token"),QJ=Symbol("aily-session-record"),aye=n=>Buffer.from(n).toString("base64"),iQ=class{constructor(){this.values=new Map}getCacheKey(r,o){return o?`${o}/${r.toString()}`:r}get(r,o){return C(this,void 0,void 0,function*(){let i=this.getCacheKey(r,o?.namespace),e=this.values.get(i);if(e){let{value:a,expiredTime:A}=e;if(!A||A-new Date().getTime()>0)return a}})}set(r,o,i,e){return C(this,void 0,void 0,function*(){let a=this.getCacheKey(r,e?.namespace);return this.values.set(a,{value:o,expiredTime:i}),!0})}},fh=new iQ,Bh=class{constructor(r){let o=tQ.createHash("sha256");o.update(r),this.key=o.digest()}decrypt(r){let o=Buffer.from(r,"base64"),i=tQ.createDecipheriv("aes-256-cbc",this.key,o.slice(0,16)),e=i.update(o.slice(16).toString("hex"),"hex","utf8");return e+=i.final("utf8"),e}},KJ=n=>{switch(n){case Cn.Feishu:return"https://open.feishu.cn";case Cn.Lark:return"https://open.larksuite.com";default:return n}},d=(n,r={})=>n.replace(/:([^/]+)/g,(o,i)=>{if(r[i]!==void 0)return r[i];throw new Error(`request miss ${i} path argument`)}),oQ=(n,r)=>C(void 0,void 0,void 0,function*(){(typeof n=="function"?n():n)&&(yield r())}),iye=n=>n?n.replace(/^\//,""):"",$f=(n,r=[])=>{let o={};return n&&r.forEach(i=>{Object.prototype.hasOwnProperty.call(n,i)&&(o[i]=n[i])}),o},u=n=>{var r;if(n instanceof _M){let{message:o,response:i,request:e,config:a}=$f(n,["message","response","request","config"]),t=[{message:o,config:$f(a,["data","url","params","method"]),request:$f(e,["protocol","host","path","method"]),response:$f(i,["data","status","statusText"])}],s=(r=n?.response)===null||r===void 0?void 0:r.data;return s&&(typeof s=="object"?t.push(Object.assign(Object.assign({},s),s.error?s.error:{})):t.push(s)),t}return[n]},cN=class{constructor(){this.acs={accessRecord:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/access_records`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/access_records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},device:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/devices`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},accessRecordAccessPhoto:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/access_records/:access_record_id/access_photo`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}})},user:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/users/:user_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/users/:user_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/users`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/users`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userFace:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/users/:user_id/face`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/users/:user_id/face`,A),method:"PUT",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},ruleExternal:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),deviceBind:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/rule_external/device_bind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},visitor:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/visitors/:visitor_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/visitors`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{accessRecord:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/access_records`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/access_records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},device:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/devices`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},accessRecordAccessPhoto:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/access_records/:access_record_id/access_photo`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}})},user:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/users/:user_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/users/:user_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/users`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/users`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userFace:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/users/:user_id/face`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/users/:user_id/face`,A),method:"PUT",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},ruleExternal:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),deviceBind:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/rule_external/device_bind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},visitor:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/visitors/:visitor_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/visitors`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},IN=class extends cN{constructor(){super(...arguments),this.admin={badgeGrant:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},badge:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges/:badge_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges/:badge_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},password:{reset:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/password/reset`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},badgeImage:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badge_images`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},auditInfo:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/audit_infos`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/audit_infos`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},adminUserStat:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/admin_user_stats`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},adminDeptStat:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/admin_dept_stats`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{badgeGrant:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},badge:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges/:badge_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges/:badge_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},password:{reset:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/password/reset`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},badgeImage:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badge_images`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},auditInfo:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/audit_infos`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/audit_infos`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},adminUserStat:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/admin_user_stats`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},adminDeptStat:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/admin_dept_stats`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},lN=class extends IN{constructor(){super(...arguments),this.aily_rag={}}},pN=class extends lN{constructor(){super(...arguments),this.aily={v1:{ailySession:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/sessions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appDataAssetTag:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_asset_tags`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_asset_tags`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appSkill:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),start:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills/:skill_id/start`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills/:skill_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appKnowledge:{ask:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/apps/:app_id/knowledges/ask`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appDataAsset:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets/:data_asset_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets/:data_asset_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),uploadFile:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets/upload_file`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},ailySessionRun:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs/:run_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),cancel:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs/:run_id/cancel`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ailySessionAilyMessage:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/messages`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/messages/:aily_message_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/messages`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},agentAgentVisibility:{check:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/agents/:agent_id/agent_visibility/check`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},agentAgentAttachment:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/agents/:agent_id/attachments`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},tenantAppStat:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/app_stats`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/app_stats`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},agentAgentChat:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/agents/:agent_id/chats/:agent_chat_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/agents/:agent_id/chats`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},agentAgentChatSession:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/agents/:agent_id/sessions/:agent_chat_session_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/agents/:agent_id/sessions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/agents/:agent_id/sessions/:agent_chat_session_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/agents/:agent_id/sessions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},agentAgentArtifact:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/agents/:agent_id/artifacts/:agent_artifact_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},EN=class extends pN{constructor(){super(...arguments),this.apaas={v1:{approvalTask:{addAssignee:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/approval_tasks/:approval_task_id/add_assignee`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),agree:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/approval_tasks/:approval_task_id/agree`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),transfer:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/approval_tasks/:approval_task_id/transfer`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),reject:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/approval_tasks/:approval_task_id/reject`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationObjectRecord:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/:id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/:id/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/:id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationObject:{oqlQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/oql_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationFunction:{invoke:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/functions/:function_api_name/invoke`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationRoleMember:{batchRemoveAuthorization:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/roles/:role_api_name/member/batch_remove_authorization`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/roles/:role_api_name/member`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreateAuthorization:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/roles/:role_api_name/member/batch_create_authorization`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationRecordPermissionMember:{batchCreateAuthorization:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/record_permissions/:record_permission_api_name/member/batch_create_authorization`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchRemoveAuthorization:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/record_permissions/:record_permission_api_name/member/batch_remove_authorization`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationEnvironmentVariable:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/environment_variables/:environment_variable_api_name`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/environment_variables/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userTask:{expediting:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/expediting`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),cc:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/cc`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),chatGroup:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/chat_group`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),rollback:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/rollback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),rollbackPoints:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/rollback_points`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/user_task/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationFlow:{execute:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/flows/:flow_id/execute`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},approvalInstance:{cancel:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/approval_instances/:approval_instance_id/cancel`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationAuditLog:{auditLogList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/audit_log/audit_log_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/audit_log`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),dataChangeLogsList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/audit_log/data_change_logs_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),dataChangeLogDetail:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/audit_log/data_change_log_detail`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},seatAssignment:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/seat_assignments`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/seat_assignments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},seatActivity:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/seat_activities`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/seat_activities`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},app:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/apps`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/apps`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},workspaceTable:{recordsBatchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records_batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),recordsDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),recordsPatch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),recordsGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),recordsPost:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),tableGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},workspace:{sqlCommands:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/sql_commands`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},workspaceView:{viewsGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/views/:view_name/records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},workspaceEnum:{enumGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/enums/:enum_name`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/enums`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},tenantAppMetrics:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/tenant_app_metrics/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},CN=class extends EN{constructor(){super(...arguments),this.application={applicationAppUsage:{overview:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/overview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),messagePushOverview:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/message_push_overview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),departmentOverview:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/department_overview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationFeedback:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks/:feedback_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appRecommendRule:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/app_recommend_rules`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/app_recommend_rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},application:{contactsRangeConfiguration:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range_configuration`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),underauditlistWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/underauditlist`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),underauditlist:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/underauditlist`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationAppVersion:{contactsRangeSuggest:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id/contacts_range_suggest`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationVisibility:{checkWhiteBlackList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility/check_white_black_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationContactsRange:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationCollaborators:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationOwner:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/owner`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationManagement:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/management`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},scope:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/scopes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),apply:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/scopes/apply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appBadge:{set:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/app_badge/set`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v5:{application:{favouriteWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v5/applications/favourite`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),favourite:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v5/applications/favourite`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),recommendWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v5/applications/recommend`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),recommend:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v5/applications/recommend`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}},v6:{applicationAppUsage:{overview:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/overview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),messagePushOverview:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/message_push_overview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),departmentOverview:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/department_overview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationFeedback:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks/:feedback_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appRecommendRule:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/app_recommend_rules`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/app_recommend_rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},application:{contactsRangeConfiguration:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range_configuration`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),underauditlistWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/underauditlist`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),underauditlist:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/underauditlist`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationAppVersion:{contactsRangeSuggest:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id/contacts_range_suggest`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationVisibility:{checkWhiteBlackList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility/check_white_black_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationContactsRange:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationCollaborators:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationOwner:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/owner`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationManagement:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/management`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},scope:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/scopes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),apply:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/scopes/apply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appBadge:{set:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/app_badge/set`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}},v7:{applicationBase:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v7/applications/:app_id/base`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationPublish:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v7/applications/:app_id/publish`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appAvatarUpload:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v7/app_avatar/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},applicationConfig:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v7/applications/:app_id/config`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationAbility:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v7/applications/:app_id/ability`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},hN=class extends CN{constructor(){super(...arguments),this.approval={instance:{specifiedRollback:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/specified_rollback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),cc:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/cc`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addSign:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/add_sign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchCc:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/search_cc`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),cancel:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/cancel`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),preview:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/preview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),remind:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/remind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addCc:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/add_cc`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),recall:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/recall`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/:instance_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),detail:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/detail`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),initiatedWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/initiated`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),initiated:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/initiated`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/subscription`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},task:{transfer:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/transfer`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),reject:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/reject`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),resubmit:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/resubmit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),approve:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/approve`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/query`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),refuse:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/refuse`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),pass:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/pass`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),forward:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/forward`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addSign:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/add_sign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),rollback:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/rollback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/subscription`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},approval:{unsubscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/approvals/:approval_code/unsubscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/approvals/:approval_code/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/approvals`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/approvals/:approval_code`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},instanceComment:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/:comment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),remove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalTask:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/external_tasks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/external_tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalInstance:{check:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/external_instances/check`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/external_instances`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalApproval:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/external_approvals/:approval_code`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/external_approvals`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},district:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/districts/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/districts/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/districts`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/districts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v4:{instance:{specifiedRollback:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/specified_rollback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),cc:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/cc`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addSign:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/add_sign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchCc:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/search_cc`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),cancel:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/cancel`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),preview:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/preview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),remind:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/remind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addCc:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/add_cc`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),recall:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/recall`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/:instance_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),detail:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/detail`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),initiatedWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/initiated`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),initiated:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/initiated`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/subscription`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},task:{transfer:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/transfer`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),reject:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/reject`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),resubmit:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/resubmit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),approve:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/approve`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/query`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),refuse:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/refuse`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),pass:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/pass`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),forward:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/forward`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addSign:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/add_sign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),rollback:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/rollback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/subscription`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},approval:{unsubscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/approvals/:approval_code/unsubscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/approvals/:approval_code/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/approvals`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/approvals/:approval_code`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},instanceComment:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/:comment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),remove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalTask:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/external_tasks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/external_tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalInstance:{check:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/external_instances/check`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/external_instances`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalApproval:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/external_approvals/:approval_code`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/external_approvals`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},district:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/districts/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/districts/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/districts`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/districts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},dN=class extends hN{constructor(){super(...arguments),this.attendance_machine={}}},uN=class extends dN{constructor(){super(...arguments),this.attendance={file:{download:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/files/:file_id/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),upload:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/files/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},group:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/groups/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/groups/:group_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listUser:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/groups/:group_id/list_user`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/groups/:group_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userDailyShift:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreateTemp:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/batch_create_temp`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userTaskRemedy:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_task_remedys`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryUserAllowedRemedys:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_task_remedys/query_user_allowed_remedys`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_task_remedys/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},shift:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/shifts/:shift_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/shifts/:shift_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/shifts/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userStatsField:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_stats_fields/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userStatsView:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_stats_views/:user_stats_view_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_stats_views/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},approvalInfo:{process:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/approval_infos/process`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userSetting:{modify:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_settings/modify`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_settings/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userStatsData:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_stats_datas/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},archiveRule:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/archive_rule`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/archive_rule`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),userStatsFieldsQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/archive_rule/user_stats_fields_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delReport:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/archive_rule/del_report`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),uploadReport:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/archive_rule/upload_report`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},leaveEmployExpireRecord:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/leave_employ_expire_records/:leave_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},leaveAccrualRecord:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/leave_accrual_record/:leave_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userFlow:{batchDel:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_flows/batch_del`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_flows/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_flows/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_flows/:user_flow_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userApproval:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_approvals`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_approvals/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userTask:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_tasks/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{file:{download:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/files/:file_id/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),upload:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/files/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},group:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/groups/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/groups/:group_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listUser:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/groups/:group_id/list_user`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/groups/:group_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userDailyShift:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreateTemp:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/batch_create_temp`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userTaskRemedy:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_task_remedys`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryUserAllowedRemedys:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_task_remedys/query_user_allowed_remedys`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_task_remedys/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},shift:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/shifts/:shift_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/shifts/:shift_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/shifts/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userStatsField:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_stats_fields/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userStatsView:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_stats_views/:user_stats_view_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_stats_views/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},approvalInfo:{process:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/approval_infos/process`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userSetting:{modify:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_settings/modify`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_settings/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userStatsData:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_stats_datas/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},archiveRule:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/archive_rule`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/archive_rule`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),userStatsFieldsQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/archive_rule/user_stats_fields_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delReport:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/archive_rule/del_report`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),uploadReport:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/archive_rule/upload_report`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},leaveEmployExpireRecord:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/leave_employ_expire_records/:leave_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},leaveAccrualRecord:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/leave_accrual_record/:leave_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userFlow:{batchDel:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_flows/batch_del`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_flows/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_flows/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_flows/:user_flow_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userApproval:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_approvals`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_approvals/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userTask:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_tasks/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},BN=class extends uN{constructor(){super(...arguments),this.audio_video_ai={}}},fN=class extends BN{constructor(){super(...arguments),this.auth={appAccessToken:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/auth/v3/app_access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),internal:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/auth/v3/app_access_token/internal`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},tenantAccessToken:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/auth/v3/tenant_access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),internal:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/auth/v3/tenant_access_token/internal`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appTicket:{resend:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/auth/v3/app_ticket/resend`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v3:{appAccessToken:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/auth/v3/app_access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),internal:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/auth/v3/app_access_token/internal`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},tenantAccessToken:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/auth/v3/tenant_access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),internal:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/auth/v3/tenant_access_token/internal`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appTicket:{resend:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/auth/v3/app_ticket/resend`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},QN=class extends fN{constructor(){super(...arguments),this.authen={userInfo:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/authen/v1/user_info`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},accessToken:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/authen/v1/access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},refreshAccessToken:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/authen/v1/refresh_access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},oidcAccessToken:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/authen/v1/oidc/access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},oidcRefreshAccessToken:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/authen/v1/oidc/refresh_access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{userInfo:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/authen/v1/user_info`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},accessToken:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/authen/v1/access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},refreshAccessToken:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/authen/v1/refresh_access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},oidcAccessToken:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/authen/v1/oidc/access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},oidcRefreshAccessToken:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/authen/v1/oidc/refresh_access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},yN=class extends QN{constructor(){super(...arguments),this.authz={}}},mN=class extends yN{constructor(){super(...arguments),this.aweme_ecosystem={}}},SN=class extends mN{constructor(){super(...arguments),this.baike={entity:{match:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities/match`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),highlight:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities/highlight`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities/:entity_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),extract:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities/extract`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities/:entity_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},classification:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/classifications`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/classifications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},file:{upload:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/files/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),download:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/files/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}})},draft:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/drafts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/drafts/:draft_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{entity:{match:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities/match`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),highlight:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities/highlight`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities/:entity_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),extract:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities/extract`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities/:entity_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},classification:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/classifications`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/classifications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},file:{upload:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/files/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),download:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/files/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}})},draft:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/drafts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/drafts/:draft_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},DN=class extends SN{constructor(){super(...arguments),this.base={v2:{appRole:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/base/v2/apps/:app_token/roles`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/base/v2/apps/:app_token/roles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/base/v2/apps/:app_token/roles`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/base/v2/apps/:app_token/roles/:role_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},wN=class extends DN{constructor(){super(...arguments),this.bitable={appTable:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appDashboard:{copy:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards/:block_id/copy`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},app:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),copy:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/copy`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appTableRecord:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appRoleMember:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appRole:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appTableView:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appTableForm:{upgrade:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/upgrade`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appTableFieldGroup:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/field_groups`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appTableFormField:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields/:field_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appWorkflow:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows/:workflow_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appTableField:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appBlockWorkflow:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/block_workflows`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{appTable:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appDashboard:{copy:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards/:block_id/copy`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},app:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),copy:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/copy`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appTableRecord:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appRoleMember:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appRole:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appTableView:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appTableForm:{upgrade:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/upgrade`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appTableFieldGroup:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/field_groups`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appTableFormField:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields/:field_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appWorkflow:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows/:workflow_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appTableField:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appBlockWorkflow:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/block_workflows`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},ON=class extends wN{constructor(){super(...arguments),this.block={entity:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/block/v2/entities`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/block/v2/entities/:block_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},message:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/block/v2/message`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v2:{entity:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/block/v2/entities`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/block/v2/entities/:block_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},message:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/block/v2/message`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},bN=class extends ON{constructor(){super(...arguments),this.board={v1:{whiteboardNode:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),createPlantuml:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes/plantuml`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},whiteboard:{downloadAsImage:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/download_as_image`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),theme:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/theme`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateTheme:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/update_theme`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},MN=class extends bN{constructor(){super(...arguments),this.bot={v4:{bot:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bot/v4/bot/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bot/v4/bot/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},_N=class extends MN{constructor(){super(...arguments),this.c360={}}},NN=class extends _N{constructor(){super(...arguments),this.calendar={exchangeBinding:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/exchange_bindings/:exchange_binding_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/exchange_bindings/:exchange_binding_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/exchange_bindings`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},calendar:{subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/unsubscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),mget:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/mget`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),primarys:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/primarys`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),primary:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/primary`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},calendarAcl:{unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/:acl_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},calendarEvent:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),reply:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/reply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),instances:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/instances`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),instanceView:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/instance_view`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},calendarEventAttendee:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},setting:{generateCaldavConf:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/settings/generate_caldav_conf`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},timeoffEvent:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/timeoff_events/:timeoff_event_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/timeoff_events`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},calendarEventMeetingMinute:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_minute`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},calendarEventMeetingChat:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},freebusy:{batch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/freebusy/batch`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/freebusy/list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},calendarEventAttendeeChatMember:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/:attendee_id/chat_members`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/:attendee_id/chat_members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v4:{exchangeBinding:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/exchange_bindings/:exchange_binding_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/exchange_bindings/:exchange_binding_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/exchange_bindings`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},calendar:{subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/unsubscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),mget:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/mget`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),primarys:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/primarys`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),primary:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/primary`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},calendarAcl:{unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/:acl_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},calendarEvent:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),reply:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/reply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),instances:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/instances`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),instanceView:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/instance_view`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},calendarEventAttendee:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},setting:{generateCaldavConf:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/settings/generate_caldav_conf`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},timeoffEvent:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/timeoff_events/:timeoff_event_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/timeoff_events`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},calendarEventMeetingMinute:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_minute`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},calendarEventMeetingChat:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},freebusy:{batch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/freebusy/batch`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/freebusy/list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},calendarEventAttendeeChatMember:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/:attendee_id/chat_members`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/:attendee_id/chat_members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},TN=class extends NN{constructor(){super(...arguments),this.cardkit={v1:{card:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/cardkit/v1/cards`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),settings:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/settings`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/cardkit/v1/cards/:card_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),idConvert:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/cardkit/v1/cards/id_convert`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/batch_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},cardElement:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements/:element_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),content:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements/:element_id/content`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements/:element_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements/:element_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},RN=class extends TN{constructor(){super(...arguments),this.ccm_unified_resource={}}},kN=class extends RN{constructor(){super(...arguments),this.collab_plugins={}}},vN=class extends kN{constructor(){super(...arguments),this.comment_sdk={}}},PN=class extends vN{constructor(){super(...arguments),this.compensation={v1:{indicator:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/indicators`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/indicators`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},socialPlan:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/social_plans/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/social_plans`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/social_plans`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},item:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/items`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/items`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},plan:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/plans`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/plans`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},socialInsurance:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/social_insurances`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},itemCategory:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/item_categories`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/item_categories`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},changeReason:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/change_reasons`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/change_reasons`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},archive:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/archives`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/archives/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},recurringPayment:{queryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/recurring_payment/query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/recurring_payment/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchRemove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},socialArchive:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/social_archive/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},socialArchiveAdjustRecord:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/social_archive_adjust_record/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},lumpSumPayment:{batchRemove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/batch_remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/batch_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryDetailWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query_detail`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryDetail:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query_detail`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},GN=class extends PN{constructor(){super(...arguments),this.contact={group:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),memberBelong:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/member_belong`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),simplelistWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/simplelist`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),simplelist:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/simplelist`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},unit:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/unit`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listDepartment:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/unit/list_department`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unbindDepartment:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/unit/unbind_department`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),bindDepartment:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/unit/bind_department`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/unit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},groupMember:{simplelist:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/:group_id/member/simplelist`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),add:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/:group_id/member/add`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),remove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/:group_id/member/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchRemove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchAdd:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_add`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},department:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateDepartmentId:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/:department_id/update_department_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unbindDepartmentChat:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/unbind_department_chat`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),parentWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/parent`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),parent:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/parent`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),childrenWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/:department_id/children`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),children:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/:department_id/children`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/batch`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobLevel:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobFamily:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},user:{updateUserId:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/:user_id/update_user_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),resurrect:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/:user_id/resurrect`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchGetId:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/batch_get_id`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),findByDepartmentWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/find_by_department`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),findByDepartment:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/find_by_department`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),basicBatch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/basic_batch`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/batch`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},employeeTypeEnum:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/employee_type_enums/:enum_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/employee_type_enums/:enum_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},functionalRoleMember:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/:member_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_delete`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),scopes:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/scopes`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},functionalRole:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobTitle:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_titles/:job_title_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_titles`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_titles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},workCity:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/work_cities/:work_city_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/work_cities`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/work_cities`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},scope:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/scopes`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/scopes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},customAttr:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/custom_attrs`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/custom_attrs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v3:{group:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),memberBelong:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/member_belong`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),simplelistWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/simplelist`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),simplelist:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/simplelist`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},unit:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/unit`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listDepartment:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/unit/list_department`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unbindDepartment:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/unit/unbind_department`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),bindDepartment:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/unit/bind_department`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/unit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},groupMember:{simplelist:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/:group_id/member/simplelist`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),add:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/:group_id/member/add`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),remove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/:group_id/member/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchRemove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchAdd:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_add`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},department:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateDepartmentId:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/:department_id/update_department_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unbindDepartmentChat:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/unbind_department_chat`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),parentWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/parent`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),parent:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/parent`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),childrenWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/:department_id/children`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),children:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/:department_id/children`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/batch`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobLevel:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobFamily:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},user:{updateUserId:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/:user_id/update_user_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),resurrect:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/:user_id/resurrect`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchGetId:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/batch_get_id`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),findByDepartmentWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/find_by_department`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),findByDepartment:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/find_by_department`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),basicBatch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/basic_batch`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/batch`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},employeeTypeEnum:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/employee_type_enums/:enum_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/employee_type_enums/:enum_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},functionalRoleMember:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/:member_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_delete`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),scopes:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/scopes`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},functionalRole:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobTitle:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_titles/:job_title_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_titles`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_titles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},workCity:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/work_cities/:work_city_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/work_cities`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/work_cities`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},scope:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/scopes`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/scopes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},customAttr:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/custom_attrs`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/custom_attrs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},FN=class extends GN{constructor(){super(...arguments),this.content_check={}}},LN=class extends FN{constructor(){super(...arguments),this.contract={}}},UN=class extends LN{constructor(){super(...arguments),this.corehr={contract:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/contracts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/contracts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},company:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/companies`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/companies`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},employeeType:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/employee_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/employee_types`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},nationalIdType:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/national_id_types`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/national_id_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},subregion:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/subregions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/subregions/:subregion_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},countryRegion:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/country_regions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/country_regions/:country_region_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},subdivision:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/subdivisions/:subdivision_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/subdivisions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},preHire:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/pre_hires`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},person:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),upload:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/persons/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/persons`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},employment:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/employments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobLevel:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_levels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_levels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobFamily:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_families`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_families`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},job:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/jobs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/jobs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobChange:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_changes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},workingHoursType:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/working_hours_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/working_hours_types`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},department:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/departments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/departments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},location:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/locations/:location_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/locations`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/locations`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/locations/:location_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},file:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/files/:id`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}})},processFormVariableData:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/processes/:process_id/form_variable_data`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},commonDataId:{convert:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/common_data/id/convert`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},leaveGrantingRecord:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/leave_granting_records/:leave_granting_record_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/leave_granting_records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},leave:{leaveTypes:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/leaves/leave_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),workCalendar:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),workCalendarDate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar_date`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),calendarByScope:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/leaves/calendar_by_scope`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),leaveBalances:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/leaves/leave_balances`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),leaveRequestHistory:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/leaves/leave_request_history`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},offboarding:{submit:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/offboardings/submit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/offboardings/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/offboardings/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/offboardings/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},securityGroup:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/security_groups`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/security_groups/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},customField:{listObjectApiName:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/custom_fields/list_object_api_name`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getByParam:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/custom_fields/get_by_param`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/custom_fields/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},commonDataMetaData:{editEnumOption:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/common_data/meta_data/edit_enum_option`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addEnumOption:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/common_data/meta_data/add_enum_option`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},authorization:{updateRoleAssign:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/authorizations/update_role_assign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),removeRoleAssign:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/authorizations/remove_role_assign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addRoleAssign:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/authorizations/add_role_assign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getByParam:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/authorizations/get_by_param`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/authorizations/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},assignedUser:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/assigned_users/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobData:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_datas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_datas`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},currency:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/currencies`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/currencies/:currency_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},transferReason:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/transfer_reasons/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},transferType:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/transfer_types/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},compensationStandard:{match:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/compensation_standards/match`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{contract:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/contracts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/contracts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},company:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/companies`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/companies`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},employeeType:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/employee_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/employee_types`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},nationalIdType:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/national_id_types`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/national_id_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},subregion:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/subregions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/subregions/:subregion_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},countryRegion:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/country_regions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/country_regions/:country_region_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},subdivision:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/subdivisions/:subdivision_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/subdivisions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},preHire:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/pre_hires`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},person:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),upload:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/persons/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/persons`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},employment:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/employments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobLevel:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_levels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_levels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobFamily:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_families`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_families`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},job:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/jobs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/jobs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobChange:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_changes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},workingHoursType:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/working_hours_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/working_hours_types`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},department:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/departments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/departments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},location:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/locations/:location_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/locations`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/locations`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/locations/:location_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},file:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/files/:id`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}})},processFormVariableData:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/processes/:process_id/form_variable_data`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},commonDataId:{convert:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/common_data/id/convert`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},leaveGrantingRecord:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/leave_granting_records/:leave_granting_record_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/leave_granting_records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},leave:{leaveTypes:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/leaves/leave_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),workCalendar:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),workCalendarDate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar_date`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),calendarByScope:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/leaves/calendar_by_scope`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),leaveBalances:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/leaves/leave_balances`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),leaveRequestHistory:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/leaves/leave_request_history`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},offboarding:{submit:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/offboardings/submit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/offboardings/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/offboardings/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/offboardings/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},securityGroup:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/security_groups`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/security_groups/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},customField:{listObjectApiName:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/custom_fields/list_object_api_name`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getByParam:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/custom_fields/get_by_param`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/custom_fields/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},commonDataMetaData:{editEnumOption:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/common_data/meta_data/edit_enum_option`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addEnumOption:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/common_data/meta_data/add_enum_option`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},authorization:{updateRoleAssign:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/authorizations/update_role_assign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),removeRoleAssign:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/authorizations/remove_role_assign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addRoleAssign:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/authorizations/add_role_assign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getByParam:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/authorizations/get_by_param`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/authorizations/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},assignedUser:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/assigned_users/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobData:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_datas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_datas`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},currency:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/currencies`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/currencies/:currency_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},transferReason:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/transfer_reasons/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},transferType:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/transfer_types/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},compensationStandard:{match:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/compensation_standards/match`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}},v2:{costCenter:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/cost_centers/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryRecentChangeWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/cost_centers/query_recent_change`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/cost_centers/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryMultiTimeline:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/cost_centers/query_multi_timeline`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/cost_centers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),tree:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/cost_centers/tree`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},basicInfoCountryRegionSubdivision:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/country_region_subdivisions/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/country_region_subdivisions/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},probation:{submit:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/probation/submit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),withdraw:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/probation/withdraw`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),enableDisableAssessment:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/probation/enable_disable_assessment`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),edit:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/probation/edit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/probation/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/probation/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},probationAssessment:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/probation/assessments/:assessment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/probation/assessments/:assessment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/probation/assessments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},customOrg:{deleteOrg:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/custom_orgs/delete_org`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),active:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/custom_orgs/active`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryRecentChangeWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/custom_orgs/query_recent_change`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/custom_orgs/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/custom_orgs/:org_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateRule:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/custom_orgs/update_rule`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/custom_orgs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/custom_orgs/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},preHire:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),transitTask:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id/transit_task`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),withdrawOnboarding:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pre_hires/withdraw_onboarding`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),restoreFlowInstance:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pre_hires/restore_flow_instance`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),transformOnboardingTask:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pre_hires/transform_onboarding_task`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),complete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id/complete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pre_hires`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pre_hires/query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pre_hires/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pre_hires/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pre_hires/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobGrade:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_grades/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_grades/:job_grade_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_grades/:job_grade_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_grades`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryRecentChangeWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_grades/query_recent_change`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_grades/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},position:{active:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/positions/active`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delPosition:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/positions/del_position`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryRecentChangeWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/positions/query_recent_change`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/positions/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/positions/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/positions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/positions/:position_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},employeesBp:{batchGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees/bps/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},bp:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/bps`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/bps`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getByDepartment:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/bps/get_by_department`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},employeesAdditionalJob:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/:additional_job_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/:additional_job_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/batch`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/batch`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},basicInfoNationality:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/nationalities/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/nationalities/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},basicInfoCountryRegion:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/country_regions/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/country_regions/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},basicInfoCity:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/cities/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/cities/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},basicInfoDistrict:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/districts/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/districts/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},basicInfoBank:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/banks/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/banks/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},basicInfoCurrency:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/currencies/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/currencies/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},employeeCustomOrg:{del:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/custom_org/del`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),createEmpCustomOrg:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/custom_org/create_emp_custom_org`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),editEmpCustomOrg:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/custom_org/edit_emp_custom_org`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),employmentCustomOrgRecord:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/custom_org/employment_custom_org_record`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),querybyid:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/custom_org/querybyid`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},signatureFile:{listByBizId:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/signature_files/list_by_biz_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),download:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/signature_files/:signature_file_id/download`,A),method:"POST",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),terminate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/signature_files/terminate`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/signature_files/query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/signature_files/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/signature_files`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/signature_files`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},signatureNode:{listByFileId:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/signature_nodes/list_by_file_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},company:{active:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/companies/active`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryRecentChangeWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/companies/query_recent_change`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/companies/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryMultiTimeline:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/companies/query_multi_timeline`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/companies/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},department:{queryRecentChangeWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/departments/query_recent_change`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/departments/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryOperationLogsWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/departments/query_operation_logs`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryOperationLogs:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/departments/query_operation_logs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/departments/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/departments/:department_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/departments/:department_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryTimeline:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/departments/query_timeline`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryMultiTimeline:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/departments/query_multi_timeline`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),parents:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/departments/parents`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/departments/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/departments/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),tree:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/departments/tree`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},draft:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/drafts/:draft_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},approvalGroups:{openQueryPositionChangeListByIds:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/approval_groups/open_query_position_change_list_by_ids`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/approval_groups/:process_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),openQueryJobChangeListByIds:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/approval_groups/open_query_job_change_list_by_ids`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),openQueryDepartmentChangeListByIds:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/approval_groups/open_query_department_change_list_by_ids`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},location:{active:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/locations/active`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryRecentChangeWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/locations/query_recent_change`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/locations/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryMultiTimeline:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/locations/query_multi_timeline`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/locations/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/locations/:location_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},locationAddress:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses/:address_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses/:address_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},basicInfoLanguage:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/languages/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/languages/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},basicInfoTimeZone:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/time_zones/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/time_zones/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},reportDetailRow:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/report_detail_row/batchDelete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchSave:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/report_detail_row/batchSave`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},workforcePlanDetailRow:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/workforce_plan_detail_row/batchDelete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchSave:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/workforce_plan_detail_row/batchSave`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},offboarding:{submitV2:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/offboardings/submit_v2`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),edit:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/offboardings/edit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),revoke:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/offboardings/revoke`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},basicInfoBankBranch:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/bank_branchs/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/bank_branchs/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},enum:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/enums/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},process:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/processes`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/processes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),flowVariableData:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/processes/:process_id/flow_variable_data`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/processes/:process_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},processApprover:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/processes/:process_id/approvers/:approver_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},processWithdraw:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/process_withdraw/:process_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},approver:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/approvers`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/approvers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},processTransfer:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/processes/:process_id/transfer`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},processExtra:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/processes/:process_id/extra`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobLevel:{queryRecentChangeWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_levels/query_recent_change`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_levels/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_levels/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobFamily:{queryRecentChangeWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_families/query_recent_change`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_families/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryMultiTimeline:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_families/query_multi_timeline`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_families/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},job:{queryRecentChangeWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/jobs/query_recent_change`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/jobs/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryMultiTimeline:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/jobs/query_multi_timeline`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/jobs/:job_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/jobs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/jobs/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},employeesInternationalAssignment:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees/international_assignments/:international_assignment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees/international_assignments`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees/international_assignments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees/international_assignments/:international_assignment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees/international_assignments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},processFormVariableData:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/processes/:process_id/form_variable_data`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},pathway:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pathways`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pathways/:pathway_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pathways/:pathway_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),active:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pathways/active`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pathways/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},processStart:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/process_start`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},costAllocation:{batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/cost_allocations/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateVersion:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/cost_allocations/update_version`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),createVersion:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/cost_allocations/create_version`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),removeVersion:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/cost_allocations/remove_version`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},costCenterVersion:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id/versions/:version_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id/versions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id/versions/:version_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},processQueryFlowDataTemplate:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/query_flow_data_template`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},defaultCostCenter:{createVersion:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/default_cost_centers/create_version`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/default_cost_centers/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),removeVersion:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/default_cost_centers/remove_version`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateVersion:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/default_cost_centers/update_version`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},processRevoke:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/process_revoke/:process_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},signatureTemplateInfoWithThumbnail:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/signature_template_info_with_thumbnails`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/signature_template_info_with_thumbnails`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobChange:{revoke:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_changes/:job_change_id/revoke`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_changes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_changes/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_changes/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},contract:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/contracts/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/contracts/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},workforcePlanDetail:{batch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/workforce_plan_details/batch`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchV2:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/workforce_plan_details/batch_v2`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},employee:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},signatureTemplate:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/signature_templates/search`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},employeesJobData:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees/job_datas/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees/job_datas/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},person:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/persons/:person_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/persons`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},workforcePlan:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/workforce_plans`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/workforce_plans`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},HN=class extends UN{constructor(){super(...arguments),this.data_cube={}}},KN=class extends HN{constructor(){super(...arguments),this.device={}}},YN=class extends KN{constructor(){super(...arguments),this.directory={v1:{employee:{resurrect:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/employees/:employee_id/resurrect`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),regular:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/employees/:employee_id/regular`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),toBeResigned:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/employees/:employee_id/to_be_resigned`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/employees/:employee_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/employees`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/employees/:employee_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),filter:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/employees/filter`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/employees/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),mget:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/employees/mget`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},collaborationTenant:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/collaboration_tenants`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/collaboration_tenants`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},collaborationRule:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/collaboration_rules/:collaboration_rule_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/collaboration_rules`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/collaboration_rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/collaboration_rules`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/collaboration_rules/:collaboration_rule_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},collborationShareEntity:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/share_entities`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/share_entities`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},department:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/departments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/departments/:department_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/departments/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),mget:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/departments/mget`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/departments/:department_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),filter:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/departments/filter`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},xN=class extends YN{constructor(){super(...arguments),this.docs_ai={}}},jN=class extends xN{constructor(){super(...arguments),this.docs_tool={}}},JN=class extends jN{constructor(){super(...arguments),this.docs={v1:{content:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docs/v1/content`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},qN=class extends JN{constructor(){super(...arguments),this.document_ai={v1:{businessCard:{recognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/business_card/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},contract:{fieldExtraction:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/contract/field_extraction`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},businessLicense:{recognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/business_license/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},drivingLicense:{recognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/driving_license/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},vehicleLicense:{recognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/vehicle_license/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},foodManageLicense:{recognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/food_manage_license/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},foodProduceLicense:{recognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/food_produce_license/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},hkmMainlandTravelPermit:{recognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/hkm_mainland_travel_permit/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},chinesePassport:{recognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/chinese_passport/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},twMainlandTravelPermit:{recognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/tw_mainland_travel_permit/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},healthCertificate:{recognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/health_certificate/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},vehicleInvoice:{recognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/vehicle_invoice/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},resume:{parse:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/resume/parse`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},bankCard:{recognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/bank_card/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},trainInvoice:{recognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/train_invoice/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},taxiInvoice:{recognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/taxi_invoice/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},vatInvoice:{recognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/vat_invoice/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},idCard:{recognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/id_card/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})}}}}},VN=class extends qN{constructor(){super(...arguments),this.docx={document:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),rawContent:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/raw_content`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),convert:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/blocks/convert`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatAnnouncementBlockChildren:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},documentBlockChildren:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatAnnouncement:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatAnnouncementBlock:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},documentBlock:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},documentBlockDescendant:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/descendant`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{document:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),rawContent:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/raw_content`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),convert:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/blocks/convert`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatAnnouncementBlockChildren:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},documentBlockChildren:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatAnnouncement:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatAnnouncementBlock:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},documentBlock:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},documentBlockDescendant:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/descendant`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},zN=class extends VN{constructor(){super(...arguments),this.drive={file:{createFolder:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/create_folder`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),move:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/move`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),copy:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/copy`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),createShortcut:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/create_shortcut`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),uploadPart:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/upload_part`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),taskCheck:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/task_check`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),deleteSubscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/delete_subscribe`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getSubscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/get_subscribe`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),download:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),uploadPrepare:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/upload_prepare`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),uploadFinish:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/upload_finish`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),uploadAll:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/upload_all`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},meta:{batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/metas/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},fileSubscription:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},exportTask:{download:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/export_tasks/file/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/export_tasks/:ticket`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/export_tasks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},fileVersion:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},fileViewRecord:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},fileStatistics:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/statistics`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},permissionPublicPassword:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},fileComment:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},media:{batchGetTmpDownloadUrl:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/medias/batch_get_tmp_download_url`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),download:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/medias/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),uploadPart:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/medias/upload_part`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),uploadFinish:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/medias/upload_finish`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),uploadAll:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/medias/upload_all`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),uploadPrepare:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/medias/upload_prepare`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},importTask:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/import_tasks/:ticket`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/import_tasks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},user:{subscriptionStatus:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/user/subscription_status`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),removeSubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/user/remove_subscription`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/user/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},fileCommentReply:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},permissionPublic:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/public`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/public`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},permissionMember:{batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/members/:member_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),transferOwner:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/members/transfer_owner`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),auth:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/members/auth`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{file:{createFolder:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/create_folder`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),move:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/move`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),copy:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/copy`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),createShortcut:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/create_shortcut`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),uploadPart:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/upload_part`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),taskCheck:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/task_check`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),deleteSubscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/delete_subscribe`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getSubscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/get_subscribe`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),download:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),uploadPrepare:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/upload_prepare`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),uploadFinish:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/upload_finish`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),uploadAll:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/upload_all`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},meta:{batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/metas/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},fileSubscription:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},exportTask:{download:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/export_tasks/file/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/export_tasks/:ticket`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/export_tasks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},fileVersion:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},fileViewRecord:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},fileStatistics:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/statistics`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},permissionPublicPassword:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},fileComment:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},media:{batchGetTmpDownloadUrl:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/medias/batch_get_tmp_download_url`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),download:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/medias/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),uploadPart:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/medias/upload_part`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),uploadFinish:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/medias/upload_finish`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),uploadAll:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/medias/upload_all`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),uploadPrepare:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/medias/upload_prepare`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},importTask:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/import_tasks/:ticket`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/import_tasks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},user:{subscriptionStatus:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/user/subscription_status`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),removeSubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/user/remove_subscription`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/user/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},fileCommentReply:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},permissionPublic:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/public`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/public`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},permissionMember:{batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/members/:member_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),transferOwner:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/members/transfer_owner`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),auth:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/members/auth`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}},v2:{fileLike:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v2/files/:file_token/likes`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v2/files/:file_token/likes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},commentReaction:{updateReaction:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v2/files/:file_token/comments/reaction`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},permissionPublic:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v2/permissions/:token/public`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v2/permissions/:token/public`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},WN=class extends zN{constructor(){super(...arguments),this.ea_symphony={}}},ZN=class extends WN{constructor(){super(...arguments),this.edu={}}},XN=class extends ZN{constructor(){super(...arguments),this.ehr={attachment:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/ehr/v1/attachments/:token`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}})},employee:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/ehr/v1/employees`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/ehr/v1/employees`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{attachment:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/ehr/v1/attachments/:token`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}})},employee:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/ehr/v1/employees`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/ehr/v1/employees`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},$N=class extends XN{constructor(){super(...arguments),this.elearning={}}},e0=class extends $N{constructor(){super(...arguments),this.event={outboundIp:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/event/v1/outbound_ip`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/event/v1/outbound_ip`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},connection:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/event/v1/connection`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{outboundIp:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/event/v1/outbound_ip`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/event/v1/outbound_ip`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},connection:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/event/v1/connection`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},A0=class extends e0{constructor(){super(...arguments),this.exam={}}},t0=class extends A0{constructor(){super(...arguments),this.face_detection={}}},r0=class extends t0{constructor(){super(...arguments),this.financial_access_platform={}}},a0=class extends r0{constructor(){super(...arguments),this.grounding={}}},i0=class extends a0{constructor(){super(...arguments),this.gtm_ai={}}},o0=class extends i0{constructor(){super(...arguments),this.helpdesk={agent:{agentEmail:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_emails`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},agentSchedule:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_schedules`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_schedules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},agentSkill:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_skills`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_skills`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},agentSkillRule:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_skill_rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},category:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/categories`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/categories`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},event:{subscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/events/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/events/unsubscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},faq:{faqImage:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs/:id/image/:image_key`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs/search`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs/search`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},agentSchedules:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ticket:{customizedFields:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/customized_fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),ticketImage:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/ticket_images`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/tickets`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),startService:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/start_service`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),answerUserQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/answer_user_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ticketCustomizedField:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},notification:{cancelApprove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/cancel_approve`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),cancelSend:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/cancel_send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/notifications`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),executeSend:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/execute_send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),preview:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/preview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),submitApprove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/submit_approve`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ticketMessage:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/messages`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},botMessage:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/message`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{agent:{agentEmail:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_emails`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},agentSchedule:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_schedules`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_schedules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},agentSkill:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_skills`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_skills`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},agentSkillRule:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_skill_rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},category:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/categories`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/categories`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},event:{subscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/events/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/events/unsubscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},faq:{faqImage:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs/:id/image/:image_key`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs/search`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs/search`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},agentSchedules:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ticket:{customizedFields:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/customized_fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),ticketImage:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/ticket_images`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/tickets`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),startService:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/start_service`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),answerUserQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/answer_user_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ticketCustomizedField:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},notification:{cancelApprove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/cancel_approve`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),cancelSend:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/cancel_send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/notifications`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),executeSend:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/execute_send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),preview:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/preview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),submitApprove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/submit_approve`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ticketMessage:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/messages`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},botMessage:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/message`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},n0=class extends o0{constructor(){super(...arguments),this.hire={websiteChannel:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels/:channel_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels/:channel_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interviewRoundType:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_round_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},offerCustomField:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offer_custom_fields/:offer_custom_field_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},websiteDelivery:{createByAttachment:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/deliveries/create_by_attachment`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),createByResume:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/deliveries/create_by_resume`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interviewRecordAttachment:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_records/attachments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},talent:{batchGetId:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/batch_get_id`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),onboardStatus:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/:talent_id/onboard_status`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addToFolder:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/add_to_folder`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),tag:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/:talent_id/tag`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),removeToFolder:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/remove_to_folder`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),combinedCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/combined_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/:talent_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),combinedUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/combined_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalInterviewAssessment:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_interview_assessments/:external_interview_assessment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_interview_assessments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},referralWebsiteJobPost:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts/:job_post_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},job:{config:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/config`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),close:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/close`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateConfig:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/update_config`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),open:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/open`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),recruiter:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/recruiter`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),combinedUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/combined_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),combinedCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/combined_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getDetail:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/get_detail`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},location:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/locations/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/locations`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/locations`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalReferralReward:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_referral_rewards`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_referral_rewards/:external_referral_reward_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},note:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/notes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/notes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},offerApprovalTemplate:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offer_approval_templates`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},website:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},examMarkingTask:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/exam_marking_tasks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/exam_marking_tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},referral:{getByApplication:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referrals/get_by_application`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referrals/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},exam:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/exams`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobRequirementSchema:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_requirement_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ecoAccountCustomField:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},talentExternalInfo:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/:talent_id/external_info`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/:talent_id/external_info`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},questionnaire:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/questionnaires`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ecoExamPaper:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_exam_papers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},offer:{internOfferStatus:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offers/:offer_id/intern_offer_status`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),offerStatus:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offers/:offer_id/offer_status`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offers/:offer_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offers/:offer_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ecoBackgroundCheck:{cancel:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_checks/cancel`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateResult:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_result`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateProgress:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_progress`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},agency:{protect:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/agencies/protect`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/agencies/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/agencies/:agency_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),protectSearch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/agencies/protection_period/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/agencies/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),operateAgencyAccount:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/agencies/operate_agency_account`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getAgencyAccount:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/agencies/get_agency_account`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},talentPool:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_pools/`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_pools/`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchChangeTalentPool:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_pools/:talent_pool_id/batch_change_talent_pool`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),moveTalent:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_pools/:talent_pool_id/talent_relationship`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},diversityInclusion:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/diversity_inclusions/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ecoExam:{loginInfo:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/login_info`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateResult:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/update_result`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},terminationReason:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/termination_reasons`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/termination_reasons`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobManager:{batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/batch_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/:manager_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobPublishRecord:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_publish_records/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},websiteJobPost:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/:job_post_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobType:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_types`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalApplication:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ecoBackgroundCheckCustomField:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},application:{transferStage:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id/transfer_stage`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),recover:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id/recover`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),terminate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id/terminate`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),transferOnboard:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id/transfer_onboard`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),offer:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id/offer`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),cancelOnboard:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id/cancel_onboard`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getDetail:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id/get_detail`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},registrationSchema:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/registration_schemas`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/registration_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},role:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/roles`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/roles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/roles/:role_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interviewRecord:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_records/:interview_record_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_records`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interviewer:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interviewers/:interviewer_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interviewers`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interviewers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},talentFolder:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_folders`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_folders`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interview:{getByTalent:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interviews/get_by_talent`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interviews`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},referralAccount:{enable:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_account/enable`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),withdraw:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/withdraw`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),deactivate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/deactivate`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),reconciliation:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_account/reconciliation`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_account`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getAccountAssets:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_account/get_account_assets`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ehrImportTask:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/ehr_import_tasks/:ehr_import_task_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},websiteDeliveryTask:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/delivery_tasks/:delivery_task_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},talentObject:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_objects/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobSchema:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobFunction:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_functions`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_functions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},advertisement:{publish:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/advertisements/:advertisement_id/publish`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},offerSchema:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offer_schemas/:offer_schema_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},attachment:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/attachments/:attachment_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),preview:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/attachments/:attachment_id/preview`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/attachments`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},applicationInterview:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id/interviews`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},websiteSiteUser:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/site_users`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},tripartiteAgreement:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ecoBackgroundCheckPackage:{batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_check_packages`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},resumeSource:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/resume_sources`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/resume_sources`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},offerApplicationForm:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offer_application_forms`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offer_application_forms/:offer_application_form_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},talentTag:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_tags`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_tags`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},talentOperationLog:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_operation_logs/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userRole:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/user_roles`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/user_roles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalInterview:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_interviews/:external_interview_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchQueryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_interviews/batch_query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_interviews/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_interviews`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_interviews/:external_interview_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalBackgroundCheck:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_background_checks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_background_checks/:external_background_check_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_background_checks/:external_background_check_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchQueryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_background_checks/batch_query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_background_checks/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},todo:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/todos`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/todos`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalOffer:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_offers/:external_offer_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchQueryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_offers/batch_query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_offers/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_offers/:external_offer_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_offers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},talentBlocklist:{changeTalentBlock:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_blocklist/change_talent_block`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},portalApplySchema:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interviewRegistrationSchema:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_registration_schemas`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_registration_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobRequirement:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_requirements`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listById:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_requirements/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_requirements`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},backgroundCheckOrder:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/background_check_orders`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/background_check_orders/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},employee:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/employees/:employee_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getByApplication:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/employees/get_by_application`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/employees/:employee_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},subject:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/subjects`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interviewFeedbackForm:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_feedback_forms`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_feedback_forms`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},evaluationTask:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/evaluation_tasks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/evaluation_tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},evaluation:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/evaluations`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/evaluations`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interviewTask:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_tasks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobProcess:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_processes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},minutes:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/minutes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},test:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/tests/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/tests/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{websiteChannel:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels/:channel_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels/:channel_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interviewRoundType:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_round_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},offerCustomField:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offer_custom_fields/:offer_custom_field_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},websiteDelivery:{createByAttachment:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/deliveries/create_by_attachment`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),createByResume:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/deliveries/create_by_resume`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interviewRecordAttachment:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_records/attachments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},talent:{batchGetId:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/batch_get_id`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),onboardStatus:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/:talent_id/onboard_status`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addToFolder:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/add_to_folder`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),tag:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/:talent_id/tag`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),removeToFolder:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/remove_to_folder`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),combinedCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/combined_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/:talent_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),combinedUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/combined_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalInterviewAssessment:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_interview_assessments/:external_interview_assessment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_interview_assessments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},referralWebsiteJobPost:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts/:job_post_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},job:{config:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/config`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),close:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/close`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateConfig:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/update_config`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),open:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/open`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),recruiter:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/recruiter`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),combinedUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/combined_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),combinedCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/combined_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getDetail:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/get_detail`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},location:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/locations/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/locations`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/locations`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalReferralReward:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_referral_rewards`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_referral_rewards/:external_referral_reward_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},note:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/notes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/notes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},offerApprovalTemplate:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offer_approval_templates`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},website:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},examMarkingTask:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/exam_marking_tasks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/exam_marking_tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},referral:{getByApplication:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referrals/get_by_application`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referrals/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},exam:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/exams`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobRequirementSchema:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_requirement_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ecoAccountCustomField:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},talentExternalInfo:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/:talent_id/external_info`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/:talent_id/external_info`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},questionnaire:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/questionnaires`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ecoExamPaper:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_exam_papers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},offer:{internOfferStatus:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offers/:offer_id/intern_offer_status`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),offerStatus:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offers/:offer_id/offer_status`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offers/:offer_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offers/:offer_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ecoBackgroundCheck:{cancel:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_checks/cancel`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateResult:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_result`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateProgress:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_progress`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},agency:{protect:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/agencies/protect`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/agencies/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/agencies/:agency_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),protectSearch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/agencies/protection_period/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/agencies/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),operateAgencyAccount:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/agencies/operate_agency_account`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getAgencyAccount:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/agencies/get_agency_account`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},talentPool:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_pools/`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_pools/`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchChangeTalentPool:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_pools/:talent_pool_id/batch_change_talent_pool`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),moveTalent:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_pools/:talent_pool_id/talent_relationship`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},diversityInclusion:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/diversity_inclusions/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ecoExam:{loginInfo:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/login_info`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateResult:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/update_result`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},terminationReason:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/termination_reasons`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/termination_reasons`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobManager:{batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/batch_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/:manager_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobPublishRecord:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_publish_records/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},websiteJobPost:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/:job_post_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobType:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_types`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalApplication:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ecoBackgroundCheckCustomField:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},application:{transferStage:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id/transfer_stage`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),recover:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id/recover`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),terminate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id/terminate`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),transferOnboard:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id/transfer_onboard`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),offer:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id/offer`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),cancelOnboard:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id/cancel_onboard`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getDetail:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id/get_detail`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},registrationSchema:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/registration_schemas`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/registration_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},role:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/roles`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/roles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/roles/:role_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interviewRecord:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_records/:interview_record_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_records`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interviewer:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interviewers/:interviewer_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interviewers`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interviewers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},talentFolder:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_folders`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_folders`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interview:{getByTalent:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interviews/get_by_talent`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interviews`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},referralAccount:{enable:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_account/enable`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),withdraw:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/withdraw`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),deactivate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/deactivate`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),reconciliation:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_account/reconciliation`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_account`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getAccountAssets:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_account/get_account_assets`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ehrImportTask:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/ehr_import_tasks/:ehr_import_task_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},websiteDeliveryTask:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/delivery_tasks/:delivery_task_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},talentObject:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_objects/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobSchema:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobFunction:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_functions`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_functions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},advertisement:{publish:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/advertisements/:advertisement_id/publish`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},offerSchema:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offer_schemas/:offer_schema_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},attachment:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/attachments/:attachment_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),preview:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/attachments/:attachment_id/preview`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/attachments`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},applicationInterview:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id/interviews`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},websiteSiteUser:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/site_users`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},tripartiteAgreement:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ecoBackgroundCheckPackage:{batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_check_packages`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},resumeSource:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/resume_sources`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/resume_sources`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},offerApplicationForm:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offer_application_forms`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offer_application_forms/:offer_application_form_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},talentTag:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_tags`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_tags`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},talentOperationLog:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_operation_logs/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userRole:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/user_roles`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/user_roles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalInterview:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_interviews/:external_interview_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchQueryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_interviews/batch_query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_interviews/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_interviews`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_interviews/:external_interview_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalBackgroundCheck:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_background_checks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_background_checks/:external_background_check_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_background_checks/:external_background_check_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchQueryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_background_checks/batch_query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_background_checks/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},todo:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/todos`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/todos`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalOffer:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_offers/:external_offer_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchQueryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_offers/batch_query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_offers/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_offers/:external_offer_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_offers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},talentBlocklist:{changeTalentBlock:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_blocklist/change_talent_block`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},portalApplySchema:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interviewRegistrationSchema:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_registration_schemas`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_registration_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobRequirement:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_requirements`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listById:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_requirements/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_requirements`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},backgroundCheckOrder:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/background_check_orders`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/background_check_orders/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},employee:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/employees/:employee_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getByApplication:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/employees/get_by_application`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/employees/:employee_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},subject:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/subjects`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interviewFeedbackForm:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_feedback_forms`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_feedback_forms`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},evaluationTask:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/evaluation_tasks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/evaluation_tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},evaluation:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/evaluations`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/evaluations`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interviewTask:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_tasks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobProcess:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_processes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},minutes:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/minutes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},test:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/tests/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/tests/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}},v2:{talent:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v2/talents/:talent_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interviewRecord:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v2/interview_records`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v2/interview_records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v2/interview_records/:interview_record_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},s0=class extends n0{constructor(){super(...arguments),this.human_authentication={identity:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/human_authentication/v1/identities`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{identity:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/human_authentication/v1/identities`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},g0=class extends s0{constructor(){super(...arguments),this.im={message:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),pushFollowUp:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/push_follow_up`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),urgentApp:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_app`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),urgentPhone:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_phone`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),urgentSms:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_sms`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),reply:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),mergeForward:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/merge_forward`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),forward:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/forward`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),readUsers:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/read_users`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),replyByCard:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),{template_id:t,template_variable:s}=a,g=F(a,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:t,template_variable:s}})},g);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`,A),method:"POST",data:c,params:e,headers:i,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(u(I)),I})}),createByCard:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),{template_id:t,template_variable:s}=a,g=F(a,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:t,template_variable:s}})},g);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages`,A),method:"POST",data:c,params:e,headers:i,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(u(I)),I})}),updateByCard:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),{template_id:t,template_variable:s}=a,g=F(a,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:t,template_variable:s}})},g);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PUT",data:c,params:e,headers:i,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(u(I)),I})})},batchMessage:{readUser:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id/read_user`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getProgress:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id/get_progress`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatMembers:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),isInChat:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/members/is_in_chat`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),meJoin:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/members/me_join`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},pin:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/pins/:message_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/pins`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/pins`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/pins`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chat:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),link:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/link`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/search`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/search`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatModeration:{getWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatTab:{listTabs:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/list_tabs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),sortTabs:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/sort_tabs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),deleteTabs:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/delete_tabs`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateTabs:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/update_tabs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatTopNotice:{deleteTopNotice:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/top_notice/delete_top_notice`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),putTopNotice:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/top_notice/put_top_notice`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatAnnouncement:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/announcement`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/announcement`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatMenuTree:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),sort:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree/sort`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatManagers:{deleteManagers:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/managers/delete_managers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addManagers:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/managers/add_managers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatMenuItem:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_items/:menu_item_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},image:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/images/:image_key`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/images`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},messageReaction:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions/:reaction_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/reactions/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},file:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/files/:file_key`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/files`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},messageResource:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/resources/:file_key`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}})},thread:{forward:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/threads/:thread_id/forward`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{message:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),pushFollowUp:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/push_follow_up`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),urgentApp:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_app`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),urgentPhone:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_phone`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),urgentSms:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_sms`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),reply:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),mergeForward:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/merge_forward`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),forward:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/forward`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),readUsers:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/read_users`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),replyByCard:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),{template_id:t,template_variable:s}=a,g=F(a,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:t,template_variable:s}})},g);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`,A),method:"POST",data:c,params:e,headers:i,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(u(I)),I})}),createByCard:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),{template_id:t,template_variable:s}=a,g=F(a,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:t,template_variable:s}})},g);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages`,A),method:"POST",data:c,params:e,headers:i,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(u(I)),I})}),updateByCard:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),{template_id:t,template_variable:s}=a,g=F(a,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:t,template_variable:s}})},g);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PUT",data:c,params:e,headers:i,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(u(I)),I})})},batchMessage:{readUser:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id/read_user`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getProgress:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id/get_progress`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatMembers:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),isInChat:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/members/is_in_chat`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),meJoin:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/members/me_join`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},pin:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/pins/:message_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/pins`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/pins`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/pins`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chat:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),link:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/link`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/search`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/search`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatModeration:{getWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatTab:{listTabs:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/list_tabs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),sortTabs:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/sort_tabs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),deleteTabs:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/delete_tabs`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateTabs:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/update_tabs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatTopNotice:{deleteTopNotice:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/top_notice/delete_top_notice`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),putTopNotice:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/top_notice/put_top_notice`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatAnnouncement:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/announcement`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/announcement`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatMenuTree:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),sort:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree/sort`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatManagers:{deleteManagers:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/managers/delete_managers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addManagers:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/managers/add_managers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatMenuItem:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_items/:menu_item_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},image:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/images/:image_key`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/images`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},messageReaction:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions/:reaction_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/reactions/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},file:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/files/:file_key`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/files`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},messageResource:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/resources/:file_key`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}})},thread:{forward:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/threads/:thread_id/forward`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}},v2:{bizEntityTagRelation:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v2/biz_entity_tag_relation`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v2/biz_entity_tag_relation`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v2/biz_entity_tag_relation`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},urlPreview:{batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v2/url_previews/batch_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appFeedCardBatch:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v2/app_feed_card/batch`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v2/app_feed_card/batch`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},feedCard:{botTimeSentive:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v2/feed_cards/bot_time_sentive`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v2/feed_cards/:feed_card_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},tag:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v2/tags`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v2/tags/:tag_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatButton:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v2/chat_button`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appFeedCard:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v2/app_feed_card`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chat:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v2/chats/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v2/chats/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},c0=class extends g0{constructor(){super(...arguments),this.inline_platform={}}},I0=class extends c0{constructor(){super(...arguments),this.laps={}}},l0=class extends I0{constructor(){super(...arguments),this.lingo={v1:{file:{download:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/files/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),upload:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/files/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},entity:{match:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/entities/match`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/entities/:entity_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),highlight:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/entities/highlight`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/entities`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/entities`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/entities/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/entities/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/entities/:entity_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/entities`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/entities/:entity_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},repo:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/repos`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},classification:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/classifications`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/classifications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},draft:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/drafts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/drafts/:draft_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},p0=class extends l0{constructor(){super(...arguments),this.llpp={}}},E0=class extends p0{constructor(){super(...arguments),this.mail={mailgroupMember:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/:member_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},mailgroupPermissionMember:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/:permission_member_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/:permission_member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},mailgroup:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},publicMailboxMember:{clear:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/clear`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/:member_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},mailgroupAlias:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases/:alias_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},publicMailboxAlias:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases/:alias_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailbox:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),accessibleMailboxes:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/accessible_mailboxes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),profile:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/profile`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxAlias:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases/:alias_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},mailgroupManager:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},publicMailbox:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),removeToRecycleBin:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/remove_to_recycle_bin`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},user:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/users/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxMessage:{getByCard:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/get_by_card`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),send:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchModify:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_modify`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),sendStatus:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/send_status`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),modify:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/modify`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchTrash:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_trash`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),trash:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/trash`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listThreadMessage:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxThread:{batchModify:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/batch_modify`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchTrash:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/batch_trash`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),modify:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/modify`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),trash:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/trash`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxEvent:{unsubscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/unsubscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/subscription`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxMailContact:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts/:mail_contact_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts/:mail_contact_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxLabel:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxDraft:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),cancelScheduledSend:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/cancel_scheduled_send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),send:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id/send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxRule:{reorder:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/reorder`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/:rule_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/:rule_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxSetting:{sendAs:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/settings/send_as`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getSignatures:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/settings/signatures`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxSentMessage:{getRecallDetail:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/recall`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),recall:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/recall`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxTemplate:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxTemplateAttachment:{downloadUrl:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id/attachments/download_url`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},multiEntity:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/multi_entity/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxFolder:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxMessageAttachment:{downloadUrl:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/attachments/download_url`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{mailgroupMember:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/:member_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},mailgroupPermissionMember:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/:permission_member_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/:permission_member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},mailgroup:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},publicMailboxMember:{clear:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/clear`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/:member_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},mailgroupAlias:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases/:alias_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},publicMailboxAlias:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases/:alias_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailbox:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),accessibleMailboxes:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/accessible_mailboxes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),profile:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/profile`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxAlias:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases/:alias_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},mailgroupManager:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},publicMailbox:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),removeToRecycleBin:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/remove_to_recycle_bin`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},user:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/users/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxMessage:{getByCard:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/get_by_card`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),send:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchModify:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_modify`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),sendStatus:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/send_status`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),modify:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/modify`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchTrash:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_trash`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),trash:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/trash`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listThreadMessage:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxThread:{batchModify:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/batch_modify`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchTrash:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/batch_trash`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),modify:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/modify`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),trash:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/trash`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxEvent:{unsubscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/unsubscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/subscription`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxMailContact:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts/:mail_contact_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts/:mail_contact_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxLabel:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxDraft:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),cancelScheduledSend:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/cancel_scheduled_send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),send:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id/send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxRule:{reorder:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/reorder`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/:rule_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/:rule_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxSetting:{sendAs:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/settings/send_as`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getSignatures:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/settings/signatures`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxSentMessage:{getRecallDetail:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/recall`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),recall:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/recall`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxTemplate:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxTemplateAttachment:{downloadUrl:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id/attachments/download_url`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},multiEntity:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/multi_entity/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxFolder:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxMessageAttachment:{downloadUrl:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/attachments/download_url`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},C0=class extends E0{constructor(){super(...arguments),this.mcp={}}},h0=class extends C0{constructor(){super(...arguments),this.mdm={userAuthDataRelation:{unbind:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/unbind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),bind:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/bind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{userAuthDataRelation:{unbind:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/unbind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),bind:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/bind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}},v3:{countryRegion:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mdm/v3/country_regions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},batchCountryRegion:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mdm/v3/batch_country_region`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},d0=class extends h0{constructor(){super(...arguments),this.meeting_room={}}},u0=class extends d0{constructor(){super(...arguments),this.mindnote={}}},B0=class extends u0{constructor(){super(...arguments),this.minutes={v1:{minuteTranscript:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token/transcript`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}})},minuteStatistics:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token/statistics`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},minuteMedia:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token/media`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},minute:{subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/minutes/v1/minutes/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/minutes/v1/minutes/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/minutes/v1/minutes/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/minutes/v1/minutes/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),artifacts:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token/artifacts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},f0=class extends B0{constructor(){super(...arguments),this.moments={post:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/moments/v1/posts/:post_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{post:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/moments/v1/posts/:post_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},Q0=class extends f0{constructor(){super(...arguments),this.myai_ai_extension={}}},y0=class extends Q0{constructor(){super(...arguments),this.myai_assistant={}}},m0=class extends y0{constructor(){super(...arguments),this.myai_base_ai={}}},S0=class extends m0{constructor(){super(...arguments),this.myai_ccm_extension={}}},D0=class extends S0{constructor(){super(...arguments),this.myai_data={}}},w0=class extends D0{constructor(){super(...arguments),this.myai_im_extension={}}},O0=class extends w0{constructor(){super(...arguments),this.myai_mail={}}},b0=class extends O0{constructor(){super(...arguments),this.myai_memory_reflection={}}},M0=class extends b0{constructor(){super(...arguments),this.myai_scenario_summary={}}},_0=class extends M0{constructor(){super(...arguments),this.myai_slides={}}},N0=class extends _0{constructor(){super(...arguments),this.myai_url_extension={}}},T0=class extends N0{constructor(){super(...arguments),this.myai={}}},R0=class extends T0{constructor(){super(...arguments),this.okr={review:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/reviews/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},periodRule:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/period_rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},progressRecord:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/progress_records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},period:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/periods`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/periods`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/periods/:period_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},okr:{batchGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/okrs/batch_get`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userOkr:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/users/:user_id/okrs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},image:{upload:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/images/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},v1:{review:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/reviews/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},periodRule:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/period_rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},progressRecord:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/progress_records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},period:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/periods`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/periods`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/periods/:period_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},okr:{batchGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/okrs/batch_get`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userOkr:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/users/:user_id/okrs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},image:{upload:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/images/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})}},v2:{okrAlignment:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/alignments/:alignment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/alignments/:alignment_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},okrObjective:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/objectives/:objective_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),keyResultsPosition:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results_position`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/objectives/:objective_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),keyResultsWeight:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results_weight`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/objectives/:objective_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},okrKeyResult:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},okrObjectiveAlignment:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/alignments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/alignments`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/alignments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},okrCategory:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/categories`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/categories`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},okrCycle:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/cycles`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/cycles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),objectivesWeight:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives_weight`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),objectivesPosition:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives_position`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},okrObjectiveKeyResult:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},okrKeyResultIndicator:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id/indicators`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},okrObjectiveIndicator:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/indicators`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},okrCycleObjective:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},okrIndicator:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/indicators/:indicator_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},okrObjectiveProgress:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/progresses`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/progresses`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},okrKeyResultProgress:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id/progresses`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id/progresses`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},k0=class extends R0{constructor(){super(...arguments),this.optical_char_recognition={image:{basicRecognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/optical_char_recognition/v1/image/basic_recognize`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{image:{basicRecognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/optical_char_recognition/v1/image/basic_recognize`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},v0=class extends k0{constructor(){super(...arguments),this.partner_ai={}}},P0=class extends v0{constructor(){super(...arguments),this.passport={session:{logout:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/passport/v1/sessions/logout`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/passport/v1/sessions/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},password:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/passport/v1/password`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{session:{logout:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/passport/v1/sessions/logout`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/passport/v1/sessions/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},password:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/passport/v1/password`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},G0=class extends P0{constructor(){super(...arguments),this.payroll={v1:{datasourceRecord:{save:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/datasource_records/save`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/datasource_records/query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/datasource_records/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},paymentDetail:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/payment_detail/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},paymentActivity:{archive:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/payment_activitys/archive`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/payment_activitys`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/payment_activitys`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},costAllocationPlan:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/cost_allocation_plans`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/cost_allocation_plans`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},paymentActivityDetail:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/payment_activity_details`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},datasource:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/datasources`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/datasources`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},costAllocationDetail:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/cost_allocation_details`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/cost_allocation_details`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},costAllocationReport:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/cost_allocation_reports`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/cost_allocation_reports`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},paygroup:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/paygroups`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/paygroups`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},acctItem:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/acct_items`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/acct_items`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},F0=class extends G0{constructor(){super(...arguments),this.people_admin={}}},L0=class extends F0{constructor(){super(...arguments),this.people_ai={}}},U0=class extends L0{constructor(){super(...arguments),this.people_bytedance={}}},H0=class extends U0{constructor(){super(...arguments),this.performance={v1:{reviewData:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v1/review_datas/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},stageTask:{findByUserList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v1/stage_tasks/find_by_user_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),findByPage:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v1/stage_tasks/find_by_page`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},semester:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v1/semesters`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}},v2:{reviewee:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/reviewees/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},additionalInformationsBatch:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/additional_informations/batch`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},metricDetail:{import:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/metric_details/import`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/metric_details/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},question:{queryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/questions/query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/questions/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},indicator:{queryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/indicators/query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/indicators/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},activity:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/activity/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},metricTag:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/metric_tags`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/metric_tags`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},metricField:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/metric_fields/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},metricLib:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/metric_libs/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},reviewData:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/review_datas/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},metricTemplate:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/metric_templates/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userInfo:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/user_info/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},reviewTemplate:{queryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/review_templates/query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/review_templates/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userGroupUserRel:{write:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/user_group_user_rels/write`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},additionalInformation:{import:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/additional_informations/import`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/additional_informations/query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/additional_informations/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},K0=class extends H0{constructor(){super(...arguments),this.personal_settings={systemStatus:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchClose:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_close`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchOpen:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_open`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{systemStatus:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchClose:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_close`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchOpen:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_open`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},Y0=class extends K0{constructor(){super(...arguments),this.profile={}}},x0=class extends Y0{constructor(){super(...arguments),this.report={rule:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/report/v1/rules/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ruleView:{remove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/report/v1/rules/:rule_id/views/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},task:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/report/v1/tasks/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{rule:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/report/v1/rules/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ruleView:{remove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/report/v1/rules/:rule_id/views/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},task:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/report/v1/tasks/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},j0=class extends x0{constructor(){super(...arguments),this.rule_engine={}}},J0=class extends j0{constructor(){super(...arguments),this.saasbi={}}},q0=class extends J0{constructor(){super(...arguments),this.scim={}}},V0=class extends q0{constructor(){super(...arguments),this.search_in_app={}}},z0=class extends V0{constructor(){super(...arguments),this.search={dataSource:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},message:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/message`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},schema:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/schemas`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},dataSourceItem:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},app:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/app`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},docWiki:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/doc_wiki/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/doc_wiki/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v2:{dataSource:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},message:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/message`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},schema:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/schemas`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},dataSourceItem:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},app:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/app`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},docWiki:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/doc_wiki/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/doc_wiki/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},W0=class extends z0{constructor(){super(...arguments),this.security_and_compliance={openapiLog:{listData:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v1/openapi_logs/list_data`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMigration:{cancel:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/cancel`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/:user_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},multiGeoEntityTenant:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v1/multi_geo_entity/tenant`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{openapiLog:{listData:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v1/openapi_logs/list_data`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMigration:{cancel:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/cancel`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/:user_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},multiGeoEntityTenant:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v1/multi_geo_entity/tenant`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}},v2:{deviceApplyRecord:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v2/device_apply_records/:device_apply_record_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},deviceRecord:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v2/device_records/:device_record_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),mine:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v2/device_records/mine`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v2/device_records/:device_record_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v2/device_records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v2/device_records/:device_record_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v2/device_records`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v2/device_records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},Z0=class extends W0{constructor(){super(...arguments),this.security_plugin={}}},X0=class extends Z0{constructor(){super(...arguments),this.sheet_ai={}}},$0=class extends X0{constructor(){super(...arguments),this.sheets={spreadsheet:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},spreadsheetSheet:{replace:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/replace`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),moveDimension:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/move_dimension`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),find:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/find`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},spreadsheetSheetFilter:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},spreadsheetSheetFilterView:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},spreadsheetSheetFilterViewCondition:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},spreadsheetSheetFloatImage:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v3:{spreadsheet:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},spreadsheetSheet:{replace:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/replace`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),moveDimension:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/move_dimension`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),find:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/find`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},spreadsheetSheetFilter:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},spreadsheetSheetFilterView:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},spreadsheetSheetFilterViewCondition:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},spreadsheetSheetFloatImage:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},eT=class extends $0{constructor(){super(...arguments),this.slides_ai={}}},AT=class extends eT{constructor(){super(...arguments),this.slides={}}},tT=class extends AT{constructor(){super(...arguments),this.spark={v1:{appTable:{deleteTableRecords:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),postTableRecords:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patchTableRecords:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdateTableRecords:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records_batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getTableDetail:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getTableList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getTableRecordList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appEnum:{getEnumDetail:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/enums/:enum_name`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getEnumList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/enums`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appView:{getViewRecordList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/views/:view_name/records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appStorage:{upload:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),download:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage`,A),method:"GET",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),uploadInitialize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage/upload/initialize`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),uploadPart:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage/upload/part`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),uploadComplete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage/upload/complete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},app:{icon:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/icon`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),uploadHtmlCodeAndRelease:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/upload_and_release_html_code`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),getAppVisibility:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/access-scope`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateAppVisibility:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/access-scope`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),sqlCommands:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/sql_commands`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},directoryUser:{idConvert:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/directory/user/id_convert`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},rT=class extends tT{constructor(){super(...arguments),this.speech_to_text={speech:{fileRecognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/speech_to_text/v1/speech/file_recognize`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),streamRecognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/speech_to_text/v1/speech/stream_recognize`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{speech:{fileRecognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/speech_to_text/v1/speech/file_recognize`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),streamRecognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/speech_to_text/v1/speech/stream_recognize`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},aT=class extends rT{constructor(){super(...arguments),this.subscriptions={}}},iT=class extends aT{constructor(){super(...arguments),this.task={task:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDeleteFollower:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/batch_delete_follower`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDeleteCollaborator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/batch_delete_collaborator`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),uncomplete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/uncomplete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),complete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/complete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},taskComment:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},taskCollaborator:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators/:collaborator_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},taskFollower:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers/:follower_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},taskReminder:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders/:reminder_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{task:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDeleteFollower:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/batch_delete_follower`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDeleteCollaborator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/batch_delete_collaborator`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),uncomplete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/uncomplete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),complete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/complete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},taskComment:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},taskCollaborator:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators/:collaborator_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},taskFollower:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers/:follower_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},taskReminder:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders/:reminder_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}},v2:{task:{tasklists:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/:task_guid/tasklists`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/:task_guid`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addDependencies:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/:task_guid/add_dependencies`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),removeDependencies:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/:task_guid/remove_dependencies`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),setAncestorTask:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/:task_guid/set_ancestor_task`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addMembers:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/:task_guid/add_members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addReminders:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/:task_guid/add_reminders`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),removeMembers:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/:task_guid/remove_members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),removeReminders:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/:task_guid/remove_reminders`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/:task_guid`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),removeTasklist:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/:task_guid/remove_tasklist`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/:task_guid`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addTasklist:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/:task_guid/add_tasklist`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},comment:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/comments/:comment_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/comments`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/comments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/comments/:comment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/comments/:comment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/comments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},section:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/sections/:section_guid`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),tasksWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/sections/:section_guid/tasks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),tasks:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/sections/:section_guid/tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/sections/:section_guid`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/sections/:section_guid`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/sections`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/sections`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/sections`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},tasklist:{tasks:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasklists`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasklists`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addMembers:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/add_members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),removeMembers:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/remove_members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasklists`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasklists/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasklists/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},customField:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/custom_fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),add:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid/add`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),remove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/custom_fields`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/custom_fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},tasklistActivitySubscription:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions/:activity_subscription_guid`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions/:activity_subscription_guid`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions/:activity_subscription_guid`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},attachment:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/attachments/:attachment_guid`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/attachments/:attachment_guid`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),upload:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/attachments/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/attachments`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/attachments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},customFieldOption:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid/options/:option_guid`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid/options`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},taskV2:{taskSubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/task_v2/task_subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listRelatedTaskWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/task_v2/list_related_task`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),listRelatedTask:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/task_v2/list_related_task`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},taskSubtask:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/:task_guid/subtasks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/:task_guid/subtasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/:task_guid/subtasks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},oT=class extends iT{constructor(){super(...arguments),this.tenant={tenant:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/tenant/v2/tenant/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},tenantProductAssignInfo:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/tenant/v2/tenant/assign_info_list/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v2:{tenant:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/tenant/v2/tenant/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},tenantProductAssignInfo:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/tenant/v2/tenant/assign_info_list/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},nT=class extends oT{constructor(){super(...arguments),this.translation={text:{translate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/translation/v1/text/translate`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),detect:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/translation/v1/text/detect`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{text:{translate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/translation/v1/text/translate`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),detect:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/translation/v1/text/detect`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},sT=class extends nT{constructor(){super(...arguments),this.trust_layer={}}},gT=class extends sT{constructor(){super(...arguments),this.trust_party={v1:{collaborationTenantCollaborationUser:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants/:target_tenant_key/collaboration_users/:target_user_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},collaborationTenantCollaborationDepartment:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants/:target_tenant_key/collaboration_departments/:target_department_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},collaborationTenant:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants/:target_tenant_key`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),visibleOrganization:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants/:target_tenant_key/visible_organization`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},cT=class extends gT{constructor(){super(...arguments),this.unified_kms_log={}}},IT=class extends cT{constructor(){super(...arguments),this.unified_kms={}}},lT=class extends IT{constructor(){super(...arguments),this.vault={}}},pT=class extends lT{constructor(){super(...arguments),this.vc={material:{uploadMeta:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/materials/upload_meta`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),remove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/materials/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),pullMeta:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/materials/pull_meta`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},meetingRecording:{start:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/start`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),stop:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/stop`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),setPermission:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/set_permission`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},roomConfig:{del:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_configs/del`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),setCheckboardAccessCode:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_configs/set_checkboard_access_code`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),setRoomAccessCode:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_configs/set_room_access_code`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_configs/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),set:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_configs/set`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},reserve:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),apply:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserves/apply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getActiveMeeting:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id/get_active_meeting`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},myAiVcMeeting:{getCommonReply:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_common_reply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),doOperation:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/do_operation`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getTodoTask:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_todo_task`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),seedAiPullData:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/seed_ai_pull_data`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),docBasedSuggestQuestion:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/doc_based_suggest_question`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),callback:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/callback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),sectionSummary:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/section_summary`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getRecap:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_recap`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),fetchStepSummaryStream:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_step_summary_stream`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),fetchSectionSummaryStream:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_section_summary_stream`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),fetchRecapStream:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_recap_stream`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},meeting:{end:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/end`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),kickout:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/kickout`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),setHost:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/set_host`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),invite:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/invite`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),changeName:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/change_name`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listByNoWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/list_by_no`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),listByNo:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/list_by_no`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},myAiRoom:{joinOfflineMeeting:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/join_offline_meeting`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),reserveInstantEvent:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/reserve_instant_event`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),helpSceneType:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/help_scene_type`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),joinMeeting:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/join_meeting`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),checkInSchedule:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/check_in_schedule`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),exit:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/exit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),autoReleaseEvent:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/auto_release_event`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),autoWelcome:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/auto_welcome`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),roomCalling:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/room_calling`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),joinMeetingNumber:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/join_meeting_number`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),leaveMeeting:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/leave_meeting`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},myAiMm:{mediaParse:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_mm/media_parse`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),extensionBoarding:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_mm/extension_boarding`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),querySuggestContext:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_mm/query_suggest_context`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),mediaBind:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_mm/media_bind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_mm/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},myAiSip:{createEventCard:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_sip/create_event_card`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},alert:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/alerts`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/alerts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},myAiVc:{cardCallback:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc/card_callback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),startAnalysis:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc/start_analysis`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),fetchMeetingList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc/fetch_meeting_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),setMeetingList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc/set_meeting_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),meetingAnalyze:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc/meeting_analyze`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),fetchMeetingAnalyze:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc/fetch_meeting_analyze`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},report:{getDaily:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reports/get_daily`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getTopUser:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reports/get_top_user`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},room:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/rooms/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),mget:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/rooms/mget`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},resourceReservationList:{getWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/resource_reservation_list`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/resource_reservation_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},participantQualityList:{getWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/participant_quality_list`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/participant_quality_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},roomLevel:{mget:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_levels/mget`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_levels/:room_level_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_levels/search`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),del:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_levels/del`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_levels/:room_level_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},scopeConfig:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/scope_config`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/scope_config`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),accessCode:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/scope_config/access_code`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},reserveConfigForm:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},reserveConfigAdmin:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},reserveConfigDisableInform:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},reserveConfig:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),reserveScope:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserve_configs/reserve_scope`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},export:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/exports/:task_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),download:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/exports/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),resourceReservationList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/exports/resource_reservation_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),participantQualityList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/exports/participant_quality_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),participantList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/exports/participant_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),meetingList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/exports/meeting_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},meetingList:{getWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meeting_list`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meeting_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},participantList:{getWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/participant_list`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/participant_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},meetingPullSubtitle:{getWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/pull_subtitle`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/pull_subtitle`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},note:{subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/notes/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/notes/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unifiedNoteTranscriptWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/notes/:note_id/unified_note_transcript`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),unifiedNoteTranscript:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/notes/:note_id/unified_note_transcript`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/notes/:note_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},recording:{unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/recordings/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/recordings/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},bot:{realtimeEndpoint:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/realtime/endpoint`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),leave:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/bots/leave`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),message:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/bots/message`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),userActiveMeeting:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/bots/user_active_meeting`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),join:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/bots/join`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),eventsWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/bots/events`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),events:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/bots/events`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{material:{uploadMeta:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/materials/upload_meta`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),remove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/materials/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),pullMeta:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/materials/pull_meta`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},meetingRecording:{start:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/start`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),stop:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/stop`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),setPermission:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/set_permission`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},roomConfig:{del:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_configs/del`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),setCheckboardAccessCode:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_configs/set_checkboard_access_code`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),setRoomAccessCode:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_configs/set_room_access_code`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_configs/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),set:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_configs/set`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},reserve:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),apply:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserves/apply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getActiveMeeting:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id/get_active_meeting`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},myAiVcMeeting:{getCommonReply:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_common_reply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),doOperation:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/do_operation`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getTodoTask:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_todo_task`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),seedAiPullData:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/seed_ai_pull_data`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),docBasedSuggestQuestion:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/doc_based_suggest_question`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),callback:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/callback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),sectionSummary:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/section_summary`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getRecap:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_recap`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),fetchStepSummaryStream:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_step_summary_stream`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),fetchSectionSummaryStream:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_section_summary_stream`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),fetchRecapStream:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_recap_stream`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},meeting:{end:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/end`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),kickout:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/kickout`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),setHost:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/set_host`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),invite:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/invite`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),changeName:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/change_name`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listByNoWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/list_by_no`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),listByNo:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/list_by_no`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},myAiRoom:{joinOfflineMeeting:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/join_offline_meeting`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),reserveInstantEvent:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/reserve_instant_event`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),helpSceneType:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/help_scene_type`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),joinMeeting:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/join_meeting`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),checkInSchedule:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/check_in_schedule`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),exit:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/exit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),autoReleaseEvent:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/auto_release_event`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),autoWelcome:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/auto_welcome`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),roomCalling:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/room_calling`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),joinMeetingNumber:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/join_meeting_number`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),leaveMeeting:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/leave_meeting`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},myAiMm:{mediaParse:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_mm/media_parse`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),extensionBoarding:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_mm/extension_boarding`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),querySuggestContext:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_mm/query_suggest_context`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),mediaBind:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_mm/media_bind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_mm/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},myAiSip:{createEventCard:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_sip/create_event_card`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},alert:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/alerts`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/alerts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},myAiVc:{cardCallback:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc/card_callback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),startAnalysis:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc/start_analysis`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),fetchMeetingList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc/fetch_meeting_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),setMeetingList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc/set_meeting_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),meetingAnalyze:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc/meeting_analyze`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),fetchMeetingAnalyze:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc/fetch_meeting_analyze`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},report:{getDaily:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reports/get_daily`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getTopUser:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reports/get_top_user`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},room:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/rooms/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),mget:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/rooms/mget`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},resourceReservationList:{getWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/resource_reservation_list`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/resource_reservation_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},participantQualityList:{getWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/participant_quality_list`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/participant_quality_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},roomLevel:{mget:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_levels/mget`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_levels/:room_level_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_levels/search`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),del:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_levels/del`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_levels/:room_level_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},scopeConfig:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/scope_config`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/scope_config`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),accessCode:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/scope_config/access_code`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},reserveConfigForm:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},reserveConfigAdmin:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},reserveConfigDisableInform:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},reserveConfig:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),reserveScope:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserve_configs/reserve_scope`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},export:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/exports/:task_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),download:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/exports/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),resourceReservationList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/exports/resource_reservation_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),participantQualityList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/exports/participant_quality_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),participantList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/exports/participant_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),meetingList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/exports/meeting_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},meetingList:{getWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meeting_list`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meeting_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},participantList:{getWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/participant_list`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/participant_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},meetingPullSubtitle:{getWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/pull_subtitle`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/pull_subtitle`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},note:{subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/notes/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/notes/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unifiedNoteTranscriptWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/notes/:note_id/unified_note_transcript`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),unifiedNoteTranscript:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/notes/:note_id/unified_note_transcript`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/notes/:note_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},recording:{unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/recordings/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/recordings/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},bot:{realtimeEndpoint:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/realtime/endpoint`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),leave:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/bots/leave`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),message:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/bots/message`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),userActiveMeeting:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/bots/user_active_meeting`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),join:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/bots/join`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),eventsWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/bots/events`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),events:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/bots/events`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},ET=class extends pT{constructor(){super(...arguments),this.verification={v1:{verification:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/verification/v1/verification`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},CT=class extends ET{constructor(){super(...arguments),this.wiki={spaceSetting:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/setting`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},spaceNode:{updateTitle:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/update_title`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),moveDocsToWiki:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/move_docs_to_wiki`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),copy:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/copy`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),move:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/move`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},spaceMember:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},space:{getNode:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/get_node`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},task:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/tasks/:task_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{node:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v1/nodes/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v1/nodes/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}},v2:{spaceSetting:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/setting`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},spaceNode:{updateTitle:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/update_title`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),moveDocsToWiki:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/move_docs_to_wiki`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),copy:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/copy`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),move:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/move`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},spaceMember:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},space:{getNode:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/get_node`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},task:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/tasks/:task_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},hT=class extends CT{constructor(){super(...arguments),this.workplace={workplaceAccessData:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/workplace/v1/workplace_access_data/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},workplaceBlockAccessData:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/workplace/v1/workplace_block_access_data/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},customWorkplaceAccessData:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/workplace/v1/custom_workplace_access_data/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{workplaceAccessData:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/workplace/v1/workplace_access_data/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},workplaceBlockAccessData:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/workplace/v1/workplace_block_access_data/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},customWorkplaceAccessData:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/workplace/v1/custom_workplace_access_data/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},Is={error:(...n)=>{console.log("[error]:",...n)},warn:(...n)=>{console.warn("[warn]:",...n)},info:(...n)=>{console.info("[info]:",...n)},debug:(...n)=>{console.debug("[debug]:",...n)},trace:(...n)=>{console.trace("[trace]:",...n)}},cg=class{constructor(r,o){this.level=r,this.logger=o}error(...r){this.level>=mi.error&&this.logger.error(r)}warn(...r){this.level>=mi.warn&&this.logger.warn(r)}info(...r){this.level>=mi.info&&this.logger.info(r)}debug(...r){this.level>=mi.debug&&this.logger.debug(r)}trace(...r){this.level>=mi.trace&&this.logger.trace(r)}},dT=class{constructor(r){this.appId=r.appId,this.appSecret=r.appSecret,this.cache=r.cache,this.domain=r.domain,this.logger=r.logger,this.appType=r.appType,this.httpInstance=r.httpInstance,this.logger.debug("app ticket manager is ready"),this.checkAppTicket()}checkAppTicket(){var r;return C(this,void 0,void 0,function*(){this.appType===En.ISV&&((yield(r=this.cache)===null||r===void 0?void 0:r.get(uh,{namespace:this.appId}))||this.requestAppTicket())})}requestAppTicket(){return C(this,void 0,void 0,function*(){this.logger.debug("request app ticket"),yield this.httpInstance.post(`${this.domain}/open-apis/auth/v3/app_ticket/resend`,{app_id:this.appId,app_secret:this.appSecret}).catch(r=>{this.logger.error(r)})})}getAppTicket(){var r;return C(this,void 0,void 0,function*(){let o=yield(r=this.cache)===null||r===void 0?void 0:r.get(uh,{namespace:this.appId});if(o)return this.logger.debug("use cache app ticket"),o;yield this.requestAppTicket()})}},nQ="/oauth/v3/token",oye="urn:ietf:params:oauth:grant-type:jwt-bearer",YJ="urn:ietf:params:oauth:client-assertion-type:jwt-bearer",nye="authorization_code",sye="refresh_token",UT="X-Target-Service",xJ=7100,HT=7101,jJ=7102,KT=7104,gye=Object.freeze({"open.feishu.cn":"https://accounts.feishu.cn","open.larksuite.com":"https://accounts.larksuite.com"}),Da=class extends Error{constructor(r,o){super(o),this.name="ClientAssertionError",this.code=r,this.msg=o}},ql=class extends Error{constructor(r,o,i,e){super(e||i||"access token request failed"),this.name="AccessTokenError",this.statusCode=r,this.code=o,this.error=i,this.errorDescription=e}},YT=n=>n.includes("://")?n:`https://${n}`;function xT(n){let r=new URL(YT(n));if(!r.host)throw new Error(`invalid url: ${n}`);return r.host}function jT(n){if(n.oauthBaseUrl)return YT(n.oauthBaseUrl).replace(/\/+$/,"");let r=xT(n.domain),o=gye[r];if(o)return o;throw new Error("oauthBaseUrl is not configured. When domain is a non-default value (neither open.feishu.cn nor open.larksuite.com), set oauthBaseUrl explicitly.")}function JJ(n){return xT(jT(n))}function JT(n,r){let o=new URL(YT(n.targetService));if(o.protocol!=="https:")throw new Error("targetService must use https");if(o.username||o.password)throw new Error("targetService must not contain userinfo");let e=`${n.targetPrefix||""}${r}`.replace(/\/{2,}/g,"/");if(/(^|\/)\.\.(\/|$)/.test(e))throw new Error("targetPrefix must not contain path traversal");return`${o.protocol}//${o.host}${e}`}function cye(n,r){var o,i;let e=(o=r?.code)!==null&&o!==void 0?o:"unknown",a=(i=r?.msg)!==null&&i!==void 0?i:"no message";return`failed to get ${n}, code: ${e}, msg: ${a}`}var uT=class{constructor(r){this.appId=r.appId,this.appSecret=r.appSecret,this.cache=r.cache,this.domain=r.domain,this.logger=r.logger,this.appType=r.appType,this.httpInstance=r.httpInstance,this.clientAssertionProvider=r.clientAssertionProvider,this.oauthBaseUrl=r.oauthBaseUrl,this.appTicketManager=new dT({appId:this.appId,appSecret:this.appSecret,cache:this.cache,domain:this.domain,logger:this.logger,appType:this.appType,httpInstance:this.httpInstance}),this.logger.debug("token manager is ready")}requestToken(r,o,i){return C(this,void 0,void 0,function*(){let e=yield this.httpInstance.post(r,o).catch(a=>{throw this.logger.error(a),a});if(!e||!e[i])throw new Error(cye(i,e));return e})}getCustomTenantAccessToken(){var r,o;return C(this,void 0,void 0,function*(){if(this.clientAssertionProvider)return this.getTenantTokenByClientAssertion();let i=yield(r=this.cache)===null||r===void 0?void 0:r.get(ph,{namespace:this.appId});if(i)return this.logger.debug("use cache token"),i;this.logger.debug("request token");let{tenant_access_token:e,expire:a}=yield this.requestToken(`${this.domain}/open-apis/auth/v3/tenant_access_token/internal`,{app_id:this.appId,app_secret:this.appSecret},"tenant_access_token");return yield(o=this.cache)===null||o===void 0?void 0:o.set(ph,e,new Date().getTime()+a*1e3-180*1e3,{namespace:this.appId}),e})}getTenantTokenByClientAssertion(){var r,o,i,e,a,A,t,s;return C(this,void 0,void 0,function*(){let g=jT({oauthBaseUrl:this.oauthBaseUrl,domain:this.domain}),c=JJ({oauthBaseUrl:this.oauthBaseUrl,domain:this.domain}),I=yield(r=this.cache)===null||r===void 0?void 0:r.get(ph,{namespace:this.appId});if(I)return this.logger.debug("use cache token"),I;let E;try{E=yield this.clientAssertionProvider.retrieveToken(c)}catch(T){throw new Da(jJ,T?.message||"client assertion provider failed")}if(!E||!E.value)throw new Da(HT,"client assertion token is empty");let B=`${g}${nQ}`,f={};E.targetInfo&&(B=JT(E.targetInfo,nQ),f[UT]=c),this.logger.debug("request token (client assertion)");let Q;try{Q=yield this.httpInstance.request({method:"post",url:B,headers:f,data:{grant_type:oye,client_assertion_type:YJ,client_assertion:E.value,client_id:this.appId}})}catch(T){throw this.logger.error(T),new Da(((i=(o=T?.response)===null||o===void 0?void 0:o.data)===null||i===void 0?void 0:i.code)||0,((a=(e=T?.response)===null||e===void 0?void 0:e.data)===null||a===void 0?void 0:a.error_description)||((t=(A=T?.response)===null||A===void 0?void 0:A.data)===null||t===void 0?void 0:t.error)||"client assertion token exchange failed")}let y=Q?.access_token;if(!y)throw new Da(Q?.code||0,Q?.error_description||Q?.error||"oauth token response missing access token");let m=Number(Q?.expires_in)||0;return yield(s=this.cache)===null||s===void 0?void 0:s.set(ph,y,new Date().getTime()+Math.max(m-180,0)*1e3,{namespace:this.appId}),y})}getMarketTenantAccessToken(r){var o;return C(this,void 0,void 0,function*(){if(this.clientAssertionProvider)throw new Da(xJ,"ClientAssertion mode is not supported for ISV apps");if(!r){this.logger.error("market app request need tenant key");return}let i=yield(o=this.cache)===null||o===void 0?void 0:o.get(`larkMarketAccessToken${r}`,{namespace:this.appId});if(i)return this.logger.debug("use cache token"),i;this.logger.debug("get app ticket");let e=yield this.appTicketManager.getAppTicket();if(!e){this.logger.warn("no app ticket");return}this.logger.debug("get app access token");let{app_access_token:a}=yield this.requestToken(`${this.domain}/open-apis/auth/v3/app_access_token`,{app_id:this.appId,app_secret:this.appSecret,app_ticket:e},"app_access_token");this.logger.debug("get tenant access token");let{tenant_access_token:A,expire:t}=yield this.requestToken(`${this.domain}/open-apis/auth/v3/tenant_access_token`,{app_access_token:a,tenant_key:r},"tenant_access_token");return yield this.cache.set(`larkMarketAccessToken${r}`,A,new Date().getTime()+t*1e3-180*1e3,{namespace:this.appId}),A})}getTenantAccessToken(r){return C(this,void 0,void 0,function*(){return oQ(this.appType===En.SelfBuild,()=>C(this,void 0,void 0,function*(){this.logger.debug("get custom app token")})),oQ(this.appType===En.ISV,()=>C(this,void 0,void 0,function*(){this.logger.debug("get market app token ")})),this.appType===En.SelfBuild?yield this.getCustomTenantAccessToken():yield this.getMarketTenantAccessToken(r?.[aQ])})}},qJ=(n,r)=>{let o=Object.assign({},n);for(let[i,e]of Object.entries(r))e!==void 0&&(o[i]=e);return o},BT=class{constructor(r){this.client=r.client}getCacheKey(r,o){return`${o?.namespace||this.client.appId}/${rye.toString()}/${r}`}calibrateTime(r){return new Date().getTime()+(r||0)*1e3-180*1e3}initWithCode(r,o){return C(this,void 0,void 0,function*(){let i={};for(let[e,a]of Object.entries(r)){let A=yield this.client.authen.oidcAccessToken.create({data:{grant_type:"authorization_code",code:a}});if(A.code!==0){this.client.logger.error("init user access token error",e,A.msg||A.message);continue}if(!A.data){this.client.logger.error("user access code expired",e,a);continue}i[e]={code:a,token:A.data.access_token,refreshToken:A.data.refresh_token,expiredTime:this.calibrateTime(A.data.expires_in)}}return yield this.update(i,{namespace:o?.namespace}),i})}update(r,o){return C(this,void 0,void 0,function*(){for(let[i,e]of Object.entries(r)){let a=this.getCacheKey(i,{namespace:o?.namespace}),A=(yield this.client.cache.get(a))||{},{code:t,token:s,refreshToken:g,expiredTime:c}=e,I=qJ(A,{code:t,token:s,refreshToken:g,expiredTime:c});yield this.client.cache.set(a,I,1/0)}})}get(r,o){return C(this,void 0,void 0,function*(){let i=this.getCacheKey(r,{namespace:o?.namespace}),e=yield this.client.cache.get(i);if(!e){this.client.logger.error("user access token needs to be initialized or updated first");return}let{token:a,code:A,refreshToken:t,expiredTime:s}=e;if(a&&s&&s-new Date().getTime()>0)return a;if(t){let g=yield this.client.authen.oidcRefreshAccessToken.create({data:{grant_type:"refresh_token",refresh_token:t}});if(g.code===0&&g.data)return yield this.update({[r]:{token:g.data.access_token,refreshToken:g.data.refresh_token,expiredTime:this.calibrateTime(g.data.expires_in)}}),g.data.access_token;this.client.logger.error("get user access token by refresh token failed.",g.msg);return}if(A){let g=yield this.client.authen.oidcAccessToken.create({data:{grant_type:"authorization_code",code:A}});g.code===0&&g.data?yield this.update({[r]:{token:g.data.access_token,refreshToken:g.data.refresh_token,expiredTime:this.calibrateTime(g.data.expires_in)}}):this.client.logger.error("get user access token by code failed.",g.msg)}})}},jl=n=>n===""||n===0||n===null||n===void 0?void 0:n,Iye=n=>{if(!n||n.error)return!0;let{code:r}=n;return r!==void 0&&r!==0&&r!=="0"&&r!==""},fT=class{constructor(r){this.appId=r.appId,this.appSecret=r.appSecret,this.clientAssertionProvider=r.clientAssertionProvider,this.oauthBaseUrl=r.oauthBaseUrl,this.domain=r.domain,this.httpInstance=r.httpInstance,this.logger=r.logger}retrieveByAuthorizationCode(r){return C(this,void 0,void 0,function*(){return this.doRequest({grant_type:nye,code:r.code,redirect_uri:r.redirectUri,code_verifier:r.codeVerifier,scope:r.scope},r.headers)})}refresh(r){return C(this,void 0,void 0,function*(){return this.doRequest({grant_type:sye,refresh_token:r.refreshToken,scope:r.scope},r.headers)})}doRequest(r,o){return C(this,void 0,void 0,function*(){let i=jT({oauthBaseUrl:this.oauthBaseUrl,domain:this.domain}),e=JJ({oauthBaseUrl:this.oauthBaseUrl,domain:this.domain}),a={client_id:this.appId};for(let[I,E]of Object.entries(r))E!=null&&(a[I]=E);let A=`${i}${nQ}`,t=Object.assign({},o||{});if(this.clientAssertionProvider){let I;try{I=yield this.clientAssertionProvider.retrieveToken(e)}catch(E){throw new Da(jJ,E?.message||"client assertion provider failed")}if(!I||!I.value)throw new Da(HT,"client assertion token is empty");a.client_assertion_type=YJ,a.client_assertion=I.value,I.targetInfo&&(A=JT(I.targetInfo,nQ),t[UT]=e)}else if(this.appSecret)a.client_secret=this.appSecret;else throw new Da(KT,"appSecret and clientAssertionProvider cannot both be empty for accessToken APIs");let s=200,g;try{g=yield this.httpInstance.request({method:"post",url:A,headers:t,data:a})}catch(I){if(this.logger.error(I),I?.response)s=I.response.status,g=I.response.data;else throw new ql(0,0,"",I?.message||"oauth token request failed")}if(s!==200||Iye(g))throw new ql(s,g?.code||0,g?.error||"",g?.error_description||g?.msg||"");let c=jl(g?.access_token);if(!c)throw new ql(s,g?.code||0,g?.error||"",g?.error_description||"oauth token response missing access_token");return{accessToken:c,tokenType:jl(g.token_type),expiresIn:jl(g.expires_in),refreshToken:jl(g.refresh_token),refreshTokenExpiresIn:jl(g.refresh_token_expires_in),scope:jl(g.scope)}})}},sQ=class extends hT{constructor(r){if(super(),this.appId="",this.appSecret="",this.helpDeskId="",this.helpDeskToken="",this.appType=En.SelfBuild,this.logger=new cg(r.loggerLevel||mi.info,r.logger||Is),this.appId=r.appId,this.appSecret=r.appSecret||"",this.clientAssertionProvider=r.clientAssertionProvider,this.oauthBaseUrl=r.oauthBaseUrl,this.disableTokenCache=r.disableTokenCache,this.userAgent=LT(r.source,{extraTags:r.extraUaTags}),oQ(!this.appId,()=>this.logger.error("appId is needed")),this.helpDeskId=r.helpDeskId,this.helpDeskToken=r.helpDeskToken,this.appType=r?.appType||En.SelfBuild,!this.appSecret&&!this.clientAssertionProvider)throw new Da(KT,"appSecret or clientAssertionProvider is required");if(this.clientAssertionProvider&&this.appType===En.ISV)throw new Da(xJ,"ClientAssertion mode is not supported for ISV apps");this.domain=KJ(r.domain||Cn.Feishu),this.logger.debug(`use domain url: ${this.domain}`),this.cache=r.cache||fh,this.httpInstance=r.httpInstance||Vl,this.tokenManager=new uT({appId:this.appId,appSecret:this.appSecret,cache:this.cache,domain:this.domain,logger:this.logger,appType:this.appType,httpInstance:this.httpInstance,clientAssertionProvider:this.clientAssertionProvider,oauthBaseUrl:this.oauthBaseUrl}),this.userAccessToken=new BT({client:this}),this.accessToken=new fT({appId:this.appId,appSecret:this.appSecret,clientAssertionProvider:this.clientAssertionProvider,oauthBaseUrl:this.oauthBaseUrl,domain:this.domain,httpInstance:this.httpInstance,logger:this.logger}),this.logger.info("client ready")}formatPayload(r,o){var i,e,a;return C(this,void 0,void 0,function*(){let A=["lark","params","data","headers","path"].reduce((g,c)=>(g[c]=o?.[c]||{},g),{}),t=(i=A?.lark)===null||i===void 0?void 0:i[HJ];if(t)this.logger.debug("use passed token"),A.headers.Authorization=`Bearer ${t}`;else if(!this.disableTokenCache){let g=yield this.tokenManager.getTenantAccessToken({[aQ]:(e=A?.lark)===null||e===void 0?void 0:e[aQ]});g?A.headers.Authorization=`Bearer ${g}`:this.logger.warn("failed to obtain token")}if((a=A?.lark)===null||a===void 0?void 0:a[UJ]){this.logger.debug("generate help desk credential");let g=aye(`${this.helpDeskId}:${this.helpDeskToken}`);A.headers["X-Lark-Helpdesk-Authorization"]=`Bearer ${g}`}return{params:Object.assign(Object.assign({},r?.params||{}),A.params),headers:Object.assign(Object.assign({"User-Agent":this.userAgent},r?.headers||{}),A.headers),data:Object.assign(Object.assign({},r?.data||{}),A.data),path:Object.assign(Object.assign({},r?.path||{}),A.path)}})}request(r,o){var i;return C(this,void 0,void 0,function*(){let{data:e,params:a,headers:A,url:t}=r,s=F(r,["data","params","headers","url"]),g=yield this.formatPayload({data:e,params:a,headers:A},o),c=((i=r.method)===null||i===void 0?void 0:i.toLowerCase())==="get"&&Object.keys(g.data).length===0?void 0:g.data;return this.logger.trace(`send request [${r.method}]: ${r.url}`),yield this.httpInstance.request(Object.assign(Object.assign({},s),{url:/^http/.test(t)?t:`${this.domain}/${iye(t)}`,headers:g.headers,data:c,params:g.params})).catch(E=>{throw this.logger.error(E),E})})}},lye=n=>n.reduce((r,o)=>(0,FJ.default)(r,o),{}),pye=n=>({lark:{[aQ]:n}}),Eye=()=>({lark:{[UJ]:!0}}),Cye=n=>({headers:{Authorization:`Bearer ${n}`}}),hye=n=>({lark:{[HJ]:n}}),gQ=class{constructor(r){let{encryptKey:o,verificationToken:i,logger:e}=r;this.verificationToken=i,this.encryptKey=o,this.logger=e,o&&(this.aesCipher=new Bh(o))}parse(r){var o,i;let e=(()=>{var t;let s=r||{},{encrypt:g}=s,c=F(s,["encrypt"]);if(g)try{return Object.assign(Object.assign({},JSON.parse((t=this.aesCipher)===null||t===void 0?void 0:t.decrypt(g))),c)}catch{return this.logger.error("parse encrypt data failed"),{}}return c})();if("schema"in e){let{header:t,event:s}=e,g=F(e,["header","event"]);return Object.assign(Object.assign(Object.assign({[rQ]:(o=e?.header)===null||o===void 0?void 0:o.event_type},g),t),s)}let{event:a}=e,A=F(e,["event"]);return Object.assign(Object.assign({[rQ]:(i=e?.event)===null||i===void 0?void 0:i.type},a),A)}checkIsCardEventValidated(r){if("encrypt"in r||"schema"in r)return this.checkIsEventValidated(r);let{"x-lark-request-timestamp":o,"x-lark-request-nonce":i,"x-lark-signature":e}=r.headers;return this.verificationToken?tQ.createHash("sha1").update(o+i+this.verificationToken+JSON.stringify(r)).digest("hex")===e:!0}checkIsEventValidated(r){if(!this.encryptKey)return!0;let{"x-lark-request-timestamp":o,"x-lark-request-nonce":i,"x-lark-signature":e}=r.headers,a=o+i+this.encryptKey+JSON.stringify(r);return tQ.createHash("sha256").update(a).digest("hex")===e}},dye="app_ticket",cQ=class{constructor(r){this.verificationToken="",this.encryptKey="",this.handles=new Map;let{encryptKey:o,verificationToken:i}=r;this.encryptKey=o||"",this.verificationToken=i||"",this.logger=new cg(r.loggerLevel||mi.info,r.logger||Is),this.requestHandle=new gQ({encryptKey:o,verificationToken:i,logger:this.logger}),this.cache=r.cache||fh,this.registerAppTicketHandle(),this.logger.info("event-dispatch is ready")}registerAppTicketHandle(){this.register({app_ticket:r=>C(this,void 0,void 0,function*(){let{app_ticket:o,app_id:i}=r;o?(yield this.cache.set(uh,o,void 0,{namespace:i}),this.logger.debug("set app ticket")):this.logger.warn("response not include app ticket")})})}register(r){return Object.keys(r).forEach(o=>{this.handles.has(o)&&o!==dye&&this.logger.error(`this ${o} handle is registered`),this.handles.set(o,r[o]),this.logger.debug(`register ${o} handle`)}),this}invoke(r,o){var i,e;return C(this,void 0,void 0,function*(){if(o?.needCheck!==!1&&!(!((i=this.requestHandle)===null||i===void 0)&&i.checkIsEventValidated(r))){this.logger.warn("verification failed event");return}let A=(e=this.requestHandle)===null||e===void 0?void 0:e.parse(r),t=A[rQ];if(this.handles.has(t)){let s=yield this.handles.get(t)(A);return this.logger.debug(`execute ${t} handle`),s}return this.logger.warn(`no ${t} handle`),`no ${t} event handle`})}},QT=class{constructor(r,o){this.verificationToken="",this.encryptKey="",this.handles=new Map;let{verificationToken:i,encryptKey:e}=r;this.encryptKey=e||"",this.verificationToken=i||"",this.cardHandler=o,this.logger=new cg(r.loggerLevel||mi.info,r.logger||Is),this.requestHandle=new gQ({encryptKey:e,verificationToken:i,logger:this.logger}),this.cache=r.cache||fh,this.registerAppTicketHandle(),this.logger.info("card-action-handle is ready")}registerAppTicketHandle(){this.register({app_ticket:r=>C(this,void 0,void 0,function*(){let{app_ticket:o,app_id:i}=r;o?(yield this.cache.set(uh,o,void 0,{namespace:i}),this.logger.debug("set app ticket")):this.logger.warn("response not include app ticket")})})}register(r){return Object.keys(r).forEach(o=>{this.handles.set(o,r[o]),this.logger.debug(`register ${o} handle`)}),this}invoke(r){var o,i;return C(this,void 0,void 0,function*(){if(!(!((o=this.requestHandle)===null||o===void 0)&&o.checkIsCardEventValidated(r))){this.logger.warn("verification failed event");return}let e=(i=this.requestHandle)===null||i===void 0?void 0:i.parse(r),a=e[rQ];if(this.handles.has(a))try{return yield this.handles.get(a)(e)}catch(A){this.logger.error(A);return}try{let A=yield this.cardHandler(e);return this.logger.debug("execute card handle"),A}catch(A){this.logger.error(A)}})}},dQ=n=>new Promise(r=>{let o="";n.on("data",i=>{o+=i}),n.on("end",()=>{try{let i=JSON.parse(o);r(i)}catch{r("")}})}),Qh=(n,r)=>{if("encrypt"in n&&!r.encryptKey)throw new Error("auto-challenge need encryptKey, please check for missing in dispatcher");let o="encrypt"in n?JSON.parse(new Bh(r.encryptKey).decrypt(n.encrypt)):n;return{isChallenge:o.type==="url_verification",challenge:{challenge:o.challenge}}},uye=(n,r,o)=>(i,e)=>C(void 0,void 0,void 0,function*(){if(i.url!==n)return;let a=Object.assign(Object.create({headers:i.headers}),yield dQ(i));if(o?.autoChallenge||!1){let{isChallenge:s,challenge:g}=Qh(a,{encryptKey:r.encryptKey});if(s){e.end(JSON.stringify(g));return}}let t=yield r.invoke(a);e.end(JSON.stringify(t))}),Bye=(n,r)=>(o,i)=>C(void 0,void 0,void 0,function*(){let e=yield C(void 0,void 0,void 0,function*(){return o.body?o.body:o.complete?((r?.logger||Is).error("unable to obtain request body, if parsed it in other middleware, please manually set in ctx.request.body"),null):yield dQ(o)}),a=Object.assign(Object.create({headers:o.headers}),e);if(r?.autoChallenge||!1){let{isChallenge:s,challenge:g}=Qh(a,{encryptKey:n.encryptKey});if(s){i.json(g);return}}let t=yield n.invoke(a);i.json(t)}),fye=(n,r,o)=>(i,e)=>C(void 0,void 0,void 0,function*(){let{originalUrl:a,req:A,request:t}=i;if(a===n){let s=yield C(void 0,void 0,void 0,function*(){return t.body?t.body:A.complete?((o?.logger||Is).error("unable to obtain request body, if parsed it in other middleware, please manually set in ctx.request.body"),null):yield dQ(A)}),g=Object.assign(Object.create({headers:A.headers}),s);if(o?.autoChallenge||!1){let{isChallenge:E,challenge:B}=Qh(g,{encryptKey:r.encryptKey});if(E){i.body=B,yield e();return}}let I=yield r.invoke(g);i.body=JSON.stringify(I)}yield e()}),Qye=(n,r)=>(o,i)=>C(void 0,void 0,void 0,function*(){let{req:e,request:a}=o,A=yield C(void 0,void 0,void 0,function*(){return a.body?a.body:e.complete?((r?.logger||Is).error("unable to obtain request body, if parsed it in other middleware, please manually set in ctx.request.body"),null):yield dQ(e)}),t=Object.assign(Object.create({headers:e.headers}),A);if(r?.autoChallenge||!1){let{isChallenge:c,challenge:I}=Qh(t,{encryptKey:n.encryptKey});if(c){o.body=I,yield i();return}}let g=yield n.invoke(t);o.body=JSON.stringify(g),yield i()}),yye=n=>{let{title:r,content:o}=n;return JSON.stringify({config:{wide_screen_mode:!0},elements:[{tag:"markdown",content:o}],header:{template:"blue",title:{content:r,tag:"plain_text"}}})},mye=Object.freeze({__proto__:null,defaultCard:yye}),cs=Zf();cs.util.Long=void 0;cs.configure();var gg=cs.Reader,yJ=cs.Writer,FA=cs.util,Xi=cs.roots.default||(cs.roots.default={}),VJ=Xi.pbbp2=(()=>{let n={};return n.Header=(function(){function r(o){if(o)for(let i=Object.keys(o),e=0;e>>3){case 1:{A.key=i.string();break}case 2:{A.value=i.string();break}default:i.skipType(t&7);break}}if(!A.hasOwnProperty("key"))throw FA.ProtocolError("missing required 'key'",{instance:A});if(!A.hasOwnProperty("value"))throw FA.ProtocolError("missing required 'value'",{instance:A});return A},r.decodeDelimited=function(i){return i instanceof gg||(i=new gg(i)),this.decode(i,i.uint32())},r.verify=function(i){return typeof i!="object"||i===null?"object expected":FA.isString(i.key)?FA.isString(i.value)?null:"value: string expected":"key: string expected"},r.fromObject=function(i){if(i instanceof Xi.pbbp2.Header)return i;let e=new Xi.pbbp2.Header;return i.key!=null&&(e.key=String(i.key)),i.value!=null&&(e.value=String(i.value)),e},r.toObject=function(i,e){e||(e={});let a={};return e.defaults&&(a.key="",a.value=""),i.key!=null&&i.hasOwnProperty("key")&&(a.key=i.key),i.value!=null&&i.hasOwnProperty("value")&&(a.value=i.value),a},r.prototype.toJSON=function(){return this.constructor.toObject(this,cs.util.toJSONOptions)},r.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/pbbp2.Header"},r})(),n.Frame=(function(){function r(o){if(this.headers=[],o)for(let i=Object.keys(o),e=0;e>>3){case 1:{A.SeqID=i.uint64();break}case 2:{A.LogID=i.uint64();break}case 3:{A.service=i.int32();break}case 4:{A.method=i.int32();break}case 5:{A.headers&&A.headers.length||(A.headers=[]),A.headers.push(Xi.pbbp2.Header.decode(i,i.uint32()));break}case 6:{A.payloadEncoding=i.string();break}case 7:{A.payloadType=i.string();break}case 8:{A.payload=i.bytes();break}case 9:{A.LogIDNew=i.string();break}default:i.skipType(t&7);break}}if(!A.hasOwnProperty("SeqID"))throw FA.ProtocolError("missing required 'SeqID'",{instance:A});if(!A.hasOwnProperty("LogID"))throw FA.ProtocolError("missing required 'LogID'",{instance:A});if(!A.hasOwnProperty("service"))throw FA.ProtocolError("missing required 'service'",{instance:A});if(!A.hasOwnProperty("method"))throw FA.ProtocolError("missing required 'method'",{instance:A});return A},r.decodeDelimited=function(i){return i instanceof gg||(i=new gg(i)),this.decode(i,i.uint32())},r.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(!FA.isInteger(i.SeqID)&&!(i.SeqID&&FA.isInteger(i.SeqID.low)&&FA.isInteger(i.SeqID.high)))return"SeqID: integer|Long expected";if(!FA.isInteger(i.LogID)&&!(i.LogID&&FA.isInteger(i.LogID.low)&&FA.isInteger(i.LogID.high)))return"LogID: integer|Long expected";if(!FA.isInteger(i.service))return"service: integer expected";if(!FA.isInteger(i.method))return"method: integer expected";if(i.headers!=null&&i.hasOwnProperty("headers")){if(!Array.isArray(i.headers))return"headers: array expected";for(let e=0;e>>0,i.SeqID.high>>>0).toNumber(!0))),i.LogID!=null&&(FA.Long?(e.LogID=FA.Long.fromValue(i.LogID)).unsigned=!0:typeof i.LogID=="string"?e.LogID=parseInt(i.LogID,10):typeof i.LogID=="number"?e.LogID=i.LogID:typeof i.LogID=="object"&&(e.LogID=new FA.LongBits(i.LogID.low>>>0,i.LogID.high>>>0).toNumber(!0))),i.service!=null&&(e.service=i.service|0),i.method!=null&&(e.method=i.method|0),i.headers){if(!Array.isArray(i.headers))throw TypeError(".pbbp2.Frame.headers: array expected");e.headers=[];for(let a=0;a=0&&(e.payload=i.payload)),i.LogIDNew!=null&&(e.LogIDNew=String(i.LogIDNew)),e},r.toObject=function(i,e){e||(e={});let a={};if((e.arrays||e.defaults)&&(a.headers=[]),e.defaults){if(FA.Long){let A=new FA.Long(0,0,!0);a.SeqID=e.longs===String?A.toString():e.longs===Number?A.toNumber():A}else a.SeqID=e.longs===String?"0":0;if(FA.Long){let A=new FA.Long(0,0,!0);a.LogID=e.longs===String?A.toString():e.longs===Number?A.toNumber():A}else a.LogID=e.longs===String?"0":0;a.service=0,a.method=0,a.payloadEncoding="",a.payloadType="",e.bytes===String?a.payload="":(a.payload=[],e.bytes!==Array&&(a.payload=FA.newBuffer(a.payload))),a.LogIDNew=""}if(i.SeqID!=null&&i.hasOwnProperty("SeqID")&&(typeof i.SeqID=="number"?a.SeqID=e.longs===String?String(i.SeqID):i.SeqID:a.SeqID=e.longs===String?FA.Long.prototype.toString.call(i.SeqID):e.longs===Number?new FA.LongBits(i.SeqID.low>>>0,i.SeqID.high>>>0).toNumber(!0):i.SeqID),i.LogID!=null&&i.hasOwnProperty("LogID")&&(typeof i.LogID=="number"?a.LogID=e.longs===String?String(i.LogID):i.LogID:a.LogID=e.longs===String?FA.Long.prototype.toString.call(i.LogID):e.longs===Number?new FA.LongBits(i.LogID.low>>>0,i.LogID.high>>>0).toNumber(!0):i.LogID),i.service!=null&&i.hasOwnProperty("service")&&(a.service=i.service),i.method!=null&&i.hasOwnProperty("method")&&(a.method=i.method),i.headers&&i.headers.length){a.headers=[];for(let A=0;AVJ.Frame.decode(n),yT=class{constructor(){this.client={appId:"",appSecret:"",domain:Cn.Feishu},this.ws={connectUrl:"",pingInterval:120*1e3,reconnectCount:-1,reconnectInterval:120*1e3,reconnectNonce:30*1e3,deviceId:"",serviceId:"",autoReconnect:!0},this.wsInstance=null}updateClient(r){Object.assign(this.client,r)}updateWs(r){Object.assign(this.ws,r)}getClient(r){return r===void 0?this.client:this.client[r]}getWS(r){return r===void 0?this.ws:this.ws[r]}get wsConfigUrl(){return`${this.getClient("domain")}/callback/ws/endpoint`}setWSInstance(r){this.wsInstance=r}getWSInstance(){return this.wsInstance}},mT=class{constructor(r){this.cache=new Map,this.logger=r.logger,this.clearAtInterval()}mergeData(r){let{message_id:o,sum:i,seq:e,trace_id:a,data:A}=r,t=this.cache.get(o);if(t)t.buffer[e]=A;else{let g=new Array(i).fill(void 0);g[e]=A,this.cache.set(o,{buffer:g,trace_id:a,message_id:o,create_time:Date.now()})}let s=this.cache.get(o);if(s?.buffer.every(g=>!!g)){let g=s.buffer.reduce((E,B)=>{let f=new Uint8Array(E.byteLength+B.byteLength);return f.set(E,0),f.set(B,E.length),f},new Uint8Array([])),c=new TextDecoder("utf-8").decode(g),I=JSON.parse(c);return this.deleteCache(o),I}return null}deleteCache(r){this.cache.delete(r)}clearAtInterval(){if(this.timer)return;let r=1e4;this.timer=setInterval(()=>{let o=Date.now();this.cache.forEach((i,e)=>{var a;let{create_time:A,trace_id:t,message_id:s}=i;o-A>r&&((a=this.logger)===null||a===void 0||a.debug(`${s} event data is deleted as expired, trace_id: ${t}`),this.deleteCache(e))})},r),typeof this.timer.unref=="function"&&this.timer.unref()}destroy(){this.timer&&(clearInterval(this.timer),this.timer=void 0),this.cache.clear()}},Ch;(function(n){n[n.ok=0]="ok",n[n.system_busy=1]="system_busy",n[n.forbidden=403]="forbidden",n[n.auth_failed=514]="auth_failed",n[n.internal_error=1000040343]="internal_error",n[n.exceed_conn_limit=1000040350]="exceed_conn_limit"})(Ch||(Ch={}));var hh;(function(n){n[n.control=0]="control",n[n.data=1]="data"})(hh||(hh={}));var dh;(function(n){n.type="type",n.message_id="message_id",n.sum="sum",n.seq="seq",n.trace_id="trace_id",n.biz_rt="biz_rt",n.handshake_status="handshake-status",n.handshake_msg="handshake-msg",n.handshake_autherrcode="handshake-autherrcode"})(dh||(dh={}));var Jl;(function(n){n.event="event",n.card="card",n.ping="ping",n.pong="pong"})(Jl||(Jl={}));var IQ;(function(n){n[n.ok=200]="ok",n[n.internal_server_error=500]="internal_server_error"})(IQ||(IQ={}));var lQ=class{constructor(r){var o;this.wsConfig=new yT,this.reconnectGeneration=0,this.isConnecting=!1,this.reconnectInfo={lastConnectTime:0,nextConnectTime:0},this.hasEverConnected=!1,this.terminalError=!1,this.currentReconnectAttempts=0;let{appId:i,appSecret:e,clientAssertionProvider:a,agent:A,domain:t=Cn.Feishu,httpInstance:s=Vl,loggerLevel:g=mi.info,logger:c=Is,autoReconnect:I=!0,source:E,extraUaTags:B,onReady:f,onError:Q,onReconnecting:y,onReconnected:m,handshakeTimeoutMs:T,wsConfig:_}=r;if(this.userAgent=LT(E,{extraTags:B}),this.logger=new cg(g,c),oQ(!i,()=>this.logger.error("appId is needed")),!e&&!a)throw new Da(KT,"appSecret or clientAssertionProvider is required");this.agent=A,this.dataCache=new mT({logger:this.logger}),this.httpInstance=s,this.wsConfig.updateClient({appId:i,appSecret:e||"",clientAssertionProvider:a,domain:KJ(t)}),this.wsConfig.updateWs({autoReconnect:I}),this.onReady=f,this.onError=Q,this.onReconnecting=y,this.onReconnected=m,this.handshakeTimeoutMs=T,this.pingTimeoutSec=(o=_?.pingTimeout)!==null&&o!==void 0?o:0}armLiveness(){this.pingTimeoutSec&&(this.livenessTimer&&clearTimeout(this.livenessTimer),this.livenessTimer=setTimeout(()=>{var r;this.livenessTimer=void 0,this.logger.warn("[ws]",`no pong/inbound within ${this.pingTimeoutSec}s of last ping, terminating to trigger reconnect`);try{(r=this.wsConfig.getWSInstance())===null||r===void 0||r.terminate()}catch{}},this.pingTimeoutSec*1e3))}clearLiveness(){this.livenessTimer&&(clearTimeout(this.livenessTimer),this.livenessTimer=void 0)}safeInvoke(r,o,...i){if(o)try{o(...i)}catch(e){this.logger.error(`[ws] ${r} callback threw`,e)}}pullConnectConfig(){return C(this,void 0,void 0,function*(){let{appId:r,appSecret:o,clientAssertionProvider:i,domain:e}=this.wsConfig.getClient(),a="/callback/ws/endpoint",A=this.wsConfig.wsConfigUrl,t={locale:"zh","User-Agent":this.userAgent},s={AppID:r};try{if(i){let Q=xT(e),y=yield i.retrieveToken(Q);if(!y||!y.value)throw new Da(HT,"client assertion token is empty");s.AppSecret="",s.ClientAssertion=y.value,y.targetInfo&&(A=JT(y.targetInfo,a),t[UT]=Q)}else s.AppSecret=o;let{code:g,data:{URL:c,ClientConfig:I},msg:E}=yield this.httpInstance.request({method:"post",url:A,data:s,headers:t,timeout:15e3});if(g!==Ch.ok){let Q=g===Ch.system_busy?"system busy":E;return this.logger.error("[ws]",`code: ${g}, ${Q}`),g===Ch.internal_error?{ok:!1,retryable:!0}:{ok:!1,retryable:!1,error:`pullConnectConfig failed: code=${g}, msg=${Q}`}}let{device_id:B,service_id:f}=WQe.parse(c);return this.wsConfig.updateWs({connectUrl:c,deviceId:B,serviceId:f,pingInterval:I.PingInterval*1e3,reconnectCount:I.ReconnectCount,reconnectInterval:I.ReconnectInterval*1e3,reconnectNonce:I.ReconnectNonce*1e3}),this.logger.debug("[ws]",`get connect config success, ws url: ${c}`),{ok:!0}}catch(g){return this.logger.error("[ws]",g?.message||"system busy"),g instanceof Da?{ok:!1,retryable:!1,error:g.message}:{ok:!1,retryable:!0}}})}connect(){let r=this.wsConfig.getWS("connectUrl"),o;try{let{agent:i}=this;o=new Ro(r,{agent:i})}catch{this.logger.error("[ws]","new WebSocket error")}return o?new Promise(i=>{let e=!1,a,A=t=>{e||(e=!0,a&&clearTimeout(a),i(t))};this.handshakeTimeoutMs&&this.handshakeTimeoutMs>0&&(a=setTimeout(()=>{this.logger.error("[ws]",`handshake timeout after ${this.handshakeTimeoutMs}ms`),o.removeAllListeners();try{o.terminate()}catch{}A(!1)},this.handshakeTimeoutMs)),o.on("open",()=>{this.logger.debug("[ws]","ws connect success"),this.wsConfig.setWSInstance(o),this.pingLoop(),A(!0)}),o.on("error",()=>{this.logger.error("[ws]","ws connect failed"),A(!1)})}):Promise.resolve(!1)}reConnect(r=!1){return C(this,void 0,void 0,function*(){if(this.isConnecting&&!r){this.logger.debug("[ws]","repeat connection");return}this.isConnecting=!0;let o=++this.reconnectGeneration,i=()=>C(this,void 0,void 0,function*(){this.reconnectInfo.lastConnectTime=Date.now();let c=yield this.pullConnectConfig();return c.ok?(yield this.connect())?(this.communicate(),{ok:!0}):{ok:!1,retryable:!0}:c});this.pingInterval&&clearTimeout(this.pingInterval),this.reconnectInterval&&clearTimeout(this.reconnectInterval);let e=this.wsConfig.getWSInstance();if(r){e&&e?.terminate();let c={ok:!1,retryable:!0};try{c=yield i()}finally{this.isConnecting=!1}if(c.ok)this.hasEverConnected=!0,this.safeInvoke("onReady",this.onReady);else if(c.retryable)this.logger.error("[ws]","connect failed"),yield this.reConnect();else{this.hasEverConnected=!1,this.terminalError=!0,this.safeInvoke("onError",this.onError,new Error(c.error));return}this.logger.info("[ws]","ws client ready");return}let{autoReconnect:a,reconnectNonce:A,reconnectCount:t,reconnectInterval:s}=this.wsConfig.getWS();if(!a){this.hasEverConnected||(this.terminalError=!0,this.safeInvoke("onError",this.onError,new Error("WebSocket connect failed and autoReconnect is disabled")));return}this.logger.info("[ws]","reconnect"),this.hasEverConnected&&this.safeInvoke("onReconnecting",this.onReconnecting),e&&e?.terminate(),this.wsConfig.setWSInstance(null);let g=A?A*Math.random():0;this.reconnectInterval=setTimeout(()=>C(this,void 0,void 0,function*(){(function c(I){return C(this,void 0,void 0,function*(){if(o!==this.reconnectGeneration)return;I++,this.currentReconnectAttempts=I;let E=yield i();if(o===this.reconnectGeneration){if(E.ok){this.logger.debug("[ws]","reconnect success"),this.currentReconnectAttempts=0,this.hasEverConnected?this.safeInvoke("onReconnected",this.onReconnected):(this.hasEverConnected=!0,this.safeInvoke("onReady",this.onReady)),this.isConnecting=!1;return}if(!E.retryable){this.isConnecting=!1,this.hasEverConnected=!1,this.terminalError=!0,this.safeInvoke("onError",this.onError,new Error(E.error));return}if(this.logger.info("ws",`unable to connect to the server after trying ${I} times")`),t>=0&&I>=t){this.isConnecting=!1,this.terminalError=!0,this.safeInvoke("onError",this.onError,new Error(`WebSocket reconnect exhausted after ${I} attempts`));return}this.reconnectInterval=setTimeout(()=>{c.bind(this)(I)},s),this.reconnectInfo.nextConnectTime=Date.now()+s}})}).bind(this)(0)}),g),this.reconnectInfo.nextConnectTime=Date.now()+g})}pingLoop(){let{serviceId:r,pingInterval:o}=this.wsConfig.getWS(),i=this.wsConfig.getWSInstance();if(i?.readyState===Ro.OPEN){let e={headers:[{key:dh.type,value:Jl.ping}],service:Number(r),method:hh.control,SeqID:0,LogID:0};this.sendMessage(e),this.armLiveness(),this.logger.trace("[ws]","ping success")}this.pingInterval=setTimeout(this.pingLoop.bind(this),o)}communicate(){let r=this.wsConfig.getWSInstance();r?.on("message",o=>C(this,void 0,void 0,function*(){this.clearLiveness();let i=Sye(o),{method:e}=i;e===hh.control&&(yield this.handleControlData(i)),e===hh.data&&(yield this.handleEventData(i))})),r?.on("error",o=>{this.logger.error("[ws]","ws error")}),r?.on("close",()=>{this.logger.debug("[ws]","client closed"),this.clearLiveness(),this.reConnect()})}handleControlData(r){var o;return C(this,void 0,void 0,function*(){let i=(o=r.headers.find(a=>a.key===dh.type))===null||o===void 0?void 0:o.value,e=r.payload;if(i!==Jl.ping&&i===Jl.pong&&e){this.logger.trace("[ws]","receive pong");let a=new TextDecoder("utf-8").decode(e),{PingInterval:A,ReconnectCount:t,ReconnectInterval:s,ReconnectNonce:g}=JSON.parse(a);this.wsConfig.updateWs({pingInterval:A*1e3,reconnectCount:t,reconnectInterval:s*1e3,reconnectNonce:g*1e3}),this.logger.trace("[ws]","update wsConfig with pong data")}})}handleEventData(r){var o;return C(this,void 0,void 0,function*(){let i=r.headers.reduce((f,Q)=>(f[Q.key]=Q.value,f),{}),{message_id:e,sum:a,seq:A,type:t,trace_id:s}=i,g=r.payload;if(t!==Jl.event)return;let c=this.dataCache.mergeData({message_id:e,sum:Number(a),seq:Number(A),trace_id:s,data:g});if(!c)return;this.logger.debug("[ws]",`receive message, message_type: ${t}; message_id: ${e}; trace_id: ${s}; data: ${c.data}`);let I={code:IQ.ok},E=Date.now();try{let f=yield(o=this.eventDispatcher)===null||o===void 0?void 0:o.invoke(c,{needCheck:!1});f&&(I.data=Buffer.from(JSON.stringify(f)).toString("base64"))}catch(f){I.code=IQ.internal_server_error,this.logger.error("[ws]",`invoke event failed, message_type: ${t}; message_id: ${e}; trace_id: ${s}; error: ${f}`)}let B=Date.now();this.sendMessage(Object.assign(Object.assign({},r),{headers:[...r.headers,{key:dh.biz_rt,value:String(E-B)}],payload:new TextEncoder().encode(JSON.stringify(I))}))})}sendMessage(r){var o;let i=this.wsConfig.getWSInstance();if(i?.readyState===Ro.OPEN){let e=VJ.Frame.encode(r).finish();(o=this.wsConfig.getWSInstance())===null||o===void 0||o.send(e,a=>{a&&this.logger.error("[ws]","send data failed")})}}getReconnectInfo(){return this.reconnectInfo}getConnectionStatus(){return{state:this.computeState(),lastConnectTime:this.reconnectInfo.lastConnectTime||void 0,nextConnectTime:this.reconnectInfo.nextConnectTime||void 0,reconnectAttempts:this.currentReconnectAttempts}}computeState(){var r;return this.terminalError?"failed":this.isConnecting&&!this.hasEverConnected?"connecting":this.isConnecting&&this.hasEverConnected?"reconnecting":((r=this.wsConfig.getWSInstance())===null||r===void 0?void 0:r.readyState)===Ro.OPEN?"connected":"idle"}close(r={}){let{force:o=!1}=r;this.reconnectGeneration++,this.pingInterval&&(clearTimeout(this.pingInterval),this.pingInterval=void 0),this.reconnectInterval&&(clearTimeout(this.reconnectInterval),this.reconnectInterval=void 0),this.clearLiveness(),this.dataCache.destroy(),this.isConnecting=!1,this.currentReconnectAttempts=0;let i=this.wsConfig.getWSInstance();i&&(i.removeAllListeners(),o?i.terminate():i.close(),this.wsConfig.setWSInstance(null)),this.logger.info("[ws]",`ws client closed manually${o?" (force)":""}`)}start(r){return C(this,void 0,void 0,function*(){let{appId:o}=this.wsConfig.getClient();if(!/^cli_[0-9a-fA-F]{16}$/.test(o)){this.logger.error("[ws]",`invalid appId: ${o}`);return}let{eventDispatcher:i}=r;if(!i){this.logger.warn("[ws]","client need to start with a eventDispatcher");return}this.terminalError=!1,this.currentReconnectAttempts=0,this.dataCache.clearAtInterval(),this.logger.info("[ws]",`receive events or callbacks through persistent connection only available in self-build & Feishu app, Configured in: +`+a)}}catch{}}throw i}}_request(r,o){typeof r=="string"?(o=o||{},o.url=r):o=r||{},o=No(this.defaults,o);let{transitional:i,paramsSerializer:e,headers:a}=o;i!==void 0&&RC.assertOptions(i,{silentJSONParsing:Sa.transitional(Sa.boolean),forcedJSONParsing:Sa.transitional(Sa.boolean),clarifyTimeoutError:Sa.transitional(Sa.boolean),legacyInterceptorReqResOrdering:Sa.transitional(Sa.boolean),advertiseZstdAcceptEncoding:Sa.transitional(Sa.boolean),validateStatusUndefinedResolves:Sa.transitional(Sa.boolean)},!1),e!=null&&(J.isFunction(e)?o.paramsSerializer={serialize:e}:RC.assertOptions(e,{encode:Sa.function,serialize:Sa.function},!0)),o.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?o.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:o.allowAbsoluteUrls=!0),RC.assertOptions(o,{baseUrl:Sa.spelling("baseURL"),withXsrfToken:Sa.spelling("withXSRFToken")},!0),o.method=(o.method||this.defaults.method||"get").toLowerCase();let A=a&&J.merge(a.common,a[o.method]);a&&J.forEach(["delete","get","head","post","put","patch","query","common"],f=>{delete a[f]}),o.headers=Mt.concat(A,a);let t=[],s=!0;this.interceptors.request.forEach(function(Q){if(typeof Q.runWhen=="function"&&Q.runWhen(o)===!1)return;s=s&&Q.synchronous;let y=o.transitional||Xs;y&&y.legacyInterceptorReqResOrdering?t.unshift(Q.fulfilled,Q.rejected):t.push(Q.fulfilled,Q.rejected)});let g=[];this.interceptors.response.forEach(function(Q){g.push(Q.fulfilled,Q.rejected)});let c,I=0,E;if(!s){let f=[TC.bind(this),void 0];for(f.unshift(...t),f.push(...g),E=f.length,c=Promise.resolve(o);ITC.call(this,B)))}catch(m){c=Promise.reject(m)}break}}if(!c)try{c=TC.call(this,B)}catch(f){c=Promise.reject(f)}for(I=0,E=g.length;I{if(!i._listeners)return;let a=i._listeners.length;for(;a-- >0;)i._listeners[a](e);i._listeners=null}),this.promise.then=e=>{let a,A=new Promise(t=>{i.subscribe(t),a=t}).then(e);return A.cancel=function(){i.unsubscribe(a)},A},r(function(a,A,t){i.reason||(i.reason=new Bi(a,A,t),o(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]}unsubscribe(r){if(!this._listeners)return;let o=this._listeners.indexOf(r);o!==-1&&this._listeners.splice(o,1)}toAbortSignal(){let r=new AbortController,o=i=>{r.abort(i)};return this.subscribe(o),r.signal.unsubscribe=()=>this.unsubscribe(o),r.signal}static source(){let r;return{token:new n(function(e){r=e}),cancel:r}}},nx=wM;function OM(n){return function(o){return n.apply(null,o)}}function bM(n){return J.isObject(n)&&n.isAxiosError===!0}var MM={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(MM).forEach(([n,r])=>{MM[r]=n});var sx=MM;function gx(n){let r=new kC(n),o=sC(kC.prototype.request,r);return J.extend(o,kC.prototype,r,{allOwnKeys:!0}),J.extend(o,r,null,{allOwnKeys:!0}),o.create=function(e){return gx(No(n,e))},o}var Cr=gx(dl);Cr.Axios=kC;Cr.CanceledError=Bi;Cr.CancelToken=nx;Cr.isCancel=fC;Cr.VERSION=Xn;Cr.toFormData=Zs;Cr.AxiosError=Se;Cr.Cancel=Cr.CanceledError;Cr.all=function(r){return Promise.all(r)};Cr.spread=OM;Cr.isAxiosError=bM;Cr.mergeConfig=No;Cr.AxiosHeaders=Mt;Cr.formToJSON=n=>HB(J.isHTMLForm(n)?new FormData(n):n);Cr.getAdapter=ZB.getAdapter;Cr.HttpStatusCode=sx;Cr.default=Cr;var $B=Cr;var{Axios:v6e,AxiosError:_M,CanceledError:P6e,isCancel:G6e,CancelToken:F6e,VERSION:L6e,all:U6e,Cancel:H6e,isAxiosError:K6e,spread:Y6e,toFormData:x6e,AxiosHeaders:j6e,HttpStatusCode:J6e,formToJSON:q6e,getAdapter:V6e,mergeConfig:z6e,create:W6e}=$B;var h=Je(t1()),O=Je(a1()),b=Je(H1()),FJ=Je(h3());import ZA from"fs";import Eh from"path";import tQ from"crypto";import $Qe from"querystring";var GQe=Je(Ij(),1),FQe=Je(Hf(),1),LQe=Je(Fl(),1),UQe=Je(G_(),1),HQe=Je(U_(),1),KQe=Je(J_(),1),fj=Je(jf(),1),YQe=Je(Bj(),1);var Ro=fj.default;import{gzipSync as eye}from"zlib";import Aye from"http";import tye from"https";import{promises as rye}from"dns";import{isIP as LJ}from"net";function F(n,r){var o={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&r.indexOf(i)<0&&(o[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var e=0,i=Object.getOwnPropertySymbols(n);e=n.length&&(n=void 0),{value:n&&n[i++],done:!n}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function S(n){return this instanceof S?(this.v=n,this):new S(n)}function L(n,r,o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=o.apply(n,r||[]),e,a=[];return e={},A("next"),A("throw"),A("return"),e[Symbol.asyncIterator]=function(){return this},e;function A(E){i[E]&&(e[E]=function(B){return new Promise(function(f,Q){a.push([E,B,f,Q])>1||t(E,B)})})}function t(E,B){try{s(i[E](B))}catch(f){I(a[0][3],f)}}function s(E){E.value instanceof S?Promise.resolve(E.value.v).then(g,c):I(a[0][2],E)}function g(E){t("next",E)}function c(E){t("throw",E)}function I(E,B){E(B),a.shift(),a.length&&t(a[0][0],a[0][1])}}function BJ(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n[Symbol.asyncIterator],o;return r?r.call(n):(n=typeof uJ=="function"?uJ(n):n[Symbol.iterator](),o={},i("next"),i("throw"),i("return"),o[Symbol.asyncIterator]=function(){return this},o);function i(a){o[a]=n[a]&&function(A){return new Promise(function(t,s){A=n[a](A),e(t,s,A.done,A.value)})}}function e(a,A,t,s){Promise.resolve(s).then(function(g){a({value:g,done:t})},A)}}var Xf;function aye(){if(Xf!==void 0)return Xf;let n=[Eh.resolve(__dirname,"..","package.json"),Eh.resolve(__dirname,"..","..","package.json")];for(let r of n)try{let o=JSON.parse(ZA.readFileSync(r,"utf-8"));if(o.name==="@larksuiteoapi/node-sdk"&&typeof o.version=="string")return Xf=o.version,o.version}catch{}return Xf="unknown","unknown"}function fJ(n){return n.replace(/[^a-zA-Z0-9._-]/g,"_").slice(0,64)}function LT(n,r){let o=`oapi-node-sdk/${aye()}`;if(n){let i=fJ(n);i&&(o+=` source/${i}`)}if(r?.extraTags)for(let i of r.extraTags){let e=fJ(i);e&&(o+=` ${e}`)}return o}var Vl=$B.create(),iye=LT();Vl.interceptors.request.use(n=>(n.headers&&!n.headers["User-Agent"]&&(n.headers["User-Agent"]=iye),n),void 0,{synchronous:!0});Vl.interceptors.response.use(n=>n.config.$return_headers?{data:n.data,headers:n.headers}:n.data);var En;(function(n){n[n.SelfBuild=0]="SelfBuild",n[n.ISV=1]="ISV"})(En||(En={}));var Cn;(function(n){n[n.Feishu=0]="Feishu",n[n.Lark=1]="Lark"})(Cn||(Cn={}));var mi;(function(n){n[n.fatal=0]="fatal",n[n.error=1]="error",n[n.warn=2]="warn",n[n.info=3]="info",n[n.debug=4]="debug",n[n.trace=5]="trace"})(mi||(mi={}));var rQ=Symbol("event-type"),aQ=Symbol("tenant-key"),uh=Symbol("app-ticket"),ph=Symbol("tenant-access-token"),UJ=Symbol("with-helpdesk-authorization"),HJ=Symbol("with-user-access-token"),oye=Symbol("user-access-token"),QJ=Symbol("aily-session-record"),nye=n=>Buffer.from(n).toString("base64"),iQ=class{constructor(){this.values=new Map}getCacheKey(r,o){return o?`${o}/${r.toString()}`:r}get(r,o){return C(this,void 0,void 0,function*(){let i=this.getCacheKey(r,o?.namespace),e=this.values.get(i);if(e){let{value:a,expiredTime:A}=e;if(!A||A-new Date().getTime()>0)return a}})}set(r,o,i,e){return C(this,void 0,void 0,function*(){let a=this.getCacheKey(r,e?.namespace);return this.values.set(a,{value:o,expiredTime:i}),!0})}},fh=new iQ,Bh=class{constructor(r){let o=tQ.createHash("sha256");o.update(r),this.key=o.digest()}decrypt(r){let o=Buffer.from(r,"base64"),i=tQ.createDecipheriv("aes-256-cbc",this.key,o.slice(0,16)),e=i.update(o.slice(16).toString("hex"),"hex","utf8");return e+=i.final("utf8"),e}},KJ=n=>{switch(n){case Cn.Feishu:return"https://open.feishu.cn";case Cn.Lark:return"https://open.larksuite.com";default:return n}},d=(n,r={})=>n.replace(/:([^/]+)/g,(o,i)=>{if(r[i]!==void 0)return r[i];throw new Error(`request miss ${i} path argument`)}),oQ=(n,r)=>C(void 0,void 0,void 0,function*(){(typeof n=="function"?n():n)&&(yield r())}),sye=n=>n?n.replace(/^\//,""):"",$f=(n,r=[])=>{let o={};return n&&r.forEach(i=>{Object.prototype.hasOwnProperty.call(n,i)&&(o[i]=n[i])}),o},u=n=>{var r;if(n instanceof _M){let{message:o,response:i,request:e,config:a}=$f(n,["message","response","request","config"]),t=[{message:o,config:$f(a,["data","url","params","method"]),request:$f(e,["protocol","host","path","method"]),response:$f(i,["data","status","statusText"])}],s=(r=n?.response)===null||r===void 0?void 0:r.data;return s&&(typeof s=="object"?t.push(Object.assign(Object.assign({},s),s.error?s.error:{})):t.push(s)),t}return[n]},cN=class{constructor(){this.acs={accessRecord:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/access_records`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/access_records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},device:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/devices`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},accessRecordAccessPhoto:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/access_records/:access_record_id/access_photo`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}})},user:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/users/:user_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/users/:user_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/users`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/users`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userFace:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/users/:user_id/face`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/users/:user_id/face`,A),method:"PUT",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},ruleExternal:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),deviceBind:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/rule_external/device_bind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},visitor:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/visitors/:visitor_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/visitors`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{accessRecord:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/access_records`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/access_records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},device:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/devices`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},accessRecordAccessPhoto:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/access_records/:access_record_id/access_photo`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}})},user:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/users/:user_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/users/:user_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/users`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/users`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userFace:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/users/:user_id/face`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/users/:user_id/face`,A),method:"PUT",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},ruleExternal:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),deviceBind:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/rule_external/device_bind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},visitor:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/visitors/:visitor_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/acs/v1/visitors`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},IN=class extends cN{constructor(){super(...arguments),this.admin={badgeGrant:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},badge:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges/:badge_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges/:badge_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},password:{reset:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/password/reset`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},badgeImage:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badge_images`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},auditInfo:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/audit_infos`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/audit_infos`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},adminUserStat:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/admin_user_stats`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},adminDeptStat:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/admin_dept_stats`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{badgeGrant:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},badge:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges/:badge_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges/:badge_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badges`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},password:{reset:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/password/reset`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},badgeImage:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/badge_images`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},auditInfo:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/audit_infos`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/audit_infos`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},adminUserStat:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/admin_user_stats`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},adminDeptStat:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/admin/v1/admin_dept_stats`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},lN=class extends IN{constructor(){super(...arguments),this.aily_rag={}}},pN=class extends lN{constructor(){super(...arguments),this.aily={v1:{ailySession:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/sessions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appDataAssetTag:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_asset_tags`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_asset_tags`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appSkill:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),start:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills/:skill_id/start`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills/:skill_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appKnowledge:{ask:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/apps/:app_id/knowledges/ask`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appDataAsset:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets/:data_asset_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets/:data_asset_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),uploadFile:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets/upload_file`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},ailySessionRun:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs/:run_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),cancel:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs/:run_id/cancel`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ailySessionAilyMessage:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/messages`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/messages/:aily_message_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/messages`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},agentAgentVisibility:{check:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/agents/:agent_id/agent_visibility/check`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},agentAgentAttachment:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/agents/:agent_id/attachments`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},tenantAppStat:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/app_stats`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/app_stats`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},agentAgentChat:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/agents/:agent_id/chats/:agent_chat_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/agents/:agent_id/chats`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},agentAgentChatSession:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/agents/:agent_id/sessions/:agent_chat_session_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/agents/:agent_id/sessions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/agents/:agent_id/sessions/:agent_chat_session_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/agents/:agent_id/sessions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},agentAgentArtifact:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/aily/v1/agents/:agent_id/artifacts/:agent_artifact_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},EN=class extends pN{constructor(){super(...arguments),this.apaas={v1:{approvalTask:{addAssignee:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/approval_tasks/:approval_task_id/add_assignee`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),agree:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/approval_tasks/:approval_task_id/agree`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),transfer:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/approval_tasks/:approval_task_id/transfer`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),reject:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/approval_tasks/:approval_task_id/reject`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationObjectRecord:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/:id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/:id/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/:id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationObject:{oqlQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/oql_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationFunction:{invoke:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/functions/:function_api_name/invoke`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationRoleMember:{batchRemoveAuthorization:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/roles/:role_api_name/member/batch_remove_authorization`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/roles/:role_api_name/member`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreateAuthorization:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/roles/:role_api_name/member/batch_create_authorization`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationRecordPermissionMember:{batchCreateAuthorization:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/record_permissions/:record_permission_api_name/member/batch_create_authorization`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchRemoveAuthorization:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/record_permissions/:record_permission_api_name/member/batch_remove_authorization`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationEnvironmentVariable:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/environment_variables/:environment_variable_api_name`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/environment_variables/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userTask:{expediting:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/expediting`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),cc:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/cc`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),chatGroup:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/chat_group`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),rollback:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/rollback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),rollbackPoints:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/rollback_points`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/user_task/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationFlow:{execute:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/flows/:flow_id/execute`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},approvalInstance:{cancel:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/approval_instances/:approval_instance_id/cancel`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationAuditLog:{auditLogList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/audit_log/audit_log_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/audit_log`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),dataChangeLogsList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/audit_log/data_change_logs_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),dataChangeLogDetail:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/applications/:namespace/audit_log/data_change_log_detail`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},seatAssignment:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/seat_assignments`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/seat_assignments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},seatActivity:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/seat_activities`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/seat_activities`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},app:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/apps`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/apps`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},workspaceTable:{recordsBatchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records_batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),recordsDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),recordsPatch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),recordsGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),recordsPost:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),tableGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},workspace:{sqlCommands:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/sql_commands`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},workspaceView:{viewsGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/views/:view_name/records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},workspaceEnum:{enumGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/enums/:enum_name`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/enums`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},tenantAppMetrics:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/apaas/v1/tenant_app_metrics/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},CN=class extends EN{constructor(){super(...arguments),this.application={applicationAppUsage:{overview:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/overview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),messagePushOverview:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/message_push_overview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),departmentOverview:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/department_overview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationFeedback:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks/:feedback_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appRecommendRule:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/app_recommend_rules`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/app_recommend_rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},application:{contactsRangeConfiguration:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range_configuration`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),underauditlistWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/underauditlist`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),underauditlist:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/underauditlist`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationAppVersion:{contactsRangeSuggest:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id/contacts_range_suggest`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationVisibility:{checkWhiteBlackList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility/check_white_black_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationContactsRange:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationCollaborators:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationOwner:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/owner`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationManagement:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/management`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},scope:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/scopes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),apply:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/scopes/apply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appBadge:{set:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/app_badge/set`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v5:{application:{favouriteWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v5/applications/favourite`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),favourite:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v5/applications/favourite`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),recommendWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v5/applications/recommend`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),recommend:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v5/applications/recommend`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}},v6:{applicationAppUsage:{overview:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/overview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),messagePushOverview:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/message_push_overview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),departmentOverview:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/department_overview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationFeedback:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks/:feedback_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appRecommendRule:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/app_recommend_rules`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/app_recommend_rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},application:{contactsRangeConfiguration:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range_configuration`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),underauditlistWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/underauditlist`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),underauditlist:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/underauditlist`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationAppVersion:{contactsRangeSuggest:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id/contacts_range_suggest`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationVisibility:{checkWhiteBlackList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility/check_white_black_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationContactsRange:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationCollaborators:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationOwner:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/owner`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationManagement:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/applications/:app_id/management`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},scope:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/scopes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),apply:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/scopes/apply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appBadge:{set:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v6/app_badge/set`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}},v7:{applicationBase:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v7/applications/:app_id/base`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationPublish:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v7/applications/:app_id/publish`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appAvatarUpload:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v7/app_avatar/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},applicationConfig:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v7/applications/:app_id/config`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},applicationAbility:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/application/v7/applications/:app_id/ability`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},hN=class extends CN{constructor(){super(...arguments),this.approval={instance:{specifiedRollback:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/specified_rollback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),cc:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/cc`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addSign:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/add_sign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchCc:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/search_cc`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),cancel:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/cancel`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),preview:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/preview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),remind:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/remind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addCc:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/add_cc`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),recall:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/recall`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/:instance_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),detail:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/detail`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),initiatedWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/initiated`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),initiated:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/initiated`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/subscription`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},task:{transfer:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/transfer`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),reject:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/reject`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),resubmit:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/resubmit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),approve:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/approve`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/query`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),refuse:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/refuse`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),pass:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/pass`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),forward:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/forward`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addSign:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/add_sign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),rollback:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/rollback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/subscription`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},approval:{unsubscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/approvals/:approval_code/unsubscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/approvals/:approval_code/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/approvals`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/approvals/:approval_code`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},instanceComment:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/:comment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),remove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalTask:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/external_tasks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/external_tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalInstance:{check:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/external_instances/check`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/external_instances`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalApproval:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/external_approvals/:approval_code`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/external_approvals`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},district:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/districts/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/districts/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/districts`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/districts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v4:{instance:{specifiedRollback:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/specified_rollback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),cc:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/cc`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addSign:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/add_sign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchCc:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/search_cc`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),cancel:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/cancel`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),preview:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/preview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),remind:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/remind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addCc:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/add_cc`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),recall:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/recall`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/:instance_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),detail:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/detail`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),initiatedWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/initiated`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),initiated:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/initiated`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/subscription`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},task:{transfer:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/transfer`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),reject:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/reject`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),resubmit:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/resubmit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),approve:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/approve`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/query`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),refuse:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/refuse`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),pass:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/pass`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),forward:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/forward`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addSign:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/add_sign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),rollback:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/rollback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/subscription`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/tasks/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},approval:{unsubscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/approvals/:approval_code/unsubscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/approvals/:approval_code/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/approvals`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/approvals/:approval_code`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},instanceComment:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/:comment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),remove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalTask:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/external_tasks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/external_tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalInstance:{check:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/external_instances/check`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/external_instances`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalApproval:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/external_approvals/:approval_code`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/external_approvals`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},district:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/districts/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/districts/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/districts`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/approval/v4/districts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},dN=class extends hN{constructor(){super(...arguments),this.attendance_machine={}}},uN=class extends dN{constructor(){super(...arguments),this.attendance={file:{download:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/files/:file_id/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),upload:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/files/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},group:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/groups/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/groups/:group_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listUser:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/groups/:group_id/list_user`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/groups/:group_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userDailyShift:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreateTemp:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/batch_create_temp`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userTaskRemedy:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_task_remedys`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryUserAllowedRemedys:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_task_remedys/query_user_allowed_remedys`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_task_remedys/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},shift:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/shifts/:shift_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/shifts/:shift_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/shifts/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userStatsField:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_stats_fields/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userStatsView:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_stats_views/:user_stats_view_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_stats_views/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},approvalInfo:{process:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/approval_infos/process`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userSetting:{modify:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_settings/modify`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_settings/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userStatsData:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_stats_datas/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},archiveRule:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/archive_rule`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/archive_rule`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),userStatsFieldsQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/archive_rule/user_stats_fields_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delReport:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/archive_rule/del_report`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),uploadReport:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/archive_rule/upload_report`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},leaveEmployExpireRecord:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/leave_employ_expire_records/:leave_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},leaveAccrualRecord:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/leave_accrual_record/:leave_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userFlow:{batchDel:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_flows/batch_del`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_flows/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_flows/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_flows/:user_flow_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userApproval:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_approvals`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_approvals/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userTask:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_tasks/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{file:{download:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/files/:file_id/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),upload:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/files/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},group:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/groups/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/groups/:group_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listUser:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/groups/:group_id/list_user`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/groups/:group_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userDailyShift:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreateTemp:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/batch_create_temp`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userTaskRemedy:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_task_remedys`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryUserAllowedRemedys:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_task_remedys/query_user_allowed_remedys`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_task_remedys/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},shift:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/shifts/:shift_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/shifts/:shift_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/shifts/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userStatsField:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_stats_fields/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userStatsView:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_stats_views/:user_stats_view_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_stats_views/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},approvalInfo:{process:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/approval_infos/process`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userSetting:{modify:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_settings/modify`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_settings/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userStatsData:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_stats_datas/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},archiveRule:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/archive_rule`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/archive_rule`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),userStatsFieldsQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/archive_rule/user_stats_fields_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delReport:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/archive_rule/del_report`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),uploadReport:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/archive_rule/upload_report`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},leaveEmployExpireRecord:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/leave_employ_expire_records/:leave_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},leaveAccrualRecord:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/leave_accrual_record/:leave_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userFlow:{batchDel:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_flows/batch_del`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_flows/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_flows/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_flows/:user_flow_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userApproval:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_approvals`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_approvals/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userTask:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/attendance/v1/user_tasks/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},BN=class extends uN{constructor(){super(...arguments),this.audio_video_ai={}}},fN=class extends BN{constructor(){super(...arguments),this.auth={appAccessToken:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/auth/v3/app_access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),internal:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/auth/v3/app_access_token/internal`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},tenantAccessToken:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/auth/v3/tenant_access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),internal:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/auth/v3/tenant_access_token/internal`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appTicket:{resend:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/auth/v3/app_ticket/resend`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v3:{appAccessToken:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/auth/v3/app_access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),internal:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/auth/v3/app_access_token/internal`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},tenantAccessToken:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/auth/v3/tenant_access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),internal:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/auth/v3/tenant_access_token/internal`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appTicket:{resend:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/auth/v3/app_ticket/resend`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},QN=class extends fN{constructor(){super(...arguments),this.authen={userInfo:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/authen/v1/user_info`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},accessToken:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/authen/v1/access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},refreshAccessToken:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/authen/v1/refresh_access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},oidcAccessToken:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/authen/v1/oidc/access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},oidcRefreshAccessToken:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/authen/v1/oidc/refresh_access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{userInfo:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/authen/v1/user_info`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},accessToken:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/authen/v1/access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},refreshAccessToken:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/authen/v1/refresh_access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},oidcAccessToken:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/authen/v1/oidc/access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},oidcRefreshAccessToken:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/authen/v1/oidc/refresh_access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},yN=class extends QN{constructor(){super(...arguments),this.authz={}}},mN=class extends yN{constructor(){super(...arguments),this.aweme_ecosystem={}}},SN=class extends mN{constructor(){super(...arguments),this.baike={entity:{match:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities/match`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),highlight:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities/highlight`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities/:entity_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),extract:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities/extract`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities/:entity_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},classification:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/classifications`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/classifications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},file:{upload:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/files/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),download:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/files/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}})},draft:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/drafts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/drafts/:draft_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{entity:{match:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities/match`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),highlight:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities/highlight`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities/:entity_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),extract:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities/extract`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/entities/:entity_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},classification:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/classifications`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/classifications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},file:{upload:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/files/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),download:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/files/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}})},draft:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/drafts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/baike/v1/drafts/:draft_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},DN=class extends SN{constructor(){super(...arguments),this.base={v2:{appRole:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/base/v2/apps/:app_token/roles`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/base/v2/apps/:app_token/roles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/base/v2/apps/:app_token/roles`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/base/v2/apps/:app_token/roles/:role_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},wN=class extends DN{constructor(){super(...arguments),this.bitable={appTable:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appDashboard:{copy:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards/:block_id/copy`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},app:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),copy:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/copy`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appTableRecord:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appRoleMember:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appRole:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appTableView:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appTableForm:{upgrade:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/upgrade`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appTableFieldGroup:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/field_groups`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appTableFormField:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields/:field_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appWorkflow:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows/:workflow_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appTableField:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appBlockWorkflow:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/block_workflows`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{appTable:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appDashboard:{copy:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards/:block_id/copy`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},app:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),copy:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/copy`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appTableRecord:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appRoleMember:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appRole:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appTableView:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appTableForm:{upgrade:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/upgrade`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appTableFieldGroup:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/field_groups`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appTableFormField:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields/:field_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appWorkflow:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows/:workflow_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appTableField:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appBlockWorkflow:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bitable/v1/apps/:app_token/block_workflows`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},ON=class extends wN{constructor(){super(...arguments),this.block={entity:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/block/v2/entities`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/block/v2/entities/:block_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},message:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/block/v2/message`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v2:{entity:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/block/v2/entities`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/block/v2/entities/:block_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},message:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/block/v2/message`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},bN=class extends ON{constructor(){super(...arguments),this.board={v1:{whiteboardNode:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),createPlantuml:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes/plantuml`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},whiteboard:{downloadAsImage:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/download_as_image`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),theme:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/theme`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateTheme:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/update_theme`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},MN=class extends bN{constructor(){super(...arguments),this.bot={v4:{bot:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/bot/v4/bot/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/bot/v4/bot/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},_N=class extends MN{constructor(){super(...arguments),this.c360={}}},NN=class extends _N{constructor(){super(...arguments),this.calendar={exchangeBinding:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/exchange_bindings/:exchange_binding_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/exchange_bindings/:exchange_binding_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/exchange_bindings`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},calendar:{subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/unsubscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),mget:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/mget`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),primarys:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/primarys`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),primary:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/primary`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},calendarAcl:{unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/:acl_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},calendarEvent:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),reply:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/reply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),instances:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/instances`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),instanceView:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/instance_view`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},calendarEventAttendee:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},setting:{generateCaldavConf:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/settings/generate_caldav_conf`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},timeoffEvent:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/timeoff_events/:timeoff_event_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/timeoff_events`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},calendarEventMeetingMinute:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_minute`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},calendarEventMeetingChat:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},freebusy:{batch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/freebusy/batch`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/freebusy/list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},calendarEventAttendeeChatMember:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/:attendee_id/chat_members`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/:attendee_id/chat_members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v4:{exchangeBinding:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/exchange_bindings/:exchange_binding_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/exchange_bindings/:exchange_binding_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/exchange_bindings`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},calendar:{subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/unsubscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),mget:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/mget`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),primarys:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/primarys`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),primary:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/primary`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},calendarAcl:{unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/:acl_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},calendarEvent:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),reply:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/reply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),instances:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/instances`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),instanceView:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/instance_view`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},calendarEventAttendee:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},setting:{generateCaldavConf:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/settings/generate_caldav_conf`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},timeoffEvent:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/timeoff_events/:timeoff_event_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/timeoff_events`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},calendarEventMeetingMinute:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_minute`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},calendarEventMeetingChat:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},freebusy:{batch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/freebusy/batch`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/freebusy/list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},calendarEventAttendeeChatMember:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/:attendee_id/chat_members`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/:attendee_id/chat_members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},TN=class extends NN{constructor(){super(...arguments),this.cardkit={v1:{card:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/cardkit/v1/cards`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),settings:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/settings`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/cardkit/v1/cards/:card_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),idConvert:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/cardkit/v1/cards/id_convert`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/batch_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},cardElement:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements/:element_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),content:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements/:element_id/content`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements/:element_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements/:element_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},RN=class extends TN{constructor(){super(...arguments),this.ccm_unified_resource={}}},kN=class extends RN{constructor(){super(...arguments),this.collab_plugins={}}},vN=class extends kN{constructor(){super(...arguments),this.comment_sdk={}}},PN=class extends vN{constructor(){super(...arguments),this.compensation={v1:{indicator:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/indicators`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/indicators`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},socialPlan:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/social_plans/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/social_plans`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/social_plans`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},item:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/items`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/items`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},plan:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/plans`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/plans`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},socialInsurance:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/social_insurances`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},itemCategory:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/item_categories`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/item_categories`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},changeReason:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/change_reasons`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/change_reasons`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},archive:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/archives`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/archives/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},recurringPayment:{queryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/recurring_payment/query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/recurring_payment/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchRemove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},socialArchive:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/social_archive/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},socialArchiveAdjustRecord:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/social_archive_adjust_record/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},lumpSumPayment:{batchRemove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/batch_remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/batch_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryDetailWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query_detail`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryDetail:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query_detail`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},GN=class extends PN{constructor(){super(...arguments),this.contact={group:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),memberBelong:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/member_belong`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),simplelistWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/simplelist`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),simplelist:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/simplelist`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},unit:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/unit`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listDepartment:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/unit/list_department`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unbindDepartment:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/unit/unbind_department`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),bindDepartment:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/unit/bind_department`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/unit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},groupMember:{simplelist:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/:group_id/member/simplelist`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),add:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/:group_id/member/add`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),remove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/:group_id/member/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchRemove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchAdd:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_add`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},department:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateDepartmentId:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/:department_id/update_department_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unbindDepartmentChat:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/unbind_department_chat`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),parentWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/parent`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),parent:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/parent`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),childrenWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/:department_id/children`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),children:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/:department_id/children`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/batch`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobLevel:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobFamily:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},user:{updateUserId:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/:user_id/update_user_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),resurrect:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/:user_id/resurrect`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchGetId:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/batch_get_id`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),findByDepartmentWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/find_by_department`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),findByDepartment:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/find_by_department`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),basicBatch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/basic_batch`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/batch`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},employeeTypeEnum:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/employee_type_enums/:enum_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/employee_type_enums/:enum_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},functionalRoleMember:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/:member_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_delete`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),scopes:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/scopes`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},functionalRole:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobTitle:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_titles/:job_title_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_titles`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_titles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},workCity:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/work_cities/:work_city_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/work_cities`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/work_cities`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},scope:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/scopes`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/scopes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},customAttr:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/custom_attrs`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/custom_attrs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v3:{group:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),memberBelong:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/member_belong`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),simplelistWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/simplelist`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),simplelist:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/simplelist`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},unit:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/unit`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listDepartment:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/unit/list_department`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unbindDepartment:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/unit/unbind_department`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),bindDepartment:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/unit/bind_department`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/unit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},groupMember:{simplelist:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/:group_id/member/simplelist`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),add:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/:group_id/member/add`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),remove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/:group_id/member/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchRemove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchAdd:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_add`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},department:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateDepartmentId:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/:department_id/update_department_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unbindDepartmentChat:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/unbind_department_chat`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),parentWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/parent`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),parent:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/parent`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),childrenWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/:department_id/children`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),children:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/:department_id/children`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/batch`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobLevel:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobFamily:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},user:{updateUserId:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/:user_id/update_user_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),resurrect:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/:user_id/resurrect`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchGetId:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/batch_get_id`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),findByDepartmentWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/find_by_department`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),findByDepartment:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/find_by_department`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),basicBatch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/basic_batch`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/users/batch`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},employeeTypeEnum:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/employee_type_enums/:enum_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/employee_type_enums/:enum_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},functionalRoleMember:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/:member_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_delete`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),scopes:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/scopes`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},functionalRole:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobTitle:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_titles/:job_title_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_titles`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/job_titles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},workCity:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/work_cities/:work_city_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/work_cities`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/work_cities`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},scope:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/scopes`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/scopes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},customAttr:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/custom_attrs`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/contact/v3/custom_attrs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},FN=class extends GN{constructor(){super(...arguments),this.content_check={}}},LN=class extends FN{constructor(){super(...arguments),this.contract={}}},UN=class extends LN{constructor(){super(...arguments),this.corehr={contract:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/contracts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/contracts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},company:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/companies`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/companies`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},employeeType:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/employee_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/employee_types`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},nationalIdType:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/national_id_types`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/national_id_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},subregion:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/subregions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/subregions/:subregion_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},countryRegion:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/country_regions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/country_regions/:country_region_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},subdivision:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/subdivisions/:subdivision_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/subdivisions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},preHire:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/pre_hires`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},person:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),upload:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/persons/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/persons`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},employment:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/employments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobLevel:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_levels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_levels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobFamily:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_families`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_families`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},job:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/jobs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/jobs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobChange:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_changes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},workingHoursType:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/working_hours_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/working_hours_types`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},department:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/departments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/departments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},location:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/locations/:location_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/locations`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/locations`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/locations/:location_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},file:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/files/:id`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}})},processFormVariableData:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/processes/:process_id/form_variable_data`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},commonDataId:{convert:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/common_data/id/convert`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},leaveGrantingRecord:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/leave_granting_records/:leave_granting_record_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/leave_granting_records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},leave:{leaveTypes:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/leaves/leave_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),workCalendar:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),workCalendarDate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar_date`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),calendarByScope:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/leaves/calendar_by_scope`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),leaveBalances:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/leaves/leave_balances`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),leaveRequestHistory:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/leaves/leave_request_history`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},offboarding:{submit:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/offboardings/submit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/offboardings/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/offboardings/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/offboardings/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},securityGroup:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/security_groups`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/security_groups/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},customField:{listObjectApiName:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/custom_fields/list_object_api_name`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getByParam:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/custom_fields/get_by_param`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/custom_fields/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},commonDataMetaData:{editEnumOption:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/common_data/meta_data/edit_enum_option`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addEnumOption:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/common_data/meta_data/add_enum_option`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},authorization:{updateRoleAssign:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/authorizations/update_role_assign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),removeRoleAssign:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/authorizations/remove_role_assign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addRoleAssign:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/authorizations/add_role_assign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getByParam:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/authorizations/get_by_param`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/authorizations/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},assignedUser:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/assigned_users/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobData:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_datas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_datas`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},currency:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/currencies`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/currencies/:currency_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},transferReason:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/transfer_reasons/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},transferType:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/transfer_types/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},compensationStandard:{match:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/compensation_standards/match`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{contract:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/contracts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/contracts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},company:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/companies`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/companies`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},employeeType:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/employee_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/employee_types`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},nationalIdType:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/national_id_types`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/national_id_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},subregion:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/subregions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/subregions/:subregion_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},countryRegion:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/country_regions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/country_regions/:country_region_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},subdivision:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/subdivisions/:subdivision_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/subdivisions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},preHire:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/pre_hires`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},person:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),upload:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/persons/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/persons`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},employment:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/employments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobLevel:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_levels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_levels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobFamily:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_families`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_families`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},job:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/jobs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/jobs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobChange:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_changes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},workingHoursType:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/working_hours_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/working_hours_types`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},department:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/departments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/departments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},location:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/locations/:location_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/locations`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/locations`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/locations/:location_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},file:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/files/:id`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}})},processFormVariableData:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/processes/:process_id/form_variable_data`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},commonDataId:{convert:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/common_data/id/convert`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},leaveGrantingRecord:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/leave_granting_records/:leave_granting_record_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/leave_granting_records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},leave:{leaveTypes:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/leaves/leave_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),workCalendar:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),workCalendarDate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar_date`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),calendarByScope:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/leaves/calendar_by_scope`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),leaveBalances:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/leaves/leave_balances`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),leaveRequestHistory:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/leaves/leave_request_history`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},offboarding:{submit:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/offboardings/submit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/offboardings/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/offboardings/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/offboardings/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},securityGroup:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/security_groups`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/security_groups/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},customField:{listObjectApiName:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/custom_fields/list_object_api_name`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getByParam:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/custom_fields/get_by_param`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/custom_fields/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},commonDataMetaData:{editEnumOption:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/common_data/meta_data/edit_enum_option`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addEnumOption:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/common_data/meta_data/add_enum_option`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},authorization:{updateRoleAssign:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/authorizations/update_role_assign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),removeRoleAssign:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/authorizations/remove_role_assign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addRoleAssign:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/authorizations/add_role_assign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getByParam:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/authorizations/get_by_param`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/authorizations/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},assignedUser:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/assigned_users/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobData:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_datas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/job_datas`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},currency:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/currencies`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/currencies/:currency_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},transferReason:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/transfer_reasons/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},transferType:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/transfer_types/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},compensationStandard:{match:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v1/compensation_standards/match`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}},v2:{costCenter:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/cost_centers/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryRecentChangeWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/cost_centers/query_recent_change`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/cost_centers/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryMultiTimeline:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/cost_centers/query_multi_timeline`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/cost_centers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),tree:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/cost_centers/tree`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},basicInfoCountryRegionSubdivision:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/country_region_subdivisions/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/country_region_subdivisions/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},probation:{submit:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/probation/submit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),withdraw:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/probation/withdraw`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),enableDisableAssessment:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/probation/enable_disable_assessment`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),edit:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/probation/edit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/probation/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/probation/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},probationAssessment:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/probation/assessments/:assessment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/probation/assessments/:assessment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/probation/assessments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},customOrg:{deleteOrg:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/custom_orgs/delete_org`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),active:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/custom_orgs/active`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryRecentChangeWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/custom_orgs/query_recent_change`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/custom_orgs/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/custom_orgs/:org_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateRule:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/custom_orgs/update_rule`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/custom_orgs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/custom_orgs/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},preHire:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),transitTask:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id/transit_task`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),withdrawOnboarding:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pre_hires/withdraw_onboarding`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),restoreFlowInstance:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pre_hires/restore_flow_instance`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),transformOnboardingTask:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pre_hires/transform_onboarding_task`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),complete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id/complete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pre_hires`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pre_hires/query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pre_hires/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pre_hires/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pre_hires/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobGrade:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_grades/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_grades/:job_grade_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_grades/:job_grade_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_grades`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryRecentChangeWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_grades/query_recent_change`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_grades/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},position:{active:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/positions/active`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delPosition:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/positions/del_position`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryRecentChangeWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/positions/query_recent_change`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/positions/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/positions/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/positions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/positions/:position_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},employeesBp:{batchGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees/bps/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},bp:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/bps`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/bps`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getByDepartment:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/bps/get_by_department`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},employeesAdditionalJob:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/:additional_job_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/:additional_job_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/batch`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/batch`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},basicInfoNationality:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/nationalities/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/nationalities/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},basicInfoCountryRegion:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/country_regions/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/country_regions/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},basicInfoCity:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/cities/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/cities/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},basicInfoDistrict:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/districts/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/districts/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},basicInfoBank:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/banks/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/banks/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},basicInfoCurrency:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/currencies/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/currencies/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},employeeCustomOrg:{del:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/custom_org/del`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),createEmpCustomOrg:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/custom_org/create_emp_custom_org`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),editEmpCustomOrg:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/custom_org/edit_emp_custom_org`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),employmentCustomOrgRecord:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/custom_org/employment_custom_org_record`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),querybyid:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/custom_org/querybyid`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},signatureFile:{listByBizId:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/signature_files/list_by_biz_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),download:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/signature_files/:signature_file_id/download`,A),method:"POST",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),terminate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/signature_files/terminate`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/signature_files/query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/signature_files/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/signature_files`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/signature_files`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},signatureNode:{listByFileId:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/signature_nodes/list_by_file_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},company:{active:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/companies/active`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryRecentChangeWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/companies/query_recent_change`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/companies/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryMultiTimeline:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/companies/query_multi_timeline`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/companies/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},department:{queryRecentChangeWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/departments/query_recent_change`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/departments/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryOperationLogsWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/departments/query_operation_logs`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryOperationLogs:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/departments/query_operation_logs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/departments/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/departments/:department_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/departments/:department_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryTimeline:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/departments/query_timeline`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryMultiTimeline:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/departments/query_multi_timeline`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),parents:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/departments/parents`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/departments/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/departments/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),tree:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/departments/tree`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},draft:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/drafts/:draft_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},approvalGroups:{openQueryPositionChangeListByIds:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/approval_groups/open_query_position_change_list_by_ids`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/approval_groups/:process_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),openQueryJobChangeListByIds:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/approval_groups/open_query_job_change_list_by_ids`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),openQueryDepartmentChangeListByIds:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/approval_groups/open_query_department_change_list_by_ids`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},location:{active:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/locations/active`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryRecentChangeWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/locations/query_recent_change`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/locations/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryMultiTimeline:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/locations/query_multi_timeline`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/locations/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/locations/:location_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},locationAddress:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses/:address_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses/:address_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},basicInfoLanguage:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/languages/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/languages/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},basicInfoTimeZone:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/time_zones/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/time_zones/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},reportDetailRow:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/report_detail_row/batchDelete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchSave:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/report_detail_row/batchSave`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},workforcePlanDetailRow:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/workforce_plan_detail_row/batchDelete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchSave:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/workforce_plan_detail_row/batchSave`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},offboarding:{submitV2:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/offboardings/submit_v2`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),edit:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/offboardings/edit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),revoke:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/offboardings/revoke`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},basicInfoBankBranch:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/bank_branchs/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/basic_info/bank_branchs/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},enum:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/enums/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},process:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/processes`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/processes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),flowVariableData:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/processes/:process_id/flow_variable_data`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/processes/:process_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},processApprover:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/processes/:process_id/approvers/:approver_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},processWithdraw:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/process_withdraw/:process_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},approver:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/approvers`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/approvers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},processTransfer:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/processes/:process_id/transfer`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},processExtra:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/processes/:process_id/extra`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobLevel:{queryRecentChangeWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_levels/query_recent_change`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_levels/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_levels/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobFamily:{queryRecentChangeWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_families/query_recent_change`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_families/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryMultiTimeline:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_families/query_multi_timeline`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_families/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},job:{queryRecentChangeWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/jobs/query_recent_change`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/jobs/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryMultiTimeline:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/jobs/query_multi_timeline`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/jobs/:job_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/jobs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/jobs/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},employeesInternationalAssignment:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees/international_assignments/:international_assignment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees/international_assignments`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees/international_assignments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees/international_assignments/:international_assignment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees/international_assignments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},processFormVariableData:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/processes/:process_id/form_variable_data`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},pathway:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pathways`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pathways/:pathway_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pathways/:pathway_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),active:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pathways/active`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/pathways/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},processStart:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/process_start`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},costAllocation:{batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/cost_allocations/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateVersion:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/cost_allocations/update_version`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),createVersion:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/cost_allocations/create_version`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),removeVersion:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/cost_allocations/remove_version`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},costCenterVersion:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id/versions/:version_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id/versions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id/versions/:version_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},processQueryFlowDataTemplate:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/query_flow_data_template`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},defaultCostCenter:{createVersion:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/default_cost_centers/create_version`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/default_cost_centers/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),removeVersion:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/default_cost_centers/remove_version`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateVersion:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/default_cost_centers/update_version`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},processRevoke:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/process_revoke/:process_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},signatureTemplateInfoWithThumbnail:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/signature_template_info_with_thumbnails`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/signature_template_info_with_thumbnails`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobChange:{revoke:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_changes/:job_change_id/revoke`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_changes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_changes/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/job_changes/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},contract:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/contracts/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/contracts/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},workforcePlanDetail:{batch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/workforce_plan_details/batch`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchV2:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/workforce_plan_details/batch_v2`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},employee:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},signatureTemplate:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/signature_templates/search`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},employeesJobData:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees/job_datas/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/employees/job_datas/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},person:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/persons/:person_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/persons`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},workforcePlan:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/workforce_plans`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/corehr/v2/workforce_plans`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},HN=class extends UN{constructor(){super(...arguments),this.data_cube={}}},KN=class extends HN{constructor(){super(...arguments),this.device={}}},YN=class extends KN{constructor(){super(...arguments),this.directory={v1:{employee:{resurrect:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/employees/:employee_id/resurrect`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),regular:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/employees/:employee_id/regular`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),toBeResigned:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/employees/:employee_id/to_be_resigned`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/employees/:employee_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/employees`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/employees/:employee_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),filter:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/employees/filter`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/employees/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),mget:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/employees/mget`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},collaborationTenant:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/collaboration_tenants`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/collaboration_tenants`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},collaborationRule:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/collaboration_rules/:collaboration_rule_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/collaboration_rules`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/collaboration_rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/collaboration_rules`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/collaboration_rules/:collaboration_rule_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},collborationShareEntity:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/share_entities`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/share_entities`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},department:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/departments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/departments/:department_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/departments/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),mget:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/departments/mget`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/departments/:department_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),filter:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/directory/v1/departments/filter`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},xN=class extends YN{constructor(){super(...arguments),this.docs_ai={}}},jN=class extends xN{constructor(){super(...arguments),this.docs_tool={}}},JN=class extends jN{constructor(){super(...arguments),this.docs={v1:{content:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docs/v1/content`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},qN=class extends JN{constructor(){super(...arguments),this.document_ai={v1:{businessCard:{recognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/business_card/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},contract:{fieldExtraction:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/contract/field_extraction`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},businessLicense:{recognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/business_license/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},drivingLicense:{recognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/driving_license/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},vehicleLicense:{recognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/vehicle_license/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},foodManageLicense:{recognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/food_manage_license/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},foodProduceLicense:{recognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/food_produce_license/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},hkmMainlandTravelPermit:{recognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/hkm_mainland_travel_permit/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},chinesePassport:{recognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/chinese_passport/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},twMainlandTravelPermit:{recognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/tw_mainland_travel_permit/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},healthCertificate:{recognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/health_certificate/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},vehicleInvoice:{recognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/vehicle_invoice/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},resume:{parse:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/resume/parse`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},bankCard:{recognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/bank_card/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},trainInvoice:{recognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/train_invoice/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},taxiInvoice:{recognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/taxi_invoice/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},vatInvoice:{recognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/vat_invoice/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},idCard:{recognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/document_ai/v1/id_card/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})}}}}},VN=class extends qN{constructor(){super(...arguments),this.docx={document:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),rawContent:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/raw_content`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),convert:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/blocks/convert`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatAnnouncementBlockChildren:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},documentBlockChildren:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatAnnouncement:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatAnnouncementBlock:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},documentBlock:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},documentBlockDescendant:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/descendant`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{document:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),rawContent:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/raw_content`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),convert:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/blocks/convert`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatAnnouncementBlockChildren:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},documentBlockChildren:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatAnnouncement:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatAnnouncementBlock:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},documentBlock:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},documentBlockDescendant:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/descendant`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},zN=class extends VN{constructor(){super(...arguments),this.drive={file:{createFolder:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/create_folder`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),move:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/move`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),copy:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/copy`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),createShortcut:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/create_shortcut`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),uploadPart:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/upload_part`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),taskCheck:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/task_check`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),deleteSubscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/delete_subscribe`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getSubscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/get_subscribe`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),download:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),uploadPrepare:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/upload_prepare`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),uploadFinish:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/upload_finish`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),uploadAll:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/upload_all`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},meta:{batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/metas/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},fileSubscription:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},exportTask:{download:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/export_tasks/file/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/export_tasks/:ticket`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/export_tasks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},fileVersion:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},fileViewRecord:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},fileStatistics:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/statistics`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},permissionPublicPassword:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},fileComment:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},media:{batchGetTmpDownloadUrl:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/medias/batch_get_tmp_download_url`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),download:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/medias/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),uploadPart:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/medias/upload_part`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),uploadFinish:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/medias/upload_finish`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),uploadAll:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/medias/upload_all`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),uploadPrepare:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/medias/upload_prepare`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},importTask:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/import_tasks/:ticket`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/import_tasks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},user:{subscriptionStatus:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/user/subscription_status`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),removeSubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/user/remove_subscription`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/user/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},fileCommentReply:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},permissionPublic:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/public`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/public`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},permissionMember:{batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/members/:member_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),transferOwner:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/members/transfer_owner`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),auth:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/members/auth`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{file:{createFolder:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/create_folder`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),move:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/move`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),copy:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/copy`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),createShortcut:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/create_shortcut`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),uploadPart:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/upload_part`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),taskCheck:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/task_check`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),deleteSubscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/delete_subscribe`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getSubscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/get_subscribe`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),download:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),uploadPrepare:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/upload_prepare`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),uploadFinish:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/upload_finish`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),uploadAll:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/upload_all`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},meta:{batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/metas/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},fileSubscription:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},exportTask:{download:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/export_tasks/file/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/export_tasks/:ticket`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/export_tasks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},fileVersion:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},fileViewRecord:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},fileStatistics:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/statistics`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},permissionPublicPassword:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},fileComment:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},media:{batchGetTmpDownloadUrl:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/medias/batch_get_tmp_download_url`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),download:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/medias/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),uploadPart:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/medias/upload_part`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),uploadFinish:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/medias/upload_finish`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),uploadAll:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/medias/upload_all`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),uploadPrepare:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/medias/upload_prepare`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},importTask:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/import_tasks/:ticket`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/import_tasks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},user:{subscriptionStatus:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/user/subscription_status`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),removeSubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/user/remove_subscription`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/user/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},fileCommentReply:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},permissionPublic:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/public`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/public`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},permissionMember:{batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/members/:member_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),transferOwner:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/members/transfer_owner`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),auth:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/members/auth`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v1/permissions/:token/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}},v2:{fileLike:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v2/files/:file_token/likes`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v2/files/:file_token/likes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},commentReaction:{updateReaction:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v2/files/:file_token/comments/reaction`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},permissionPublic:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v2/permissions/:token/public`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/drive/v2/permissions/:token/public`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},WN=class extends zN{constructor(){super(...arguments),this.ea_symphony={}}},ZN=class extends WN{constructor(){super(...arguments),this.edu={}}},XN=class extends ZN{constructor(){super(...arguments),this.ehr={attachment:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/ehr/v1/attachments/:token`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}})},employee:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/ehr/v1/employees`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/ehr/v1/employees`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{attachment:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/ehr/v1/attachments/:token`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}})},employee:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/ehr/v1/employees`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/ehr/v1/employees`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},$N=class extends XN{constructor(){super(...arguments),this.elearning={}}},e0=class extends $N{constructor(){super(...arguments),this.event={outboundIp:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/event/v1/outbound_ip`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/event/v1/outbound_ip`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},connection:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/event/v1/connection`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{outboundIp:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/event/v1/outbound_ip`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/event/v1/outbound_ip`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},connection:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/event/v1/connection`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},A0=class extends e0{constructor(){super(...arguments),this.exam={}}},t0=class extends A0{constructor(){super(...arguments),this.face_detection={}}},r0=class extends t0{constructor(){super(...arguments),this.financial_access_platform={}}},a0=class extends r0{constructor(){super(...arguments),this.grounding={}}},i0=class extends a0{constructor(){super(...arguments),this.gtm_ai={}}},o0=class extends i0{constructor(){super(...arguments),this.helpdesk={agent:{agentEmail:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_emails`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},agentSchedule:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_schedules`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_schedules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},agentSkill:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_skills`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_skills`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},agentSkillRule:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_skill_rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},category:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/categories`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/categories`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},event:{subscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/events/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/events/unsubscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},faq:{faqImage:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs/:id/image/:image_key`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs/search`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs/search`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},agentSchedules:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ticket:{customizedFields:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/customized_fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),ticketImage:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/ticket_images`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/tickets`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),startService:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/start_service`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),answerUserQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/answer_user_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ticketCustomizedField:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},notification:{cancelApprove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/cancel_approve`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),cancelSend:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/cancel_send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/notifications`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),executeSend:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/execute_send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),preview:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/preview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),submitApprove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/submit_approve`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ticketMessage:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/messages`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},botMessage:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/message`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{agent:{agentEmail:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_emails`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},agentSchedule:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_schedules`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_schedules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},agentSkill:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_skills`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_skills`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},agentSkillRule:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agent_skill_rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},category:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/categories`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/categories`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},event:{subscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/events/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/events/unsubscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},faq:{faqImage:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs/:id/image/:image_key`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs/search`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs/search`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},agentSchedules:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ticket:{customizedFields:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/customized_fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),ticketImage:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/ticket_images`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/tickets`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),startService:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/start_service`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),answerUserQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/answer_user_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ticketCustomizedField:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},notification:{cancelApprove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/cancel_approve`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),cancelSend:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/cancel_send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/notifications`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),executeSend:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/execute_send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),preview:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/preview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),submitApprove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/submit_approve`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ticketMessage:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/messages`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},botMessage:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/helpdesk/v1/message`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},n0=class extends o0{constructor(){super(...arguments),this.hire={websiteChannel:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels/:channel_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels/:channel_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interviewRoundType:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_round_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},offerCustomField:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offer_custom_fields/:offer_custom_field_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},websiteDelivery:{createByAttachment:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/deliveries/create_by_attachment`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),createByResume:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/deliveries/create_by_resume`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interviewRecordAttachment:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_records/attachments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},talent:{batchGetId:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/batch_get_id`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),onboardStatus:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/:talent_id/onboard_status`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addToFolder:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/add_to_folder`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),tag:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/:talent_id/tag`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),removeToFolder:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/remove_to_folder`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),combinedCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/combined_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/:talent_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),combinedUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/combined_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalInterviewAssessment:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_interview_assessments/:external_interview_assessment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_interview_assessments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},referralWebsiteJobPost:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts/:job_post_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},job:{config:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/config`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),close:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/close`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateConfig:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/update_config`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),open:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/open`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),recruiter:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/recruiter`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),combinedUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/combined_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),combinedCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/combined_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getDetail:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/get_detail`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},location:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/locations/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/locations`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/locations`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalReferralReward:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_referral_rewards`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_referral_rewards/:external_referral_reward_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},note:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/notes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/notes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},offerApprovalTemplate:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offer_approval_templates`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},website:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},examMarkingTask:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/exam_marking_tasks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/exam_marking_tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},referral:{getByApplication:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referrals/get_by_application`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referrals/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},exam:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/exams`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobRequirementSchema:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_requirement_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ecoAccountCustomField:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},talentExternalInfo:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/:talent_id/external_info`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/:talent_id/external_info`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},questionnaire:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/questionnaires`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ecoExamPaper:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_exam_papers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},offer:{internOfferStatus:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offers/:offer_id/intern_offer_status`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),offerStatus:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offers/:offer_id/offer_status`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offers/:offer_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offers/:offer_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ecoBackgroundCheck:{cancel:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_checks/cancel`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateResult:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_result`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateProgress:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_progress`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},agency:{protect:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/agencies/protect`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/agencies/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/agencies/:agency_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),protectSearch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/agencies/protection_period/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/agencies/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),operateAgencyAccount:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/agencies/operate_agency_account`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getAgencyAccount:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/agencies/get_agency_account`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},talentPool:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_pools/`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_pools/`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchChangeTalentPool:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_pools/:talent_pool_id/batch_change_talent_pool`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),moveTalent:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_pools/:talent_pool_id/talent_relationship`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},diversityInclusion:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/diversity_inclusions/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ecoExam:{loginInfo:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/login_info`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateResult:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/update_result`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},terminationReason:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/termination_reasons`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/termination_reasons`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobManager:{batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/batch_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/:manager_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobPublishRecord:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_publish_records/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},websiteJobPost:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/:job_post_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobType:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_types`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalApplication:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ecoBackgroundCheckCustomField:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},application:{transferStage:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id/transfer_stage`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),recover:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id/recover`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),terminate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id/terminate`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),transferOnboard:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id/transfer_onboard`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),offer:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id/offer`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),cancelOnboard:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id/cancel_onboard`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getDetail:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id/get_detail`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},registrationSchema:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/registration_schemas`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/registration_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},role:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/roles`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/roles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/roles/:role_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interviewRecord:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_records/:interview_record_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_records`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interviewer:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interviewers/:interviewer_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interviewers`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interviewers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},talentFolder:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_folders`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_folders`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interview:{getByTalent:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interviews/get_by_talent`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interviews`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},referralAccount:{enable:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_account/enable`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),withdraw:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/withdraw`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),deactivate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/deactivate`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),reconciliation:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_account/reconciliation`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_account`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getAccountAssets:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_account/get_account_assets`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ehrImportTask:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/ehr_import_tasks/:ehr_import_task_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},websiteDeliveryTask:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/delivery_tasks/:delivery_task_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},talentObject:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_objects/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobSchema:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobFunction:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_functions`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_functions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},advertisement:{publish:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/advertisements/:advertisement_id/publish`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},offerSchema:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offer_schemas/:offer_schema_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},attachment:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/attachments/:attachment_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),preview:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/attachments/:attachment_id/preview`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/attachments`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},applicationInterview:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id/interviews`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},websiteSiteUser:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/site_users`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},tripartiteAgreement:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ecoBackgroundCheckPackage:{batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_check_packages`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},resumeSource:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/resume_sources`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/resume_sources`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},offerApplicationForm:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offer_application_forms`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offer_application_forms/:offer_application_form_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},talentTag:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_tags`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_tags`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},talentOperationLog:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_operation_logs/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userRole:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/user_roles`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/user_roles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalInterview:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_interviews/:external_interview_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchQueryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_interviews/batch_query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_interviews/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_interviews`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_interviews/:external_interview_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalBackgroundCheck:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_background_checks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_background_checks/:external_background_check_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_background_checks/:external_background_check_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchQueryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_background_checks/batch_query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_background_checks/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},todo:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/todos`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/todos`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalOffer:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_offers/:external_offer_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchQueryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_offers/batch_query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_offers/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_offers/:external_offer_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_offers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},talentBlocklist:{changeTalentBlock:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_blocklist/change_talent_block`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},portalApplySchema:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interviewRegistrationSchema:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_registration_schemas`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_registration_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobRequirement:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_requirements`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listById:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_requirements/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_requirements`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},backgroundCheckOrder:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/background_check_orders`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/background_check_orders/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},employee:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/employees/:employee_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getByApplication:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/employees/get_by_application`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/employees/:employee_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},subject:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/subjects`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interviewFeedbackForm:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_feedback_forms`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_feedback_forms`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},evaluationTask:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/evaluation_tasks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/evaluation_tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},evaluation:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/evaluations`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/evaluations`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interviewTask:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_tasks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobProcess:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_processes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},minutes:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/minutes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},test:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/tests/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/tests/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{websiteChannel:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels/:channel_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels/:channel_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interviewRoundType:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_round_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},offerCustomField:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offer_custom_fields/:offer_custom_field_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},websiteDelivery:{createByAttachment:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/deliveries/create_by_attachment`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),createByResume:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/deliveries/create_by_resume`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interviewRecordAttachment:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_records/attachments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},talent:{batchGetId:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/batch_get_id`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),onboardStatus:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/:talent_id/onboard_status`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addToFolder:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/add_to_folder`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),tag:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/:talent_id/tag`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),removeToFolder:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/remove_to_folder`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),combinedCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/combined_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/:talent_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),combinedUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/combined_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalInterviewAssessment:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_interview_assessments/:external_interview_assessment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_interview_assessments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},referralWebsiteJobPost:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts/:job_post_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},job:{config:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/config`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),close:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/close`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateConfig:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/update_config`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),open:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/open`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),recruiter:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/recruiter`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),combinedUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/combined_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),combinedCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/combined_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getDetail:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/get_detail`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},location:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/locations/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/locations`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/locations`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalReferralReward:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_referral_rewards`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_referral_rewards/:external_referral_reward_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},note:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/notes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/notes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},offerApprovalTemplate:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offer_approval_templates`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},website:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},examMarkingTask:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/exam_marking_tasks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/exam_marking_tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},referral:{getByApplication:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referrals/get_by_application`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referrals/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},exam:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/exams`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobRequirementSchema:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_requirement_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ecoAccountCustomField:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},talentExternalInfo:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/:talent_id/external_info`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talents/:talent_id/external_info`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},questionnaire:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/questionnaires`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ecoExamPaper:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_exam_papers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},offer:{internOfferStatus:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offers/:offer_id/intern_offer_status`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),offerStatus:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offers/:offer_id/offer_status`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offers/:offer_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offers/:offer_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ecoBackgroundCheck:{cancel:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_checks/cancel`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateResult:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_result`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateProgress:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_progress`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},agency:{protect:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/agencies/protect`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/agencies/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/agencies/:agency_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),protectSearch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/agencies/protection_period/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/agencies/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),operateAgencyAccount:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/agencies/operate_agency_account`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getAgencyAccount:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/agencies/get_agency_account`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},talentPool:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_pools/`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_pools/`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchChangeTalentPool:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_pools/:talent_pool_id/batch_change_talent_pool`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),moveTalent:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_pools/:talent_pool_id/talent_relationship`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},diversityInclusion:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/diversity_inclusions/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ecoExam:{loginInfo:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/login_info`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateResult:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/update_result`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},terminationReason:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/termination_reasons`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/termination_reasons`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobManager:{batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/batch_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/:manager_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobPublishRecord:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_publish_records/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},websiteJobPost:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/:job_post_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobType:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_types`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalApplication:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ecoBackgroundCheckCustomField:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},application:{transferStage:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id/transfer_stage`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),recover:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id/recover`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),terminate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id/terminate`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),transferOnboard:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id/transfer_onboard`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),offer:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id/offer`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),cancelOnboard:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id/cancel_onboard`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getDetail:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id/get_detail`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},registrationSchema:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/registration_schemas`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/registration_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},role:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/roles`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/roles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/roles/:role_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interviewRecord:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_records/:interview_record_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_records`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interviewer:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interviewers/:interviewer_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interviewers`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interviewers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},talentFolder:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_folders`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_folders`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interview:{getByTalent:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interviews/get_by_talent`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interviews`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},referralAccount:{enable:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_account/enable`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),withdraw:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/withdraw`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),deactivate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/deactivate`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),reconciliation:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_account/reconciliation`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_account`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getAccountAssets:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/referral_account/get_account_assets`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ehrImportTask:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/ehr_import_tasks/:ehr_import_task_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},websiteDeliveryTask:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/delivery_tasks/:delivery_task_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},talentObject:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_objects/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobSchema:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobFunction:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_functions`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_functions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},advertisement:{publish:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/advertisements/:advertisement_id/publish`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},offerSchema:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offer_schemas/:offer_schema_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},attachment:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/attachments/:attachment_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),preview:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/attachments/:attachment_id/preview`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/attachments`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},applicationInterview:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/applications/:application_id/interviews`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},websiteSiteUser:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/websites/:website_id/site_users`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},tripartiteAgreement:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ecoBackgroundCheckPackage:{batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_check_packages`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},resumeSource:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/resume_sources`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/resume_sources`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},offerApplicationForm:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offer_application_forms`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/offer_application_forms/:offer_application_form_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},talentTag:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_tags`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_tags`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},talentOperationLog:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_operation_logs/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userRole:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/user_roles`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/user_roles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalInterview:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_interviews/:external_interview_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchQueryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_interviews/batch_query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_interviews/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_interviews`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_interviews/:external_interview_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalBackgroundCheck:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_background_checks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_background_checks/:external_background_check_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_background_checks/:external_background_check_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchQueryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_background_checks/batch_query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_background_checks/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},todo:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/todos`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/todos`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},externalOffer:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_offers/:external_offer_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchQueryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_offers/batch_query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_offers/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_offers/:external_offer_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/external_offers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},talentBlocklist:{changeTalentBlock:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/talent_blocklist/change_talent_block`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},portalApplySchema:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interviewRegistrationSchema:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_registration_schemas`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_registration_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobRequirement:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_requirements`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listById:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_requirements/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_requirements`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},backgroundCheckOrder:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/background_check_orders`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/background_check_orders/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},employee:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/employees/:employee_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getByApplication:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/employees/get_by_application`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/employees/:employee_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},subject:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/subjects`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interviewFeedbackForm:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_feedback_forms`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_feedback_forms`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},evaluationTask:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/evaluation_tasks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/evaluation_tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},evaluation:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/evaluations`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/evaluations`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interviewTask:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_tasks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/interview_tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},jobProcess:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/job_processes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},minutes:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/minutes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},test:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/tests/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v1/tests/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}},v2:{talent:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v2/talents/:talent_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},interviewRecord:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v2/interview_records`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v2/interview_records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/hire/v2/interview_records/:interview_record_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},s0=class extends n0{constructor(){super(...arguments),this.human_authentication={identity:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/human_authentication/v1/identities`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{identity:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/human_authentication/v1/identities`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},g0=class extends s0{constructor(){super(...arguments),this.im={message:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),pushFollowUp:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/push_follow_up`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),urgentApp:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_app`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),urgentPhone:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_phone`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),urgentSms:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_sms`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),reply:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),mergeForward:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/merge_forward`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),forward:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/forward`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),readUsers:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/read_users`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),replyByCard:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),{template_id:t,template_variable:s}=a,g=F(a,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:t,template_variable:s}})},g);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`,A),method:"POST",data:c,params:e,headers:i,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(u(I)),I})}),createByCard:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),{template_id:t,template_variable:s}=a,g=F(a,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:t,template_variable:s}})},g);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages`,A),method:"POST",data:c,params:e,headers:i,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(u(I)),I})}),updateByCard:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),{template_id:t,template_variable:s}=a,g=F(a,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:t,template_variable:s}})},g);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PUT",data:c,params:e,headers:i,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(u(I)),I})})},batchMessage:{readUser:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id/read_user`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getProgress:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id/get_progress`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatMembers:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),isInChat:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/members/is_in_chat`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),meJoin:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/members/me_join`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},pin:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/pins/:message_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/pins`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/pins`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/pins`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chat:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),link:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/link`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/search`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/search`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatModeration:{getWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatTab:{listTabs:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/list_tabs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),sortTabs:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/sort_tabs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),deleteTabs:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/delete_tabs`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateTabs:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/update_tabs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatTopNotice:{deleteTopNotice:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/top_notice/delete_top_notice`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),putTopNotice:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/top_notice/put_top_notice`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatAnnouncement:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/announcement`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/announcement`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatMenuTree:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),sort:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree/sort`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatManagers:{deleteManagers:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/managers/delete_managers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addManagers:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/managers/add_managers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatMenuItem:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_items/:menu_item_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},image:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/images/:image_key`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/images`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},messageReaction:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions/:reaction_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/reactions/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},file:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/files/:file_key`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/files`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},messageResource:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/resources/:file_key`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}})},thread:{forward:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/threads/:thread_id/forward`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{message:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),pushFollowUp:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/push_follow_up`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),urgentApp:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_app`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),urgentPhone:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_phone`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),urgentSms:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_sms`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),reply:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),mergeForward:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/merge_forward`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),forward:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/forward`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),readUsers:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/read_users`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),replyByCard:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),{template_id:t,template_variable:s}=a,g=F(a,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:t,template_variable:s}})},g);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`,A),method:"POST",data:c,params:e,headers:i,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(u(I)),I})}),createByCard:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),{template_id:t,template_variable:s}=a,g=F(a,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:t,template_variable:s}})},g);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages`,A),method:"POST",data:c,params:e,headers:i,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(u(I)),I})}),updateByCard:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),{template_id:t,template_variable:s}=a,g=F(a,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:t,template_variable:s}})},g);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PUT",data:c,params:e,headers:i,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(u(I)),I})})},batchMessage:{readUser:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id/read_user`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getProgress:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id/get_progress`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatMembers:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),isInChat:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/members/is_in_chat`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),meJoin:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/members/me_join`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},pin:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/pins/:message_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/pins`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/pins`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/pins`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chat:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),link:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/link`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/search`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/search`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatModeration:{getWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatTab:{listTabs:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/list_tabs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),sortTabs:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/sort_tabs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),deleteTabs:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/delete_tabs`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateTabs:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/update_tabs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatTopNotice:{deleteTopNotice:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/top_notice/delete_top_notice`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),putTopNotice:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/top_notice/put_top_notice`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatAnnouncement:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/announcement`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/announcement`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatMenuTree:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),sort:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree/sort`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatManagers:{deleteManagers:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/managers/delete_managers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addManagers:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/managers/add_managers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatMenuItem:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_items/:menu_item_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},image:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/images/:image_key`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/images`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},messageReaction:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions/:reaction_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchQuery:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/reactions/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},file:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/files/:file_key`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/files`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},messageResource:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/messages/:message_id/resources/:file_key`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}})},thread:{forward:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v1/threads/:thread_id/forward`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}},v2:{bizEntityTagRelation:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v2/biz_entity_tag_relation`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v2/biz_entity_tag_relation`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v2/biz_entity_tag_relation`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},urlPreview:{batchUpdate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v2/url_previews/batch_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appFeedCardBatch:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v2/app_feed_card/batch`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v2/app_feed_card/batch`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},feedCard:{botTimeSentive:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v2/feed_cards/bot_time_sentive`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v2/feed_cards/:feed_card_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},tag:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v2/tags`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v2/tags/:tag_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chatButton:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v2/chat_button`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appFeedCard:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v2/app_feed_card`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},chat:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v2/chats/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/im/v2/chats/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},c0=class extends g0{constructor(){super(...arguments),this.inline_platform={}}},I0=class extends c0{constructor(){super(...arguments),this.laps={}}},l0=class extends I0{constructor(){super(...arguments),this.lingo={v1:{file:{download:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/files/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),upload:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/files/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},entity:{match:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/entities/match`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/entities/:entity_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),highlight:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/entities/highlight`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/entities`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/entities`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/entities/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/entities/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/entities/:entity_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/entities`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/entities/:entity_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},repo:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/repos`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},classification:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/classifications`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/classifications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},draft:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/drafts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/lingo/v1/drafts/:draft_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},p0=class extends l0{constructor(){super(...arguments),this.llpp={}}},E0=class extends p0{constructor(){super(...arguments),this.mail={mailgroupMember:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/:member_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},mailgroupPermissionMember:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/:permission_member_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/:permission_member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},mailgroup:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},publicMailboxMember:{clear:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/clear`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/:member_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},mailgroupAlias:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases/:alias_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},publicMailboxAlias:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases/:alias_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailbox:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),accessibleMailboxes:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/accessible_mailboxes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),profile:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/profile`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxAlias:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases/:alias_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},mailgroupManager:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},publicMailbox:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),removeToRecycleBin:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/remove_to_recycle_bin`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},user:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/users/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxMessage:{getByCard:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/get_by_card`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),send:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchModify:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_modify`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),sendStatus:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/send_status`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),modify:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/modify`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchTrash:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_trash`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),trash:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/trash`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listThreadMessage:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxThread:{batchModify:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/batch_modify`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchTrash:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/batch_trash`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),modify:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/modify`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),trash:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/trash`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxEvent:{unsubscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/unsubscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/subscription`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxMailContact:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts/:mail_contact_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts/:mail_contact_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxLabel:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxDraft:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),cancelScheduledSend:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/cancel_scheduled_send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),send:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id/send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxRule:{reorder:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/reorder`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/:rule_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/:rule_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxSetting:{sendAs:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/settings/send_as`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getSignatures:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/settings/signatures`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxSentMessage:{getRecallDetail:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/recall`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),recall:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/recall`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxTemplate:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxTemplateAttachment:{downloadUrl:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id/attachments/download_url`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},multiEntity:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/multi_entity/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxFolder:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxMessageAttachment:{downloadUrl:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/attachments/download_url`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{mailgroupMember:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/:member_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},mailgroupPermissionMember:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/:permission_member_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/:permission_member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},mailgroup:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},publicMailboxMember:{clear:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/clear`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/:member_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},mailgroupAlias:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases/:alias_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},publicMailboxAlias:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases/:alias_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailbox:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),accessibleMailboxes:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/accessible_mailboxes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),profile:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/profile`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxAlias:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases/:alias_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},mailgroupManager:{batchDelete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchCreate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},publicMailbox:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),removeToRecycleBin:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/remove_to_recycle_bin`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},user:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/users/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxMessage:{getByCard:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/get_by_card`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),send:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchModify:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_modify`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),sendStatus:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/send_status`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),modify:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/modify`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchTrash:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_trash`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),trash:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/trash`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listThreadMessage:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxThread:{batchModify:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/batch_modify`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchTrash:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/batch_trash`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),modify:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/modify`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),trash:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/trash`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxEvent:{unsubscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/unsubscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscribe:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/subscription`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxMailContact:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts/:mail_contact_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts/:mail_contact_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxLabel:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxDraft:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),cancelScheduledSend:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/cancel_scheduled_send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),send:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id/send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxRule:{reorder:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/reorder`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/:rule_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/:rule_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxSetting:{sendAs:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/settings/send_as`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getSignatures:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/settings/signatures`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxSentMessage:{getRecallDetail:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/recall`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),recall:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/recall`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxTemplate:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxTemplateAttachment:{downloadUrl:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id/attachments/download_url`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},multiEntity:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/multi_entity/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxFolder:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMailboxMessageAttachment:{downloadUrl:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/attachments/download_url`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},C0=class extends E0{constructor(){super(...arguments),this.mcp={}}},h0=class extends C0{constructor(){super(...arguments),this.mdm={userAuthDataRelation:{unbind:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/unbind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),bind:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/bind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{userAuthDataRelation:{unbind:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/unbind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),bind:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/bind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}},v3:{countryRegion:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mdm/v3/country_regions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},batchCountryRegion:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/mdm/v3/batch_country_region`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},d0=class extends h0{constructor(){super(...arguments),this.meeting_room={}}},u0=class extends d0{constructor(){super(...arguments),this.mindnote={}}},B0=class extends u0{constructor(){super(...arguments),this.minutes={v1:{minuteTranscript:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token/transcript`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}})},minuteStatistics:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token/statistics`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},minuteMedia:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token/media`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},minute:{subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/minutes/v1/minutes/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/minutes/v1/minutes/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/minutes/v1/minutes/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/minutes/v1/minutes/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),artifacts:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token/artifacts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},f0=class extends B0{constructor(){super(...arguments),this.moments={post:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/moments/v1/posts/:post_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{post:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/moments/v1/posts/:post_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},Q0=class extends f0{constructor(){super(...arguments),this.myai_ai_extension={}}},y0=class extends Q0{constructor(){super(...arguments),this.myai_assistant={}}},m0=class extends y0{constructor(){super(...arguments),this.myai_base_ai={}}},S0=class extends m0{constructor(){super(...arguments),this.myai_ccm_extension={}}},D0=class extends S0{constructor(){super(...arguments),this.myai_data={}}},w0=class extends D0{constructor(){super(...arguments),this.myai_im_extension={}}},O0=class extends w0{constructor(){super(...arguments),this.myai_mail={}}},b0=class extends O0{constructor(){super(...arguments),this.myai_memory_reflection={}}},M0=class extends b0{constructor(){super(...arguments),this.myai_scenario_summary={}}},_0=class extends M0{constructor(){super(...arguments),this.myai_slides={}}},N0=class extends _0{constructor(){super(...arguments),this.myai_url_extension={}}},T0=class extends N0{constructor(){super(...arguments),this.myai={}}},R0=class extends T0{constructor(){super(...arguments),this.okr={review:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/reviews/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},periodRule:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/period_rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},progressRecord:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/progress_records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},period:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/periods`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/periods`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/periods/:period_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},okr:{batchGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/okrs/batch_get`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userOkr:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/users/:user_id/okrs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},image:{upload:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/images/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})},v1:{review:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/reviews/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},periodRule:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/period_rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},progressRecord:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/progress_records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},period:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/periods`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/periods`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/periods/:period_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},okr:{batchGet:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/okrs/batch_get`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userOkr:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/users/:user_id/okrs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},image:{upload:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v1/images/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null})}},v2:{okrAlignment:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/alignments/:alignment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/alignments/:alignment_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},okrObjective:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/objectives/:objective_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),keyResultsPosition:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results_position`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/objectives/:objective_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),keyResultsWeight:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results_weight`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/objectives/:objective_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},okrKeyResult:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},okrObjectiveAlignment:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/alignments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/alignments`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/alignments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},okrCategory:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/categories`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/categories`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},okrCycle:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/cycles`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/cycles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),objectivesWeight:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives_weight`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),objectivesPosition:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives_position`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},okrObjectiveKeyResult:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},okrKeyResultIndicator:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id/indicators`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},okrObjectiveIndicator:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/indicators`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},okrCycleObjective:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},okrIndicator:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/indicators/:indicator_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},okrObjectiveProgress:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/progresses`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/progresses`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},okrKeyResultProgress:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id/progresses`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id/progresses`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},k0=class extends R0{constructor(){super(...arguments),this.optical_char_recognition={image:{basicRecognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/optical_char_recognition/v1/image/basic_recognize`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{image:{basicRecognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/optical_char_recognition/v1/image/basic_recognize`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},v0=class extends k0{constructor(){super(...arguments),this.partner_ai={}}},P0=class extends v0{constructor(){super(...arguments),this.passport={session:{logout:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/passport/v1/sessions/logout`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/passport/v1/sessions/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},password:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/passport/v1/password`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{session:{logout:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/passport/v1/sessions/logout`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/passport/v1/sessions/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},password:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/passport/v1/password`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},G0=class extends P0{constructor(){super(...arguments),this.payroll={v1:{datasourceRecord:{save:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/datasource_records/save`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/datasource_records/query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/datasource_records/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},paymentDetail:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/payment_detail/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},paymentActivity:{archive:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/payment_activitys/archive`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/payment_activitys`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/payment_activitys`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},costAllocationPlan:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/cost_allocation_plans`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/cost_allocation_plans`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},paymentActivityDetail:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/payment_activity_details`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},datasource:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/datasources`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/datasources`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},costAllocationDetail:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/cost_allocation_details`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/cost_allocation_details`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},costAllocationReport:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/cost_allocation_reports`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/cost_allocation_reports`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},paygroup:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/paygroups`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/paygroups`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},acctItem:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/acct_items`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/payroll/v1/acct_items`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},F0=class extends G0{constructor(){super(...arguments),this.people_admin={}}},L0=class extends F0{constructor(){super(...arguments),this.people_ai={}}},U0=class extends L0{constructor(){super(...arguments),this.people_bytedance={}}},H0=class extends U0{constructor(){super(...arguments),this.performance={v1:{reviewData:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v1/review_datas/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},stageTask:{findByUserList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v1/stage_tasks/find_by_user_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),findByPage:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v1/stage_tasks/find_by_page`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},semester:{list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v1/semesters`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}},v2:{reviewee:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/reviewees/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},additionalInformationsBatch:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/additional_informations/batch`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},metricDetail:{import:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/metric_details/import`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/metric_details/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},question:{queryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/questions/query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/questions/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},indicator:{queryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/indicators/query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/indicators/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},activity:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/activity/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},metricTag:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/metric_tags`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/metric_tags`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},metricField:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/metric_fields/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},metricLib:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/metric_libs/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},reviewData:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/review_datas/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},metricTemplate:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/metric_templates/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userInfo:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/user_info/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},reviewTemplate:{queryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/review_templates/query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/review_templates/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userGroupUserRel:{write:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/user_group_user_rels/write`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},additionalInformation:{import:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/additional_informations/import`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),queryWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/additional_informations/query`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/performance/v2/additional_informations/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},K0=class extends H0{constructor(){super(...arguments),this.personal_settings={systemStatus:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchClose:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_close`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchOpen:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_open`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{systemStatus:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchClose:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_close`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchOpen:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_open`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},Y0=class extends K0{constructor(){super(...arguments),this.profile={}}},x0=class extends Y0{constructor(){super(...arguments),this.report={rule:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/report/v1/rules/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ruleView:{remove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/report/v1/rules/:rule_id/views/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},task:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/report/v1/tasks/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{rule:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/report/v1/rules/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},ruleView:{remove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/report/v1/rules/:rule_id/views/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},task:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/report/v1/tasks/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},j0=class extends x0{constructor(){super(...arguments),this.rule_engine={}}},J0=class extends j0{constructor(){super(...arguments),this.saasbi={}}},q0=class extends J0{constructor(){super(...arguments),this.scim={}}},V0=class extends q0{constructor(){super(...arguments),this.search_in_app={}}},z0=class extends V0{constructor(){super(...arguments),this.search={dataSource:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},message:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/message`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},schema:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/schemas`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},dataSourceItem:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},app:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/app`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},docWiki:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/doc_wiki/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/doc_wiki/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v2:{dataSource:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},message:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/message`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},schema:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/schemas`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},dataSourceItem:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},app:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/app`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},docWiki:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/doc_wiki/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/search/v2/doc_wiki/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},W0=class extends z0{constructor(){super(...arguments),this.security_and_compliance={openapiLog:{listData:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v1/openapi_logs/list_data`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMigration:{cancel:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/cancel`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/:user_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},multiGeoEntityTenant:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v1/multi_geo_entity/tenant`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{openapiLog:{listData:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v1/openapi_logs/list_data`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},userMigration:{cancel:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/cancel`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/:user_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},multiGeoEntityTenant:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v1/multi_geo_entity/tenant`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}},v2:{deviceApplyRecord:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v2/device_apply_records/:device_apply_record_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},deviceRecord:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v2/device_records/:device_record_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),mine:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v2/device_records/mine`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v2/device_records/:device_record_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v2/device_records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v2/device_records/:device_record_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v2/device_records`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/security_and_compliance/v2/device_records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},Z0=class extends W0{constructor(){super(...arguments),this.security_plugin={}}},X0=class extends Z0{constructor(){super(...arguments),this.sheet_ai={}}},$0=class extends X0{constructor(){super(...arguments),this.sheets={spreadsheet:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},spreadsheetSheet:{replace:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/replace`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),moveDimension:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/move_dimension`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),find:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/find`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},spreadsheetSheetFilter:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},spreadsheetSheetFilterView:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},spreadsheetSheetFilterViewCondition:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},spreadsheetSheetFloatImage:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v3:{spreadsheet:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},spreadsheetSheet:{replace:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/replace`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),moveDimension:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/move_dimension`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),find:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/find`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},spreadsheetSheetFilter:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},spreadsheetSheetFilterView:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},spreadsheetSheetFilterViewCondition:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},spreadsheetSheetFloatImage:{create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},eT=class extends $0{constructor(){super(...arguments),this.slides_ai={}}},AT=class extends eT{constructor(){super(...arguments),this.slides={}}},tT=class extends AT{constructor(){super(...arguments),this.spark={v1:{appTable:{deleteTableRecords:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),postTableRecords:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patchTableRecords:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchUpdateTableRecords:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records_batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getTableDetail:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getTableList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getTableRecordList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appEnum:{getEnumDetail:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/enums/:enum_name`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getEnumList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/enums`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appView:{getViewRecordList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/views/:view_name/records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},appStorage:{upload:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),download:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage`,A),method:"GET",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),uploadInitialize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage/upload/initialize`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),uploadPart:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage/upload/part`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),uploadComplete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage/upload/complete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},app:{icon:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/icon`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),uploadHtmlCodeAndRelease:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/upload_and_release_html_code`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),getAppVisibility:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/access-scope`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),updateAppVisibility:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/access-scope`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),sqlCommands:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id/sql_commands`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps/:app_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/apps`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},directoryUser:{idConvert:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/spark/v1/directory/user/id_convert`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},rT=class extends tT{constructor(){super(...arguments),this.speech_to_text={speech:{fileRecognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/speech_to_text/v1/speech/file_recognize`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),streamRecognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/speech_to_text/v1/speech/stream_recognize`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{speech:{fileRecognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/speech_to_text/v1/speech/file_recognize`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),streamRecognize:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/speech_to_text/v1/speech/stream_recognize`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},aT=class extends rT{constructor(){super(...arguments),this.subscriptions={}}},iT=class extends aT{constructor(){super(...arguments),this.task={task:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDeleteFollower:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/batch_delete_follower`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDeleteCollaborator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/batch_delete_collaborator`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),uncomplete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/uncomplete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),complete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/complete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},taskComment:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},taskCollaborator:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators/:collaborator_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},taskFollower:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers/:follower_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},taskReminder:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders/:reminder_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{task:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDeleteFollower:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/batch_delete_follower`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),batchDeleteCollaborator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/batch_delete_collaborator`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),uncomplete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/uncomplete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),complete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/complete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},taskComment:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},taskCollaborator:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators/:collaborator_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},taskFollower:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers/:follower_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},taskReminder:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders/:reminder_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}},v2:{task:{tasklists:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/:task_guid/tasklists`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/:task_guid`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addDependencies:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/:task_guid/add_dependencies`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),removeDependencies:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/:task_guid/remove_dependencies`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),setAncestorTask:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/:task_guid/set_ancestor_task`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addMembers:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/:task_guid/add_members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addReminders:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/:task_guid/add_reminders`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),removeMembers:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/:task_guid/remove_members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),removeReminders:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/:task_guid/remove_reminders`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/:task_guid`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),removeTasklist:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/:task_guid/remove_tasklist`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/:task_guid`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addTasklist:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/:task_guid/add_tasklist`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},comment:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/comments/:comment_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/comments`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/comments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/comments/:comment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/comments/:comment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/comments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},section:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/sections/:section_guid`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),tasksWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/sections/:section_guid/tasks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),tasks:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/sections/:section_guid/tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/sections/:section_guid`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/sections/:section_guid`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/sections`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/sections`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/sections`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},tasklist:{tasks:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasklists`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasklists`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),addMembers:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/add_members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),removeMembers:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/remove_members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasklists`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasklists/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasklists/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},customField:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/custom_fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),add:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid/add`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),remove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/custom_fields`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/custom_fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},tasklistActivitySubscription:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions/:activity_subscription_guid`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions/:activity_subscription_guid`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions/:activity_subscription_guid`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},attachment:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/attachments/:attachment_guid`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/attachments/:attachment_guid`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),upload:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/attachments/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,h.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return t?.data||null}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/attachments`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/attachments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},customFieldOption:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid/options/:option_guid`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid/options`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},taskV2:{taskSubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/task_v2/task_subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listRelatedTaskWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/task_v2/list_related_task`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),listRelatedTask:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/task_v2/list_related_task`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},taskSubtask:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/:task_guid/subtasks`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/:task_guid/subtasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/task/v2/tasks/:task_guid/subtasks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},oT=class extends iT{constructor(){super(...arguments),this.tenant={tenant:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/tenant/v2/tenant/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},tenantProductAssignInfo:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/tenant/v2/tenant/assign_info_list/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v2:{tenant:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/tenant/v2/tenant/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},tenantProductAssignInfo:{query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/tenant/v2/tenant/assign_info_list/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},nT=class extends oT{constructor(){super(...arguments),this.translation={text:{translate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/translation/v1/text/translate`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),detect:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/translation/v1/text/detect`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{text:{translate:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/translation/v1/text/translate`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),detect:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/translation/v1/text/detect`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},sT=class extends nT{constructor(){super(...arguments),this.trust_layer={}}},gT=class extends sT{constructor(){super(...arguments),this.trust_party={v1:{collaborationTenantCollaborationUser:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants/:target_tenant_key/collaboration_users/:target_user_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},collaborationTenantCollaborationDepartment:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants/:target_tenant_key/collaboration_departments/:target_department_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},collaborationTenant:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants/:target_tenant_key`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),visibleOrganization:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants/:target_tenant_key/visible_organization`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},cT=class extends gT{constructor(){super(...arguments),this.unified_kms_log={}}},IT=class extends cT{constructor(){super(...arguments),this.unified_kms={}}},lT=class extends IT{constructor(){super(...arguments),this.vault={}}},pT=class extends lT{constructor(){super(...arguments),this.vc={material:{uploadMeta:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/materials/upload_meta`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),remove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/materials/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),pullMeta:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/materials/pull_meta`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},meetingRecording:{start:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/start`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),stop:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/stop`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),setPermission:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/set_permission`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},roomConfig:{del:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_configs/del`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),setCheckboardAccessCode:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_configs/set_checkboard_access_code`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),setRoomAccessCode:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_configs/set_room_access_code`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_configs/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),set:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_configs/set`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},reserve:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),apply:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserves/apply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getActiveMeeting:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id/get_active_meeting`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},myAiVcMeeting:{getCommonReply:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_common_reply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),doOperation:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/do_operation`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getTodoTask:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_todo_task`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),seedAiPullData:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/seed_ai_pull_data`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),docBasedSuggestQuestion:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/doc_based_suggest_question`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),callback:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/callback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),sectionSummary:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/section_summary`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getRecap:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_recap`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),fetchStepSummaryStream:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_step_summary_stream`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),fetchSectionSummaryStream:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_section_summary_stream`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),fetchRecapStream:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_recap_stream`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},meeting:{end:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/end`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),kickout:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/kickout`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),setHost:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/set_host`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),invite:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/invite`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),changeName:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/change_name`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listByNoWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/list_by_no`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),listByNo:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/list_by_no`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},myAiRoom:{joinOfflineMeeting:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/join_offline_meeting`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),reserveInstantEvent:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/reserve_instant_event`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),helpSceneType:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/help_scene_type`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),joinMeeting:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/join_meeting`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),checkInSchedule:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/check_in_schedule`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),exit:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/exit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),autoReleaseEvent:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/auto_release_event`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),autoWelcome:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/auto_welcome`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),roomCalling:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/room_calling`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),joinMeetingNumber:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/join_meeting_number`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),leaveMeeting:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/leave_meeting`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},myAiMm:{mediaParse:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_mm/media_parse`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),extensionBoarding:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_mm/extension_boarding`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),querySuggestContext:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_mm/query_suggest_context`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),mediaBind:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_mm/media_bind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_mm/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},myAiSip:{createEventCard:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_sip/create_event_card`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},alert:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/alerts`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/alerts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},myAiVc:{cardCallback:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc/card_callback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),startAnalysis:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc/start_analysis`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),fetchMeetingList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc/fetch_meeting_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),setMeetingList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc/set_meeting_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),meetingAnalyze:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc/meeting_analyze`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),fetchMeetingAnalyze:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc/fetch_meeting_analyze`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},report:{getDaily:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reports/get_daily`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getTopUser:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reports/get_top_user`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},room:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/rooms/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),mget:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/rooms/mget`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},resourceReservationList:{getWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/resource_reservation_list`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/resource_reservation_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},participantQualityList:{getWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/participant_quality_list`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/participant_quality_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},roomLevel:{mget:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_levels/mget`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_levels/:room_level_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_levels/search`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),del:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_levels/del`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_levels/:room_level_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},scopeConfig:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/scope_config`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/scope_config`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),accessCode:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/scope_config/access_code`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},reserveConfigForm:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},reserveConfigAdmin:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},reserveConfigDisableInform:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},reserveConfig:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),reserveScope:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserve_configs/reserve_scope`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},export:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/exports/:task_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),download:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/exports/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),resourceReservationList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/exports/resource_reservation_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),participantQualityList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/exports/participant_quality_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),participantList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/exports/participant_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),meetingList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/exports/meeting_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},meetingList:{getWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meeting_list`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meeting_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},participantList:{getWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/participant_list`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/participant_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},meetingPullSubtitle:{getWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/pull_subtitle`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/pull_subtitle`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},note:{subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/notes/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/notes/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unifiedNoteTranscriptWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/notes/:note_id/unified_note_transcript`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),unifiedNoteTranscript:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/notes/:note_id/unified_note_transcript`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/notes/:note_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},recording:{unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/recordings/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/recordings/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},bot:{realtimeEndpoint:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/realtime/endpoint`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),leave:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/bots/leave`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),message:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/bots/message`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),userActiveMeeting:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/bots/user_active_meeting`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),join:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/bots/join`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),eventsWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/bots/events`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),events:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/bots/events`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{material:{uploadMeta:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/materials/upload_meta`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),remove:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/materials/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),pullMeta:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/materials/pull_meta`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},meetingRecording:{start:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/start`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),stop:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/stop`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),setPermission:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/set_permission`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},roomConfig:{del:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_configs/del`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),setCheckboardAccessCode:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_configs/set_checkboard_access_code`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),setRoomAccessCode:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_configs/set_room_access_code`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_configs/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),set:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_configs/set`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},reserve:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),apply:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserves/apply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getActiveMeeting:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id/get_active_meeting`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},myAiVcMeeting:{getCommonReply:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_common_reply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),doOperation:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/do_operation`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getTodoTask:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_todo_task`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),seedAiPullData:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/seed_ai_pull_data`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),docBasedSuggestQuestion:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/doc_based_suggest_question`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),callback:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/callback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),sectionSummary:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/section_summary`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getRecap:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_recap`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),fetchStepSummaryStream:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_step_summary_stream`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),fetchSectionSummaryStream:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_section_summary_stream`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),fetchRecapStream:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_recap_stream`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},meeting:{end:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/end`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),kickout:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/kickout`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),setHost:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/set_host`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),invite:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/invite`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),changeName:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/change_name`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listByNoWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/list_by_no`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),listByNo:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/list_by_no`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},myAiRoom:{joinOfflineMeeting:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/join_offline_meeting`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),reserveInstantEvent:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/reserve_instant_event`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),helpSceneType:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/help_scene_type`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),joinMeeting:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/join_meeting`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),checkInSchedule:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/check_in_schedule`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),exit:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/exit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),autoReleaseEvent:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/auto_release_event`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),autoWelcome:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/auto_welcome`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),roomCalling:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/room_calling`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),joinMeetingNumber:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/join_meeting_number`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),leaveMeeting:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_room/leave_meeting`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},myAiMm:{mediaParse:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_mm/media_parse`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),extensionBoarding:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_mm/extension_boarding`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),querySuggestContext:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_mm/query_suggest_context`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),mediaBind:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_mm/media_bind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),query:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_mm/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},myAiSip:{createEventCard:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_sip/create_event_card`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},alert:{listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/alerts`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/alerts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},myAiVc:{cardCallback:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc/card_callback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),startAnalysis:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc/start_analysis`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),fetchMeetingList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc/fetch_meeting_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),setMeetingList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc/set_meeting_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),meetingAnalyze:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc/meeting_analyze`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),fetchMeetingAnalyze:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/my_ai_vc/fetch_meeting_analyze`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},report:{getDaily:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reports/get_daily`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),getTopUser:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reports/get_top_user`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},room:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/rooms/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),mget:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/rooms/mget`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},resourceReservationList:{getWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/resource_reservation_list`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/resource_reservation_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},participantQualityList:{getWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/participant_quality_list`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/participant_quality_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},roomLevel:{mget:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_levels/mget`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_levels/:room_level_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_levels/search`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),del:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_levels/del`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_levels/:room_level_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},scopeConfig:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/scope_config`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/scope_config`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),accessCode:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/scope_config/access_code`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},reserveConfigForm:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},reserveConfigAdmin:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},reserveConfigDisableInform:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},reserveConfig:{patch:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),reserveScope:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/reserve_configs/reserve_scope`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},export:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/exports/:task_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),download:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/exports/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,h.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!t.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>C(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let E=ZA.createWriteStream(g);E.on("finish",()=>{c(g)}),E.on("error",B=>{I(B)}),t.data.pipe(E)})}),getReadableStream:()=>(s(),t.data),headers:t.headers}}),resourceReservationList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/exports/resource_reservation_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),participantQualityList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/exports/participant_quality_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),participantList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/exports/participant_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),meetingList:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/exports/meeting_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},meetingList:{getWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meeting_list`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meeting_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},participantList:{getWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/participant_list`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/participant_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},meetingPullSubtitle:{getWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/pull_subtitle`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/pull_subtitle`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},note:{subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/notes/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/notes/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),unifiedNoteTranscriptWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/notes/:note_id/unified_note_transcript`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),unifiedNoteTranscript:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/notes/:note_id/unified_note_transcript`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/notes/:note_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},recording:{unsubscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/recordings/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),subscription:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/recordings/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},bot:{realtimeEndpoint:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/realtime/endpoint`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),leave:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/bots/leave`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),message:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/bots/message`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),userActiveMeeting:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/bots/user_active_meeting`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),join:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/bots/join`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),eventsWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/bots/events`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),events:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/vc/v1/bots/events`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},ET=class extends pT{constructor(){super(...arguments),this.verification={v1:{verification:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/verification/v1/verification`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},CT=class extends ET{constructor(){super(...arguments),this.wiki={spaceSetting:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/setting`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},spaceNode:{updateTitle:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/update_title`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),moveDocsToWiki:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/move_docs_to_wiki`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),copy:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/copy`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),move:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/move`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},spaceMember:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},space:{getNode:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/get_node`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},task:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/tasks/:task_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{node:{searchWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v1/nodes/search`,A),method:"POST",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v1/nodes/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}},v2:{spaceSetting:{update:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/setting`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},spaceNode:{updateTitle:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/update_title`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),moveDocsToWiki:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/move_docs_to_wiki`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),copy:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/copy`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),move:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/move`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},spaceMember:{delete:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},space:{getNode:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/get_node`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),create:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces/:space_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})}),listWithIterator:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o),t=g=>C(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"GET",headers:(0,b.default)(g.headers,O.default),params:(0,b.default)(g.params,O.default),data:a,paramsSerializer:I=>(0,h.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return L(this,arguments,function*(){let c=!0,I;for(;c;)try{let E=yield S(t({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=E?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=F(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},task:{get:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/wiki/v2/tasks/:task_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},hT=class extends CT{constructor(){super(...arguments),this.workplace={workplaceAccessData:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/workplace/v1/workplace_access_data/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},workplaceBlockAccessData:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/workplace/v1/workplace_block_access_data/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},customWorkplaceAccessData:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/workplace/v1/custom_workplace_access_data/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},v1:{workplaceAccessData:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/workplace/v1/workplace_access_data/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},workplaceBlockAccessData:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/workplace/v1/workplace_block_access_data/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})},customWorkplaceAccessData:{search:(r,o)=>C(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(r,o);return this.httpInstance.request({url:d(`${this.domain}/open-apis/workplace/v1/custom_workplace_access_data/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:t=>(0,h.stringify)(t,{arrayFormat:"repeat"})}).catch(t=>{throw this.logger.error(u(t)),t})})}}}}},Is={error:(...n)=>{console.log("[error]:",...n)},warn:(...n)=>{console.warn("[warn]:",...n)},info:(...n)=>{console.info("[info]:",...n)},debug:(...n)=>{console.debug("[debug]:",...n)},trace:(...n)=>{console.trace("[trace]:",...n)}},cg=class{constructor(r,o){this.level=r,this.logger=o}error(...r){this.level>=mi.error&&this.logger.error(r)}warn(...r){this.level>=mi.warn&&this.logger.warn(r)}info(...r){this.level>=mi.info&&this.logger.info(r)}debug(...r){this.level>=mi.debug&&this.logger.debug(r)}trace(...r){this.level>=mi.trace&&this.logger.trace(r)}},dT=class{constructor(r){this.appId=r.appId,this.appSecret=r.appSecret,this.cache=r.cache,this.domain=r.domain,this.logger=r.logger,this.appType=r.appType,this.httpInstance=r.httpInstance,this.logger.debug("app ticket manager is ready"),this.checkAppTicket()}checkAppTicket(){var r;return C(this,void 0,void 0,function*(){this.appType===En.ISV&&((yield(r=this.cache)===null||r===void 0?void 0:r.get(uh,{namespace:this.appId}))||this.requestAppTicket())})}requestAppTicket(){return C(this,void 0,void 0,function*(){this.logger.debug("request app ticket"),yield this.httpInstance.post(`${this.domain}/open-apis/auth/v3/app_ticket/resend`,{app_id:this.appId,app_secret:this.appSecret}).catch(r=>{this.logger.error(r)})})}getAppTicket(){var r;return C(this,void 0,void 0,function*(){let o=yield(r=this.cache)===null||r===void 0?void 0:r.get(uh,{namespace:this.appId});if(o)return this.logger.debug("use cache app ticket"),o;yield this.requestAppTicket()})}},nQ="/oauth/v3/token",gye="urn:ietf:params:oauth:grant-type:jwt-bearer",YJ="urn:ietf:params:oauth:client-assertion-type:jwt-bearer",cye="authorization_code",Iye="refresh_token",UT="X-Target-Service",xJ=7100,HT=7101,jJ=7102,KT=7104,lye=Object.freeze({"open.feishu.cn":"https://accounts.feishu.cn","open.larksuite.com":"https://accounts.larksuite.com"}),Da=class extends Error{constructor(r,o){super(o),this.name="ClientAssertionError",this.code=r,this.msg=o}},ql=class extends Error{constructor(r,o,i,e){super(e||i||"access token request failed"),this.name="AccessTokenError",this.statusCode=r,this.code=o,this.error=i,this.errorDescription=e}},YT=n=>n.includes("://")?n:`https://${n}`;function xT(n){let r=new URL(YT(n));if(!r.host)throw new Error(`invalid url: ${n}`);return r.host}function jT(n){if(n.oauthBaseUrl)return YT(n.oauthBaseUrl).replace(/\/+$/,"");let r=xT(n.domain),o=lye[r];if(o)return o;throw new Error("oauthBaseUrl is not configured. When domain is a non-default value (neither open.feishu.cn nor open.larksuite.com), set oauthBaseUrl explicitly.")}function JJ(n){return xT(jT(n))}function JT(n,r){let o=new URL(YT(n.targetService));if(o.protocol!=="https:")throw new Error("targetService must use https");if(o.username||o.password)throw new Error("targetService must not contain userinfo");let e=`${n.targetPrefix||""}${r}`.replace(/\/{2,}/g,"/");if(/(^|\/)\.\.(\/|$)/.test(e))throw new Error("targetPrefix must not contain path traversal");return`${o.protocol}//${o.host}${e}`}function pye(n,r){var o,i;let e=(o=r?.code)!==null&&o!==void 0?o:"unknown",a=(i=r?.msg)!==null&&i!==void 0?i:"no message";return`failed to get ${n}, code: ${e}, msg: ${a}`}var uT=class{constructor(r){this.appId=r.appId,this.appSecret=r.appSecret,this.cache=r.cache,this.domain=r.domain,this.logger=r.logger,this.appType=r.appType,this.httpInstance=r.httpInstance,this.clientAssertionProvider=r.clientAssertionProvider,this.oauthBaseUrl=r.oauthBaseUrl,this.appTicketManager=new dT({appId:this.appId,appSecret:this.appSecret,cache:this.cache,domain:this.domain,logger:this.logger,appType:this.appType,httpInstance:this.httpInstance}),this.logger.debug("token manager is ready")}requestToken(r,o,i){return C(this,void 0,void 0,function*(){let e=yield this.httpInstance.post(r,o).catch(a=>{throw this.logger.error(a),a});if(!e||!e[i])throw new Error(pye(i,e));return e})}getCustomTenantAccessToken(){var r,o;return C(this,void 0,void 0,function*(){if(this.clientAssertionProvider)return this.getTenantTokenByClientAssertion();let i=yield(r=this.cache)===null||r===void 0?void 0:r.get(ph,{namespace:this.appId});if(i)return this.logger.debug("use cache token"),i;this.logger.debug("request token");let{tenant_access_token:e,expire:a}=yield this.requestToken(`${this.domain}/open-apis/auth/v3/tenant_access_token/internal`,{app_id:this.appId,app_secret:this.appSecret},"tenant_access_token");return yield(o=this.cache)===null||o===void 0?void 0:o.set(ph,e,new Date().getTime()+a*1e3-180*1e3,{namespace:this.appId}),e})}getTenantTokenByClientAssertion(){var r,o,i,e,a,A,t,s;return C(this,void 0,void 0,function*(){let g=jT({oauthBaseUrl:this.oauthBaseUrl,domain:this.domain}),c=JJ({oauthBaseUrl:this.oauthBaseUrl,domain:this.domain}),I=yield(r=this.cache)===null||r===void 0?void 0:r.get(ph,{namespace:this.appId});if(I)return this.logger.debug("use cache token"),I;let E;try{E=yield this.clientAssertionProvider.retrieveToken(c)}catch(T){throw new Da(jJ,T?.message||"client assertion provider failed")}if(!E||!E.value)throw new Da(HT,"client assertion token is empty");let B=`${g}${nQ}`,f={};E.targetInfo&&(B=JT(E.targetInfo,nQ),f[UT]=c),this.logger.debug("request token (client assertion)");let Q;try{Q=yield this.httpInstance.request({method:"post",url:B,headers:f,data:{grant_type:gye,client_assertion_type:YJ,client_assertion:E.value,client_id:this.appId}})}catch(T){throw this.logger.error(T),new Da(((i=(o=T?.response)===null||o===void 0?void 0:o.data)===null||i===void 0?void 0:i.code)||0,((a=(e=T?.response)===null||e===void 0?void 0:e.data)===null||a===void 0?void 0:a.error_description)||((t=(A=T?.response)===null||A===void 0?void 0:A.data)===null||t===void 0?void 0:t.error)||"client assertion token exchange failed")}let y=Q?.access_token;if(!y)throw new Da(Q?.code||0,Q?.error_description||Q?.error||"oauth token response missing access token");let m=Number(Q?.expires_in)||0;return yield(s=this.cache)===null||s===void 0?void 0:s.set(ph,y,new Date().getTime()+Math.max(m-180,0)*1e3,{namespace:this.appId}),y})}getMarketTenantAccessToken(r){var o;return C(this,void 0,void 0,function*(){if(this.clientAssertionProvider)throw new Da(xJ,"ClientAssertion mode is not supported for ISV apps");if(!r){this.logger.error("market app request need tenant key");return}let i=yield(o=this.cache)===null||o===void 0?void 0:o.get(`larkMarketAccessToken${r}`,{namespace:this.appId});if(i)return this.logger.debug("use cache token"),i;this.logger.debug("get app ticket");let e=yield this.appTicketManager.getAppTicket();if(!e){this.logger.warn("no app ticket");return}this.logger.debug("get app access token");let{app_access_token:a}=yield this.requestToken(`${this.domain}/open-apis/auth/v3/app_access_token`,{app_id:this.appId,app_secret:this.appSecret,app_ticket:e},"app_access_token");this.logger.debug("get tenant access token");let{tenant_access_token:A,expire:t}=yield this.requestToken(`${this.domain}/open-apis/auth/v3/tenant_access_token`,{app_access_token:a,tenant_key:r},"tenant_access_token");return yield this.cache.set(`larkMarketAccessToken${r}`,A,new Date().getTime()+t*1e3-180*1e3,{namespace:this.appId}),A})}getTenantAccessToken(r){return C(this,void 0,void 0,function*(){return oQ(this.appType===En.SelfBuild,()=>C(this,void 0,void 0,function*(){this.logger.debug("get custom app token")})),oQ(this.appType===En.ISV,()=>C(this,void 0,void 0,function*(){this.logger.debug("get market app token ")})),this.appType===En.SelfBuild?yield this.getCustomTenantAccessToken():yield this.getMarketTenantAccessToken(r?.[aQ])})}},qJ=(n,r)=>{let o=Object.assign({},n);for(let[i,e]of Object.entries(r))e!==void 0&&(o[i]=e);return o},BT=class{constructor(r){this.client=r.client}getCacheKey(r,o){return`${o?.namespace||this.client.appId}/${oye.toString()}/${r}`}calibrateTime(r){return new Date().getTime()+(r||0)*1e3-180*1e3}initWithCode(r,o){return C(this,void 0,void 0,function*(){let i={};for(let[e,a]of Object.entries(r)){let A=yield this.client.authen.oidcAccessToken.create({data:{grant_type:"authorization_code",code:a}});if(A.code!==0){this.client.logger.error("init user access token error",e,A.msg||A.message);continue}if(!A.data){this.client.logger.error("user access code expired",e,a);continue}i[e]={code:a,token:A.data.access_token,refreshToken:A.data.refresh_token,expiredTime:this.calibrateTime(A.data.expires_in)}}return yield this.update(i,{namespace:o?.namespace}),i})}update(r,o){return C(this,void 0,void 0,function*(){for(let[i,e]of Object.entries(r)){let a=this.getCacheKey(i,{namespace:o?.namespace}),A=(yield this.client.cache.get(a))||{},{code:t,token:s,refreshToken:g,expiredTime:c}=e,I=qJ(A,{code:t,token:s,refreshToken:g,expiredTime:c});yield this.client.cache.set(a,I,1/0)}})}get(r,o){return C(this,void 0,void 0,function*(){let i=this.getCacheKey(r,{namespace:o?.namespace}),e=yield this.client.cache.get(i);if(!e){this.client.logger.error("user access token needs to be initialized or updated first");return}let{token:a,code:A,refreshToken:t,expiredTime:s}=e;if(a&&s&&s-new Date().getTime()>0)return a;if(t){let g=yield this.client.authen.oidcRefreshAccessToken.create({data:{grant_type:"refresh_token",refresh_token:t}});if(g.code===0&&g.data)return yield this.update({[r]:{token:g.data.access_token,refreshToken:g.data.refresh_token,expiredTime:this.calibrateTime(g.data.expires_in)}}),g.data.access_token;this.client.logger.error("get user access token by refresh token failed.",g.msg);return}if(A){let g=yield this.client.authen.oidcAccessToken.create({data:{grant_type:"authorization_code",code:A}});g.code===0&&g.data?yield this.update({[r]:{token:g.data.access_token,refreshToken:g.data.refresh_token,expiredTime:this.calibrateTime(g.data.expires_in)}}):this.client.logger.error("get user access token by code failed.",g.msg)}})}},jl=n=>n===""||n===0||n===null||n===void 0?void 0:n,Eye=n=>{if(!n||n.error)return!0;let{code:r}=n;return r!==void 0&&r!==0&&r!=="0"&&r!==""},fT=class{constructor(r){this.appId=r.appId,this.appSecret=r.appSecret,this.clientAssertionProvider=r.clientAssertionProvider,this.oauthBaseUrl=r.oauthBaseUrl,this.domain=r.domain,this.httpInstance=r.httpInstance,this.logger=r.logger}retrieveByAuthorizationCode(r){return C(this,void 0,void 0,function*(){return this.doRequest({grant_type:cye,code:r.code,redirect_uri:r.redirectUri,code_verifier:r.codeVerifier,scope:r.scope},r.headers)})}refresh(r){return C(this,void 0,void 0,function*(){return this.doRequest({grant_type:Iye,refresh_token:r.refreshToken,scope:r.scope},r.headers)})}doRequest(r,o){return C(this,void 0,void 0,function*(){let i=jT({oauthBaseUrl:this.oauthBaseUrl,domain:this.domain}),e=JJ({oauthBaseUrl:this.oauthBaseUrl,domain:this.domain}),a={client_id:this.appId};for(let[I,E]of Object.entries(r))E!=null&&(a[I]=E);let A=`${i}${nQ}`,t=Object.assign({},o||{});if(this.clientAssertionProvider){let I;try{I=yield this.clientAssertionProvider.retrieveToken(e)}catch(E){throw new Da(jJ,E?.message||"client assertion provider failed")}if(!I||!I.value)throw new Da(HT,"client assertion token is empty");a.client_assertion_type=YJ,a.client_assertion=I.value,I.targetInfo&&(A=JT(I.targetInfo,nQ),t[UT]=e)}else if(this.appSecret)a.client_secret=this.appSecret;else throw new Da(KT,"appSecret and clientAssertionProvider cannot both be empty for accessToken APIs");let s=200,g;try{g=yield this.httpInstance.request({method:"post",url:A,headers:t,data:a})}catch(I){if(this.logger.error(I),I?.response)s=I.response.status,g=I.response.data;else throw new ql(0,0,"",I?.message||"oauth token request failed")}if(s!==200||Eye(g))throw new ql(s,g?.code||0,g?.error||"",g?.error_description||g?.msg||"");let c=jl(g?.access_token);if(!c)throw new ql(s,g?.code||0,g?.error||"",g?.error_description||"oauth token response missing access_token");return{accessToken:c,tokenType:jl(g.token_type),expiresIn:jl(g.expires_in),refreshToken:jl(g.refresh_token),refreshTokenExpiresIn:jl(g.refresh_token_expires_in),scope:jl(g.scope)}})}},sQ=class extends hT{constructor(r){if(super(),this.appId="",this.appSecret="",this.helpDeskId="",this.helpDeskToken="",this.appType=En.SelfBuild,this.logger=new cg(r.loggerLevel||mi.info,r.logger||Is),this.appId=r.appId,this.appSecret=r.appSecret||"",this.clientAssertionProvider=r.clientAssertionProvider,this.oauthBaseUrl=r.oauthBaseUrl,this.disableTokenCache=r.disableTokenCache,this.userAgent=LT(r.source,{extraTags:r.extraUaTags}),oQ(!this.appId,()=>this.logger.error("appId is needed")),this.helpDeskId=r.helpDeskId,this.helpDeskToken=r.helpDeskToken,this.appType=r?.appType||En.SelfBuild,!this.appSecret&&!this.clientAssertionProvider)throw new Da(KT,"appSecret or clientAssertionProvider is required");if(this.clientAssertionProvider&&this.appType===En.ISV)throw new Da(xJ,"ClientAssertion mode is not supported for ISV apps");this.domain=KJ(r.domain||Cn.Feishu),this.logger.debug(`use domain url: ${this.domain}`),this.cache=r.cache||fh,this.httpInstance=r.httpInstance||Vl,this.tokenManager=new uT({appId:this.appId,appSecret:this.appSecret,cache:this.cache,domain:this.domain,logger:this.logger,appType:this.appType,httpInstance:this.httpInstance,clientAssertionProvider:this.clientAssertionProvider,oauthBaseUrl:this.oauthBaseUrl}),this.userAccessToken=new BT({client:this}),this.accessToken=new fT({appId:this.appId,appSecret:this.appSecret,clientAssertionProvider:this.clientAssertionProvider,oauthBaseUrl:this.oauthBaseUrl,domain:this.domain,httpInstance:this.httpInstance,logger:this.logger}),this.logger.info("client ready")}formatPayload(r,o){var i,e,a;return C(this,void 0,void 0,function*(){let A=["lark","params","data","headers","path"].reduce((g,c)=>(g[c]=o?.[c]||{},g),{}),t=(i=A?.lark)===null||i===void 0?void 0:i[HJ];if(t)this.logger.debug("use passed token"),A.headers.Authorization=`Bearer ${t}`;else if(!this.disableTokenCache){let g=yield this.tokenManager.getTenantAccessToken({[aQ]:(e=A?.lark)===null||e===void 0?void 0:e[aQ]});g?A.headers.Authorization=`Bearer ${g}`:this.logger.warn("failed to obtain token")}if((a=A?.lark)===null||a===void 0?void 0:a[UJ]){this.logger.debug("generate help desk credential");let g=nye(`${this.helpDeskId}:${this.helpDeskToken}`);A.headers["X-Lark-Helpdesk-Authorization"]=`Bearer ${g}`}return{params:Object.assign(Object.assign({},r?.params||{}),A.params),headers:Object.assign(Object.assign({"User-Agent":this.userAgent},r?.headers||{}),A.headers),data:Object.assign(Object.assign({},r?.data||{}),A.data),path:Object.assign(Object.assign({},r?.path||{}),A.path)}})}request(r,o){var i;return C(this,void 0,void 0,function*(){let{data:e,params:a,headers:A,url:t}=r,s=F(r,["data","params","headers","url"]),g=yield this.formatPayload({data:e,params:a,headers:A},o),c=((i=r.method)===null||i===void 0?void 0:i.toLowerCase())==="get"&&Object.keys(g.data).length===0?void 0:g.data;return this.logger.trace(`send request [${r.method}]: ${r.url}`),yield this.httpInstance.request(Object.assign(Object.assign({},s),{url:/^http/.test(t)?t:`${this.domain}/${sye(t)}`,headers:g.headers,data:c,params:g.params})).catch(E=>{throw this.logger.error(E),E})})}},Cye=n=>n.reduce((r,o)=>(0,FJ.default)(r,o),{}),hye=n=>({lark:{[aQ]:n}}),dye=()=>({lark:{[UJ]:!0}}),uye=n=>({headers:{Authorization:`Bearer ${n}`}}),Bye=n=>({lark:{[HJ]:n}}),gQ=class{constructor(r){let{encryptKey:o,verificationToken:i,logger:e}=r;this.verificationToken=i,this.encryptKey=o,this.logger=e,o&&(this.aesCipher=new Bh(o))}parse(r){var o,i;let e=(()=>{var t;let s=r||{},{encrypt:g}=s,c=F(s,["encrypt"]);if(g)try{return Object.assign(Object.assign({},JSON.parse((t=this.aesCipher)===null||t===void 0?void 0:t.decrypt(g))),c)}catch{return this.logger.error("parse encrypt data failed"),{}}return c})();if("schema"in e){let{header:t,event:s}=e,g=F(e,["header","event"]);return Object.assign(Object.assign(Object.assign({[rQ]:(o=e?.header)===null||o===void 0?void 0:o.event_type},g),t),s)}let{event:a}=e,A=F(e,["event"]);return Object.assign(Object.assign({[rQ]:(i=e?.event)===null||i===void 0?void 0:i.type},a),A)}checkIsCardEventValidated(r){if("encrypt"in r||"schema"in r)return this.checkIsEventValidated(r);let{"x-lark-request-timestamp":o,"x-lark-request-nonce":i,"x-lark-signature":e}=r.headers;return this.verificationToken?tQ.createHash("sha1").update(o+i+this.verificationToken+JSON.stringify(r)).digest("hex")===e:!0}checkIsEventValidated(r){if(!this.encryptKey)return!0;let{"x-lark-request-timestamp":o,"x-lark-request-nonce":i,"x-lark-signature":e}=r.headers,a=o+i+this.encryptKey+JSON.stringify(r);return tQ.createHash("sha256").update(a).digest("hex")===e}},fye="app_ticket",cQ=class{constructor(r){this.verificationToken="",this.encryptKey="",this.handles=new Map;let{encryptKey:o,verificationToken:i}=r;this.encryptKey=o||"",this.verificationToken=i||"",this.logger=new cg(r.loggerLevel||mi.info,r.logger||Is),this.requestHandle=new gQ({encryptKey:o,verificationToken:i,logger:this.logger}),this.cache=r.cache||fh,this.registerAppTicketHandle(),this.logger.info("event-dispatch is ready")}registerAppTicketHandle(){this.register({app_ticket:r=>C(this,void 0,void 0,function*(){let{app_ticket:o,app_id:i}=r;o?(yield this.cache.set(uh,o,void 0,{namespace:i}),this.logger.debug("set app ticket")):this.logger.warn("response not include app ticket")})})}register(r){return Object.keys(r).forEach(o=>{this.handles.has(o)&&o!==fye&&this.logger.error(`this ${o} handle is registered`),this.handles.set(o,r[o]),this.logger.debug(`register ${o} handle`)}),this}invoke(r,o){var i,e;return C(this,void 0,void 0,function*(){if(o?.needCheck!==!1&&!(!((i=this.requestHandle)===null||i===void 0)&&i.checkIsEventValidated(r))){this.logger.warn("verification failed event");return}let A=(e=this.requestHandle)===null||e===void 0?void 0:e.parse(r),t=A[rQ];if(this.handles.has(t)){let s=yield this.handles.get(t)(A);return this.logger.debug(`execute ${t} handle`),s}return this.logger.warn(`no ${t} handle`),`no ${t} event handle`})}},QT=class{constructor(r,o){this.verificationToken="",this.encryptKey="",this.handles=new Map;let{verificationToken:i,encryptKey:e}=r;this.encryptKey=e||"",this.verificationToken=i||"",this.cardHandler=o,this.logger=new cg(r.loggerLevel||mi.info,r.logger||Is),this.requestHandle=new gQ({encryptKey:e,verificationToken:i,logger:this.logger}),this.cache=r.cache||fh,this.registerAppTicketHandle(),this.logger.info("card-action-handle is ready")}registerAppTicketHandle(){this.register({app_ticket:r=>C(this,void 0,void 0,function*(){let{app_ticket:o,app_id:i}=r;o?(yield this.cache.set(uh,o,void 0,{namespace:i}),this.logger.debug("set app ticket")):this.logger.warn("response not include app ticket")})})}register(r){return Object.keys(r).forEach(o=>{this.handles.set(o,r[o]),this.logger.debug(`register ${o} handle`)}),this}invoke(r){var o,i;return C(this,void 0,void 0,function*(){if(!(!((o=this.requestHandle)===null||o===void 0)&&o.checkIsCardEventValidated(r))){this.logger.warn("verification failed event");return}let e=(i=this.requestHandle)===null||i===void 0?void 0:i.parse(r),a=e[rQ];if(this.handles.has(a))try{return yield this.handles.get(a)(e)}catch(A){this.logger.error(A);return}try{let A=yield this.cardHandler(e);return this.logger.debug("execute card handle"),A}catch(A){this.logger.error(A)}})}},dQ=n=>new Promise(r=>{let o="";n.on("data",i=>{o+=i}),n.on("end",()=>{try{let i=JSON.parse(o);r(i)}catch{r("")}})}),Qh=(n,r)=>{if("encrypt"in n&&!r.encryptKey)throw new Error("auto-challenge need encryptKey, please check for missing in dispatcher");let o="encrypt"in n?JSON.parse(new Bh(r.encryptKey).decrypt(n.encrypt)):n;return{isChallenge:o.type==="url_verification",challenge:{challenge:o.challenge}}},Qye=(n,r,o)=>(i,e)=>C(void 0,void 0,void 0,function*(){if(i.url!==n)return;let a=Object.assign(Object.create({headers:i.headers}),yield dQ(i));if(o?.autoChallenge||!1){let{isChallenge:s,challenge:g}=Qh(a,{encryptKey:r.encryptKey});if(s){e.end(JSON.stringify(g));return}}let t=yield r.invoke(a);e.end(JSON.stringify(t))}),yye=(n,r)=>(o,i)=>C(void 0,void 0,void 0,function*(){let e=yield C(void 0,void 0,void 0,function*(){return o.body?o.body:o.complete?((r?.logger||Is).error("unable to obtain request body, if parsed it in other middleware, please manually set in ctx.request.body"),null):yield dQ(o)}),a=Object.assign(Object.create({headers:o.headers}),e);if(r?.autoChallenge||!1){let{isChallenge:s,challenge:g}=Qh(a,{encryptKey:n.encryptKey});if(s){i.json(g);return}}let t=yield n.invoke(a);i.json(t)}),mye=(n,r,o)=>(i,e)=>C(void 0,void 0,void 0,function*(){let{originalUrl:a,req:A,request:t}=i;if(a===n){let s=yield C(void 0,void 0,void 0,function*(){return t.body?t.body:A.complete?((o?.logger||Is).error("unable to obtain request body, if parsed it in other middleware, please manually set in ctx.request.body"),null):yield dQ(A)}),g=Object.assign(Object.create({headers:A.headers}),s);if(o?.autoChallenge||!1){let{isChallenge:E,challenge:B}=Qh(g,{encryptKey:r.encryptKey});if(E){i.body=B,yield e();return}}let I=yield r.invoke(g);i.body=JSON.stringify(I)}yield e()}),Sye=(n,r)=>(o,i)=>C(void 0,void 0,void 0,function*(){let{req:e,request:a}=o,A=yield C(void 0,void 0,void 0,function*(){return a.body?a.body:e.complete?((r?.logger||Is).error("unable to obtain request body, if parsed it in other middleware, please manually set in ctx.request.body"),null):yield dQ(e)}),t=Object.assign(Object.create({headers:e.headers}),A);if(r?.autoChallenge||!1){let{isChallenge:c,challenge:I}=Qh(t,{encryptKey:n.encryptKey});if(c){o.body=I,yield i();return}}let g=yield n.invoke(t);o.body=JSON.stringify(g),yield i()}),Dye=n=>{let{title:r,content:o}=n;return JSON.stringify({config:{wide_screen_mode:!0},elements:[{tag:"markdown",content:o}],header:{template:"blue",title:{content:r,tag:"plain_text"}}})},wye=Object.freeze({__proto__:null,defaultCard:Dye}),cs=Zf();cs.util.Long=void 0;cs.configure();var gg=cs.Reader,yJ=cs.Writer,FA=cs.util,Xi=cs.roots.default||(cs.roots.default={}),VJ=Xi.pbbp2=(()=>{let n={};return n.Header=(function(){function r(o){if(o)for(let i=Object.keys(o),e=0;e>>3){case 1:{A.key=i.string();break}case 2:{A.value=i.string();break}default:i.skipType(t&7);break}}if(!A.hasOwnProperty("key"))throw FA.ProtocolError("missing required 'key'",{instance:A});if(!A.hasOwnProperty("value"))throw FA.ProtocolError("missing required 'value'",{instance:A});return A},r.decodeDelimited=function(i){return i instanceof gg||(i=new gg(i)),this.decode(i,i.uint32())},r.verify=function(i){return typeof i!="object"||i===null?"object expected":FA.isString(i.key)?FA.isString(i.value)?null:"value: string expected":"key: string expected"},r.fromObject=function(i){if(i instanceof Xi.pbbp2.Header)return i;let e=new Xi.pbbp2.Header;return i.key!=null&&(e.key=String(i.key)),i.value!=null&&(e.value=String(i.value)),e},r.toObject=function(i,e){e||(e={});let a={};return e.defaults&&(a.key="",a.value=""),i.key!=null&&i.hasOwnProperty("key")&&(a.key=i.key),i.value!=null&&i.hasOwnProperty("value")&&(a.value=i.value),a},r.prototype.toJSON=function(){return this.constructor.toObject(this,cs.util.toJSONOptions)},r.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/pbbp2.Header"},r})(),n.Frame=(function(){function r(o){if(this.headers=[],o)for(let i=Object.keys(o),e=0;e>>3){case 1:{A.SeqID=i.uint64();break}case 2:{A.LogID=i.uint64();break}case 3:{A.service=i.int32();break}case 4:{A.method=i.int32();break}case 5:{A.headers&&A.headers.length||(A.headers=[]),A.headers.push(Xi.pbbp2.Header.decode(i,i.uint32()));break}case 6:{A.payloadEncoding=i.string();break}case 7:{A.payloadType=i.string();break}case 8:{A.payload=i.bytes();break}case 9:{A.LogIDNew=i.string();break}default:i.skipType(t&7);break}}if(!A.hasOwnProperty("SeqID"))throw FA.ProtocolError("missing required 'SeqID'",{instance:A});if(!A.hasOwnProperty("LogID"))throw FA.ProtocolError("missing required 'LogID'",{instance:A});if(!A.hasOwnProperty("service"))throw FA.ProtocolError("missing required 'service'",{instance:A});if(!A.hasOwnProperty("method"))throw FA.ProtocolError("missing required 'method'",{instance:A});return A},r.decodeDelimited=function(i){return i instanceof gg||(i=new gg(i)),this.decode(i,i.uint32())},r.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(!FA.isInteger(i.SeqID)&&!(i.SeqID&&FA.isInteger(i.SeqID.low)&&FA.isInteger(i.SeqID.high)))return"SeqID: integer|Long expected";if(!FA.isInteger(i.LogID)&&!(i.LogID&&FA.isInteger(i.LogID.low)&&FA.isInteger(i.LogID.high)))return"LogID: integer|Long expected";if(!FA.isInteger(i.service))return"service: integer expected";if(!FA.isInteger(i.method))return"method: integer expected";if(i.headers!=null&&i.hasOwnProperty("headers")){if(!Array.isArray(i.headers))return"headers: array expected";for(let e=0;e>>0,i.SeqID.high>>>0).toNumber(!0))),i.LogID!=null&&(FA.Long?(e.LogID=FA.Long.fromValue(i.LogID)).unsigned=!0:typeof i.LogID=="string"?e.LogID=parseInt(i.LogID,10):typeof i.LogID=="number"?e.LogID=i.LogID:typeof i.LogID=="object"&&(e.LogID=new FA.LongBits(i.LogID.low>>>0,i.LogID.high>>>0).toNumber(!0))),i.service!=null&&(e.service=i.service|0),i.method!=null&&(e.method=i.method|0),i.headers){if(!Array.isArray(i.headers))throw TypeError(".pbbp2.Frame.headers: array expected");e.headers=[];for(let a=0;a=0&&(e.payload=i.payload)),i.LogIDNew!=null&&(e.LogIDNew=String(i.LogIDNew)),e},r.toObject=function(i,e){e||(e={});let a={};if((e.arrays||e.defaults)&&(a.headers=[]),e.defaults){if(FA.Long){let A=new FA.Long(0,0,!0);a.SeqID=e.longs===String?A.toString():e.longs===Number?A.toNumber():A}else a.SeqID=e.longs===String?"0":0;if(FA.Long){let A=new FA.Long(0,0,!0);a.LogID=e.longs===String?A.toString():e.longs===Number?A.toNumber():A}else a.LogID=e.longs===String?"0":0;a.service=0,a.method=0,a.payloadEncoding="",a.payloadType="",e.bytes===String?a.payload="":(a.payload=[],e.bytes!==Array&&(a.payload=FA.newBuffer(a.payload))),a.LogIDNew=""}if(i.SeqID!=null&&i.hasOwnProperty("SeqID")&&(typeof i.SeqID=="number"?a.SeqID=e.longs===String?String(i.SeqID):i.SeqID:a.SeqID=e.longs===String?FA.Long.prototype.toString.call(i.SeqID):e.longs===Number?new FA.LongBits(i.SeqID.low>>>0,i.SeqID.high>>>0).toNumber(!0):i.SeqID),i.LogID!=null&&i.hasOwnProperty("LogID")&&(typeof i.LogID=="number"?a.LogID=e.longs===String?String(i.LogID):i.LogID:a.LogID=e.longs===String?FA.Long.prototype.toString.call(i.LogID):e.longs===Number?new FA.LongBits(i.LogID.low>>>0,i.LogID.high>>>0).toNumber(!0):i.LogID),i.service!=null&&i.hasOwnProperty("service")&&(a.service=i.service),i.method!=null&&i.hasOwnProperty("method")&&(a.method=i.method),i.headers&&i.headers.length){a.headers=[];for(let A=0;AVJ.Frame.decode(n),yT=class{constructor(){this.client={appId:"",appSecret:"",domain:Cn.Feishu},this.ws={connectUrl:"",pingInterval:120*1e3,reconnectCount:-1,reconnectInterval:120*1e3,reconnectNonce:30*1e3,deviceId:"",serviceId:"",autoReconnect:!0},this.wsInstance=null}updateClient(r){Object.assign(this.client,r)}updateWs(r){Object.assign(this.ws,r)}getClient(r){return r===void 0?this.client:this.client[r]}getWS(r){return r===void 0?this.ws:this.ws[r]}get wsConfigUrl(){return`${this.getClient("domain")}/callback/ws/endpoint`}setWSInstance(r){this.wsInstance=r}getWSInstance(){return this.wsInstance}},mT=class{constructor(r){this.cache=new Map,this.logger=r.logger,this.clearAtInterval()}mergeData(r){let{message_id:o,sum:i,seq:e,trace_id:a,data:A}=r,t=this.cache.get(o);if(t)t.buffer[e]=A;else{let g=new Array(i).fill(void 0);g[e]=A,this.cache.set(o,{buffer:g,trace_id:a,message_id:o,create_time:Date.now()})}let s=this.cache.get(o);if(s?.buffer.every(g=>!!g)){let g=s.buffer.reduce((E,B)=>{let f=new Uint8Array(E.byteLength+B.byteLength);return f.set(E,0),f.set(B,E.length),f},new Uint8Array([])),c=new TextDecoder("utf-8").decode(g),I=JSON.parse(c);return this.deleteCache(o),I}return null}deleteCache(r){this.cache.delete(r)}clearAtInterval(){if(this.timer)return;let r=1e4;this.timer=setInterval(()=>{let o=Date.now();this.cache.forEach((i,e)=>{var a;let{create_time:A,trace_id:t,message_id:s}=i;o-A>r&&((a=this.logger)===null||a===void 0||a.debug(`${s} event data is deleted as expired, trace_id: ${t}`),this.deleteCache(e))})},r),typeof this.timer.unref=="function"&&this.timer.unref()}destroy(){this.timer&&(clearInterval(this.timer),this.timer=void 0),this.cache.clear()}},Ch;(function(n){n[n.ok=0]="ok",n[n.system_busy=1]="system_busy",n[n.forbidden=403]="forbidden",n[n.auth_failed=514]="auth_failed",n[n.internal_error=1000040343]="internal_error",n[n.exceed_conn_limit=1000040350]="exceed_conn_limit"})(Ch||(Ch={}));var hh;(function(n){n[n.control=0]="control",n[n.data=1]="data"})(hh||(hh={}));var dh;(function(n){n.type="type",n.message_id="message_id",n.sum="sum",n.seq="seq",n.trace_id="trace_id",n.biz_rt="biz_rt",n.handshake_status="handshake-status",n.handshake_msg="handshake-msg",n.handshake_autherrcode="handshake-autherrcode"})(dh||(dh={}));var Jl;(function(n){n.event="event",n.card="card",n.ping="ping",n.pong="pong"})(Jl||(Jl={}));var IQ;(function(n){n[n.ok=200]="ok",n[n.internal_server_error=500]="internal_server_error"})(IQ||(IQ={}));var lQ=class{constructor(r){var o;this.wsConfig=new yT,this.reconnectGeneration=0,this.isConnecting=!1,this.reconnectInfo={lastConnectTime:0,nextConnectTime:0},this.hasEverConnected=!1,this.terminalError=!1,this.currentReconnectAttempts=0;let{appId:i,appSecret:e,clientAssertionProvider:a,agent:A,domain:t=Cn.Feishu,httpInstance:s=Vl,loggerLevel:g=mi.info,logger:c=Is,autoReconnect:I=!0,source:E,extraUaTags:B,onReady:f,onError:Q,onReconnecting:y,onReconnected:m,handshakeTimeoutMs:T,wsConfig:_}=r;if(this.userAgent=LT(E,{extraTags:B}),this.logger=new cg(g,c),oQ(!i,()=>this.logger.error("appId is needed")),!e&&!a)throw new Da(KT,"appSecret or clientAssertionProvider is required");this.agent=A,this.dataCache=new mT({logger:this.logger}),this.httpInstance=s,this.wsConfig.updateClient({appId:i,appSecret:e||"",clientAssertionProvider:a,domain:KJ(t)}),this.wsConfig.updateWs({autoReconnect:I}),this.onReady=f,this.onError=Q,this.onReconnecting=y,this.onReconnected=m,this.handshakeTimeoutMs=T,this.pingTimeoutSec=(o=_?.pingTimeout)!==null&&o!==void 0?o:0}armLiveness(){this.pingTimeoutSec&&(this.livenessTimer&&clearTimeout(this.livenessTimer),this.livenessTimer=setTimeout(()=>{var r;this.livenessTimer=void 0,this.logger.warn("[ws]",`no pong/inbound within ${this.pingTimeoutSec}s of last ping, terminating to trigger reconnect`);try{(r=this.wsConfig.getWSInstance())===null||r===void 0||r.terminate()}catch{}},this.pingTimeoutSec*1e3))}clearLiveness(){this.livenessTimer&&(clearTimeout(this.livenessTimer),this.livenessTimer=void 0)}safeInvoke(r,o,...i){if(o)try{o(...i)}catch(e){this.logger.error(`[ws] ${r} callback threw`,e)}}pullConnectConfig(){return C(this,void 0,void 0,function*(){let{appId:r,appSecret:o,clientAssertionProvider:i,domain:e}=this.wsConfig.getClient(),a="/callback/ws/endpoint",A=this.wsConfig.wsConfigUrl,t={locale:"zh","User-Agent":this.userAgent},s={AppID:r};try{if(i){let Q=xT(e),y=yield i.retrieveToken(Q);if(!y||!y.value)throw new Da(HT,"client assertion token is empty");s.AppSecret="",s.ClientAssertion=y.value,y.targetInfo&&(A=JT(y.targetInfo,a),t[UT]=Q)}else s.AppSecret=o;let{code:g,data:{URL:c,ClientConfig:I},msg:E}=yield this.httpInstance.request({method:"post",url:A,data:s,headers:t,timeout:15e3});if(g!==Ch.ok){let Q=g===Ch.system_busy?"system busy":E;return this.logger.error("[ws]",`code: ${g}, ${Q}`),g===Ch.internal_error?{ok:!1,retryable:!0}:{ok:!1,retryable:!1,error:`pullConnectConfig failed: code=${g}, msg=${Q}`}}let{device_id:B,service_id:f}=$Qe.parse(c);return this.wsConfig.updateWs({connectUrl:c,deviceId:B,serviceId:f,pingInterval:I.PingInterval*1e3,reconnectCount:I.ReconnectCount,reconnectInterval:I.ReconnectInterval*1e3,reconnectNonce:I.ReconnectNonce*1e3}),this.logger.debug("[ws]",`get connect config success, ws url: ${c}`),{ok:!0}}catch(g){return this.logger.error("[ws]",g?.message||"system busy"),g instanceof Da?{ok:!1,retryable:!1,error:g.message}:{ok:!1,retryable:!0}}})}connect(){let r=this.wsConfig.getWS("connectUrl"),o;try{let{agent:i}=this;o=new Ro(r,{agent:i})}catch{this.logger.error("[ws]","new WebSocket error")}return o?new Promise(i=>{let e=!1,a,A=t=>{e||(e=!0,a&&clearTimeout(a),i(t))};this.handshakeTimeoutMs&&this.handshakeTimeoutMs>0&&(a=setTimeout(()=>{this.logger.error("[ws]",`handshake timeout after ${this.handshakeTimeoutMs}ms`),o.removeAllListeners();try{o.terminate()}catch{}A(!1)},this.handshakeTimeoutMs)),o.on("open",()=>{this.logger.debug("[ws]","ws connect success"),this.wsConfig.setWSInstance(o),this.pingLoop(),A(!0)}),o.on("error",()=>{this.logger.error("[ws]","ws connect failed"),A(!1)})}):Promise.resolve(!1)}reConnect(r=!1){return C(this,void 0,void 0,function*(){if(this.isConnecting&&!r){this.logger.debug("[ws]","repeat connection");return}this.isConnecting=!0;let o=++this.reconnectGeneration,i=()=>C(this,void 0,void 0,function*(){this.reconnectInfo.lastConnectTime=Date.now();let c=yield this.pullConnectConfig();return c.ok?(yield this.connect())?(this.communicate(),{ok:!0}):{ok:!1,retryable:!0}:c});this.pingInterval&&clearTimeout(this.pingInterval),this.reconnectInterval&&clearTimeout(this.reconnectInterval);let e=this.wsConfig.getWSInstance();if(r){e&&e?.terminate();let c={ok:!1,retryable:!0};try{c=yield i()}finally{this.isConnecting=!1}if(c.ok)this.hasEverConnected=!0,this.safeInvoke("onReady",this.onReady);else if(c.retryable)this.logger.error("[ws]","connect failed"),yield this.reConnect();else{this.hasEverConnected=!1,this.terminalError=!0,this.safeInvoke("onError",this.onError,new Error(c.error));return}this.logger.info("[ws]","ws client ready");return}let{autoReconnect:a,reconnectNonce:A,reconnectCount:t,reconnectInterval:s}=this.wsConfig.getWS();if(!a){this.hasEverConnected||(this.terminalError=!0,this.safeInvoke("onError",this.onError,new Error("WebSocket connect failed and autoReconnect is disabled")));return}this.logger.info("[ws]","reconnect"),this.hasEverConnected&&this.safeInvoke("onReconnecting",this.onReconnecting),e&&e?.terminate(),this.wsConfig.setWSInstance(null);let g=A?A*Math.random():0;this.reconnectInterval=setTimeout(()=>C(this,void 0,void 0,function*(){(function c(I){return C(this,void 0,void 0,function*(){if(o!==this.reconnectGeneration)return;I++,this.currentReconnectAttempts=I;let E=yield i();if(o===this.reconnectGeneration){if(E.ok){this.logger.debug("[ws]","reconnect success"),this.currentReconnectAttempts=0,this.hasEverConnected?this.safeInvoke("onReconnected",this.onReconnected):(this.hasEverConnected=!0,this.safeInvoke("onReady",this.onReady)),this.isConnecting=!1;return}if(!E.retryable){this.isConnecting=!1,this.hasEverConnected=!1,this.terminalError=!0,this.safeInvoke("onError",this.onError,new Error(E.error));return}if(this.logger.info("ws",`unable to connect to the server after trying ${I} times")`),t>=0&&I>=t){this.isConnecting=!1,this.terminalError=!0,this.safeInvoke("onError",this.onError,new Error(`WebSocket reconnect exhausted after ${I} attempts`));return}this.reconnectInterval=setTimeout(()=>{c.bind(this)(I)},s),this.reconnectInfo.nextConnectTime=Date.now()+s}})}).bind(this)(0)}),g),this.reconnectInfo.nextConnectTime=Date.now()+g})}pingLoop(){let{serviceId:r,pingInterval:o}=this.wsConfig.getWS(),i=this.wsConfig.getWSInstance();if(i?.readyState===Ro.OPEN){let e={headers:[{key:dh.type,value:Jl.ping}],service:Number(r),method:hh.control,SeqID:0,LogID:0};this.sendMessage(e),this.armLiveness(),this.logger.trace("[ws]","ping success")}this.pingInterval=setTimeout(this.pingLoop.bind(this),o)}communicate(){let r=this.wsConfig.getWSInstance();r?.on("message",o=>C(this,void 0,void 0,function*(){this.clearLiveness();let i=Oye(o),{method:e}=i;e===hh.control&&(yield this.handleControlData(i)),e===hh.data&&(yield this.handleEventData(i))})),r?.on("error",o=>{this.logger.error("[ws]","ws error")}),r?.on("close",()=>{this.logger.debug("[ws]","client closed"),this.clearLiveness(),this.reConnect()})}handleControlData(r){var o;return C(this,void 0,void 0,function*(){let i=(o=r.headers.find(a=>a.key===dh.type))===null||o===void 0?void 0:o.value,e=r.payload;if(i!==Jl.ping&&i===Jl.pong&&e){this.logger.trace("[ws]","receive pong");let a=new TextDecoder("utf-8").decode(e),{PingInterval:A,ReconnectCount:t,ReconnectInterval:s,ReconnectNonce:g}=JSON.parse(a);this.wsConfig.updateWs({pingInterval:A*1e3,reconnectCount:t,reconnectInterval:s*1e3,reconnectNonce:g*1e3}),this.logger.trace("[ws]","update wsConfig with pong data")}})}handleEventData(r){var o;return C(this,void 0,void 0,function*(){let i=r.headers.reduce((f,Q)=>(f[Q.key]=Q.value,f),{}),{message_id:e,sum:a,seq:A,type:t,trace_id:s}=i,g=r.payload;if(t!==Jl.event)return;let c=this.dataCache.mergeData({message_id:e,sum:Number(a),seq:Number(A),trace_id:s,data:g});if(!c)return;this.logger.debug("[ws]",`receive message, message_type: ${t}; message_id: ${e}; trace_id: ${s}; data: ${c.data}`);let I={code:IQ.ok},E=Date.now();try{let f=yield(o=this.eventDispatcher)===null||o===void 0?void 0:o.invoke(c,{needCheck:!1});f&&(I.data=Buffer.from(JSON.stringify(f)).toString("base64"))}catch(f){I.code=IQ.internal_server_error,this.logger.error("[ws]",`invoke event failed, message_type: ${t}; message_id: ${e}; trace_id: ${s}; error: ${f}`)}let B=Date.now();this.sendMessage(Object.assign(Object.assign({},r),{headers:[...r.headers,{key:dh.biz_rt,value:String(E-B)}],payload:new TextEncoder().encode(JSON.stringify(I))}))})}sendMessage(r){var o;let i=this.wsConfig.getWSInstance();if(i?.readyState===Ro.OPEN){let e=VJ.Frame.encode(r).finish();(o=this.wsConfig.getWSInstance())===null||o===void 0||o.send(e,a=>{a&&this.logger.error("[ws]","send data failed")})}}getReconnectInfo(){return this.reconnectInfo}getConnectionStatus(){return{state:this.computeState(),lastConnectTime:this.reconnectInfo.lastConnectTime||void 0,nextConnectTime:this.reconnectInfo.nextConnectTime||void 0,reconnectAttempts:this.currentReconnectAttempts}}computeState(){var r;return this.terminalError?"failed":this.isConnecting&&!this.hasEverConnected?"connecting":this.isConnecting&&this.hasEverConnected?"reconnecting":((r=this.wsConfig.getWSInstance())===null||r===void 0?void 0:r.readyState)===Ro.OPEN?"connected":"idle"}close(r={}){let{force:o=!1}=r;this.reconnectGeneration++,this.pingInterval&&(clearTimeout(this.pingInterval),this.pingInterval=void 0),this.reconnectInterval&&(clearTimeout(this.reconnectInterval),this.reconnectInterval=void 0),this.clearLiveness(),this.dataCache.destroy(),this.isConnecting=!1,this.currentReconnectAttempts=0;let i=this.wsConfig.getWSInstance();i&&(i.removeAllListeners(),o?i.terminate():i.close(),this.wsConfig.setWSInstance(null)),this.logger.info("[ws]",`ws client closed manually${o?" (force)":""}`)}start(r){return C(this,void 0,void 0,function*(){let{appId:o}=this.wsConfig.getClient();if(!/^cli_[0-9a-fA-F]{16}$/.test(o)){this.logger.error("[ws]",`invalid appId: ${o}`);return}let{eventDispatcher:i}=r;if(!i){this.logger.warn("[ws]","client need to start with a eventDispatcher");return}this.terminalError=!1,this.currentReconnectAttempts=0,this.dataCache.clearAtInterval(),this.logger.info("[ws]",`receive events or callbacks through persistent connection only available in self-build & Feishu app, Configured in: Developer Console(\u5F00\u53D1\u8005\u540E\u53F0) -> Events and Callbacks(\u4E8B\u4EF6\u4E0E\u56DE\u8C03) -> Mode of event/callback subscription(\u8BA2\u9605\u65B9\u5F0F) -> - Receive events/callbacks through persistent connection(\u4F7F\u7528 \u957F\u8FDE\u63A5 \u63A5\u6536\u4E8B\u4EF6/\u56DE\u8C03)`),this.eventDispatcher=i,this.reConnect(!0)})}},ST=class{constructor(){this.sessions=new Map}set(r,o){return C(this,void 0,void 0,function*(){let i=this.sessions.get(r.toString())||{},e=qJ(i,o);return this.sessions.set(r.toString(),e),!0})}get(r){return C(this,void 0,void 0,function*(){return this.sessions.get(r.toString())})}},yi;(function(n){n[n.ERROR=-1]="ERROR",n[n.SUCCESS=0]="SUCCESS",n[n.EXPIRED=1]="EXPIRED",n[n.CANCELLED=2]="CANCELLED",n[n.FAILED=3]="FAILED",n[n.OTHER=4]="OTHER"})(yi||(yi={}));var DT=class{constructor(r){this.completions={create:this.create.bind(this),createWithStream:this.createWithStream.bind(this),sessionRecords:{get:this.getRecords.bind(this),update:this.updateRecords.bind(this)}},this.client=r.client,this.logger=r.client.logger,this.cache=r.cache||new ST}getSessionId(r){var o;return C(this,void 0,void 0,function*(){let{sessionId:i,payload:e,options:a}=r,A=yield this.getRecords();if(i&&i in A)return A[i];let t=yield this.client.aily.v1.ailySession.create({data:e},a);if(t.code===0&&t.data){let s=(o=t.data.session)===null||o===void 0?void 0:o.id;return i&&(yield this.updateRecords({[i]:s})),s}else{this.logger.error("get aily session id error",t.msg);return}})}waitReply(r,o){var i,e;return C(this,void 0,void 0,function*(){let{sessionId:a,ailyAppId:A,message:t,sessionInfo:s,messageInfo:g,runInfo:c,skillId:I}=r,E=yield this.getSessionId({sessionId:a,payload:s,options:o});if(!E)throw yi.ERROR;let B=yield this.client.aily.v1.ailySessionAilyMessage.create({path:{aily_session_id:E},data:Object.assign(Object.assign({},g),{content:t,idempotent_id:`${Date.now()}`,content_type:"MDX"})},o);if(!(B.code===0&&B.data))throw this.logger.error("create aily message error",B.msg),yi.ERROR;let f=(i=B.data.message)===null||i===void 0?void 0:i.id,Q=yield this.client.aily.v1.ailySessionRun.create({path:{aily_session_id:E},data:Object.assign({app_id:A,skill_id:I},c)},o);if(!(Q.code===0&&Q.data))throw this.logger.error("create aily session run error",Q.msg),yi.ERROR;let y=(e=Q.data.run)===null||e===void 0?void 0:e.id;if(!y)throw this.logger.error("run id is empty"),yi.ERROR;let m=()=>C(this,void 0,void 0,function*(){return new Promise(_=>{setTimeout(()=>C(this,void 0,void 0,function*(){var P,Y;let j=yield this.client.aily.v1.ailySessionRun.get({path:{aily_session_id:E,run_id:y}},o);if(!(j.code===0&&j.data)){_(3);return}switch((Y=(P=j.data)===null||P===void 0?void 0:P.run)===null||Y===void 0?void 0:Y.status){case"QUEUED":case"IN_PROGRESS":yield C(this,void 0,void 0,function*(){let q=yield m();_(q)});case"COMPLETED":_(yi.SUCCESS);case"EXPIRED":_(yi.EXPIRED);case"CANCELLED":_(yi.CANCELLED);case"FAILED":_(yi.FAILED);default:_(yi.OTHER)}}),500)})}),T=yield m();if(T!==yi.SUCCESS)throw this.logger.error("aily run error"),T;return{ailySessionId:E,runId:y,messageId:f}})}create(r,o){var i,e,a,A,t;return C(this,void 0,void 0,function*(){let{ailySessionId:s,runId:g}=yield this.waitReply(r,o),c;try{for(var I=!0,E=BJ(yield this.client.aily.v1.ailySessionAilyMessage.listWithIterator({path:{aily_session_id:s},params:{run_id:g,with_partial_message:!1}},o)),B;B=yield E.next(),i=B.done,!i;){A=B.value,I=!1;try{let f=A;if(!f)continue;(t=f?.messages)===null||t===void 0||t.forEach(Q=>{var y;((y=Q.sender)===null||y===void 0?void 0:y.sender_type)==="ASSISTANT"&&(c=Q)})}finally{I=!0}}}catch(f){e={error:f}}finally{try{!I&&!i&&(a=E.return)&&(yield a.call(E))}finally{if(e)throw e.error}}if(!c)throw this.logger.error("no aily reply"),yi.ERROR;return c})}createWithStream(r,o){return C(this,void 0,void 0,function*(){let{ailySessionId:i,runId:e,messageId:a}=yield this.waitReply(r,o),A=()=>this.client.aily.v1.ailySessionAilyMessage.listWithIterator({path:{aily_session_id:i},params:{run_id:e,with_partial_message:!0}},o),t=!1;return{[Symbol.asyncIterator](){return L(this,arguments,function*(){var c,I,E,B;try{for(var f=!0,Q=BJ(yield S(A())),y;y=yield S(Q.next()),c=y.done,!c;){B=y.value,f=!1;try{let m=B;if(!m)continue;for(let T of m.messages||[])if(t){if(yield yield S(T),T.status==="COMPLETED")return yield S(void 0)}else T.id===a&&T.status==="COMPLETED"&&(t=!0)}finally{f=!0}}}catch(m){I={error:m}}finally{try{!f&&!c&&(E=Q.return)&&(yield S(E.call(Q)))}finally{if(I)throw I.error}}})}}})}getRecords(){return C(this,void 0,void 0,function*(){return(yield this.cache.get(QJ))||{}})}updateRecords(r){return C(this,void 0,void 0,function*(){yield this.cache.set(QJ,r)})}};function gh(n,r){if(typeof n!="object"||n===null||Array.isArray(n))throw new Error(`${r} must be an object`)}function ch(n,r,o){for(let i of Object.keys(n))if(!r.includes(i))throw new Error(`${o}.${i} is not allowed; allowed keys: ${r.join(", ")}`)}function Dye(n,r){if(n!==void 0){if(!Array.isArray(n))throw new Error(`${r} must be an array of strings`);return n.forEach((o,i)=>{if(typeof o!="string"||o==="")throw new Error(`${r}[${i}] must be a non-empty string`)}),n}}function wye(n){gh(n,"addons"),ch(n,["preset","scopes","events","callbacks"],"addons");let r=0,o=(e,a)=>{var A;let t=Dye(e,a);return r+=(A=t?.length)!==null&&A!==void 0?A:0,t},i={};if(n.preset!==void 0){if(typeof n.preset!="boolean")throw new Error("addons.preset must be a boolean");i.preset=n.preset}if(n.scopes!==void 0&&(gh(n.scopes,"addons.scopes"),ch(n.scopes,["tenant","user"],"addons.scopes"),i.scopes={tenant:o(n.scopes.tenant,"addons.scopes.tenant"),user:o(n.scopes.user,"addons.scopes.user")}),n.events!==void 0&&(gh(n.events,"addons.events"),ch(n.events,["items"],"addons.events"),n.events.items!==void 0&&(gh(n.events.items,"addons.events.items"),ch(n.events.items,["tenant","user"],"addons.events.items"),i.events={items:{tenant:o(n.events.items.tenant,"addons.events.items.tenant"),user:o(n.events.items.user,"addons.events.items.user")}})),n.callbacks!==void 0&&(gh(n.callbacks,"addons.callbacks"),ch(n.callbacks,["items"],"addons.callbacks"),i.callbacks={items:o(n.callbacks.items,"addons.callbacks.items")}),r===0&&n.preset!==!1)throw new Error("addons must contain at least one scope, event or callback");return i}function Oye(n){let r=JSON.stringify(wye(n));return ZQe(Buffer.from(r,"utf8")).toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Ih(n,r){return{code:n,description:r}}var mJ="node-sdk",bye="accounts.feishu.cn",Mye="accounts.larksuite.com",_ye="/oauth/v1/app/registration",SJ=6;function Nye(n,r){let{avatar:o,name:i,desc:e}=r;if(o!==void 0){let a=Array.isArray(o)?o:[o];if(a.length===0)throw new Error("appPreset.avatar must contain at least 1 URL");if(a.length>SJ)throw new Error(`appPreset.avatar supports at most ${SJ} URLs, got ${a.length}`);a.forEach((A,t)=>{if(typeof A!="string"||A==="")throw new Error(`appPreset.avatar[${t}] must be a non-empty string`);n.searchParams.append("avatar",A)})}i!==void 0&&n.searchParams.set("name",i),e!==void 0&&n.searchParams.set("desc",e)}function zJ(n,r){var o;return C(this,void 0,void 0,function*(){try{return yield Vl.post(`${n}${_ye}`,new URLSearchParams(r).toString(),{headers:{"Content-Type":"application/x-www-form-urlencoded"}})}catch(i){if(i instanceof _M&&(!((o=i.response)===null||o===void 0)&&o.data))return i.response.data;throw i}})}function Tye(n){return zJ(n,{action:"begin",archetype:"PersonalAgent",auth_method:"client_secret",request_user_info:"open_id"})}function Rye(n){return new Promise((r,o)=>{var i,e;let{baseUrl:a,interval:A}=n,t=!1,s=null,g=null,c=()=>{var B;s!==null&&(clearTimeout(s),s=null),g!==null&&(clearTimeout(g),g=null),(B=n.signal)===null||B===void 0||B.removeEventListener("abort",I)},I=()=>{c(),o(Ih("abort","Registration was aborted"))};if(!((i=n.signal)===null||i===void 0)&&i.aborted)return o(Ih("abort","Registration was aborted"));(e=n.signal)===null||e===void 0||e.addEventListener("abort",I,{once:!0}),g=setTimeout(()=>{c(),o(Ih("expired_token","Polling timed out"))},n.expireIn);let E=()=>C(this,void 0,void 0,function*(){var B,f,Q,y,m,T;try{let _=yield zJ(a,{action:"poll",device_code:n.deviceCode});if(((B=_.user_info)===null||B===void 0?void 0:B.tenant_brand)==="lark"&&!t){a=n.larkBaseUrl,t=!0,(f=n.onStatusChange)===null||f===void 0||f.call(n,{status:"domain_switched"}),E();return}if(_.client_id&&_.client_secret){c(),r({client_id:_.client_id,client_secret:_.client_secret,user_info:_.user_info});return}switch(_.error){case"authorization_pending":(Q=n.onStatusChange)===null||Q===void 0||Q.call(n,{status:"polling"});break;case"slow_down":A+=5e3,(y=n.onStatusChange)===null||y===void 0||y.call(n,{status:"slow_down",interval:A/1e3});break;case"access_denied":case"expired_token":c(),o(Ih(_.error,(m=_.error_description)!==null&&m!==void 0?m:"Unknown error"));return;default:if(_.error){c(),o(Ih(_.error,(T=_.error_description)!==null&&T!==void 0?T:"Unknown error"));return}break}s=setTimeout(E,A)}catch(_){c(),o(_)}});E()})}function kye(n){var r,o,i,e;return C(this,void 0,void 0,function*(){let{domain:a,source:A,signal:t,onQRCodeReady:s,onStatusChange:g,appPreset:c,addons:I,createOnly:E,appId:B}=n;if(B!==void 0&&(typeof B!="string"||B===""))throw new Error("appId must be a non-empty string");let f=`https://${a??bye}`,Q=yield Tye(f),y=new URL(Q.verification_uri_complete);return y.searchParams.set("from","sdk"),y.searchParams.set("source",A?`${mJ}/${A}`:mJ),y.searchParams.set("tp","sdk"),c&&Nye(y,c),I&&y.searchParams.set("addons",Oye(I)),E===!0&&y.searchParams.set("createOnly","true"),B&&y.searchParams.set("clientID",B),s({url:y.toString(),expireIn:(r=Q.expires_in)!==null&&r!==void 0?r:600}),Rye({baseUrl:f,deviceCode:Q.device_code,interval:((o=Q.interval)!==null&&o!==void 0?o:5)*1e3,expireIn:((i=Q.expires_in)!==null&&i!==void 0?i:600)*1e3,larkBaseUrl:`https://${(e=n.larkDomain)!==null&&e!==void 0?e:Mye}`,signal:t,onStatusChange:g})})}var St=class extends Error{constructor(r,o,i){super(o),this.name="LarkChannelError",this.code=r,this.cause=i?.cause,this.context=i?.context}},pQ=class{constructor(r,o){this.opts=r,this.fire=o,this.pendingChars=0,this.lastFireAt=0}note(r){if(this.pendingChars+=r,this.pendingChars>=this.opts.chars){this.fireSoon(0);return}if(!this.timer){let o=Date.now()-this.lastFireAt,i=Math.max(0,this.opts.ms-o);this.fireSoon(i)}}fireSoon(r){this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.timer=void 0,this.doFire()},r)}flushNow(){return C(this,void 0,void 0,function*(){this.timer&&(clearTimeout(this.timer),this.timer=void 0),this.inFlight&&(yield this.inFlight),yield this.doFire()})}doFire(){return C(this,void 0,void 0,function*(){if(this.inFlight){this.fireSoon(this.opts.ms);return}let r=C(this,void 0,void 0,function*(){this.pendingChars=0,this.lastFireAt=Date.now(),yield this.fire()});this.inFlight=r;try{yield r}finally{this.inFlight=void 0}})}dispose(){this.timer&&(clearTimeout(this.timer),this.timer=void 0)}},EQ=class{constructor(){this.tail=Promise.resolve()}enqueue(r){let o=this.tail.then(r,r);return this.tail=o.then(()=>{},()=>{}),o}drain(){return this.tail}};function vye(n,r){if(!n)return r;if(!r)return n;if(r.startsWith(n))return r;if(n.startsWith(r))return n;let o=Math.min(n.length,r.length);for(let i=o;i>0;i--)if(n.endsWith(r.substring(0,i)))return n+r.substring(i);return n+r}function WJ(n,r){if(n.length<=r)return[n];let o=n.split(` + Receive events/callbacks through persistent connection(\u4F7F\u7528 \u957F\u8FDE\u63A5 \u63A5\u6536\u4E8B\u4EF6/\u56DE\u8C03)`),this.eventDispatcher=i,this.reConnect(!0)})}},ST=class{constructor(){this.sessions=new Map}set(r,o){return C(this,void 0,void 0,function*(){let i=this.sessions.get(r.toString())||{},e=qJ(i,o);return this.sessions.set(r.toString(),e),!0})}get(r){return C(this,void 0,void 0,function*(){return this.sessions.get(r.toString())})}},yi;(function(n){n[n.ERROR=-1]="ERROR",n[n.SUCCESS=0]="SUCCESS",n[n.EXPIRED=1]="EXPIRED",n[n.CANCELLED=2]="CANCELLED",n[n.FAILED=3]="FAILED",n[n.OTHER=4]="OTHER"})(yi||(yi={}));var DT=class{constructor(r){this.completions={create:this.create.bind(this),createWithStream:this.createWithStream.bind(this),sessionRecords:{get:this.getRecords.bind(this),update:this.updateRecords.bind(this)}},this.client=r.client,this.logger=r.client.logger,this.cache=r.cache||new ST}getSessionId(r){var o;return C(this,void 0,void 0,function*(){let{sessionId:i,payload:e,options:a}=r,A=yield this.getRecords();if(i&&i in A)return A[i];let t=yield this.client.aily.v1.ailySession.create({data:e},a);if(t.code===0&&t.data){let s=(o=t.data.session)===null||o===void 0?void 0:o.id;return i&&(yield this.updateRecords({[i]:s})),s}else{this.logger.error("get aily session id error",t.msg);return}})}waitReply(r,o){var i,e;return C(this,void 0,void 0,function*(){let{sessionId:a,ailyAppId:A,message:t,sessionInfo:s,messageInfo:g,runInfo:c,skillId:I}=r,E=yield this.getSessionId({sessionId:a,payload:s,options:o});if(!E)throw yi.ERROR;let B=yield this.client.aily.v1.ailySessionAilyMessage.create({path:{aily_session_id:E},data:Object.assign(Object.assign({},g),{content:t,idempotent_id:`${Date.now()}`,content_type:"MDX"})},o);if(!(B.code===0&&B.data))throw this.logger.error("create aily message error",B.msg),yi.ERROR;let f=(i=B.data.message)===null||i===void 0?void 0:i.id,Q=yield this.client.aily.v1.ailySessionRun.create({path:{aily_session_id:E},data:Object.assign({app_id:A,skill_id:I},c)},o);if(!(Q.code===0&&Q.data))throw this.logger.error("create aily session run error",Q.msg),yi.ERROR;let y=(e=Q.data.run)===null||e===void 0?void 0:e.id;if(!y)throw this.logger.error("run id is empty"),yi.ERROR;let m=()=>C(this,void 0,void 0,function*(){return new Promise(_=>{setTimeout(()=>C(this,void 0,void 0,function*(){var P,Y;let j=yield this.client.aily.v1.ailySessionRun.get({path:{aily_session_id:E,run_id:y}},o);if(!(j.code===0&&j.data)){_(3);return}switch((Y=(P=j.data)===null||P===void 0?void 0:P.run)===null||Y===void 0?void 0:Y.status){case"QUEUED":case"IN_PROGRESS":yield C(this,void 0,void 0,function*(){let q=yield m();_(q)});case"COMPLETED":_(yi.SUCCESS);case"EXPIRED":_(yi.EXPIRED);case"CANCELLED":_(yi.CANCELLED);case"FAILED":_(yi.FAILED);default:_(yi.OTHER)}}),500)})}),T=yield m();if(T!==yi.SUCCESS)throw this.logger.error("aily run error"),T;return{ailySessionId:E,runId:y,messageId:f}})}create(r,o){var i,e,a,A,t;return C(this,void 0,void 0,function*(){let{ailySessionId:s,runId:g}=yield this.waitReply(r,o),c;try{for(var I=!0,E=BJ(yield this.client.aily.v1.ailySessionAilyMessage.listWithIterator({path:{aily_session_id:s},params:{run_id:g,with_partial_message:!1}},o)),B;B=yield E.next(),i=B.done,!i;){A=B.value,I=!1;try{let f=A;if(!f)continue;(t=f?.messages)===null||t===void 0||t.forEach(Q=>{var y;((y=Q.sender)===null||y===void 0?void 0:y.sender_type)==="ASSISTANT"&&(c=Q)})}finally{I=!0}}}catch(f){e={error:f}}finally{try{!I&&!i&&(a=E.return)&&(yield a.call(E))}finally{if(e)throw e.error}}if(!c)throw this.logger.error("no aily reply"),yi.ERROR;return c})}createWithStream(r,o){return C(this,void 0,void 0,function*(){let{ailySessionId:i,runId:e,messageId:a}=yield this.waitReply(r,o),A=()=>this.client.aily.v1.ailySessionAilyMessage.listWithIterator({path:{aily_session_id:i},params:{run_id:e,with_partial_message:!0}},o),t=!1;return{[Symbol.asyncIterator](){return L(this,arguments,function*(){var c,I,E,B;try{for(var f=!0,Q=BJ(yield S(A())),y;y=yield S(Q.next()),c=y.done,!c;){B=y.value,f=!1;try{let m=B;if(!m)continue;for(let T of m.messages||[])if(t){if(yield yield S(T),T.status==="COMPLETED")return yield S(void 0)}else T.id===a&&T.status==="COMPLETED"&&(t=!0)}finally{f=!0}}}catch(m){I={error:m}}finally{try{!f&&!c&&(E=Q.return)&&(yield S(E.call(Q)))}finally{if(I)throw I.error}}})}}})}getRecords(){return C(this,void 0,void 0,function*(){return(yield this.cache.get(QJ))||{}})}updateRecords(r){return C(this,void 0,void 0,function*(){yield this.cache.set(QJ,r)})}};function gh(n,r){if(typeof n!="object"||n===null||Array.isArray(n))throw new Error(`${r} must be an object`)}function ch(n,r,o){for(let i of Object.keys(n))if(!r.includes(i))throw new Error(`${o}.${i} is not allowed; allowed keys: ${r.join(", ")}`)}function bye(n,r){if(n!==void 0){if(!Array.isArray(n))throw new Error(`${r} must be an array of strings`);return n.forEach((o,i)=>{if(typeof o!="string"||o==="")throw new Error(`${r}[${i}] must be a non-empty string`)}),n}}function Mye(n){gh(n,"addons"),ch(n,["preset","scopes","events","callbacks"],"addons");let r=0,o=(e,a)=>{var A;let t=bye(e,a);return r+=(A=t?.length)!==null&&A!==void 0?A:0,t},i={};if(n.preset!==void 0){if(typeof n.preset!="boolean")throw new Error("addons.preset must be a boolean");i.preset=n.preset}if(n.scopes!==void 0&&(gh(n.scopes,"addons.scopes"),ch(n.scopes,["tenant","user"],"addons.scopes"),i.scopes={tenant:o(n.scopes.tenant,"addons.scopes.tenant"),user:o(n.scopes.user,"addons.scopes.user")}),n.events!==void 0&&(gh(n.events,"addons.events"),ch(n.events,["items"],"addons.events"),n.events.items!==void 0&&(gh(n.events.items,"addons.events.items"),ch(n.events.items,["tenant","user"],"addons.events.items"),i.events={items:{tenant:o(n.events.items.tenant,"addons.events.items.tenant"),user:o(n.events.items.user,"addons.events.items.user")}})),n.callbacks!==void 0&&(gh(n.callbacks,"addons.callbacks"),ch(n.callbacks,["items"],"addons.callbacks"),i.callbacks={items:o(n.callbacks.items,"addons.callbacks.items")}),r===0&&n.preset!==!1)throw new Error("addons must contain at least one scope, event or callback");return i}function _ye(n){let r=JSON.stringify(Mye(n));return eye(Buffer.from(r,"utf8")).toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Ih(n,r){return{code:n,description:r}}var mJ="node-sdk",Nye="accounts.feishu.cn",Tye="accounts.larksuite.com",Rye="/oauth/v1/app/registration",SJ=6;function kye(n,r){let{avatar:o,name:i,desc:e}=r;if(o!==void 0){let a=Array.isArray(o)?o:[o];if(a.length===0)throw new Error("appPreset.avatar must contain at least 1 URL");if(a.length>SJ)throw new Error(`appPreset.avatar supports at most ${SJ} URLs, got ${a.length}`);a.forEach((A,t)=>{if(typeof A!="string"||A==="")throw new Error(`appPreset.avatar[${t}] must be a non-empty string`);n.searchParams.append("avatar",A)})}i!==void 0&&n.searchParams.set("name",i),e!==void 0&&n.searchParams.set("desc",e)}function zJ(n,r){var o;return C(this,void 0,void 0,function*(){try{return yield Vl.post(`${n}${Rye}`,new URLSearchParams(r).toString(),{headers:{"Content-Type":"application/x-www-form-urlencoded"}})}catch(i){if(i instanceof _M&&(!((o=i.response)===null||o===void 0)&&o.data))return i.response.data;throw i}})}function vye(n){return zJ(n,{action:"begin",archetype:"PersonalAgent",auth_method:"client_secret",request_user_info:"open_id"})}function Pye(n){return new Promise((r,o)=>{var i,e;let{baseUrl:a,interval:A}=n,t=!1,s=null,g=null,c=()=>{var B;s!==null&&(clearTimeout(s),s=null),g!==null&&(clearTimeout(g),g=null),(B=n.signal)===null||B===void 0||B.removeEventListener("abort",I)},I=()=>{c(),o(Ih("abort","Registration was aborted"))};if(!((i=n.signal)===null||i===void 0)&&i.aborted)return o(Ih("abort","Registration was aborted"));(e=n.signal)===null||e===void 0||e.addEventListener("abort",I,{once:!0}),g=setTimeout(()=>{c(),o(Ih("expired_token","Polling timed out"))},n.expireIn);let E=()=>C(this,void 0,void 0,function*(){var B,f,Q,y,m,T;try{let _=yield zJ(a,{action:"poll",device_code:n.deviceCode});if(((B=_.user_info)===null||B===void 0?void 0:B.tenant_brand)==="lark"&&!t){a=n.larkBaseUrl,t=!0,(f=n.onStatusChange)===null||f===void 0||f.call(n,{status:"domain_switched"}),E();return}if(_.client_id&&_.client_secret){c(),r({client_id:_.client_id,client_secret:_.client_secret,user_info:_.user_info});return}switch(_.error){case"authorization_pending":(Q=n.onStatusChange)===null||Q===void 0||Q.call(n,{status:"polling"});break;case"slow_down":A+=5e3,(y=n.onStatusChange)===null||y===void 0||y.call(n,{status:"slow_down",interval:A/1e3});break;case"access_denied":case"expired_token":c(),o(Ih(_.error,(m=_.error_description)!==null&&m!==void 0?m:"Unknown error"));return;default:if(_.error){c(),o(Ih(_.error,(T=_.error_description)!==null&&T!==void 0?T:"Unknown error"));return}break}s=setTimeout(E,A)}catch(_){c(),o(_)}});E()})}function Gye(n){var r,o,i,e;return C(this,void 0,void 0,function*(){let{domain:a,source:A,signal:t,onQRCodeReady:s,onStatusChange:g,appPreset:c,addons:I,createOnly:E,appId:B}=n;if(B!==void 0&&(typeof B!="string"||B===""))throw new Error("appId must be a non-empty string");let f=`https://${a??Nye}`,Q=yield vye(f),y=new URL(Q.verification_uri_complete);return y.searchParams.set("from","sdk"),y.searchParams.set("source",A?`${mJ}/${A}`:mJ),y.searchParams.set("tp","sdk"),c&&kye(y,c),I&&y.searchParams.set("addons",_ye(I)),E===!0&&y.searchParams.set("createOnly","true"),B&&y.searchParams.set("clientID",B),s({url:y.toString(),expireIn:(r=Q.expires_in)!==null&&r!==void 0?r:600}),Pye({baseUrl:f,deviceCode:Q.device_code,interval:((o=Q.interval)!==null&&o!==void 0?o:5)*1e3,expireIn:((i=Q.expires_in)!==null&&i!==void 0?i:600)*1e3,larkBaseUrl:`https://${(e=n.larkDomain)!==null&&e!==void 0?e:Tye}`,signal:t,onStatusChange:g})})}var St=class extends Error{constructor(r,o,i){super(o),this.name="LarkChannelError",this.code=r,this.cause=i?.cause,this.context=i?.context}},pQ=class{constructor(r,o){this.opts=r,this.fire=o,this.pendingChars=0,this.lastFireAt=0}note(r){if(this.pendingChars+=r,this.pendingChars>=this.opts.chars){this.fireSoon(0);return}if(!this.timer){let o=Date.now()-this.lastFireAt,i=Math.max(0,this.opts.ms-o);this.fireSoon(i)}}fireSoon(r){this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.timer=void 0,this.doFire()},r)}flushNow(){return C(this,void 0,void 0,function*(){this.timer&&(clearTimeout(this.timer),this.timer=void 0),this.inFlight&&(yield this.inFlight),yield this.doFire()})}doFire(){return C(this,void 0,void 0,function*(){if(this.inFlight){this.fireSoon(this.opts.ms);return}let r=C(this,void 0,void 0,function*(){this.pendingChars=0,this.lastFireAt=Date.now(),yield this.fire()});this.inFlight=r;try{yield r}finally{this.inFlight=void 0}})}dispose(){this.timer&&(clearTimeout(this.timer),this.timer=void 0)}},EQ=class{constructor(){this.tail=Promise.resolve()}enqueue(r){let o=this.tail.then(r,r);return this.tail=o.then(()=>{},()=>{}),o}drain(){return this.tail}};function Fye(n,r){if(!n)return r;if(!r)return n;if(r.startsWith(n))return r;if(n.startsWith(r))return n;let o=Math.min(n.length,r.length);for(let i=o;i>0;i--)if(n.endsWith(r.substring(0,i)))return n+r.substring(i);return n+r}function WJ(n,r){if(n.length<=r)return[n];let o=n.split(` `),i=[],e=[],a=0,A=null,t=()=>{if(e.length===0)return;let s=e.join(` -`);A!==null&&(s+="\n```"),i.push(s),e=[],a=0,A!==null&&(e.push("```"+A),a=e[0].length)};for(let s of o){let g=s.match(/^```(\w*)$/),c=s.length+(e.length>0?1:0),I=/^#{1,6}\s/.test(s),E=a>r*.75;(a+c>r||I&&E&&e.length>0)&&t(),e.push(s),a+=c,g&&(A=A===null?g[1]||"":null)}return t(),i}var Pye=100,Gye=50,Fye="Thinking...",DJ="(no content)",Lye="[Generating...]",Uye=50,Hye=` +`);A!==null&&(s+="\n```"),i.push(s),e=[],a=0,A!==null&&(e.push("```"+A),a=e[0].length)};for(let s of o){let g=s.match(/^```(\w*)$/),c=s.length+(e.length>0?1:0),I=/^#{1,6}\s/.test(s),E=a>r*.75;(a+c>r||I&&E&&e.length>0)&&t(),e.push(s),a+=c,g&&(A=A===null?g[1]||"":null)}return t(),i}var Lye=100,Uye=50,Hye="Thinking...",DJ="(no content)",Kye="[Generating...]",Yye=50,xye=` -\u2014 _(Generation interrupted)_`,Kye=3e4,AQ="stream_md";function gN(n,r=Uye){if(!n)return"";let o=n.replace(/\s+/g," ").trim();return o.length<=r?o:o.slice(0,r-1)+"\u2026"}function wJ(n){return{schema:"2.0",config:{streaming_mode:!0,summary:{content:Lye},streaming_config:{print_frequency_ms:{default:70},print_step:{default:1},print_strategy:"fast"}},body:{elements:[{tag:"markdown",element_id:AQ,content:n}]}}}var wT=class{constructor(r,o,i,e){var a,A,t;this.sender=r,this.to=o,this.idType=i,this.opts=e,this.content="",this.fullAccumulated="",this._messageId="",this.cardId="",this.sequence=0,this.queue=new EQ,this.started=!1,this.streamingFailed=!1,this.rolloverMessageIds=[];let s=this.sender.config;this.throttle=new pQ({ms:(a=s.streamThrottleMs)!==null&&a!==void 0?a:Pye,chars:(A=s.streamThrottleChars)!==null&&A!==void 0?A:Gye},()=>this.pushContent()),this.maxChars=(t=s.streamMaxElementChars)!==null&&t!==void 0?t:Kye}get messageId(){return this._messageId}append(r){return C(this,void 0,void 0,function*(){if(!r)return;yield this.ensureStarted();let o=vye(this.fullAccumulated,r),i=o.slice(this.fullAccumulated.length);this.fullAccumulated=o,this.content+=i,this.throttle.note(r.length)})}setContent(r){return C(this,void 0,void 0,function*(){yield this.ensureStarted(),this.fullAccumulated=r??"",this.content=r??"",this.throttle.note(Number.MAX_SAFE_INTEGER)})}run(r){return C(this,void 0,void 0,function*(){yield this.ensureStarted();try{yield r(this)}catch(o){throw yield this.failTerminal(o),o}return yield this.completeTerminal(),{messageId:this._messageId}})}ensureStarted(){var r;return C(this,void 0,void 0,function*(){if(this.started)return;this.started=!0;let o=(r=this.sender.config.streamInitialText)!==null&&r!==void 0?r:Fye,i=wJ(o||"...");this.cardId=yield this.sender.createCardInstance(i),this._messageId=yield this.sender.sendCardByReference(this.to,this.idType,this.cardId,this.opts)})}pushContent(){return C(this,void 0,void 0,function*(){!this.cardId||this.streamingFailed||(yield this.queue.enqueue(()=>C(this,void 0,void 0,function*(){var r,o;if(!this.streamingFailed)try{yield this.pushSnapshot()}catch(i){this.streamingFailed=!0,(o=(r=this.sender.logger).warn)===null||o===void 0||o.call(r,"[stream] update failed",i)}})))})}pushSnapshot(){return C(this,void 0,void 0,function*(){for(;this.content.length>this.maxChars;)yield this.rollover();let r=this.content||"...";yield this.sender.updateCardElementContent(this.cardId,AQ,r,++this.sequence)})}rollover(){return C(this,void 0,void 0,function*(){let r=WJ(this.content,this.maxChars);if(r.length<2)throw new Error("rollover: content not splittable below limit");let o=r[0],i=r.slice(1).join(` -`);yield this.sender.updateCardElementContent(this.cardId,AQ,o,++this.sequence);try{yield this.sender.finishStreamingCard(this.cardId,++this.sequence,gN(o))}catch{}let e=wJ(i||"..."),a=yield this.sender.createCardInstance(e),A=yield this.sender.sendCardByReference(this.to,this.idType,a,this.opts);this.cardId=a,this.content=i,this.sequence=0,this.rolloverMessageIds.push(A)})}completeTerminal(){var r,o;return C(this,void 0,void 0,function*(){if(yield this.throttle.flushNow(),yield this.queue.drain(),!!this.cardId){!this.content&&!this.streamingFailed&&(yield this.queue.enqueue(()=>C(this,void 0,void 0,function*(){try{yield this.sender.updateCardElementContent(this.cardId,AQ,DJ,++this.sequence)}catch{}})),yield this.queue.drain());try{yield this.sender.finishStreamingCard(this.cardId,++this.sequence,gN(this.content||DJ))}catch(i){(o=(r=this.sender.logger).warn)===null||o===void 0||o.call(r,"[stream] finishStreamingCard failed",i)}}})}failTerminal(r){return C(this,void 0,void 0,function*(){if(this.throttle.dispose(),!!this.cardId){this.content=(this.content||"")+Hye,yield this.queue.enqueue(()=>C(this,void 0,void 0,function*(){try{yield this.pushSnapshot()}catch{}})),yield this.queue.drain();try{yield this.sender.finishStreamingCard(this.cardId,++this.sequence,gN(this.content))}catch{}}})}},OT=class{constructor(r,o,i,e){this.impl=new wT(r,o,i,e)}run(r){return this.impl.run(r)}},Yye=100,xye=50,bT=class{constructor(r,o,i,e,a){var A,t;this.sender=r,this.to=o,this.idType=i,this.opts=e,this._messageId="",this.queue=new EQ,this._current=a;let s=r.config;this.throttle=new pQ({ms:(A=s.streamThrottleMs)!==null&&A!==void 0?A:Yye,chars:(t=s.streamThrottleChars)!==null&&t!==void 0?t:xye},()=>this.patch())}get messageId(){return this._messageId}get current(){return this._current}update(r){return C(this,void 0,void 0,function*(){let o=typeof r=="function"?r(this._current):r;this._current=o,this.throttle.note(JSON.stringify(o).length)})}run(r){return C(this,void 0,void 0,function*(){yield this.sendInitial();try{yield r(this)}catch(o){throw yield this.failTerminal(o),o}return yield this.completeTerminal(),{messageId:this._messageId}})}sendInitial(){return C(this,void 0,void 0,function*(){let r=yield this.sender.sendOneWithFallback({to:this.to,idType:this.idType,msgType:"interactive",content:this._current,replyTo:this.opts.replyTo,replyInThread:this.opts.replyInThread});this._messageId=r})}patch(){return C(this,void 0,void 0,function*(){if(!this._messageId)return;let r=this._current;yield this.queue.enqueue(()=>C(this,void 0,void 0,function*(){yield this.sender.patchCard(this._messageId,r)}))})}completeTerminal(){return C(this,void 0,void 0,function*(){yield this.throttle.flushNow(),yield this.queue.drain()})}failTerminal(r){return C(this,void 0,void 0,function*(){this.throttle.dispose();let o=jye(this._current);yield this.queue.enqueue(()=>C(this,void 0,void 0,function*(){try{yield this.sender.patchCard(this._messageId,o)}catch{}})),yield this.queue.drain()})}};function jye(n){let r=n,o=Array.isArray(r?.elements)?[...r.elements]:[];return o.push({tag:"note",elements:[{tag:"plain_text",content:"\u26A0\uFE0F \u751F\u6210\u4E2D\u65AD"}]}),Object.assign(Object.assign({},n),{elements:o})}var MT=class{constructor(r,o,i,e,a){this.impl=new bT(r,o,i,e,a)}run(r){return this.impl.run(r)}};function Jye(n){if(!(!n||n.length<27)){for(let r=n.length-27;r>=0;r--)if(n[r]===79&&n[r+1]===103&&n[r+2]===103&&n[r+3]===83){let o=n.readBigInt64LE(r+6);if(on.length)return;let e=n.readUInt8(i),a=i+4,A,t;if(e===1){if(a+28>n.length)return;A=n.readUInt32BE(a+16),t=Number(n.readBigUInt64BE(a+20))}else{if(a+16>n.length)return;A=n.readUInt32BE(a+8),t=n.readUInt32BE(a+12)}if(!(!A||!Number.isFinite(A)||!Number.isFinite(t)))return Math.round(t/A*1e3)}function OJ(n,r,o,i){let e=r;for(;e+8<=o&&e+8<=n.length;){let a=n.readUInt32BE(e),A=n.slice(e+4,e+8).toString("ascii"),t=a===1?e+Number(n.readBigUInt64BE(e+8)):a===0?o:e+a;if(t<=e||t>o)return;if(A===i)return{start:a===1?e+16:e+8,end:t};e=t}}var Vye=[[0,8],[167772160,8],[2130706432,8],[2851995648,16],[2886729728,12],[3232235520,16],[1681915904,10],[3221225472,24],[3221225984,24],[3323068416,15],[3325256704,24],[3405803776,24],[3758096384,4],[4026531840,4]];function zye(n,r={}){var o,i;return C(this,void 0,void 0,function*(){let e=new URL(n);if(e.protocol!=="http:"&&e.protocol!=="https:")throw new Error(`ssrf_blocked: protocol ${e.protocol}`);let a=e.hostname,A=a.startsWith("[")&&a.endsWith("]")?a.slice(1,-1):a,t=(i=(o=r.allowlist)===null||o===void 0?void 0:o.includes(A))!==null&&i!==void 0?i:!1,s;if(LJ(A))s=A,t||bJ(s);else{let g=yield eye.lookup(A,{all:!0});if(g.length===0)throw new Error(`ssrf_blocked: no DNS records for ${A}`);if(!t)for(let c of g)bJ(c.address);s=g[0].address}return{resolvedIp:s,originalHost:A}})}function bJ(n){let r=LJ(n);if(r===4&&ZJ(n))throw new Error(`ssrf_blocked: ${n}`);if(r===6&&tme(n))throw new Error(`ssrf_blocked: ${n}`);if(r===0)throw new Error(`ssrf_blocked: not a valid IP: ${n}`)}function ZJ(n){let r=n.split(".").map(Number);if(r.length!==4||r.some(i=>i<0||i>255))return!0;let o=(r[0]<<24|r[1]<<16|r[2]<<8|r[3])>>>0;return Vye.some(([i,e])=>{let a=e===0?0:-1<<32-e>>>0;return(o&a)===(i&a)})}var Wye=[[BigInt("0xfe800000000000000000000000000000"),10],[BigInt("0xfc000000000000000000000000000000"),7],[BigInt("0xff000000000000000000000000000000"),8],[BigInt("0x01000000000000000000000000000000"),64],[BigInt("0x20010db8000000000000000000000000"),32],[BigInt("0x20010000000000000000000000000000"),32]],Zye=BigInt("0xffffffffffffffffffffffff00000000"),Xye=BigInt("0x00000000000000000000ffff00000000"),$ye=BigInt(0),eme=BigInt("0x0064ff9b000000000000000000000000"),Ame=BigInt("0xffffffff");function tme(n){let r;try{r=rme(n)}catch{return!0}let o=r&Zye;if(o===Xye||o===eme||o===$ye){let i=Number(r&Ame),e=[i>>>24&255,i>>>16&255,i>>>8&255,i&255].join(".");return ZJ(e)}return Wye.some(([i,e])=>{let a=BigInt(128-e),t=(BigInt(1)<>a<!Number.isFinite(g)||g<0||g>255))throw new Error("bad v4 suffix");let t=(A[0]<<8|A[1]).toString(16),s=(A[2]<<8|A[3]).toString(16);r=r.slice(0,r.length-o[1].length)+`${t}:${s}`}let i=r.split("::");if(i.length>2)throw new Error('multiple "::"');let e;if(i.length===2){let A=i[0]?i[0].split(":"):[],t=i[1]?i[1].split(":"):[],s=8-A.length-t.length;if(s<0)throw new Error("too many groups");e=[...A,...Array(s).fill("0"),...t]}else e=r.split(":");if(e.length!==8)throw new Error("wrong group count");let a=BigInt(0);for(let A of e){if(!/^[0-9a-f]{0,4}$/.test(A))throw new Error("bad group");a=a<0&&!(yield Promise.all(t.map(E=>C(this,void 0,void 0,function*(){let B=Eh.resolve(E);try{return yield ZA.promises.realpath(B)}catch{return B}})))).some(E=>g===E||g.startsWith(E+Eh.sep)))throw new St("upload_failed",`file path is outside allowed directories: ${g}`);return yield ZA.promises.readFile(g)}catch(g){throw g instanceof St?g:new St("upload_failed",`source is neither an http(s) URL nor a readable local file: ${r}`,{cause:g})}}let e=(i=this.config)===null||i===void 0?void 0:i.ssrfGuard,a=e!==!1,A;if(a){let t=typeof e=="object"&&e?{allowlist:e.allowlist}:{};try{({resolvedIp:A}=yield zye(r,t))}catch(s){throw new St("ssrf_blocked",`URL blocked: ${String(s)}`,{cause:s})}}try{let t={url:r,method:"GET",responseType:"arraybuffer",timeout:15e3,maxContentLength:MJ,maxBodyLength:MJ};if(A){let g=ime(r,A);t.httpAgent=g,t.httpsAgent=g}let s=yield this.client.httpInstance.request(t);return Buffer.from(s)}catch(t){throw new St("upload_failed","fetch source URL failed",{cause:t})}})}assertNotOnPosixBlocklist(r){if(process.platform!=="win32"&&ame.some(o=>r===o.slice(0,-1)||r.startsWith(o)))throw new St("upload_failed",`file path is not allowed: ${r}`)}resolveDuration(r,o){if(r.duration!=null&&r.duration>0)return r.duration;let i=r.kind==="audio"?Jye(o):r.kind==="video"?qye(o):void 0;if(i!=null)return i;throw new St("upload_failed",`duration could not be determined for ${r.kind}; pass it explicitly`)}uploadImage(r){var o,i;return C(this,void 0,void 0,function*(){try{let e=yield this.client.im.v1.image.create({data:{image_type:"message",image:r}}),a=(o=e?.image_key)!==null&&o!==void 0?o:(i=e?.data)===null||i===void 0?void 0:i.image_key;if(!a)throw new Error("image_key missing in upload response");return{kind:"image",fileKey:a}}catch(e){throw new St("upload_failed","image upload failed",{cause:e})}})}uploadFile(r,o,i,e){var a,A;return C(this,void 0,void 0,function*(){try{let t={file_type:o,file_name:i,file:r};e!=null&&(t.duration=e);let s=yield this.client.im.v1.file.create({data:t}),g=(a=s?.file_key)!==null&&a!==void 0?a:(A=s?.data)===null||A===void 0?void 0:A.file_key;if(!g)throw new Error("file_key missing in upload response");return{kind:o==="opus"?"audio":o==="mp4"?"video":"file",fileKey:g,durationMs:e}}catch(t){throw t instanceof St?t:new St("upload_failed","file upload failed",{cause:t})}})}};function ime(n,r){let o=n.startsWith("https:")?$Qe.Agent:XQe.Agent,i=new o,e=r.includes(":")?6:4,a=(t,s,g)=>{g(null,r,e)},A=i.createConnection.bind(i);return i.createConnection=(t,s)=>A(Object.assign(Object.assign({},t),{lookup:a}),s),i}function XJ(n){var r;if(!n?.length)return"";let o=[];for(let i of n){if(!i.openId)continue;let e=(r=i.name)!==null&&r!==void 0?r:"";o.push(`${e}`)}return o.length>0?o.join(" ")+" ":""}function ome(n,r=1){try{return nme(n,r)}catch{return n}}function nme(n,r){let o="___CB_",i=[],e=n.replace(/(^|\n)(`{3,})([^\n]*)\n[\s\S]*?\n\2(?=\n|$)/g,(A,t="")=>{let s=A.slice(String(t).length);return`${t}${o}${i.push(s)-1}___`});return/^#{1,3} /m.test(n)&&(e=e.replace(/^#{2,6} (.+)$/gm,"##### $1"),e=e.replace(/^# (.+)$/gm,"#### $1")),r>=2?(e=e.replace(/^(#{4,5} .+)\n{1,2}(#{4,5} )/gm,`$1 +\u2014 _(Generation interrupted)_`,jye=3e4,AQ="stream_md";function gN(n,r=Yye){if(!n)return"";let o=n.replace(/\s+/g," ").trim();return o.length<=r?o:o.slice(0,r-1)+"\u2026"}function wJ(n){return{schema:"2.0",config:{streaming_mode:!0,summary:{content:Kye},streaming_config:{print_frequency_ms:{default:70},print_step:{default:1},print_strategy:"fast"}},body:{elements:[{tag:"markdown",element_id:AQ,content:n}]}}}var wT=class{constructor(r,o,i,e){var a,A,t;this.sender=r,this.to=o,this.idType=i,this.opts=e,this.content="",this.fullAccumulated="",this._messageId="",this.cardId="",this.sequence=0,this.queue=new EQ,this.started=!1,this.streamingFailed=!1,this.rolloverMessageIds=[];let s=this.sender.config;this.throttle=new pQ({ms:(a=s.streamThrottleMs)!==null&&a!==void 0?a:Lye,chars:(A=s.streamThrottleChars)!==null&&A!==void 0?A:Uye},()=>this.pushContent()),this.maxChars=(t=s.streamMaxElementChars)!==null&&t!==void 0?t:jye}get messageId(){return this._messageId}append(r){return C(this,void 0,void 0,function*(){if(!r)return;yield this.ensureStarted();let o=Fye(this.fullAccumulated,r),i=o.slice(this.fullAccumulated.length);this.fullAccumulated=o,this.content+=i,this.throttle.note(r.length)})}setContent(r){return C(this,void 0,void 0,function*(){yield this.ensureStarted(),this.fullAccumulated=r??"",this.content=r??"",this.throttle.note(Number.MAX_SAFE_INTEGER)})}run(r){return C(this,void 0,void 0,function*(){yield this.ensureStarted();try{yield r(this)}catch(o){throw yield this.failTerminal(o),o}return yield this.completeTerminal(),{messageId:this._messageId}})}ensureStarted(){var r;return C(this,void 0,void 0,function*(){if(this.started)return;this.started=!0;let o=(r=this.sender.config.streamInitialText)!==null&&r!==void 0?r:Hye,i=wJ(o||"...");this.cardId=yield this.sender.createCardInstance(i),this._messageId=yield this.sender.sendCardByReference(this.to,this.idType,this.cardId,this.opts)})}pushContent(){return C(this,void 0,void 0,function*(){!this.cardId||this.streamingFailed||(yield this.queue.enqueue(()=>C(this,void 0,void 0,function*(){var r,o;if(!this.streamingFailed)try{yield this.pushSnapshot()}catch(i){this.streamingFailed=!0,(o=(r=this.sender.logger).warn)===null||o===void 0||o.call(r,"[stream] update failed",i)}})))})}pushSnapshot(){return C(this,void 0,void 0,function*(){for(;this.content.length>this.maxChars;)yield this.rollover();let r=this.content||"...";yield this.sender.updateCardElementContent(this.cardId,AQ,r,++this.sequence)})}rollover(){return C(this,void 0,void 0,function*(){let r=WJ(this.content,this.maxChars);if(r.length<2)throw new Error("rollover: content not splittable below limit");let o=r[0],i=r.slice(1).join(` +`);yield this.sender.updateCardElementContent(this.cardId,AQ,o,++this.sequence);try{yield this.sender.finishStreamingCard(this.cardId,++this.sequence,gN(o))}catch{}let e=wJ(i||"..."),a=yield this.sender.createCardInstance(e),A=yield this.sender.sendCardByReference(this.to,this.idType,a,this.opts);this.cardId=a,this.content=i,this.sequence=0,this.rolloverMessageIds.push(A)})}completeTerminal(){var r,o;return C(this,void 0,void 0,function*(){if(yield this.throttle.flushNow(),yield this.queue.drain(),!!this.cardId){!this.content&&!this.streamingFailed&&(yield this.queue.enqueue(()=>C(this,void 0,void 0,function*(){try{yield this.sender.updateCardElementContent(this.cardId,AQ,DJ,++this.sequence)}catch{}})),yield this.queue.drain());try{yield this.sender.finishStreamingCard(this.cardId,++this.sequence,gN(this.content||DJ))}catch(i){(o=(r=this.sender.logger).warn)===null||o===void 0||o.call(r,"[stream] finishStreamingCard failed",i)}}})}failTerminal(r){return C(this,void 0,void 0,function*(){if(this.throttle.dispose(),!!this.cardId){this.content=(this.content||"")+xye,yield this.queue.enqueue(()=>C(this,void 0,void 0,function*(){try{yield this.pushSnapshot()}catch{}})),yield this.queue.drain();try{yield this.sender.finishStreamingCard(this.cardId,++this.sequence,gN(this.content))}catch{}}})}},OT=class{constructor(r,o,i,e){this.impl=new wT(r,o,i,e)}run(r){return this.impl.run(r)}},Jye=100,qye=50,bT=class{constructor(r,o,i,e,a){var A,t;this.sender=r,this.to=o,this.idType=i,this.opts=e,this._messageId="",this.queue=new EQ,this._current=a;let s=r.config;this.throttle=new pQ({ms:(A=s.streamThrottleMs)!==null&&A!==void 0?A:Jye,chars:(t=s.streamThrottleChars)!==null&&t!==void 0?t:qye},()=>this.patch())}get messageId(){return this._messageId}get current(){return this._current}update(r){return C(this,void 0,void 0,function*(){let o=typeof r=="function"?r(this._current):r;this._current=o,this.throttle.note(JSON.stringify(o).length)})}run(r){return C(this,void 0,void 0,function*(){yield this.sendInitial();try{yield r(this)}catch(o){throw yield this.failTerminal(o),o}return yield this.completeTerminal(),{messageId:this._messageId}})}sendInitial(){return C(this,void 0,void 0,function*(){let r=yield this.sender.sendOneWithFallback({to:this.to,idType:this.idType,msgType:"interactive",content:this._current,replyTo:this.opts.replyTo,replyInThread:this.opts.replyInThread});this._messageId=r})}patch(){return C(this,void 0,void 0,function*(){if(!this._messageId)return;let r=this._current;yield this.queue.enqueue(()=>C(this,void 0,void 0,function*(){yield this.sender.patchCard(this._messageId,r)}))})}completeTerminal(){return C(this,void 0,void 0,function*(){yield this.throttle.flushNow(),yield this.queue.drain()})}failTerminal(r){return C(this,void 0,void 0,function*(){this.throttle.dispose();let o=Vye(this._current);yield this.queue.enqueue(()=>C(this,void 0,void 0,function*(){try{yield this.sender.patchCard(this._messageId,o)}catch{}})),yield this.queue.drain()})}};function Vye(n){let r=n,o=Array.isArray(r?.elements)?[...r.elements]:[];return o.push({tag:"note",elements:[{tag:"plain_text",content:"\u26A0\uFE0F \u751F\u6210\u4E2D\u65AD"}]}),Object.assign(Object.assign({},n),{elements:o})}var MT=class{constructor(r,o,i,e,a){this.impl=new bT(r,o,i,e,a)}run(r){return this.impl.run(r)}};function zye(n){if(!(!n||n.length<27)){for(let r=n.length-27;r>=0;r--)if(n[r]===79&&n[r+1]===103&&n[r+2]===103&&n[r+3]===83){let o=n.readBigInt64LE(r+6);if(on.length)return;let e=n.readUInt8(i),a=i+4,A,t;if(e===1){if(a+28>n.length)return;A=n.readUInt32BE(a+16),t=Number(n.readBigUInt64BE(a+20))}else{if(a+16>n.length)return;A=n.readUInt32BE(a+8),t=n.readUInt32BE(a+12)}if(!(!A||!Number.isFinite(A)||!Number.isFinite(t)))return Math.round(t/A*1e3)}function OJ(n,r,o,i){let e=r;for(;e+8<=o&&e+8<=n.length;){let a=n.readUInt32BE(e),A=n.slice(e+4,e+8).toString("ascii"),t=a===1?e+Number(n.readBigUInt64BE(e+8)):a===0?o:e+a;if(t<=e||t>o)return;if(A===i)return{start:a===1?e+16:e+8,end:t};e=t}}var Zye=[[0,8],[167772160,8],[2130706432,8],[2851995648,16],[2886729728,12],[3232235520,16],[1681915904,10],[3221225472,24],[3221225984,24],[3323068416,15],[3325256704,24],[3405803776,24],[3758096384,4],[4026531840,4]];function Xye(n,r={}){var o,i;return C(this,void 0,void 0,function*(){let e=new URL(n);if(e.protocol!=="http:"&&e.protocol!=="https:")throw new Error(`ssrf_blocked: protocol ${e.protocol}`);let a=e.hostname,A=a.startsWith("[")&&a.endsWith("]")?a.slice(1,-1):a,t=(i=(o=r.allowlist)===null||o===void 0?void 0:o.includes(A))!==null&&i!==void 0?i:!1,s;if(LJ(A))s=A,t||bJ(s);else{let g=yield rye.lookup(A,{all:!0});if(g.length===0)throw new Error(`ssrf_blocked: no DNS records for ${A}`);if(!t)for(let c of g)bJ(c.address);s=g[0].address}return{resolvedIp:s,originalHost:A}})}function bJ(n){let r=LJ(n);if(r===4&&ZJ(n))throw new Error(`ssrf_blocked: ${n}`);if(r===6&&ime(n))throw new Error(`ssrf_blocked: ${n}`);if(r===0)throw new Error(`ssrf_blocked: not a valid IP: ${n}`)}function ZJ(n){let r=n.split(".").map(Number);if(r.length!==4||r.some(i=>i<0||i>255))return!0;let o=(r[0]<<24|r[1]<<16|r[2]<<8|r[3])>>>0;return Zye.some(([i,e])=>{let a=e===0?0:-1<<32-e>>>0;return(o&a)===(i&a)})}var $ye=[[BigInt("0xfe800000000000000000000000000000"),10],[BigInt("0xfc000000000000000000000000000000"),7],[BigInt("0xff000000000000000000000000000000"),8],[BigInt("0x01000000000000000000000000000000"),64],[BigInt("0x20010db8000000000000000000000000"),32],[BigInt("0x20010000000000000000000000000000"),32]],eme=BigInt("0xffffffffffffffffffffffff00000000"),Ame=BigInt("0x00000000000000000000ffff00000000"),tme=BigInt(0),rme=BigInt("0x0064ff9b000000000000000000000000"),ame=BigInt("0xffffffff");function ime(n){let r;try{r=ome(n)}catch{return!0}let o=r&eme;if(o===Ame||o===rme||o===tme){let i=Number(r&ame),e=[i>>>24&255,i>>>16&255,i>>>8&255,i&255].join(".");return ZJ(e)}return $ye.some(([i,e])=>{let a=BigInt(128-e),t=(BigInt(1)<>a<!Number.isFinite(g)||g<0||g>255))throw new Error("bad v4 suffix");let t=(A[0]<<8|A[1]).toString(16),s=(A[2]<<8|A[3]).toString(16);r=r.slice(0,r.length-o[1].length)+`${t}:${s}`}let i=r.split("::");if(i.length>2)throw new Error('multiple "::"');let e;if(i.length===2){let A=i[0]?i[0].split(":"):[],t=i[1]?i[1].split(":"):[],s=8-A.length-t.length;if(s<0)throw new Error("too many groups");e=[...A,...Array(s).fill("0"),...t]}else e=r.split(":");if(e.length!==8)throw new Error("wrong group count");let a=BigInt(0);for(let A of e){if(!/^[0-9a-f]{0,4}$/.test(A))throw new Error("bad group");a=a<0&&!(yield Promise.all(t.map(E=>C(this,void 0,void 0,function*(){let B=Eh.resolve(E);try{return yield ZA.promises.realpath(B)}catch{return B}})))).some(E=>g===E||g.startsWith(E+Eh.sep)))throw new St("upload_failed",`file path is outside allowed directories: ${g}`);return yield ZA.promises.readFile(g)}catch(g){throw g instanceof St?g:new St("upload_failed",`source is neither an http(s) URL nor a readable local file: ${r}`,{cause:g})}}let e=(i=this.config)===null||i===void 0?void 0:i.ssrfGuard,a=e!==!1,A;if(a){let t=typeof e=="object"&&e?{allowlist:e.allowlist}:{};try{({resolvedIp:A}=yield Xye(r,t))}catch(s){throw new St("ssrf_blocked",`URL blocked: ${String(s)}`,{cause:s})}}try{let t={url:r,method:"GET",responseType:"arraybuffer",timeout:15e3,maxContentLength:MJ,maxBodyLength:MJ};if(A){let g=sme(r,A);t.httpAgent=g,t.httpsAgent=g}let s=yield this.client.httpInstance.request(t);return Buffer.from(s)}catch(t){throw new St("upload_failed","fetch source URL failed",{cause:t})}})}assertNotOnPosixBlocklist(r){if(process.platform!=="win32"&&nme.some(o=>r===o.slice(0,-1)||r.startsWith(o)))throw new St("upload_failed",`file path is not allowed: ${r}`)}resolveDuration(r,o){if(r.duration!=null&&r.duration>0)return r.duration;let i=r.kind==="audio"?zye(o):r.kind==="video"?Wye(o):void 0;if(i!=null)return i;throw new St("upload_failed",`duration could not be determined for ${r.kind}; pass it explicitly`)}uploadImage(r){var o,i;return C(this,void 0,void 0,function*(){try{let e=yield this.client.im.v1.image.create({data:{image_type:"message",image:r}}),a=(o=e?.image_key)!==null&&o!==void 0?o:(i=e?.data)===null||i===void 0?void 0:i.image_key;if(!a)throw new Error("image_key missing in upload response");return{kind:"image",fileKey:a}}catch(e){throw new St("upload_failed","image upload failed",{cause:e})}})}uploadFile(r,o,i,e){var a,A;return C(this,void 0,void 0,function*(){try{let t={file_type:o,file_name:i,file:r};e!=null&&(t.duration=e);let s=yield this.client.im.v1.file.create({data:t}),g=(a=s?.file_key)!==null&&a!==void 0?a:(A=s?.data)===null||A===void 0?void 0:A.file_key;if(!g)throw new Error("file_key missing in upload response");return{kind:o==="opus"?"audio":o==="mp4"?"video":"file",fileKey:g,durationMs:e}}catch(t){throw t instanceof St?t:new St("upload_failed","file upload failed",{cause:t})}})}};function sme(n,r){let o=n.startsWith("https:")?tye.Agent:Aye.Agent,i=new o,e=r.includes(":")?6:4,a=(t,s,g)=>{g(null,r,e)},A=i.createConnection.bind(i);return i.createConnection=(t,s)=>A(Object.assign(Object.assign({},t),{lookup:a}),s),i}function XJ(n){var r;if(!n?.length)return"";let o=[];for(let i of n){if(!i.openId)continue;let e=(r=i.name)!==null&&r!==void 0?r:"";o.push(`${e}`)}return o.length>0?o.join(" ")+" ":""}function gme(n,r=1){try{return cme(n,r)}catch{return n}}function cme(n,r){let o="___CB_",i=[],e=n.replace(/(^|\n)(`{3,})([^\n]*)\n[\s\S]*?\n\2(?=\n|$)/g,(A,t="")=>{let s=A.slice(String(t).length);return`${t}${o}${i.push(s)-1}___`});return/^#{1,3} /m.test(n)&&(e=e.replace(/^#{2,6} (.+)$/gm,"##### $1"),e=e.replace(/^# (.+)$/gm,"#### $1")),r>=2?(e=e.replace(/^(#{4,5} .+)\n{1,2}(#{4,5} )/gm,`$1
$2`),e=e.replace(/^([^|\n].*)\n(\|.+\|)/gm,`$1 @@ -180,80 +180,80 @@ ${A}
`)})):i.forEach((A,t)=>{e=e.replace(`${o}${t}___`,A)}),e=e.replace(/\n{3,}/g,` -`),e}function sme(n,r){var o,i;let e=XJ((o=r?.mentions)!==null&&o!==void 0?o:[]),a=ome(e+n,1);return{zh_cn:{title:(i=r?.title)!==null&&i!==void 0?i:"",content:[[{tag:"md",text:a}]]}}}function gme(n){var r;let o=n?.zh_cn;if(!o?.content)return"";let i=[];for(let e of o.content){if(!Array.isArray(e))continue;let a=[];for(let A of e)switch(A.tag){case"md":case"text":case"a":a.push((r=A.text)!==null&&r!==void 0?r:"");break;case"at":a.push(A.user_name?`@${A.user_name}`:"");break;case"img":a.push(A.image_key?"[image]":"");break}i.push(a.join(""))}return i.join(` -`).trim()}function _J(n){if(!n)throw new Error("empty receive_id");return n.startsWith("oc_")?"chat_id":n.startsWith("ou_")?"open_id":n.startsWith("on_")?"union_id":n.includes("@")?"email":"user_id"}function qT(n,r){if(n instanceof St)return n;let o=cme(n),i=Ime(n);return new St(o,i,{cause:n,context:r})}function cme(n){var r,o,i,e,a,A,t,s;let g=n,c=(o=(r=g?.response)===null||r===void 0?void 0:r.status)!==null&&o!==void 0?o:g?.status,I=(t=(a=(e=(i=g?.response)===null||i===void 0?void 0:i.data)===null||e===void 0?void 0:e.code)!==null&&a!==void 0?a:(A=g?.data)===null||A===void 0?void 0:A.code)!==null&&t!==void 0?t:g?.code,E=String((s=g?.message)!==null&&s!==void 0?s:"").toLowerCase();if(typeof I=="number"){if(I===230020||I===230017)return"target_revoked";if(I===99991400||I===99991401)return"permission_denied";if(I===230002||I===230001)return"format_error"}return c===429?"rate_limited":c===401||c===403?"permission_denied":c===400?"format_error":c===404?"target_revoked":E.startsWith("ssrf_blocked")?"ssrf_blocked":E.includes("timeout")||g?.code==="ETIMEDOUT"||g?.code==="ECONNABORTED"?"send_timeout":"unknown"}function Ime(n){var r,o,i,e;let a=n;return((o=(r=a?.response)===null||r===void 0?void 0:r.data)===null||o===void 0?void 0:o.msg)||((e=(i=a?.response)===null||i===void 0?void 0:i.data)===null||e===void 0?void 0:e.message)||a?.message||String(n)}function lme(n){return n.code==="rate_limited"||n.code==="unknown"}function pme(n){return n.code==="format_error"}function Eme(n){return n.code==="target_revoked"}function Cme(n,r={}){var o,i;return C(this,void 0,void 0,function*(){let e=(o=r.maxAttempts)!==null&&o!==void 0?o:3,a=(i=r.baseDelayMs)!==null&&i!==void 0?i:500,A;for(let t=1;t<=e;t++)try{return yield n(t)}catch(s){let g=qT(s,{attempt:t});if(A=g,t>=e||!lme(g))throw g;let c=a*Math.pow(3,t-1);yield hme(c)}throw A})}function hme(n){return new Promise(r=>setTimeout(r,n))}var dme=3500,NT=class{constructor(r,o,i){var e;this.client=r,this.config=o,this.logger=i,this.uploader=new _T(r,o),this.chunkLimit=(e=o.textChunkLimit)!==null&&e!==void 0?e:dme}send(r,o,i={}){return C(this,void 0,void 0,function*(){let e=_J(r);if("markdown"in o)return this.sendMarkdown(r,e,o.markdown,i);if("text"in o)return this.sendText(r,e,o.text,i);if("post"in o)return this.sendPost(r,e,o.post,i);if("image"in o)return this.sendImage(r,e,o.image,i);if("file"in o)return this.sendFile(r,e,o.file,i);if("audio"in o)return this.sendAudio(r,e,o.audio,i);if("video"in o)return this.sendVideo(r,e,o.video,i);if("card"in o)return this.sendCard(r,e,o.card,i);if("shareChat"in o)return this.sendShareChat(r,e,o.shareChat.chatId,i);if("shareUser"in o)return this.sendShareUser(r,e,o.shareUser.userId,i);if("sticker"in o)return this.sendSticker(r,e,o.sticker.fileKey,i);throw new St("format_error","unrecognized SendInput shape")})}stream(r,o,i={}){return C(this,void 0,void 0,function*(){let e=_J(r);if("markdown"in o)return new OT(this,r,e,i).run(o.markdown);if("card"in o)return new MT(this,r,e,i,o.card.initial).run(o.card.producer);throw new St("format_error","unrecognized StreamInput shape")})}sendMarkdown(r,o,i,e){return C(this,void 0,void 0,function*(){let a=WJ(i,this.chunkLimit),A=[];for(let t=0;tthis.rawSend(r),this.config.retry)})}rawSend(r){var o,i;return C(this,void 0,void 0,function*(){let e={receive_id:r.to,msg_type:r.msgType,content:JSON.stringify(r.content)};if(r.replyTo){let s=(o=(yield this.client.im.v1.message.reply({path:{message_id:r.replyTo},data:{content:e.content,msg_type:r.msgType,reply_in_thread:r.replyInThread}})).data)===null||o===void 0?void 0:o.message_id;if(!s)throw new St("unknown","message_id missing from reply response");return s}let A=(i=(yield this.client.im.v1.message.create({params:{receive_id_type:r.idType},data:e})).data)===null||i===void 0?void 0:i.message_id;if(!A)throw new St("unknown","message_id missing from create response");return A})}patchCard(r,o){return C(this,void 0,void 0,function*(){yield this.client.im.v1.message.patch({path:{message_id:r},data:{content:JSON.stringify(o)}})})}createCardInstance(r){var o;return C(this,void 0,void 0,function*(){let e=(o=(yield this.client.cardkit.v1.card.create({data:{type:"card_json",data:JSON.stringify(r)}})).data)===null||o===void 0?void 0:o.card_id;if(!e)throw new St("unknown","cardkit.card.create returned no card_id");return e})}sendCardByReference(r,o,i,e){return C(this,void 0,void 0,function*(){return this.rawSendWithRetry({to:r,idType:o,msgType:"interactive",content:{type:"card",data:{card_id:i}},replyTo:e.replyTo,replyInThread:e.replyInThread})})}updateCardElementContent(r,o,i,e){return C(this,void 0,void 0,function*(){yield this.client.cardkit.v1.cardElement.content({path:{card_id:r,element_id:o},data:{content:i,sequence:e,uuid:`c_${r}_${e}`}})})}finishStreamingCard(r,o,i){return C(this,void 0,void 0,function*(){let e={streaming_mode:!1};i!==void 0&&(e.summary={content:i}),yield this.client.cardkit.v1.card.settings({path:{card_id:r},data:{settings:JSON.stringify({config:e}),sequence:o,uuid:`s_${r}_${o}`}})})}makeResult(r){return{messageId:r[0],chunkIds:r.length>1?r:void 0}}};function ume(n,r){if(n.length<=r)return[n];let o=[];for(let i=0;i=this.config.maxMessages||this.bufferChars>=this.config.maxChars){this.clearTimer(),this.enqueueFlush();return}if(this.config.delayMs<=0||this.serialOnly){this.clearTimer(),this.enqueueFlush();return}this.clearTimer();let e=this.bufferChars>=this.config.longThresholdChars?this.config.longDelayMs:this.config.delayMs;this.timer=setTimeout(()=>{this.timer=void 0,this.enqueueFlush()},e)}run(r){this.buffer.length>0&&(this.clearTimer(),this.enqueueFlush());let o=this.tail.then(r,r);return this.tail=o.then(()=>{},()=>{}),o}flushNow(){return C(this,void 0,void 0,function*(){this.buffer.length>0&&(this.clearTimer(),this.enqueueFlush()),yield this.tail})}isIdle(){return this.buffer.length===0&&!this.timer}dispose(){this.clearTimer(),this.buffer=[],this.pendingHandler=void 0}clearTimer(){this.timer&&(clearTimeout(this.timer),this.timer=void 0)}enqueueFlush(){if(this.buffer.length===0)return;let r=this.buffer,o=this.pendingHandler;if(this.buffer=[],this.bufferChars=0,this.pendingHandler=void 0,!o)return;let i={message:Bme(r),sourceIds:r.map(A=>A.messageId)},e=()=>o(i),a=this.tail.then(e,e);this.tail=a.then(()=>{},()=>{})}},RT=class{constructor(r){this.config=r,this.pipelines=new Map}push(r,o,i){this.getOrCreate(r,!1).push(o,i)}run(r,o){return this.getOrCreate(r,!0).run(o)}getOrCreate(r,o){let i=this.pipelines.get(r);return i||(i=new TT(this.config,o),this.pipelines.set(r,i)),i}flushAll(){return C(this,void 0,void 0,function*(){yield Promise.all([...this.pipelines.values()].map(r=>r.flushNow()))})}dispose(){return C(this,void 0,void 0,function*(){yield this.flushAll();for(let r of this.pipelines.values())r.dispose();this.pipelines.clear()})}};function Bme(n){if(n.length===1)return n[0];let r=n[n.length-1],o=n.map(a=>a.content).filter(a=>a&&a.length>0).join(` +`),e}function Ime(n,r){var o,i;let e=XJ((o=r?.mentions)!==null&&o!==void 0?o:[]),a=gme(e+n,1);return{zh_cn:{title:(i=r?.title)!==null&&i!==void 0?i:"",content:[[{tag:"md",text:a}]]}}}function lme(n){var r;let o=n?.zh_cn;if(!o?.content)return"";let i=[];for(let e of o.content){if(!Array.isArray(e))continue;let a=[];for(let A of e)switch(A.tag){case"md":case"text":case"a":a.push((r=A.text)!==null&&r!==void 0?r:"");break;case"at":a.push(A.user_name?`@${A.user_name}`:"");break;case"img":a.push(A.image_key?"[image]":"");break}i.push(a.join(""))}return i.join(` +`).trim()}function _J(n){if(!n)throw new Error("empty receive_id");return n.startsWith("oc_")?"chat_id":n.startsWith("ou_")?"open_id":n.startsWith("on_")?"union_id":n.includes("@")?"email":"user_id"}function qT(n,r){if(n instanceof St)return n;let o=pme(n),i=Eme(n);return new St(o,i,{cause:n,context:r})}function pme(n){var r,o,i,e,a,A,t,s;let g=n,c=(o=(r=g?.response)===null||r===void 0?void 0:r.status)!==null&&o!==void 0?o:g?.status,I=(t=(a=(e=(i=g?.response)===null||i===void 0?void 0:i.data)===null||e===void 0?void 0:e.code)!==null&&a!==void 0?a:(A=g?.data)===null||A===void 0?void 0:A.code)!==null&&t!==void 0?t:g?.code,E=String((s=g?.message)!==null&&s!==void 0?s:"").toLowerCase();if(typeof I=="number"){if(I===230020||I===230017)return"target_revoked";if(I===99991400||I===99991401)return"permission_denied";if(I===230002||I===230001)return"format_error"}return c===429?"rate_limited":c===401||c===403?"permission_denied":c===400?"format_error":c===404?"target_revoked":E.startsWith("ssrf_blocked")?"ssrf_blocked":E.includes("timeout")||g?.code==="ETIMEDOUT"||g?.code==="ECONNABORTED"?"send_timeout":"unknown"}function Eme(n){var r,o,i,e;let a=n;return((o=(r=a?.response)===null||r===void 0?void 0:r.data)===null||o===void 0?void 0:o.msg)||((e=(i=a?.response)===null||i===void 0?void 0:i.data)===null||e===void 0?void 0:e.message)||a?.message||String(n)}function Cme(n){return n.code==="rate_limited"||n.code==="unknown"}function hme(n){return n.code==="format_error"}function dme(n){return n.code==="target_revoked"}function ume(n,r={}){var o,i;return C(this,void 0,void 0,function*(){let e=(o=r.maxAttempts)!==null&&o!==void 0?o:3,a=(i=r.baseDelayMs)!==null&&i!==void 0?i:500,A;for(let t=1;t<=e;t++)try{return yield n(t)}catch(s){let g=qT(s,{attempt:t});if(A=g,t>=e||!Cme(g))throw g;let c=a*Math.pow(3,t-1);yield Bme(c)}throw A})}function Bme(n){return new Promise(r=>setTimeout(r,n))}var fme=3500,NT=class{constructor(r,o,i){var e;this.client=r,this.config=o,this.logger=i,this.uploader=new _T(r,o),this.chunkLimit=(e=o.textChunkLimit)!==null&&e!==void 0?e:fme}send(r,o,i={}){return C(this,void 0,void 0,function*(){let e=_J(r);if("markdown"in o)return this.sendMarkdown(r,e,o.markdown,i);if("text"in o)return this.sendText(r,e,o.text,i);if("post"in o)return this.sendPost(r,e,o.post,i);if("image"in o)return this.sendImage(r,e,o.image,i);if("file"in o)return this.sendFile(r,e,o.file,i);if("audio"in o)return this.sendAudio(r,e,o.audio,i);if("video"in o)return this.sendVideo(r,e,o.video,i);if("card"in o)return this.sendCard(r,e,o.card,i);if("shareChat"in o)return this.sendShareChat(r,e,o.shareChat.chatId,i);if("shareUser"in o)return this.sendShareUser(r,e,o.shareUser.userId,i);if("sticker"in o)return this.sendSticker(r,e,o.sticker.fileKey,i);throw new St("format_error","unrecognized SendInput shape")})}stream(r,o,i={}){return C(this,void 0,void 0,function*(){let e=_J(r);if("markdown"in o)return new OT(this,r,e,i).run(o.markdown);if("card"in o)return new MT(this,r,e,i,o.card.initial).run(o.card.producer);throw new St("format_error","unrecognized StreamInput shape")})}sendMarkdown(r,o,i,e){return C(this,void 0,void 0,function*(){let a=WJ(i,this.chunkLimit),A=[];for(let t=0;tthis.rawSend(r),this.config.retry)})}rawSend(r){var o,i;return C(this,void 0,void 0,function*(){let e={receive_id:r.to,msg_type:r.msgType,content:JSON.stringify(r.content)};if(r.replyTo){let s=(o=(yield this.client.im.v1.message.reply({path:{message_id:r.replyTo},data:{content:e.content,msg_type:r.msgType,reply_in_thread:r.replyInThread}})).data)===null||o===void 0?void 0:o.message_id;if(!s)throw new St("unknown","message_id missing from reply response");return s}let A=(i=(yield this.client.im.v1.message.create({params:{receive_id_type:r.idType},data:e})).data)===null||i===void 0?void 0:i.message_id;if(!A)throw new St("unknown","message_id missing from create response");return A})}patchCard(r,o){return C(this,void 0,void 0,function*(){yield this.client.im.v1.message.patch({path:{message_id:r},data:{content:JSON.stringify(o)}})})}createCardInstance(r){var o;return C(this,void 0,void 0,function*(){let e=(o=(yield this.client.cardkit.v1.card.create({data:{type:"card_json",data:JSON.stringify(r)}})).data)===null||o===void 0?void 0:o.card_id;if(!e)throw new St("unknown","cardkit.card.create returned no card_id");return e})}sendCardByReference(r,o,i,e){return C(this,void 0,void 0,function*(){return this.rawSendWithRetry({to:r,idType:o,msgType:"interactive",content:{type:"card",data:{card_id:i}},replyTo:e.replyTo,replyInThread:e.replyInThread})})}updateCardElementContent(r,o,i,e){return C(this,void 0,void 0,function*(){yield this.client.cardkit.v1.cardElement.content({path:{card_id:r,element_id:o},data:{content:i,sequence:e,uuid:`c_${r}_${e}`}})})}finishStreamingCard(r,o,i){return C(this,void 0,void 0,function*(){let e={streaming_mode:!1};i!==void 0&&(e.summary={content:i}),yield this.client.cardkit.v1.card.settings({path:{card_id:r},data:{settings:JSON.stringify({config:e}),sequence:o,uuid:`s_${r}_${o}`}})})}makeResult(r){return{messageId:r[0],chunkIds:r.length>1?r:void 0}}};function Qme(n,r){if(n.length<=r)return[n];let o=[];for(let i=0;i=this.config.maxMessages||this.bufferChars>=this.config.maxChars){this.clearTimer(),this.enqueueFlush();return}if(this.config.delayMs<=0||this.serialOnly){this.clearTimer(),this.enqueueFlush();return}this.clearTimer();let e=this.bufferChars>=this.config.longThresholdChars?this.config.longDelayMs:this.config.delayMs;this.timer=setTimeout(()=>{this.timer=void 0,this.enqueueFlush()},e)}run(r){this.buffer.length>0&&(this.clearTimer(),this.enqueueFlush());let o=this.tail.then(r,r);return this.tail=o.then(()=>{},()=>{}),o}flushNow(){return C(this,void 0,void 0,function*(){this.buffer.length>0&&(this.clearTimer(),this.enqueueFlush()),yield this.tail})}isIdle(){return this.buffer.length===0&&!this.timer}dispose(){this.clearTimer(),this.buffer=[],this.pendingHandler=void 0}clearTimer(){this.timer&&(clearTimeout(this.timer),this.timer=void 0)}enqueueFlush(){if(this.buffer.length===0)return;let r=this.buffer,o=this.pendingHandler;if(this.buffer=[],this.bufferChars=0,this.pendingHandler=void 0,!o)return;let i={message:yme(r),sourceIds:r.map(A=>A.messageId)},e=()=>o(i),a=this.tail.then(e,e);this.tail=a.then(()=>{},()=>{})}},RT=class{constructor(r){this.config=r,this.pipelines=new Map}push(r,o,i){this.getOrCreate(r,!1).push(o,i)}run(r,o){return this.getOrCreate(r,!0).run(o)}getOrCreate(r,o){let i=this.pipelines.get(r);return i||(i=new TT(this.config,o),this.pipelines.set(r,i)),i}flushAll(){return C(this,void 0,void 0,function*(){yield Promise.all([...this.pipelines.values()].map(r=>r.flushNow()))})}dispose(){return C(this,void 0,void 0,function*(){yield this.flushAll();for(let r of this.pipelines.values())r.dispose();this.pipelines.clear()})}};function yme(n){if(n.length===1)return n[0];let r=n[n.length-1],o=n.map(a=>a.content).filter(a=>a&&a.length>0).join(` -`),i=NJ(n.flatMap(a=>a.resources),a=>a.fileKey),e=NJ(n.flatMap(a=>a.mentions),a=>{var A;return(A=a.openId)!==null&&A!==void 0?A:a.key});return Object.assign(Object.assign({},r),{content:o,resources:i,mentions:e,mentionAll:n.some(a=>a.mentionAll),mentionedBot:n.some(a=>a.mentionedBot)})}function NJ(n,r){let o=new Set,i=[];for(let e of n){let a=r(e);if(a==null){i.push(e);continue}o.has(a)||(o.add(a),i.push(e))}return i}var lh={delayMs:600,longThresholdChars:1e3,longDelayMs:2e3,maxMessages:8,maxChars:4e3},eQ={ttl:12*36e5,maxEntries:5e3,sweepIntervalMs:5*6e4,namespace:"channel:seen"},$J=30*6e4,fme=5*6e4;function Qme(n){var r,o,i,e,a,A,t;let s=(o=(r=n?.batch)===null||r===void 0?void 0:r.text)!==null&&o!==void 0?o:{};return{delayMs:(i=s.delayMs)!==null&&i!==void 0?i:lh.delayMs,longThresholdChars:(e=s.longThresholdChars)!==null&&e!==void 0?e:lh.longThresholdChars,longDelayMs:(a=s.longDelayMs)!==null&&a!==void 0?a:lh.longDelayMs,maxMessages:(A=s.maxMessages)!==null&&A!==void 0?A:lh.maxMessages,maxChars:(t=s.maxChars)!==null&&t!==void 0?t:lh.maxChars}}var kT=class{constructor(r,o={}){var i,e,a,A,t,s;this.cache=r,this.memory=new Map,this.ttlMs=(i=o.ttlMs)!==null&&i!==void 0?i:eQ.ttl,this.maxMem=(e=o.maxMemEntries)!==null&&e!==void 0?e:eQ.maxEntries,this.ns=(a=o.namespace)!==null&&a!==void 0?a:eQ.namespace;let g=(A=o.sweepMs)!==null&&A!==void 0?A:eQ.sweepIntervalMs;this.sweeper=setInterval(()=>this.sweep(),g),(s=(t=this.sweeper).unref)===null||s===void 0||s.call(t)}has(r){return C(this,void 0,void 0,function*(){let o=Date.now(),i=this.memory.get(r);return i&&i>o?(this.memory.delete(r),this.memory.set(r,i),!0):(yield this.cache.get(r,{namespace:this.ns}))?(this.memory.set(r,o+this.ttlMs),this.evictIfNeeded(),!0):!1})}add(r){return C(this,void 0,void 0,function*(){let o=Date.now()+this.ttlMs;this.memory.set(r,o),this.evictIfNeeded();try{yield this.cache.set(r,"1",o,{namespace:this.ns})}catch{}})}evictIfNeeded(){for(;this.memory.size>this.maxMem;){let r=this.memory.keys().next().value;if(r===void 0)break;this.memory.delete(r)}}sweep(){let r=Date.now();for(let[o,i]of this.memory)i<=r&&this.memory.delete(o)}dispose(){clearInterval(this.sweeper),this.memory.clear()}},vT=class{constructor(r,o){this.cfg=Object.assign({},r??{}),this.bot=o}evaluate(r){return r.chatType==="group"?this.evaluateGroup(r):this.evaluateDm(r)}evaluateGroup(r){var o,i;let e=this.cfg.groupAllowlist;return e&&e.length>0&&!e.includes(r.chatId)?{allowed:!1,reason:"group_not_allowed"}:((o=this.cfg.requireMention)!==null&&o!==void 0?o:!0)&&!r.mentionedBot?{allowed:!1,reason:"no_mention"}:r.mentionAll&&!((i=this.cfg.respondToMentionAll)!==null&&i!==void 0&&i)?{allowed:!1,reason:"mention_all_blocked"}:{allowed:!0}}evaluateDm(r){var o,i;let e=(o=this.cfg.dmMode)!==null&&o!==void 0?o:"open";return e==="disabled"?{allowed:!1,reason:"dm_disabled"}:e==="allowlist"&&!((i=this.cfg.dmAllowlist)!==null&&i!==void 0?i:[]).includes(r.senderId)?{allowed:!1,reason:"sender_not_allowed"}:{allowed:!0}}updateConfig(r){this.cfg=Object.assign(Object.assign({},this.cfg),r)}getConfig(){return this.cfg}setBotIdentity(r){this.bot=r}getBotIdentity(){return this.bot}},PT=class{constructor(r=fme,o=6e4){var i,e;this.ttlMs=r,this.locks=new Map,this.sweeper=setInterval(()=>this.sweep(),o),(e=(i=this.sweeper).unref)===null||e===void 0||e.call(i)}acquire(r){let o=Date.now(),i=this.locks.get(r);return i&&i>o?!1:(this.locks.set(r,o+this.ttlMs),!0)}release(r){this.locks.delete(r)}sweep(){let r=Date.now();for(let[o,i]of this.locks)i<=r&&this.locks.delete(o)}dispose(){clearInterval(this.sweeper),this.locks.clear()}};function yme(n,r=$J){return!n||!Number.isFinite(n)?!1:Date.now()-n>r}var GT=class{constructor(r){var o,i,e,a,A,t,s,g,c,I,E;this.logger=r.logger,this.onReject=r.onReject,this.onMessage=r.onMessage,this.staleWindow=(i=(o=r.config)===null||o===void 0?void 0:o.staleMessageWindowMs)!==null&&i!==void 0?i:$J,this.queueEnabled=(A=(a=(e=r.config)===null||e===void 0?void 0:e.chatQueue)===null||a===void 0?void 0:a.enabled)!==null&&A!==void 0?A:!0,this.seenCache=new kT(r.cache,{ttlMs:(s=(t=r.config)===null||t===void 0?void 0:t.dedup)===null||s===void 0?void 0:s.ttl,maxMemEntries:(c=(g=r.config)===null||g===void 0?void 0:g.dedup)===null||c===void 0?void 0:c.maxEntries,sweepMs:(E=(I=r.config)===null||I===void 0?void 0:I.dedup)===null||E===void 0?void 0:E.sweepIntervalMs}),this.lock=new PT,this.policy=new vT(r.policy,r.botIdentity),this.manager=new RT(Qme(r.config))}pushMessage(r){var o,i,e,a,A,t,s;return C(this,void 0,void 0,function*(){if(yme(r.createTime,this.staleWindow)){(i=(o=this.logger).debug)===null||i===void 0||i.call(o,`safety: drop stale message ${r.messageId}`);return}if(yield this.seenCache.has(r.messageId)){(a=(e=this.logger).debug)===null||a===void 0||a.call(e,`safety: drop duplicate message ${r.messageId}`);return}let g=this.policy.evaluate(r);if(!g.allowed){this.onReject({messageId:r.messageId,chatId:r.chatId,senderId:r.senderId,reason:(A=g.reason)!==null&&A!==void 0?A:"group_not_allowed"});return}if(!this.lock.acquire(r.messageId)){(s=(t=this.logger).debug)===null||s===void 0||s.call(t,`safety: drop in-flight message ${r.messageId}`);return}let c=I=>C(this,void 0,void 0,function*(){var E,B;try{yield this.onMessage(I.message)}catch(f){(B=(E=this.logger).error)===null||B===void 0||B.call(E,"safety: message handler threw",f)}finally{for(let f of I.sourceIds){try{yield this.seenCache.add(f)}catch{}this.lock.release(f)}}});this.queueEnabled?this.manager.push(r.chatId,r,c):c({message:r,sourceIds:[r.messageId]})})}pushAction(r,o,i){var e,a,A,t;return C(this,void 0,void 0,function*(){if(yield this.seenCache.has(r)){(a=(e=this.logger).debug)===null||a===void 0||a.call(e,`safety: drop duplicate action ${r}`);return}if(!this.lock.acquire(r)){(t=(A=this.logger).debug)===null||t===void 0||t.call(A,`safety: drop in-flight action ${r}`);return}let s=()=>C(this,void 0,void 0,function*(){var g,c;try{yield i()}catch(I){(c=(g=this.logger).error)===null||c===void 0||c.call(g,"safety: action handler threw",I)}finally{try{yield this.seenCache.add(r)}catch{}this.lock.release(r)}});this.queueEnabled?yield this.manager.run(o,s):yield s()})}pushLight(r,o){var i,e;return C(this,void 0,void 0,function*(){if(!(yield this.seenCache.has(r))){yield this.seenCache.add(r);try{yield o()}catch(a){(e=(i=this.logger).warn)===null||e===void 0||e.call(i,"safety: light handler threw",a)}}})}updatePolicy(r){this.policy.updateConfig(r)}getPolicy(){return this.policy.getConfig()}setBotIdentity(r){this.policy.setBotIdentity(r)}dispose(){return C(this,void 0,void 0,function*(){yield this.manager.dispose(),this.seenCache.dispose(),this.lock.dispose()})}};function mme(n){return n.key==="@_all"}function Sme(n,r){var o,i,e;let a=new Map,A=new Map,t=[],s=!1,g=!1;for(let c of n??[]){if(mme(c)){s=!0,a.set(c.key,{key:c.key,name:c.name,isBot:!1});continue}let I=(i=(o=c.id)===null||o===void 0?void 0:o.open_id)!==null&&i!==void 0?i:"",E=(e=c.id)===null||e===void 0?void 0:e.user_id,B=!!(r&&I===r);B&&(g=!0);let f={key:c.key,openId:I||void 0,userId:E,name:c.name,isBot:B};a.set(c.key,f),I&&A.set(I,f),t.push(f)}return{mentions:a,mentionsByOpenId:A,mentionList:t,mentionAll:s,mentionedBot:g}}function Dme(n,r){if(!n||r.mentions.size===0)return n;let o=n;for(let[i,e]of r.mentions){if(e.isBot&&r.stripBotMentions){let A=new RegExp(`\\s?${wme(i)}\\s?`,"g");o=o.replace(A," ");continue}let a=e.name?`@${e.name}`:i;o=o.split(i).join(a)}return o.replace(/[ \t]{2,}/g," ").trim()}function wme(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function mr(n){if(n)try{return JSON.parse(n)}catch{return}}function Ome(n,r){if(!r||r.length===0)return n;let o=n;return r.includes("bold")&&(o=`**${o}**`),r.includes("italic")&&(o=`*${o}*`),r.includes("underline")&&(o=`${o}`),(r.includes("lineThrough")||r.includes("strikethrough"))&&(o=`~~${o}~~`),(r.includes("codeInline")||r.includes("code"))&&(o=`\`${o}\``),o}var bme=["zh_cn","en_us","ja_jp"];function Mme(n){if("title"in n||"content"in n)return n;for(let o of bme){let i=n[o];if(i!=null&&typeof i=="object")return i}let r=Object.keys(n)[0];if(r){let o=n[r];if(o!=null&&typeof o=="object")return o}}function eq(n){if(!(n==null||!Number.isFinite(n)||n<0))return n<1e3?`${Math.round(n)}ms`:n%1e3===0?`${n/1e3}s`:`${(n/1e3).toFixed(1)}s`}function CQ(n){if(n==null)return;let r=typeof n=="string"?parseInt(n,10):n;if(!Number.isFinite(r)||r<=0)return;let o=new Date(r+8*36e5),i=o.getUTCFullYear(),e=String(o.getUTCMonth()+1).padStart(2,"0"),a=String(o.getUTCDate()).padStart(2,"0"),A=String(o.getUTCHours()).padStart(2,"0"),t=String(o.getUTCMinutes()).padStart(2,"0");return`${i}-${e}-${a} ${A}:${t}`}function _me(n){let r=new Date(n+288e5),o=r.getUTCFullYear(),i=String(r.getUTCMonth()+1).padStart(2,"0"),e=String(r.getUTCDate()).padStart(2,"0"),a=String(r.getUTCHours()).padStart(2,"0"),A=String(r.getUTCMinutes()).padStart(2,"0"),t=String(r.getUTCSeconds()).padStart(2,"0");return`${o}-${i}-${e}T${a}:${A}:${t}+08:00`}function Nme(n,r){return n.split(` +`),i=NJ(n.flatMap(a=>a.resources),a=>a.fileKey),e=NJ(n.flatMap(a=>a.mentions),a=>{var A;return(A=a.openId)!==null&&A!==void 0?A:a.key});return Object.assign(Object.assign({},r),{content:o,resources:i,mentions:e,mentionAll:n.some(a=>a.mentionAll),mentionedBot:n.some(a=>a.mentionedBot)})}function NJ(n,r){let o=new Set,i=[];for(let e of n){let a=r(e);if(a==null){i.push(e);continue}o.has(a)||(o.add(a),i.push(e))}return i}var lh={delayMs:600,longThresholdChars:1e3,longDelayMs:2e3,maxMessages:8,maxChars:4e3},eQ={ttl:12*36e5,maxEntries:5e3,sweepIntervalMs:5*6e4,namespace:"channel:seen"},$J=30*6e4,mme=5*6e4;function Sme(n){var r,o,i,e,a,A,t;let s=(o=(r=n?.batch)===null||r===void 0?void 0:r.text)!==null&&o!==void 0?o:{};return{delayMs:(i=s.delayMs)!==null&&i!==void 0?i:lh.delayMs,longThresholdChars:(e=s.longThresholdChars)!==null&&e!==void 0?e:lh.longThresholdChars,longDelayMs:(a=s.longDelayMs)!==null&&a!==void 0?a:lh.longDelayMs,maxMessages:(A=s.maxMessages)!==null&&A!==void 0?A:lh.maxMessages,maxChars:(t=s.maxChars)!==null&&t!==void 0?t:lh.maxChars}}var kT=class{constructor(r,o={}){var i,e,a,A,t,s;this.cache=r,this.memory=new Map,this.ttlMs=(i=o.ttlMs)!==null&&i!==void 0?i:eQ.ttl,this.maxMem=(e=o.maxMemEntries)!==null&&e!==void 0?e:eQ.maxEntries,this.ns=(a=o.namespace)!==null&&a!==void 0?a:eQ.namespace;let g=(A=o.sweepMs)!==null&&A!==void 0?A:eQ.sweepIntervalMs;this.sweeper=setInterval(()=>this.sweep(),g),(s=(t=this.sweeper).unref)===null||s===void 0||s.call(t)}has(r){return C(this,void 0,void 0,function*(){let o=Date.now(),i=this.memory.get(r);return i&&i>o?(this.memory.delete(r),this.memory.set(r,i),!0):(yield this.cache.get(r,{namespace:this.ns}))?(this.memory.set(r,o+this.ttlMs),this.evictIfNeeded(),!0):!1})}add(r){return C(this,void 0,void 0,function*(){let o=Date.now()+this.ttlMs;this.memory.set(r,o),this.evictIfNeeded();try{yield this.cache.set(r,"1",o,{namespace:this.ns})}catch{}})}evictIfNeeded(){for(;this.memory.size>this.maxMem;){let r=this.memory.keys().next().value;if(r===void 0)break;this.memory.delete(r)}}sweep(){let r=Date.now();for(let[o,i]of this.memory)i<=r&&this.memory.delete(o)}dispose(){clearInterval(this.sweeper),this.memory.clear()}},vT=class{constructor(r,o){this.cfg=Object.assign({},r??{}),this.bot=o}evaluate(r){return r.chatType==="group"?this.evaluateGroup(r):this.evaluateDm(r)}evaluateGroup(r){var o,i;let e=this.cfg.groupAllowlist;return e&&e.length>0&&!e.includes(r.chatId)?{allowed:!1,reason:"group_not_allowed"}:((o=this.cfg.requireMention)!==null&&o!==void 0?o:!0)&&!r.mentionedBot?{allowed:!1,reason:"no_mention"}:r.mentionAll&&!((i=this.cfg.respondToMentionAll)!==null&&i!==void 0&&i)?{allowed:!1,reason:"mention_all_blocked"}:{allowed:!0}}evaluateDm(r){var o,i;let e=(o=this.cfg.dmMode)!==null&&o!==void 0?o:"open";return e==="disabled"?{allowed:!1,reason:"dm_disabled"}:e==="allowlist"&&!((i=this.cfg.dmAllowlist)!==null&&i!==void 0?i:[]).includes(r.senderId)?{allowed:!1,reason:"sender_not_allowed"}:{allowed:!0}}updateConfig(r){this.cfg=Object.assign(Object.assign({},this.cfg),r)}getConfig(){return this.cfg}setBotIdentity(r){this.bot=r}getBotIdentity(){return this.bot}},PT=class{constructor(r=mme,o=6e4){var i,e;this.ttlMs=r,this.locks=new Map,this.sweeper=setInterval(()=>this.sweep(),o),(e=(i=this.sweeper).unref)===null||e===void 0||e.call(i)}acquire(r){let o=Date.now(),i=this.locks.get(r);return i&&i>o?!1:(this.locks.set(r,o+this.ttlMs),!0)}release(r){this.locks.delete(r)}sweep(){let r=Date.now();for(let[o,i]of this.locks)i<=r&&this.locks.delete(o)}dispose(){clearInterval(this.sweeper),this.locks.clear()}};function Dme(n,r=$J){return!n||!Number.isFinite(n)?!1:Date.now()-n>r}var GT=class{constructor(r){var o,i,e,a,A,t,s,g,c,I,E;this.logger=r.logger,this.onReject=r.onReject,this.onMessage=r.onMessage,this.staleWindow=(i=(o=r.config)===null||o===void 0?void 0:o.staleMessageWindowMs)!==null&&i!==void 0?i:$J,this.queueEnabled=(A=(a=(e=r.config)===null||e===void 0?void 0:e.chatQueue)===null||a===void 0?void 0:a.enabled)!==null&&A!==void 0?A:!0,this.seenCache=new kT(r.cache,{ttlMs:(s=(t=r.config)===null||t===void 0?void 0:t.dedup)===null||s===void 0?void 0:s.ttl,maxMemEntries:(c=(g=r.config)===null||g===void 0?void 0:g.dedup)===null||c===void 0?void 0:c.maxEntries,sweepMs:(E=(I=r.config)===null||I===void 0?void 0:I.dedup)===null||E===void 0?void 0:E.sweepIntervalMs}),this.lock=new PT,this.policy=new vT(r.policy,r.botIdentity),this.manager=new RT(Sme(r.config))}pushMessage(r){var o,i,e,a,A,t,s;return C(this,void 0,void 0,function*(){if(Dme(r.createTime,this.staleWindow)){(i=(o=this.logger).debug)===null||i===void 0||i.call(o,`safety: drop stale message ${r.messageId}`);return}if(yield this.seenCache.has(r.messageId)){(a=(e=this.logger).debug)===null||a===void 0||a.call(e,`safety: drop duplicate message ${r.messageId}`);return}let g=this.policy.evaluate(r);if(!g.allowed){this.onReject({messageId:r.messageId,chatId:r.chatId,senderId:r.senderId,reason:(A=g.reason)!==null&&A!==void 0?A:"group_not_allowed"});return}if(!this.lock.acquire(r.messageId)){(s=(t=this.logger).debug)===null||s===void 0||s.call(t,`safety: drop in-flight message ${r.messageId}`);return}let c=I=>C(this,void 0,void 0,function*(){var E,B;try{yield this.onMessage(I.message)}catch(f){(B=(E=this.logger).error)===null||B===void 0||B.call(E,"safety: message handler threw",f)}finally{for(let f of I.sourceIds){try{yield this.seenCache.add(f)}catch{}this.lock.release(f)}}});this.queueEnabled?this.manager.push(r.chatId,r,c):c({message:r,sourceIds:[r.messageId]})})}pushAction(r,o,i){var e,a,A,t;return C(this,void 0,void 0,function*(){if(yield this.seenCache.has(r)){(a=(e=this.logger).debug)===null||a===void 0||a.call(e,`safety: drop duplicate action ${r}`);return}if(!this.lock.acquire(r)){(t=(A=this.logger).debug)===null||t===void 0||t.call(A,`safety: drop in-flight action ${r}`);return}let s=()=>C(this,void 0,void 0,function*(){var g,c;try{yield i()}catch(I){(c=(g=this.logger).error)===null||c===void 0||c.call(g,"safety: action handler threw",I)}finally{try{yield this.seenCache.add(r)}catch{}this.lock.release(r)}});this.queueEnabled?yield this.manager.run(o,s):yield s()})}pushLight(r,o){var i,e;return C(this,void 0,void 0,function*(){if(!(yield this.seenCache.has(r))){yield this.seenCache.add(r);try{yield o()}catch(a){(e=(i=this.logger).warn)===null||e===void 0||e.call(i,"safety: light handler threw",a)}}})}updatePolicy(r){this.policy.updateConfig(r)}getPolicy(){return this.policy.getConfig()}setBotIdentity(r){this.policy.setBotIdentity(r)}dispose(){return C(this,void 0,void 0,function*(){yield this.manager.dispose(),this.seenCache.dispose(),this.lock.dispose()})}};function wme(n){return n.key==="@_all"}function Ome(n,r){var o,i,e;let a=new Map,A=new Map,t=[],s=!1,g=!1;for(let c of n??[]){if(wme(c)){s=!0,a.set(c.key,{key:c.key,name:c.name,isBot:!1});continue}let I=(i=(o=c.id)===null||o===void 0?void 0:o.open_id)!==null&&i!==void 0?i:"",E=(e=c.id)===null||e===void 0?void 0:e.user_id,B=!!(r&&I===r);B&&(g=!0);let f={key:c.key,openId:I||void 0,userId:E,name:c.name,isBot:B};a.set(c.key,f),I&&A.set(I,f),t.push(f)}return{mentions:a,mentionsByOpenId:A,mentionList:t,mentionAll:s,mentionedBot:g}}function bme(n,r){if(!n||r.mentions.size===0)return n;let o=n;for(let[i,e]of r.mentions){if(e.isBot&&r.stripBotMentions){let A=new RegExp(`\\s?${Mme(i)}\\s?`,"g");o=o.replace(A," ");continue}let a=e.name?`@${e.name}`:i;o=o.split(i).join(a)}return o.replace(/[ \t]{2,}/g," ").trim()}function Mme(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function mr(n){if(n)try{return JSON.parse(n)}catch{return}}function _me(n,r){if(!r||r.length===0)return n;let o=n;return r.includes("bold")&&(o=`**${o}**`),r.includes("italic")&&(o=`*${o}*`),r.includes("underline")&&(o=`${o}`),(r.includes("lineThrough")||r.includes("strikethrough"))&&(o=`~~${o}~~`),(r.includes("codeInline")||r.includes("code"))&&(o=`\`${o}\``),o}var Nme=["zh_cn","en_us","ja_jp"];function Tme(n){if("title"in n||"content"in n)return n;for(let o of Nme){let i=n[o];if(i!=null&&typeof i=="object")return i}let r=Object.keys(n)[0];if(r){let o=n[r];if(o!=null&&typeof o=="object")return o}}function eq(n){if(!(n==null||!Number.isFinite(n)||n<0))return n<1e3?`${Math.round(n)}ms`:n%1e3===0?`${n/1e3}s`:`${(n/1e3).toFixed(1)}s`}function CQ(n){if(n==null)return;let r=typeof n=="string"?parseInt(n,10):n;if(!Number.isFinite(r)||r<=0)return;let o=new Date(r+8*36e5),i=o.getUTCFullYear(),e=String(o.getUTCMonth()+1).padStart(2,"0"),a=String(o.getUTCDate()).padStart(2,"0"),A=String(o.getUTCHours()).padStart(2,"0"),t=String(o.getUTCMinutes()).padStart(2,"0");return`${i}-${e}-${a} ${A}:${t}`}function Rme(n){let r=new Date(n+288e5),o=r.getUTCFullYear(),i=String(r.getUTCMonth()+1).padStart(2,"0"),e=String(r.getUTCDate()).padStart(2,"0"),a=String(r.getUTCHours()).padStart(2,"0"),A=String(r.getUTCMinutes()).padStart(2,"0"),t=String(r.getUTCSeconds()).padStart(2,"0");return`${o}-${i}-${e}T${a}:${A}:${t}+08:00`}function kme(n,r){return n.split(` `).map(o=>`${r}${o}`).join(` -`)}function yh(n){return n.replace(/"/g,""")}var Tme=(n,r)=>C(void 0,void 0,void 0,function*(){let o=mr(n),i=o?.file_key;if(!i)return{content:"[audio]",resources:[]};let e=o?.duration,a=eq(e),A=a?` duration="${a}"`:"";return{content:`